原文来自于:http://blog.csdn.net/w13770269691/article/details/17353595
今天想使用一下Hive的图形化工具HWI,我的Hive是0.12.0版本。
该版本已经集成了HWI的JAR包,在$HIVE_HOME/lib下的hive-hwi-0.12.0.war。
配置文件也使用默认的即可,
hive-site.xml中默认的配置如下:
<property>
<name>hive.hwi.listen.host</name>
<value>0.0.0.0</value>
<description>This is the host address the Hive Web Interface will listen on</description>
</property>
<property>
<name>hive.hwi.listen.port</name>
<value>9999</value>
<description>This is the port the Hive Web Interface will listen on</description>
</property>
<property>
<name>hive.hwi.war.file</name>
<value>/usr/lib/hive/lib/hive_hwi.war</value>
<description>This is the WAR file with the jsp content for Hive Web Interface</description>
</property>
现在要做的就是添加apache ant的编译工具,不安装则会报错
Problem accessing /hwi/. Reason:
No Java compiler available
安装方法不做介绍了,网上很多。
安装完后需要设置path:
设置ANT_LIB路径
export ANT_LIB=/usr/lib/apache-ant-1.9.0/lib
,但是这个方法不好使,需要把
- ant-launcher.jar
- ant.jar
这两个jar包拷贝到$HIVE_HOME/lib下,才能使用。
异常:
Caused by:
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/opt/jdk/jre"
cp opt/jdk/tools.jar /home/hadoop/hive/lib/
后台运行hwi:
$ nohup /home/work/hive/hive-0.8.1/bin/hive --service hwi &
参考 资料:http://blog.csdn.net/gpcuster/article/details/5327743
http://blog.csdn.net/forever_feng/article/details/9070141
http://blog.csdn.net/aaa1117a8w5s6d/article/details/16981501
http://blog.csdn.net/yfkiss/article/details/7837739
http://www.cnblogs.com/gpcuster/archive/2010/02/25/1673480.html
转:搭建Hive的图形界面