我正在尝试在hadoop2上设置hbase 0.94(分布式设置)。我使用以下命令重新编译了支持hadoop2的hbase mvn -Dhadoop.profile=2.0 -DskipTests install
我将hbase/lib中的所有hadoop-*.jar替换为hadoop2.2中相应的。我仍然无法让hmaster运行
FATAL org.apache.hadoop.hbase.master.HMaster: HBase is having a problem with its Hadoop jars. You may need to recompile HBase against Hadoop version 2.2.0 or change your hadoop jars to start properly
java.lang.NoClassDefFoundError: org/apache/hadoop/hdfs/protocol/FSConstants$SafeModeAction
at org.apache.hadoop.hbase.util.FSUtils.waitOnSafeMode(FSUtils.java:529)
at org.apache.hadoop.hbase.master.MasterFileSystem.checkRootDir(MasterFileSystem.java:333)
at org.apache.hadoop.hbase.master.MasterFileSystem.createInitialFileSystemLayout(MasterFileSystem.java:130)
at org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:115)
at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:514)
at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:376)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hdfs.protocol.FSConstants$SafeModeAction
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 7 more
如何解决?
1条答案
按热度按时间3wabscal1#
这是通过使用maven进行干净的构建来解决的。以下命令起作用