原文地址:http://hi.baidu.com/leibin_neu/item/467e2213104821483a176e12
一下是错误信息:
[root@localhost conf]# hadoop namenode -format
12/07/11 21:48:35 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = localhost.localdomain/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 /home/termite/Hadoop_HDFS_tmp/dfs/name ? (Y or N) y
Format aborted in /home/termite/Hadoop_HDFS_tmp/dfs/name
12/07/11 21:48:37 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at localhost.localdomain/127.0.0.1
************************************************************/
解决方法如下:
在conf目录下的core-site.xml里查看tmp的目录,然后进入tmp目录,删除dfs目录下的name文件夹,之后重新格式化即可。
[root@localhost termite]# hadoop namenode -format
12/07/11 22:03:52 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = localhost.localdomain/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
************************************************************/
12/07/11 22:03:52 INFO namenode.FSNamesystem: fsOwner=root,root,bin,daemon,sys,adm,disk,wheel
12/07/11 22:03:52 INFO namenode.FSNamesystem: supergroup=supergroup
12/07/11 22:03:52 INFO namenode.FSNamesystem: isPermissionEnabled=true
12/07/11 22:03:53 INFO common.Storage: Image file of size 94 saved in 0 seconds.
12/07/11 22:03:53 INFO common.Storage: Storage directory /home/termite/Hadoop_HDFS_tmp/dfs/name has been successfully formatted.
12/07/11 22:03:53 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at localhost.localdomain/127.0.0.1
************************************************************/