本文介绍了HDFS namenood格式化出错"找不到主类:namenood"。 code附的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如下图所示我得到的错误,而在格式化的Namenode,
i am getting error while formating Namenode as shown below,
[hadoop@localhost ~]$ /home/hadoop/project/hadoop-1.0.4/bin/hadoop namenood -format
Exception in thread "main" java.lang.NoClassDefFoundError: namenood
Caused by: java.lang.ClassNotFoundException: namenood
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: namenood. Program will exit.
[hadoop@localhost ~]$
EDIT:
[hadoop@localhost ~]$ /home/hadoop/project/hadoop-1.0.4/bin/hadoop namenode -format
13/02/13 11:23:47 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 = 1.0.4
STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.0 -r 1393290; compiled by 'hortonfo' on Wed Oct 3 05:13:58 UTC 2012
************************************************************/
13/02/13 11:23:47 INFO util.GSet: VM type = 32-bit
13/02/13 11:23:47 INFO util.GSet: 2% max memory = 19.33375 MB
13/02/13 11:23:47 INFO util.GSet: capacity = 2^22 = 4194304 entries
13/02/13 11:23:47 INFO util.GSet: recommended=4194304, actual=4194304
13/02/13 11:23:48 INFO namenode.FSNamesystem: fsOwner=hadoop
13/02/13 11:23:48 INFO namenode.FSNamesystem: supergroup=supergroup
13/02/13 11:23:48 INFO namenode.FSNamesystem: isPermissionEnabled=true
13/02/13 11:23:48 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100
13/02/13 11:23:48 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
13/02/13 11:23:48 INFO namenode.NameNode: Caching file names occuring more than 10 times
13/02/13 11:23:49 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:297)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1320)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1339)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1164)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1271)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1288)
13/02/13 11:23:49 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at localhost.localdomain/127.0.0.1
************************************************************/
的建议希望
推荐答案
我记得应该是
/home/hadoop/project/hadoop-1.0.4/bin/hadoop namenode -format
这篇关于HDFS namenood格式化出错"找不到主类:namenood"。 code附的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!