gpt4 book ai didi

hadoop - 使用 Hcatalog REST 从 HIVe 访问表

转载 作者:可可西里 更新时间:2023-11-01 16:17:21 28 4
gpt4 key购买 nike

我用 CDH4 安装了 Hcatalog(在 Ubuntu 12.04 64 位上),我目前正在尝试 Access Table Information with REST

我重新启动了 webhcat-server service webhcat-server restart。然后我在终端执行了这个,

curl http://localhost:50111/templeton/v1/ddl/database/?user.name=hive

我得到了,

{"databases":["default","testas"]}

符合预期(并且正确)。

我试了几次都得到了相同的输出。

然后我在浏览器中尝试了同样的操作,我得到了,

{"statement":"show databases like '*';","error":"unable to show databases for: *","exec":
{"stdout":"","stderr":"Hive history file=/tmp/hive/hive_job_log_9f5d4411-e8f4-4c7e-a8db-
3bc53a565db8_2034639464.txt\nSLF4J: Class path contains multiple SLF4J bindings.\nSLF4J:
Found binding in [jar:file:/usr/lib/zookeeper/lib/slf4j-log4j12-
1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]\nSLF4J: Found binding in
[jar:file:/usr/lib/hive/lib/slf4j-log4j12-
1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]\nSLF4J: See
http://www.slf4j.org/codes.html#multiple_bindings for an explanation.\n","exitcode":143}}

然后我回到终端并尝试,

curl http://localhost:50111/templeton/v1/ddl/database/?user.name=hive

现在不工作,输出

{"statement":"show databases like '*';","error":"unable to show databases for: *","exec":
{"stdout":"","stderr":"Hive history file=/tmp/hive/hive_job_log_ce3f8d69-35b1-4617-b3a5-
624be0a500cc_268094038.txt\nSLF4J: Class path contains multiple SLF4J bindings.\nSLF4J:
Found binding in [jar:file:/usr/lib/zookeeper/lib/slf4j-log4j12-
1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]\nSLF4J: Found binding in
[jar:file:/usr/lib/hive/lib/slf4j-log4j12-
1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]\nSLF4J: See
http://www.slf4j.org/codes.html#multiple_bindings for an explanation.\nOK\nFAILED: Hive
Internal Error: java.lang.IllegalStateException(Shutdown in progress, cannot add a
shutdownHook)\njava.lang.IllegalStateException: Shutdown in progress, cannot add a
shutdownHook\n\tat
org.apache.hadoop.util.ShutdownHookManager.addShutdownHook(ShutdownHookManager.java:152)\n\t
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2352)\n\tat
org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2324)\n\tat
org.apache.hadoop.fs.FileSystem.get(FileSystem.java:351)\n\tat
org.apache.hadoop.fs.Path.getFileSystem(Path.java:194)\n\tat
org.apache.hadoop.hive.ql.Context.clear(Context.java:381)\n\tat
org.apache.hadoop.hive.ql.Driver.close(Driver.java:1553)\n\tat
org.apache.hcatalog.cli.HCatCli.processCmd(HCatCli.java:276)\n\tat
org.apache.hcatalog.cli.HCatCli.processLine(HCatCli.java:205)\n\tat
org.apache.hcatalog.cli.HCatCli.main(HCatCli.java:164)\n\tat
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n\tat
sun.reflect.D","exitcode":143}}

为什么会这样?

注意:

/etc/hcatalog/proto-hive-site.xml 中,我从现有的 PASSWORD 更改了 javax.jdo.option.ConnectionPassword code> 到 hive 的密码。

我知道有一个 log4j 错误,但我怀疑这与此有什么关系

最佳答案

可能是您的类路径中有许多不同版本的 slf4j jar。这是运行 java 程序时抛出的常见错误。请检查配置单元日志(配置单元历史文件)以获取更多信息。请尝试删除不需要的 jar 版本。

关于hadoop - 使用 Hcatalog REST 从 HIVe 访问表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17484485/

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