在hadoop 2.5.2上格式化namenode,centos 6.4\u 64位错误

stszievb  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(405)

请帮我解决错误:
我在运行命令hdfs namenode时使用了apache hadoop 2.5.2-格式错误如下:

STARTUP_MSG:   build = https://git-wip-us.apache.org/repos  /asf/hadoop.git -r cc72e9b000545b86b75a61f4835eb86d57bfafc0; compiled by 'jenkins' on 2014-11-14T23:45Z
STARTUP_MSG:   java = 1.7.0_79

************************************************************/

15/05/22 17:19:24 INFO namenode.NameNode: registered UNIX signal    handlers for [TERM, HUP, INT]
15/05/22 17:19:24 INFO namenode.NameNode: createNameNode [-format]
15/05/22 17:19:24 FATAL namenode.NameNode: Exception in namenode join
java.lang.NoClassDefFoundError: org/apache/commons/configuration/Configuration
    at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.<init>(DefaultMetricsSystem.java:38)
    at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.<clinit>(DefaultMetricsSystem.java:36)
    at org.apache.hadoop.security.UserGroupInformation$UgiMetrics.create(UserGroupInformation.java:108)
    at org.apache.hadoop.security.UserGroupInformation.<clinit>(UserGroupInformation.java:210)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:895)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1354)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1473)
Caused by: java.lang.ClassNotFoundException:    org.apache.commons.configuration.Configuration
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 7 more
 15/05/22 17:19:24 INFO util.ExitUtil: Exiting with status 1
 15/05/22 17:19:24 INFO namenode.NameNode: SHUTDOWN_MSG:
 /************************************************************
 SHUTDOWN_MSG: Shutting down NameNode at localhost/127.0.0.1

************************************************************/

提前谢谢!

mtb9vblg

mtb9vblg1#

你不是第一个提到这个问题的人。
这是因为 hadoop-common-*.jar 必须包含在 org.apache.commons.configuration.Configuration 班级。请参考我粘贴的链接,thx,将jar作为依赖项。

相关问题