将jar复制到/home/hadoop/lib emr时出错

tzcvj98z  于 2021-06-04  发布在  Hadoop
关注(0)|答案(1)|浏览(314)

我正在将我的外部jar复制到 /home/hadoop/lib 董事 emr 作为一个 bootstrap 过程。但它在引导过程中显示了以下错误

Exception in thread "main" java.lang.IncompatibleClassChangeError: class com.google.common.cache.CacheBuilder$3 has interface com.google.common.base.Ticker as super class
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    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:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at com.google.common.cache.CacheBuilder.<clinit>(CacheBuilder.java:207)
    at org.apache.hadoop.security.ShellBasedUnixGroupsMapping.<clinit>(ShellBasedUnixGroupsMapping.java:46)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:861)
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:906)
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:932)
    at org.apache.hadoop.security.Groups.<init>(Groups.java:48)
    at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:140)
    at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:205)
    at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:184)
    at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:236)
    at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:477)
    at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:463)
    at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:1521)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1422)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:256)
    at com.amazon.elasticmapreduce.scriptrunner.ScriptRunner.fetchFile(ScriptRunner.java:39)
    at com.amazon.elasticmapreduce.scriptrunner.ScriptRunner.main(ScriptRunner.java:56)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:187)

有人能帮我解释一下为什么会这样吗?

ui7jx7zq

ui7jx7zq1#

我找到了答案。问题是mahout0.7使用的是较旧版本的guava。我用0.8替换了mahout的0.7,结果成功了。

相关问题