HIVE配置啟動Hwi方法,版本0.14.0

呆呆笨笨的魚發表於2015-01-20
1.下載原始碼包:
 wget

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 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了。

更多測試,大家自行去測試..


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28929558/viewspace-1408291/,如需轉載,請註明出處,否則將追究法律責任。

相關文章