webhcat 安装及配置

来源:互联网 发布:剑三丐帮成男捏脸数据 编辑:程序博客网 时间:2024/06/15 20:10
webhcat的安装
前提:1、hadoop的已经安装。此处使用的hadoop-1.0.4版本。
      2、hive以及hcatalog已经安装。由于我这使用的是hive-0.11.0版本,它本身自带了hcatalog。故我这就无需安装这些。
      3、zookeeper的安装。我这里使用的版本是 zookeeper-3.3.6
      3、环境变量的设置。HADOOP_HOME,HIVE_HOME,TEMPLETON_HOME(/home/hadoop/hive-0.11/hcatalog)




使用相应的版本下的jar包替换$TEMPLETON_HOME/share/webhcat/svr/lib下的一些jar包。
如:hadoop-core-1.0.4.jar  hadoop-tools-1.0.4.jar,zookeeper-3.3.6


复制 webhcat-0.11.0.jar到$TEMPLETON_HOME/share/webhcat/svr。若存在则替换,否则添加




修改 Hadoop Distributed Cache
hadoop fs -put /tmp/hive-0.11.0.tar.gz
/apps/templeton/hive-0.11.0.tar.gz


hadoop fs -put <hadoop streaming jar> \
<templeton.streaming.jar>/hadoop-streaming-*.jar


hadoop fs -put ugi.jar /apps/templeton/ugi.jar




直接修改配置文件webhcat-site.xml文件。注意这个文件的位置是在$HADOOP_HOME/conf/目录下。
注意关于里面的路径最好采用绝对路径


<?xml version="1.0" encoding="UTF-8"?>


<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at


        http://www.apache.org/licenses/LICENSE-2.0


    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->


<!-- The default settings for Templeton. -->
<!-- Edit templeton-site.xml to change settings for your local -->
<!-- install. -->


<configuration>
  <property>
    <name>templeton.hadoop.conf.dir</name>
    <value>/home/hadoop-1.0.4/conf</value>
    <description>The path to the Hadoop configuration.</description>
  </property>


  <property>
    <name>templeton.jar</name>
    <value>/home/hadoop/hive-0.11/hcatalog/share/webhcat/svr/webhcat-0.11.0.jar</value>
    <description>The path to the Templeton jar file.</description>
  </property>


  <property>
    <name>templeton.libjars</name>
    <value>/home/hadoop/hive-0.11/hcatalog/share/webhcat/svr/lib/zookeeper-3.3.6.jar</value>
    <description>Jars to add to the classpath.</description>
  </property>


  <property>
    <name>templeton.streaming.jar</name>
    <value>hdfs://192.168.32.203:9000/apps/webhcat/hadoop-streaming-1.0.4.jar</value>
    <description>The hdfs path to the Hadoop streaming jar file.</description>
  </property>


  <property>
    <name>templeton.hadoop</name>
    <value>/home/hadoop/hadoop-1.0.4/bin/hadoop</value>
    <description>The path to the Hadoop executable.</description>
  </property>




  <property>
    <name>templeton.hcat</name>
    <value>/home/hadoop/hive-0.11/hcatalog/bin/hcat</value>
    <description>The HTTP port for the main server.</description>
  </property>


 <property>
    <name>templeton.hive.archive</name>
    <value>hdfs://192.168.32.203:9000/apps/webhcat/hive-0.11.0.tar.gz</value>
    <description>The path to the Hive archive.</description>
  </property>


  <property>
    <name>templeton.hive.path</name>
    <value>hive-0.11.0.tar.gz/hive-0.11.0/bin/hive</value>
    <description>The path to the Hive executable.</description>
  </property>


  <property>
    <name>templeton.hive.properties</name>
    <value>hive.metastore.local=false,hive.metastore.uris=thrift://localhost:9933,hive.metastore.sasl.enabled=false</value>
    <description>Properties to set when running hive.</description>
  </property>




 <property>
    <name>templeton.exec.encoding</name>
    <value>UTF-8</value>
    <description>The encoding of the stdout and stderr data.</description>
  </property>


  <property>
    <name>templeton.exec.timeout</name>
    <value>10000</value>
    <description>
      How long in milliseconds a program is allowed to run on the
      Templeton box.
    </description>
  </property>


  <property>
    <name>templeton.exec.max-procs</name>
    <value>16</value>
    <description>The maximum number of processes allowed to run at once.</description>
  </property>


  <property>
    <name>templeton.exec.max-output-bytes</name>
    <value>1048576</value>
    <description>
      The maximum number of bytes from stdout or stderr stored in ram.
    </description>
  </property>


  <property>
    <name>templeton.controller.mr.child.opts</name>
    <value>-server -Xmx1024m -Djava.net.preferIPv4Stack=true</value>
    <description>Java options to be passed to templeton controller map task.
        The default value of mapreduce child "-Xmx" (heap memory limit)
        might be close to what is allowed for a map task.
        Even if templeton  controller map task does not need much 
        memory, the jvm (with -server option?)
        allocates the max memory when it starts. This along with the 
        memory used by pig/hive client it starts can end up exceeding
        the max memory configured to be allowed for a map task
        Use this option to set -Xmx to lower value
    </description>
  </property>


  <property>
    <name>templeton.exec.envs</name>
    <value>HADOOP_HOME,JAVA_HOME,HIVE_HOME</value>
    <description>The environment variables passed through to exec.</description>
  </property>


  <property>
    <name>templeton.zookeeper.hosts</name>
    <value>192.168.32.203:2181,192.168.32.93:2181,192.168.32.206:2181</value>
    <description>ZooKeeper servers, as comma separated host:port pairs</description>
  </property>




  <property>
    <name>webhcat.proxyuser.hadoop.groups</name>
    <value>hadoop</value>
  </property>


 <property>
    <name>webhcat.proxyuser.hadoop.hosts</name>
    <value>zhaocw.host,192.168.32.203</value>
  </property>


<property>
    <name>templeton.port</name>
    <value>50222</value>
</property>
 <property>
    <name>templeton.hive.properties</name>
    <value>hive.metastore.local=false,hive.metastore.sasl.enabled=false</value>
    <description>Properties to set when running hive.</description>
  </property>
<property>
    <name>templeton.override.jars</name>
    <value>hdfs://192.168.32.203:9000/apps/webhcat/ugi.jar</value>
</property>
<property>
    <name>templeton.override.enabled</name>
    <value>false</value>
</property>


</configuration>


在core-site.xml里增加如下内容
<property>
<name>hadoop.security.authorization</name>
<value>false</value>
</property>
<property>
    <name>hadoop.proxyuser.hadoop.hosts</name>
    <value>zhaocw.host,192.168.32.203</value>
  </property>


  <property>
    <name>hadoop.proxyuser.hadoop.groups</name>
    <value>hadoop,supergroup</value>
  </property>








配置的内容差不多就这么多了。


直接启动webhcat.进入$TEMPLETON_HOME/sbin


运行:./webhcat_server.sh start 启动
      ./webhcat_server.sh start 停止








      
0 0
原创粉丝点击