1.下载源码包:
wget http://mirror.bit.edu.cn/apache/hive/hive-0.14.0/apache-hive-0.14.0-src.tar.gz
2.解压,并找到 hwi/web
点击(此处)折叠或打开
-
[zhang@namenode Downloads]$ cd apache-hive-0.14.0-src
-
[zhang@namenode apache-hive-0.14.0-src]$ ls
-
accumulo-handler bin common data hcatalog jdbc NOTICE pom.xml RELEASE_NOTES.txt shims
-
ant checkstyle conf docs hwi LICENSE odbc ql serde testutils
-
beeline cli contrib hbase-handler itests metastore packaging README.txt service
-
[zhang@namenode apache-hive-0.14.0-src]$ cd hwi/web/
-
[zhang@namenode web]$ ls
-
authorize.jsp error_page.jsp left_navigation.jsp session_diagnostics.jsp session_list.jsp session_result.jsp show_table.jsp
-
css img navbar.jsp session_history.jsp session_manage.jsp show_database.jsp view_file.jsp
-
diagnostics.jsp index.jsp session_create.jsp session_kill.jsp session_remove.jsp show_databases.jsp WEB-INF
3.打包 hwi/web/ 所有文件
点击(此处)折叠或打开
-
[zhang@namenode web]$ zip hive-hwi-0.14.0.zip ./*
-
adding: authorize.jsp (deflated 56%)
-
adding: css/ (stored 0%)
-
adding: diagnostics.jsp (deflated 55%)
-
adding: error_page.jsp (deflated 50%)
-
adding: img/ (stored 0%)
-
adding: index.jsp (deflated 48%)
-
adding: left_navigation.jsp (deflated 54%)
-
adding: navbar.jsp (deflated 49%)
-
adding: session_create.jsp (deflated 54%)
-
adding: session_diagnostics.jsp (deflated 54%)
-
adding: session_history.jsp (deflated 58%)
-
adding: session_kill.jsp (deflated 50%)
-
adding: session_list.jsp (deflated 54%)
-
adding: session_manage.jsp (deflated 67%)
-
adding: session_remove.jsp (deflated 51%)
-
adding: session_result.jsp (deflated 54%)
-
adding: show_database.jsp (deflated 52%)
-
adding: show_databases.jsp (deflated 50%)
-
adding: show_table.jsp (deflated 68%)
-
adding: view_file.jsp (deflated 53%)
-
adding: WEB-INF/ (stored 0%)
-
[zhang@namenode web]$ ls
-
authorize.jsp error_page.jsp index.jsp session_create.jsp session_kill.jsp session_remove.jsp show_databases.jsp WEB-INF
-
css hive-hwi-0.14.0.zip left_navigation.jsp session_diagnostics.jsp session_list.jsp session_result.jsp show_table.jsp
-
diagnostics.jsp img navbar.jsp session_history.jsp session_manage.jsp show_database.jsp view_file.jsp
4.将打包好的文件拷贝到 $HOME_HIVE/lib下
mv hive-hwi-0.14.0.zip ~/hive/lib/hive-hwi-0.14.0.war
5.修改 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>lib/hive-hwi-0.14.0.war</value>
-
<description>This sets the path to the HWI war file, relative to ${HIVE_HOME}. </description>
-
</property>
-
<property>
6.复制 tools.jar(jdk的lib包下面的jar包) 到 hive/lib下
点击(此处)折叠或打开
-
192.168.78.129 namenode
-
[zhang@namenode lib]$ cp /usr/java/jdk1.8.0_25/lib/tools.jar ./
-
[zhang@namenode lib]$ ls |grep -i tools.jar
-
tools.jar
7.启动 hive hwi 服务
点击(此处)折叠或打开
-
[zhang@namenode bin]$ ./hive –service hwi
-
15/01/20 00:09:09 INFO hwi.HWIServer: HWI is starting up
-
15/01/20 00:09:09 WARN conf.HiveConf: DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
-
15/01/20 00:09:09 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist
-
SLF4J: Class path contains multiple SLF4J bindings.
-
SLF4J: Found binding in [jar:file:/home/zhang/hadoop-2.5.2/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
-
SLF4J: Found binding in [jar:file:/home/zhang/hive/lib/hive-jdbc-0.14.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
-
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
-
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
-
15/01/20 00:09:09 INFO mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
-
15/01/20 00:09:09 INFO mortbay.log: jetty-6.1.26
-
15/01/20 00:09:09 INFO mortbay.log: Extract /home/zhang/hive/lib/hive-hwi-0.14.0.war to /tmp/Jetty_0_0_0_0_9999_hive.hwi.0.14.0.war__hwi__.90h87k/webapp
-
15/01/20 00:09:10 INFO mortbay.log: Started SocketConnector@0.0.0.0:9999
8.在页面打开
点击 schema 看下:
在命令行下查看 下我们的数据库:
点击(此处)折叠或打开
-
hive> show databases;
-
OK
-
default
-
temp
-
Time taken: 0.477 seconds, Fetched: 2 row(s)
到此,OK了。
更多测试,大家自行去测试..