Problems in formatting NAMENODE - Installing MAC machine


7 Answer(s)


Hi,

Appreciate the steps you have taken to resolve the issue.
Mostly this error comes due to insufficient permissions however 777 on all directories should resolve all permission issue.
Suggest you to change the value for property "hadoop.tmp.dir" to "/tmp/namenode/current" and then re-try the same command.
Note: If this also don't work, use command: "sudo hadoop namenode -format".

Post if nothing works.

hey , this helped. -- thanks a lot
But was wondering wht happens behind the scenes with this property and how hadoop uses this for creating the tmp directory.
Just trying to understand why it was erroring out earlier..

Also please explain - once the formatting is done , will there be any directory created ? and where ?
for example below is the message that i got after formatting.
Storage directory /tmp/namenode/current/dfs/name has been successfully formatted.

Where will this directory be created , is it from the place i run “hadoop namenode -format”
Or is it from Hadoop home folder ? or something else ?

Hi,

You are welcome.
This property specify the top level directory for hadoop's other directories such as
1. dfs.name.dir: directory where namenode stores its metadata, with default value ${hadoop.tmp.dir}/dfs/name.
2. dfs.data.dir: directory where HDFS data blocks are stored, with default value ${hadoop.tmp.dir}/dfs/data.
3. fs.checkpoint.dir: directory where secondary namenode store its checkpoints, default value is ${hadoop.tmp.dir}/dfs/namesecondary.

Yes, this is created under local filesystem and you can do a ls to see the directories.
This location starts with / hence is at root level.
If you want to check, try following command:
1. ls -l /tmp/namenode/current/
2. sudo ls -l /tmp/namenode/current/

Hi,
Thanks for explaining this.
One final question in the same area.

When i am creating directories by using the command
hadoop fs -mkdir testdir
the location of this directory has been “/user/priyasagiraju/testdir” -- > Howz “/user/priyasagiraju/“ getting created in the file system of hadoop ?

NOTE: priyasagiraju is the admin username of my machine on which hadoop is installed.


in Class as Ubuntu was used.

when hadoop fs -mkdir test dir ran.
It created a directory in “/user/hadoop/testdir”


PLEASE explain or clarify.

Hi,

This is the value of your present working directory from where you are running your hadoop fs command.
You can check the value using command : 'pwd'

Hope this helps.

happy Learning @ Dezyre !!

null

Hi,
changing the value for property "hadoop.tmp.dir" to "/tmp/namenode/current" has fixed my problem perfectly.

Thank you so much.