错误:$ hadoop namenode -format

时间:2014-05-10 16:26:40

标签: hadoop mapreduce hdfs dfs

当我运行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
************************************************************/

1 个答案:

答案 0 :(得分:0)

您可以检查一下namenode正在运行,或者如果它没有运行,您需要运行一次。它需要在/ app中创建dir它需要权限。输入以下命令:

sudo mkdir / app

sudo chown $ USER / app

hadoop namenode -format

然后启动所有节点并在几分钟后检查。它将运行所有节点..................