gpt4 book ai didi

java - bin/hive 给出错误问题

转载 作者:行者123 更新时间:2023-11-29 08:01:07 25 4
gpt4 key购买 nike

我已经使用 source 和 run ant 包安装了配置单元。

根据 cwiki.apache.org 文档,我还添加了 PATH 变量,即 $HIVE_HOME$PATH 但从基本目录(bin/hive 或 hive)运行命令

它给出了以下错误。我已添加补丁 (HIVE-3606.1.patch) 来解决它,但它仍然无法正常工作。

添加补丁的命令:

hive-0.10.0-bin]$ patch -p0 < ~/Downloads/HIVE-3606.1.patch

运行 Hive:

hive-0.10.0-bin]$ bin/hive

Exception in thread "main" java.lang.NoSuchFieldError: ALLOW_UNQUOTED_CONTROL_CHARS
at org.apache.hadoop.hive.ql.udf.generic.GenericUDTFJSONTuple.<clinit>(GenericUDTFJSONTuple.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:113)
at org.apache.hadoop.hive.ql.exec.FunctionRegistry.registerGenericUDTF(FunctionRegistry.java:545)
at org.apache.hadoop.hive.ql.exec.FunctionRegistry.registerGenericUDTF(FunctionRegistry.java:539)
at org.apache.hadoop.hive.ql.exec.FunctionRegistry.<clinit>(FunctionRegistry.java:472)
at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:202)
at org.apache.hadoop.hive.cli.CliSessionState.<init>(CliSessionState.java:86)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:635)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

有人可以帮忙吗?

最佳答案

这很可能是因为您的 Hadoop 使用与 Hive 不同(较旧)的 Jackson 库版本。作为快速解决方法,您可以替换 $HADOOP_HOME/lib 中的 jackson-core-asl-X-X-X.jarjackson-mapper-asl-X.X.X.jar > 较新的在 $HIVE_HOME/lib

关于java - bin/hive 给出错误问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14378843/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com