Exception in thread “main“ java.lang.NoClassDefFoundError: org/apache/tez/dag/api/TezConfiguration

报错内容

Logging initialized using configuration in file:/usr/bigtop/3.2.0/etc/hive/conf.dist/hive-log4j2.properties Async: true
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Previous writer likely failed to write hdfs://hadoop0001:8020/tmp/hive/hive/_tez_session_dir/620ac4b7-02a8-4e4f-a057-e1a409ba4ad4-resources/hcatalog-core.jar. Failing because I am unlikely to write too.
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:683)
        at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:591)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:747)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: java.io.IOException: Previous writer likely failed to write hdfs://hadoop0001:8020/tmp/hive/hive/_tez_session_dir/620ac4b7-02a8-4e4f-a057-e1a409ba4ad4-resources/hcatalog-core.jar. Failing because I am unlikely to write too.
        at org.apache.hadoop.hive.ql.exec.tez.DagUtils.localizeResource(DagUtils.java:1191)
        at org.apache.hadoop.hive.ql.exec.tez.DagUtils.addTempResources(DagUtils.java:1042)
        at org.apache.hadoop.hive.ql.exec.tez.DagUtils.localizeTempFilesFromConf(DagUtils.java:931)
        at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.ensureLocalResources(TezSessionState.java:610)
        at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.openInternal(TezSessionState.java:287)
        at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.beginOpen(TezSessionState.java:256)
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:680)
        ... 9 more

文件目录权限已经设置过的

hdfs dfs -chmod -R 777 /tmp/hive

查询了好多解决方案,主要来自 ambari-9821, 15年的问题了,距离现在8年了, 现在的代码早已更新

而且最新的代码已经更新脚本 HIVE_AUX_JARS_PATH

[AMBARI-9821] Need to update HIVE_AUX_JARS_PATH in hive-env.sh - ASF JIRA

然后看到 16398这条问题

[HIVE-16398] [Hive on Tez] Jar Localization issues - ASF JIRA

1) If a jar is already present in the classpath and is added again via aux.jars or using add jar command by the user.
2) If the jar is missing- Ideally it should ignore or either throw a error/warning stating jar not found.
3) When a "*" is present in some of the classpath entries, it will try to replicate the same * path on hdfs and fails.

通过第3条*号这个提醒, 检查了一下文件是否存在

export HIVE_AUX_JARS_PATH=${HIVE_AUX_JARS_PATH}
  export HIVE_AUX_JARS_PATH=/usr/bigtop/current/hive-webhcat/share/hcatalog/hive-hcatalog-core-*.jar
  export HIVE_AUX_JARS_PATH=/usr/bigtop/current/hive-webhcat/share/hcatalog/hcatalog-core.jar 

发现ls: cannot access /usr/bigtop/current/hive-webhcat/: No such file or directory

说明这个目录不存在, 从其它服务器copy这个目录到当前执行的客户机, 解决了问题. 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值