core-site.xml配置项:hadoop.tmp.dir

hadoop.tmp.dir:A base for other temporary directories.

集群运行后,修改该配置项后,发现类似错误:

-- ::, INFO org.apache.hadoop.hdfs.server.common.Storage: Storage directory /tmp/hadoop-grid/dfs/name does not exist.
-- ::, ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem initialization failed.
org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /tmp/hadoop-grid/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:)
-- ::, INFO org.apache.hadoop.ipc.Server: Stopping server on

Hadoop无法找到dfs/name 这个dfs文件系统的域名空间文件。

重新配置了hadoop.tmp.dir 目录,必须重新格式hdfs。

hadoop namenode -format -cluster ns1
上一篇:转:10分钟了解JS堆、栈以及事件循环的概念


下一篇:Actioncontext之类的map嵌套,取值