hive僞分佈式安裝

vim .bash_profileapache

#hive-0.11.0vim

export HIVE_HOME=/nutch/hivebash

export HIVE_BIN=/nutch/hive/binapp

export PATH=$PATH:$HIVE_HOME/binjsp


source .bash_profileoop

cd hive/conf             #配置文件目錄spa

cp hive-env.sh.template hive-env.sh日誌

vim hive-env.shorm


export HADOOP_HOME=/nutch/hadoopxml

export HIVE_CONF_DIR=/nutch/hive/conf  

export HIVE_AUX_JARS_PATH=/nutch/hive/lib


mkdir -p /nutch/hive-0.11.0/warehouse

mkdir -p /nutch/hive-0.11.0/tmp

mkdir -p /nutch/hive-0.11.0/log


cp hive-default.xml.template hive-site.xml


 vim hive-site.xml


鍵入‘/hive.metastore.warehouse.dir’(回車)


<property>

<name>hive.metastore.warehouse.dir</name>

<value>/nutch/hive-0.11.0/warehouse</value>

</property>

這個是設定數據目錄

<property>

<name>hive.querylog.location</name>

<value>/nutch/hive-0.11.0/log</value>

</property>

//文件中沒有能夠本身添加

<property>

<name>hive.exec.scratdir</name>

<value>/nutch/hive-0.11.0/tmp</value>

</property>

這個是設定臨時文件目錄

<property>

  <name>hive.aux.jars.path</name>

  <value>file:///nutch/hive/lib/hive-hbase-handler-0.11.0.jar,

file:///nutch/hive/lib/hbase-0.94.14.jar,

file:///nutch/hive/lib/zookeeper-3.4.5.jar

</value>

</property>

這個是用於存放hive相關日誌的目錄


cp hive-log4j.properties.template  hive-log4j.proprties

vim hive-log4j.properties


log4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter

若是沒有修改的話會出現:

WARNING: org.apache.hadoop.metrics.EventCounter is deprecated.

please use org.apache.hadoop.log.metrics.EventCounter  in all the  log4j.properties files.



hive圖形界面


添加war包到hive的lib目錄:


下載添加到/usr/lib/hive/lib/hive-hwi-0.9.0-cdh4.1.0.war


添加配置到hive-site.xml


<property>

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

  <value>172.16.2.29</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>$HIVE_HOME/lib/hive_hwi.war</value>

  <description>This is the WAR file with the jsp content for Hive Web Interface</description>

</property>


設置ANT_LIB路徑

            export ANT_LIB=/usr/lib/apache-ant-1.9.0/lib


啓動hwi


hive --service hwi > hwi.log

http://172.16.2.29:9999/hwi/

相關文章
相關標籤/搜索