I have recently started playing around with hadoop. I went through a bunch of tutorials and docs and installed it on a Centos 6 box. When I tried to start the namenode, it gave me an error informing that my namenode dir is not formatted. Fair enough but whenever I tried to format it, it used to get aborted. I checked all the configs, user, group, permissions and what not. I read and reread the docs to figure out if I am missing anything but no luck. Every time I got the following error:
-bash-4.1$ hadoop namenode -format
12/05/28 07:33:42 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = hadoop1.staging.example.com/10.10.54.143
STARTUP_MSG: args = [-format]
STARTUP_MSG: version = 0.20.2-cdh3u4
STARTUP_MSG: build = file:///data/1/tmp/topdir/BUILD/hadoop-0.20.2-cdh3u4 -r 214dd731e3bdb687cb55988d3f47dd9e248c5690; compil
ed by 'root' on Mon May 7 14:01:59 PDT 2012
************************************************************/
Re-format filesystem in /data/namenode ? (Y or N) y
Format aborted in /data/namenode
12/05/28 07:33:46 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at hadoop1.staging.example.com/10.10.54.143
************************************************************/
There were no logs or messages to analyze. Every things looked in order then what was the issue?
Turned out that when the CLI asked me "
Re-format filesystem in /data/namenode ? (Y or N)
" I was supposed to hit upper case Y and not y. I found this quite bad and un-intuitive on developers' part that they did not implement case-insensitivity or gave out a message about hitting upper case when a lower case was entered. I just hope that this post might save someone some time.