zoukankan      html  css  js  c++  java
  • Hive的安装部署

    1.环境准备

    1.1软件版本

    hive-0.14 下载地址

    2.配置

    安装hive的前提,必需安装好hadoop环境,可以参考我之前Hadoop社区版搭建,先搭建好hadoop环境;接下来我们开始配置hive

    2.1环境变量

    sudo vi /etc/profile
    HIVE_HOME=/home/hadoop/source/hive-0.14.0
    PATH=$HIVE_HOME/bin
    export  HIVE_HOME 

    2.2hive-site.xml

    <configuration>
    <property>   
      <name>datanucleus.fixedDatastore</name>   
      <value>false</value>   
    </property>
    <property>
      <name>hive.metastore.execute.setugi</name>
      <value>true</value>
    </property>
    
    <property>
      <name>hive.metastore.warehouse.dir</name>
      <value>/home/hive/warehouse</value>
      <description>location of default database for the warehouse</description>
    </property>
    
    <!-- metadata database connection configuration -->
    
    <property>
      <name>javax.jdo.option.ConnectionURL</name>
      <value>jdbc:mysql://10.211.55.18:3306/hive?useUnicode=true&amp;characterEncoding=UTF-8&amp;createDatabaseIfNotExist=true</value>
      <description>JDBC connect string for a JDBC metastore</description>
    </property>
    
    <property>
      <name>javax.jdo.option.ConnectionDriverName</name>
      <value>com.mysql.jdbc.Driver</value>
      <description>Driver class name for a JDBC metastore</description>
    </property>
    
    <property>
      <name>javax.jdo.option.ConnectionUserName</name>
      <value>root</value>
      <description>username to use against metastore database</description>
    </property>
    
    <property>
      <name>javax.jdo.option.ConnectionPassword</name>
      <value>root</value>
      <description>password to use against metastore database</description>
    </property>
    
    <property>
      <name>hive.hwi.listen.host</name>
      <value>10.211.55.18</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>
    
    <!-- configure hwi war package location -->
    <!--
    <property>
      <name>hive.hwi.war.file</name>
      <value>lib/hive-hwi-0.14.0.war</value>
      <description>This is the WAR file with the jsp content for Hive Web Interface</description>
    </property>
    -->
    </configuration>

     2.3hive-env.sh

    # Set HADOOP_HOME to point to a specific hadoop install directory
    HADOOP_HOME=/home/hadoop/source/hadoop-2.5.1

    2.4启动

    [hadoop@cloud001 ~]$ hive
    
    Logging initialized using configuration in file:/home/hadoop/source/hive-0.14.0/conf/hive-log4j.properties
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/home/hadoop/source/hadoop-2.5.1/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/home/hadoop/source/hive-0.14.0/lib/hive-jdbc-0.14.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
    hive> 

    至此,hive配置完成。

    注:由于配置的是mysql驱动,所以需要把mysql的驱动包放到$HIVE_HOME/lib下

  • 相关阅读:
    oracle里的查询转换
    Oracle里的优化器
    转:oracle几组重要的常见视图-v$undostat,v$open_cursor,v$rowcache,v$session_longops,v$waitstat
    转:oracle几组重要的常见视图-v$segstat,v$segment_statistics,v$filestat,v$rollstat
    转:oracle几组重要的常见视图-v$latch,v$latch_children,v$lock,v$locked_object
    转:oracle常见重要视图-v$sql,v$sql_plan,v$sqltext,v$sqlarea,v$sql_plan_statistcs
    转:oracle几组重要的常见视图-v$process,v$session,v$session_wait,v$session_event
    第三方引擎应用场景分析--Tokudb,infobright
    mysql 常见参数
    Uep的静态下拉和动态下拉建立
  • 原文地址:https://www.cnblogs.com/smartloli/p/4201831.html
Copyright © 2011-2022 走看看