HIVE配置启动Hwi方法,版本0.14.0-呆呆笨笨的鱼-ITPUB博客

1.下载源码包:


 wget http://mirror.bit.edu.cn/apache/hive/hive-0.14.0/apache-hive-0.14.0-src.tar.gz


2.解压,并找到 hwi/web

点击(此处)折叠或打开

  1. [zhang@namenode Downloads]$ cd apache-hive-0.14.0-src

  2. [zhang@namenode apache-hive-0.14.0-src]$ ls

  3. accumulo-handler bin common data hcatalog jdbc NOTICE pom.xml RELEASE_NOTES.txt shims

  4. ant checkstyle conf docs hwi LICENSE odbc ql serde testutils

  5. beeline cli contrib hbase-handler itests metastore packaging README.txt service

  6. [zhang@namenode apache-hive-0.14.0-src]$ cd hwi/web/

  7. [zhang@namenode web]$ ls

  8. authorize.jsp error_page.jsp left_navigation.jsp session_diagnostics.jsp session_list.jsp session_result.jsp show_table.jsp

  9. css img navbar.jsp session_history.jsp session_manage.jsp show_database.jsp view_file.jsp

  10. diagnostics.jsp index.jsp session_create.jsp session_kill.jsp session_remove.jsp show_databases.jsp WEB-INF

3.打包 hwi/web/ 所有文件

点击(此处)折叠或打开

  1. [zhang@namenode web]$ zip hive-hwi-0.14.0.zip ./*

  2. adding: authorize.jsp (deflated 56%)

  3. adding: css/ (stored 0%)

  4. adding: diagnostics.jsp (deflated 55%)

  5. adding: error_page.jsp (deflated 50%)

  6. adding: img/ (stored 0%)

  7. adding: index.jsp (deflated 48%)

  8. adding: left_navigation.jsp (deflated 54%)

  9. adding: navbar.jsp (deflated 49%)

  10. adding: session_create.jsp (deflated 54%)

  11. adding: session_diagnostics.jsp (deflated 54%)

  12. adding: session_history.jsp (deflated 58%)

  13. adding: session_kill.jsp (deflated 50%)

  14. adding: session_list.jsp (deflated 54%)

  15. adding: session_manage.jsp (deflated 67%)

  16. adding: session_remove.jsp (deflated 51%)

  17. adding: session_result.jsp (deflated 54%)

  18. adding: show_database.jsp (deflated 52%)

  19. adding: show_databases.jsp (deflated 50%)

  20. adding: show_table.jsp (deflated 68%)

  21. adding: view_file.jsp (deflated 53%)

  22. adding: WEB-INF/ (stored 0%)

  23. [zhang@namenode web]$ ls

  24. authorize.jsp error_page.jsp index.jsp session_create.jsp session_kill.jsp session_remove.jsp show_databases.jsp WEB-INF

  25. css hive-hwi-0.14.0.zip left_navigation.jsp session_diagnostics.jsp session_list.jsp session_result.jsp show_table.jsp

  26. 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 文件

点击(此处)折叠或打开

  1. <property>

  2.     <name>hive.hwi.listen.host</name>

  3.     <value>0.0.0.0</value>

  4.     <description>This is the host address the Hive Web Interface will listen on</description>

  5.   </property>

  6.   <property>

  7.     <name>hive.hwi.listen.port</name>

  8.     <value>9999</value>

  9.     <description>This is the port the Hive Web Interface will listen on</description>

  10.   </property>

  11.   <property>

  12.     <name>hive.hwi.war.file</name>

  13.     <value>lib/hive-hwi-0.14.0.war</value>

  14.     <description>This sets the path to the HWI war file, relative to ${HIVE_HOME}. </description>

  15.   </property>

  16.   <property>

6.复制 tools.jar(jdk的lib包下面的jar包) 到 hive/lib下

点击(此处)折叠或打开

  1. 192.168.78.129 namenode

  2. [zhang@namenode lib]$ cp /usr/java/jdk1.8.0_25/lib/tools.jar ./

  3. [zhang@namenode lib]$ ls |grep -i tools.jar

  4. tools.jar

7.启动 hive hwi 服务

点击(此处)折叠或打开

  1. [zhang@namenode bin]$ ./hive –service hwi

  2. 15/01/20 00:09:09 INFO hwi.HWIServer: HWI is starting up

  3. 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.

  4. 15/01/20 00:09:09 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist

  5. SLF4J: Class path contains multiple SLF4J bindings.

  6. 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]

  7. SLF4J: Found binding in [jar:file:/home/zhang/hive/lib/hive-jdbc-0.14.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]

  8. SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

  9. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

  10. 15/01/20 00:09:09 INFO mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog

  11. 15/01/20 00:09:09 INFO mortbay.log: jetty-6.1.26

  12. 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

  13. 15/01/20 00:09:10 INFO mortbay.log: Started SocketConnector@0.0.0.0:9999

8.在页面打开

点击 schema 看下:

在命令行下查看 下我们的数据库:

点击(此处)折叠或打开

  1. hive> show databases;

  2. OK

  3. default

  4. temp

  5. Time taken: 0.477 seconds, Fetched: 2 row(s)

到此,OK了。

更多测试,大家自行去测试..

来源URL:http://blog.itpub.net/28929558/viewspace-1408291