2

我正在 Windows Azure 上建立一个 Hadoop (v1.1.1) 集群。我正在尝试使用以下方法启动名称节点进程:

service hadoop-namenode start

但是,我一直收到以下错误,该错误与 VM 重新启动时被擦除有关。我将此目录移出,因此不会每次都将其删除,但仍然会发生。任何帮助将不胜感激。

STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = master/10.77.42.61
STARTUP_MSG:   args = []
STARTUP_MSG:   version = 1.1.1
STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.1 -r 1411108; compiled by 'hortonfo' on Mon Nov 19 10:44:13 UTC 2012
************************************************************/
2012-12-13 09:38:54,102 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2012-12-13 09:38:54,222 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source MetricsSystem,sub=Stats registered.
2012-12-13 09:38:54,230 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 60 second(s).
2012-12-13 09:38:54,230 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: NameNode metrics system started
2012-12-13 09:38:54,675 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source ugi registered.
2012-12-13 09:38:54,714 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source jvm registered.
2012-12-13 09:38:54,720 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source NameNode registered.
2012-12-13 09:38:54,804 INFO org.apache.hadoop.hdfs.util.GSet: VM type       = 64-bit
2012-12-13 09:38:54,810 INFO org.apache.hadoop.hdfs.util.GSet: 2% max memory = 2.475 MB
2012-12-13 09:38:54,810 INFO org.apache.hadoop.hdfs.util.GSet: capacity      = 2^18 = 262144 entries
2012-12-13 09:38:54,810 INFO org.apache.hadoop.hdfs.util.GSet: recommended=262144, actual=262144
2012-12-13 09:38:54,890 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: fsOwner=hdfs
2012-12-13 09:38:54,895 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: supergroup=supergroup
2012-12-13 09:38:54,895 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: isPermissionEnabled=true
2012-12-13 09:38:54,915 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: dfs.block.invalidate.limit=100
2012-12-13 09:38:54,915 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
2012-12-13 09:38:55,429 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Registered FSNamesystemStateMBean and NameNodeMXBean
2012-12-13 09:38:55,465 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: Caching file names occuring more than 10 times
2012-12-13 09:38:55,471 INFO org.apache.hadoop.hdfs.server.common.Storage: Cannot access storage directory /hadoop/name
2012-12-13 09:38:55,474 ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem initialization failed.
org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /hadoop/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:303)
        at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:100)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:411)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:379)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:277)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:529)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1403)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1412)
2012-12-13 09:38:55,476 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /hadoop/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:303)
        at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:100)
4

1 回答 1

2

将目录的权限(您在 hdfs-site.xml 文件中指定为“dfs.name.dir”属性的值)更改为 755,并将此目录的用户更改为当前用户。顺便说一句,你能做一个成功的格式吗?

于 2012-12-13T10:25:52.027 回答