当我运行hadoop namenode -format
命令时,我得到以下错误:
14/05/10 09:51:36 INFO namenode.NameNode: Caching file names occuring more than 10 times
14/05/10 09:51:36 ERROR namenode.NameNode: java.io.IOException: Cannot create directory /app/hadoop/tmp/dfs/name/current
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:294)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1337)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1356)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1261)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1467)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1488)
14/05/10 09:51:36 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at chirag/127.0.1.1
************************************************************/
您可以检查一下namenode是否正在运行,或者如果它没有运行,您需要运行一次。它需要在/app中创建dir,它需要权限。输入下面的命令:
mkdir/app
sudo chown $USER/app
hadoop namenode -format
启动所有节点,几分钟后检查。它将运行所有节点..................