A New Hive Web Interface
Query
- Seamless intergration with existing hive deployment
- Save user queries in database
- Save hive query result in hdfs
- Show progress of queries
- Summary info, such as cpu time, total time, saved time
- Callback when hive query is completed
- Download full result
Crontab
- Create crontabs to run queries automatically
Following frameworks are used:
- Twitter Bootstrap for html, css, js
- Velocity for view templating
- Jersey for url routing
- Quartz for queries scheduling
Download
$ git clone git@github.com:anjuke/hwi.git
Package
$ cd hwi
$ mvn clean package war:war
Deploy
$ mv ${HIVE_HOME}/lib/hive-hwi-x.jar ${HIVE_HOME}/lib/hive-hwi-x.jar.bak
$ mv ${HIVE_HOME}/lib/hive-hwi-x.war ${HIVE_HOME}/lib/hive-hwi-x.war.bak
$ cp target/hive-hwi-1.0.jar ${HIVE_HOME}/lib/hive-hwi-1.0.jar
$ cp target/hive-hwi-1.0.war ${HIVE_HOME}/lib/hive-hwi-1.0.war
**Pay attention!** Maybe you prefer not to simply overide conf/hive-site.xml
$ cp src/main/resources/hive-site.xml.template ${HIVE_HOME}/conf/hive-site.xml
Run
$ hive --service hwi
Create Database
$ create database hive
$ create user 'hive'@'localhost' identified by password 'hive'
$ grant all on hive.* to 'hive'@'localhost'
$ flush privileges
config file
cp src/main/resources/hive-site.xml.template src/main/resources/hive-site.xml
vim src/main/resources/hive-site.xml
cp src/main/resources/hive-site.xml {$HIVE_HOME}/conf/
cp ~/.m2/repository/mysql/mysql-connector-java/5.1.22/mysql-connector-java-5.1.22.jar {$HIVE_HOME}/lib/
Install DataNucleus
- install url is
http://www.datanucleus.org/downloads/eclipse-update/
Create Eclipse Configuration
$ mvn eclipse:eclipse
Import Hwi Maven Project
- eclipse import maven project
- please use java environment
- hwi project right click, DataNuclens => Add DataNuclens Support
- hwi project right click, DataNuclens => Enable Auto-Enhancement
run project
- hadoop fs -mkdir /user/hive/result
- use TestRunHWIServer.java to run as java application
- you can open your browser, input "http://localhost:9999/hwi/"