Hadoop 使用Hcatalog REST从配置单元访问表

Hadoop 使用Hcatalog REST从配置单元访问表,hadoop,hive,cloudera,hcatalog,Hadoop,Hive,Cloudera,Hcatalog,我在Ubuntu12.04 64位上安装了带有CDH4的Hcatalog,目前我正在尝试 我重新启动了webhcat服务器服务webhcat服务器重新启动。 然后我在终点站做了这个 curl http://localhost:50111/templeton/v1/ddl/database/?user.name=hive 我得到了 {"statement":"show databases like '*';","error":"unable to show databases for: *","

我在Ubuntu12.04 64位上安装了带有CDH4的Hcatalog,目前我正在尝试

我重新启动了webhcat服务器服务webhcat服务器重新启动。 然后我在终点站做了这个

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_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}}
{数据库:[默认,测试]}

正如预期和正确的

我试了几次,得到了同样的结果

然后我在浏览器中尝试了同样的方法

{"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中,我将javax.jdo.option.ConnectionPassword从预先存在的密码更改为hive的密码


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

可能是因为您的类路径中有许多版本不同的slf4j jar。这是运行java程序时引发的常见错误。有关详细信息,请检查配置单元日志配置单元历史文件。请尝试删除不必要的JAR版本。

您好,VusP,我也面临同样的问题,您有没有找到解决方案?@MukeshS Nothing当前没有。从那以后我再也没有尝试过。当我再试一次时,我会把它贴在这里。