TeRiTeRi

  1. 首页
  2. 大数据
  3. Hive
  4. 正文

HIVE HWI 搭建过程

2019年11月22日 1817点热度 0人点赞 2条评论

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

搭建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]

 

标签: centos Hadoop Hive HIVE-HWI Java linux
最后更新:2019年11月22日

kamisamak

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2023 TeRiTeRi. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang