我尝试在单节点Hadoop安装上安装配置单元。我正在运行Mint 16.我已经尝试安装Hive 0.12.0和0.13.0。我已将HIVE_HOME,HIVE_HOME / bin和HIVE_HOME / lib(以及没有lib)添加到我的路径中。每次我从终端运行配置单元时,我都会得到以下堆栈
Exception in thread "main" java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:120)
at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:115)
at org.apache.hadoop.hive.shims.ShimLoader.getHadoopShims(ShimLoader.java:80)
at org.apache.hadoop.hive.conf.HiveConf$ConfVars.<clinit>(HiveConf.java:248)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:641)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
我还试图从源代码编译配置单元,但maven在测试中失败了。还有其他人找到了解决方案吗?
编辑: 我没有在VM中运行它。我在我的系统上构建了安装程序,因此我在google上看到了一些建议删除CDH等旧版旧库的内容。
运行Oracle Java 1.8
$ hadoop version
Hadoop 2.4.0
Subversion http://svn.apache.org/repos/asf/hadoop/common -r 1583262
Compiled by jenkins on 2014-03-31T08:29Z
Compiled with protoc 2.5.0
From source with checksum 375b2832a6641759c6eaf6e3e998147
This command was run using /opt/hadoop-2.4.0/share/hadoop/common/hadoop-common-2.4.0.jar
当我尝试编译配置单元时:
testConfProperties(org.apache.hadoop.hive.conf.TestHiveConf) Time elapsed: 0.331 sec <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<null>
at org.junit.Assert.fail(Assert.java:93)
at org.junit.Assert.failNotEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:128)
at org.junit.Assert.assertEquals(Assert.java:147)
at org.apache.hadoop.hive.conf.TestHiveConf.checkHadoopConf(TestHiveConf.java:42)
at org.apache.hadoop.hive.conf.TestHiveConf.testConfProperties(TestHiveConf.java:64)
答案 0 :(得分:0)
看起来我有几个问题。我必须使用maven 3.0.5构建。然后我不得不在构建过程中跳过测试。最后,我有决斗罐,不得不删除
/opt/hadoop-2.4.0/share/hadoop/mapreduce/hadoop-core-0.20.2-cdh3u1.jar
/opt/hadoop-2.4.0/share/hadoop/tools/lib/hadoop-core-0.20.2-cdh3u1.jar