[[Email protected] bin] #./hadoop namenode-format
12/05/21 06:13:51 info namenode. namenode: startup_msg:
/*************************************** *********************
Startup_msg: Starting namenode
Startup_msg: host = nn01/127.0.0.1
Startup_msg: ARGs = [-format]
Startup_msg: version = 0.20.2
Startup_msg: Build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-r 911707; compiled by 'chrisdo 'on Fri Feb 19 08:07:34 UTC 2010
**************************************** ********************/
Re-format filesystem in/tmp/hadoop-root/dfs/name? (Y or N) y
12/05/21 06:14:01 info namenode. fsnamesystem: fsowner = root, root, bin, daemon, sys, ADM, disk, wheel
12/05/21 06:14:01 info namenode. fsnamesystem: supergroup = supergroup
12/05/21 06:14:01 info namenode. fsnamesystem: ispermissionenabled = true
12/05/21 06:14:01 info common. Storage: cannot lock storage/tmp/hadoop-root/dfs/name. The directory is already locked.
12/05/21 06:14:01 error namenode. namenode: Java. Io. ioexception: cannot lock storage/tmp/hadoop-root/dfs/name. The directory is already locked.
At org. Apache. hadoop. HDFS. server. Common. Storage $ storagedirectory. Lock (storage. Java: 510)
At org. Apache. hadoop. HDFS. server. namenode. fsimage. Format (fsimage. Java: 1087)
At org. Apache. hadoop. HDFS. server. namenode. fsimage. Format (fsimage. Java: 1110)
At org. Apache. hadoop. HDFS. server. namenode. namenode. Format (namenode. Java: 856)
At org. Apache. hadoop. HDFS. server. namenode. namenode. createnamenode (namenode. Java: 948)
At org. Apache. hadoop. HDFS. server. namenode. namenode. Main (namenode. Java: 965)
12/05/21 06:14:01 info namenode. namenode: shutdown_msg:
/*************************************** *********************
Shutdown_msg: Shutting Down namenode at nn01/127.0.0.1
./The hadoop namenode-format command is used to format the namespace. It must be executed before the hadoop service is started. The error message is displayed because the hadoop service is in the sub-running status.