HIVE HWI 搭建过程

众所周知,Hive有三种使用方式:CLI、HWI浏览器、Thrift客户端。安装配置完Hive后无需进行额外操作即可使用CLI。但是HWI则需要单独搭建。

[dangerbox title=”搭建HWI过程”]

[warningbox title=”前置需求”]

安装ANT并配置环境变量(注意版本)

https://www.apache.org/dist/ant/binaries/

[/warningbox]

[warningbox title=”①下载源代码”]

下载源代码,根据自己的hive版本下载http://archive.apache.org/dist/hive/apache-hive-1.2.1-src.tar.gz

镜像站 https://mirrors.huaweicloud.com/apache/hive/

[/warningbox]

[warningbox title=”②解压打包”]

解压后将./hwi/web/ 目录打包成 hive-hwi-**.war 放入放到hive/lib目录下
jar cvfM0 hive-hwi-1.2.2.war -C web/

[/warningbox]

[warningbox title=”③更改配置文件hive-site.xml”]

<!-- HWI -->
<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>lib/hive-hwi-1.2.2.war</value>
<description>This is the WAR file with the jsp content forHive Web Interface</description>
</property>
<!-- HWI -->

[/warningbox]

[warningbox title=”启动HWI”]

hive --service hwi

发现报错

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

出错原因:hive/lib下没有tools.jar所致。把JAVA安装目录下的tools.jar包复制到hive/lib

cp ${JAVA_HOME}/lib/tools.jar ${HIVE_HOME}/lib

再次启动

hive --service hwi &

访问 IP:9999/hwi

搭建完成

[/warningbox]

 

[/dangerbox]


已发布

分类

, ,

作者:

评论

《“HIVE HWI 搭建过程”》 有 2 条评论

  1. viagra

    WALCOME

  2. viagra

    WALCOME

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注