搭建hive1.2.1图形界面

下载:apache-hive-1.2.1-src.tar
apache-hive-1.2.1-src.tar
解压,cd apache-hive-1.2.1-src/hwi
命令:jar cfM hive-hwi-1.2.0.war -C web .
复制:hive-1.2.1/lib

hive-1.2.1/conf/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 host port the Hive Web Interface will listen on</description>
    </property>
    <property>
        <name>hive.hwi.war.file</name>
        <value>lib/hive-hwi-1.2.1.war</value>
        <description>This is the WAR file with the jsp content for Hive Web Interface</description>
    </property>

开启服务:hive –service hwi 2> /tmp/hwi2.log &

错误:

ERROR compiler.Compiler: Javac exception 
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/local/java/jre"

原因:jetty编译jsp类时,ant没有识别到正确的jdk路径。

解决:

ln -s $JAVA_HOME/lib/tools.jar $HIVE_HOME/lib/

访问:http://master:9999/hwi/

你可能感兴趣的:(hive1-2-1,图形界面搭建)