启用hive hwi方法
hive启动hwi:
./hive --service hwi
ls: cannot access /opt/cdh-5.3.6/hive-0.13.1/lib/hive-hwi-*.war: No such file or directory
17/05/12 09:29:47 INFO hwi.HWIServer: HWI is starting up
17/05/12 09:29:48 INFO mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
17/05/12 09:29:48 INFO mortbay.log: jetty-6.1.26.cloudera.4
17/05/12 09:29:48 INFO mortbay.log: Started SocketConnector@0.0.0.0:9999
从日志可以看到启动hwi报错:cannot access /opt/cdh-5.3.6/hive-0.13.1/lib/hive-hwi-*.war: No such file or directory
这时因为没有hive-hwi-*.war这个包,这里我们需要手工编译这个包:
下载hive源码包:hive-0.13.1-cdh5.3.6-src.tar.gz
解压后进入源码包hwi目录下,执行以下打包命令将hwi目录打成war包:
$sudo jar cvfM0 hive-hwi-0.13.1.war -C web/ .
adding: authorize.jsp(in = 2729) (out= 2729)(stored 0%)
adding: session_create.jsp(in = 2690) (out= 2690)(stored 0%)
adding: show_database.jsp(in = 2346) (out= 2346)(stored 0%)
adding: session_diagnostics.jsp(in = 2489) (out= 2489)(stored 0%)
adding: navbar.jsp(in = 1345) (out= 1345)(stored 0%)
adding: index.jsp(in = 1876) (out= 1876)(stored 0%)
adding: session_history.jsp(in = 3150) (out= 3150)(stored 0%)
adding: session_manage.jsp(in = 6738) (out= 6738)(stored 0%)
adding: session_result.jsp(in = 2488) (out= 2488)(stored 0%)
adding: show_databases.jsp(in = 2096) (out= 2096)(stored 0%)
adding: diagnostics.jsp(in = 2365) (out= 2365)(stored 0%)
adding: css/(in = 0) (out= 0)(stored 0%)
adding: css/bootstrap.min.css(in = 90193) (out= 90193)(stored 0%)
adding: left_navigation.jsp(in = 1553) (out= 1553)(stored 0%)
adding: show_table.jsp(in = 4996) (out= 4996)(stored 0%)
adding: session_remove.jsp(in = 2359) (out= 2359)(stored 0%)
adding: error_page.jsp(in = 1867) (out= 1867)(stored 0%)
adding: session_kill.jsp(in = 2236) (out= 2236)(stored 0%)
adding: WEB-INF/(in = 0) (out= 0)(stored 0%)
adding: WEB-INF/web.xml(in = 1438) (out= 1438)(stored 0%)
adding: view_file.jsp(in = 2653) (out= 2653)(stored 0%)
adding: session_list.jsp(in = 2298) (out= 2298)(stored 0%)
adding: img/(in = 0) (out= 0)(stored 0%)
adding: img/glyphicons-halflings.png(in = 4352) (out= 4352)(stored 0%)
adding: img/glyphicons-halflings-white.png(in = 4352) (out= 4352)(stored 0%)
将打包后的war包cp到hive/lib目录下:
cp hive-hwi-0.13.1.war /opt/cdh-5.3.6/hive-0.13.1/lib/
在hive-site.xml文件中配置hive-hwi包路径:
<property>
<name>hive.hwi.war.file</name>
<value>lib/hive-hwi-0.13.1.war</value>
</property>
启动hive hwi,通过web登录http://host:port/hwi,报错如下:
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/java/jdk1.7.0_67/jre"
解决办法:
cp /opt/java/jdk1.7.0_67/lib/tools.jar /opt/cdh-5.3.6/hive-0.13.1/lib/
然后再次登录成功。
hive hwi相关参数:
./hive -e "set" |grep hive.hwi.listen
hive.hwi.listen.host=0.0.0.0
hive.hwi.listen.port=9999
hive.hwi.war.file=lib/hive-hwi-0.13.1.war
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了