0
我正在嘗試使用Hive並使用'use db'命令切換數據庫。我的設置是Hadoop 2.4.0和Hive 0.13.1。我添加以下3個屬性的.settings文件由於缺少jar而無法配置hive.exec鉤子
set hive.exec.failure.hooks=org.apache.hadoop.hive.ql.hooks.ATSHook;
set hive.exec.post.hooks=org.apache.hadoop.hive.ql.hooks.ATSHook;
set hive.exec.pre.hooks=org.apache.hadoop.hive.ql.hooks.ATSHook;
我再打開蜂箱命令行,傳遞.settings通過「蜂巢-i my.settings」文件,然後我得到:
hive> use db;
hive.exec.pre.hooks Class not found:org.apache.hadoop.hive.ql.hooks.ATSHook
FAILED: Hive Internal Error: java.lang.ClassNotFoundException(org.apache.hadoop.hive.ql.hooks.ATSHook)
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
似乎在我的類路徑中缺少一個jar。我試圖在網上搜索一個包含「org.apache.hadoop.hive.ql.hooks.ATSHook」類的jar,但沒有運氣。我嘗試添加所有帶有罐子的路徑,從HIVE_HOME到yarn-site.xml:
<property>
<name>yarn.application.classpath</name>
<value>
...
/apps/hive/hive-0.13.1/hcatalog/share/hcatalog/*,
/apps/hive/hive-0.13.1/hcatalog/share/hcatalog/storage-handlers/hbase/lib/*,
/apps/hive/hive-0.13.1/hcatalog/share/webhcat/java-client/*,
/apps/hive/hive-0.13.1/hcatalog/share/webhcat/svr/lib/*,
/apps/hive/hive-0.13.1/lib/*
</value>
</property>
仍然沒有運氣。有誰知道是否有一些額外的步驟,我需要做配置這些屬性?