目录
一、HWI安装
二、其中遇到一些问题:
1.遇到如下问题,将jre环境中的toos.jar 服务到lib目录下
2.CDH中没有hwi相关配置参数,手动加入并修改端口为9998,发现并未生效,暂时未找到原因所在。
通过查看《Hadoop权威指南》发现hive有 hwi功能研究一下看看是否方便
执行
[root@test111 lib]# hive --service hwi
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
ls: cannot access /opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/bin/../lib/hive/lib/hive-hwi-*.war: No such file or directory
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
18/09/21 11:16:03 INFO hwi.HWIServer: HWI is starting up
18/09/21 11:16:03 INFO mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
18/09/21 11:16:03 INFO mortbay.log: jetty-6.1.26.cloudera.4
18/09/21 11:16:04 INFO mortbay.log: Started [email protected]:9999
访问链接发现根本不是web页面,妈的。都是文件
后来发现需要编译相关war包,传入服务器。
首先下载相对应的源码下载地址:http://www.apache.org/dyn/closer.cgi/hive/
进入hwi目录
apache-hive-1.2.2-src/hwi
编译成war包
注意打包方式要使用这种,网上很多种方式,使用完之后发现还不是web操作页面
jar cvfM0 hive-hwi-1.2.1.war -C web/ .
查找hive的目录安装在
/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hive/lib
将hive-hwi-1.2.1.war 复制到该目录下,运行报错如下
[root@test111 hive]# hive --service hwi
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
18/09/21 11:11:25 INFO hwi.HWIServer: HWI is starting up
18/09/21 11:11:26 ERROR hwi.HWIServer: HWI WAR file not found at /opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/bin/../lib/hive/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/bin/../lib/hive/lib/hive-hwi-1.1.0.war
提示文件没有在目录中找到,cd进这个目录发现没有该目录,手动创建
[root@test111 hive]# mkdir -p /opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/bin/../lib/hive/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/bin/../lib/hive/lib/
将文件 hive-hwi-1.2.1.war 也复制到该目录下
再次执行
[root@test111 lib]# hive --service hwi
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
18/09/21 11:15:00 INFO hwi.HWIServer: HWI is starting up
18/09/21 11:15:00 INFO mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
18/09/21 11:15:00 INFO mortbay.log: jetty-6.1.26.cloudera.4
18/09/21 11:15:00 INFO mortbay.log: Extract /opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/bin/../lib/hive/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/bin/../lib/hive/lib/hive-hwi-1.1.0.war to /tmp/Jetty_0_0_0_0_9999_hive.hwi.1.1.0.war__hwi__.4otk49/webapp
18/09/21 11:15:00 INFO mortbay.log: Started [email protected]:9999
访问http://192.168.2.111:9999/hwi/ 一定要加上hwi 否则无法访问
cp tools.jar /opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hive/lib
18/09/21 10:35:21 ERROR mortbay.log: /hwi/hwi/web/
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 "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre"
at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:129)
at org.apache.tools.ant.taskdefs.Javac.findSupportedFileExtensions(Javac.java:979)
at org.apache.tools.ant.taskdefs.Javac.scanDir(Javac.java:956)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:927)
at org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:220)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:767)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:503)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:767)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
CDH中修改配置参数,hive-site相关有很多个配置,修改如图所示的那个参数,其他的修改无法生效。
hive-site.xml 的 Hive 客户端高级配置代码段(安全阀)
hive.hwi.listen.port
9991
true