2、hive配置及说明

1、hive-site.xml配置:

    一般解压二进制hive安装文件后,cp hive-default.xml.template hive-site.xml;

    vi hive-site.xml:

     需添加mysql配置:

          

                 javax.jdo.option.ConnectionURL

                 jdbc:mysql://192.168.10.186:3306/hive?createDatabaseIfNotExist=true

                 JDBC connect string for a JDBC metastore

          

          

                    javax.jdo.option.ConnectionDriverName

                    com.mysql.jdbc.Driver

                  Driver class name for a JDBC metastore

          

          

                  javax.jdo.option.ConnectionUserName

                 root

                 Username to use against metastore database

        

        

               javax.jdo.option.ConnectionPassword

               root

               password to use against metastore database

         

可更改配置:

 hive数据库创建默认路径<-->

   

    hive.metastore.warehouse.dir

    /user/hive/warehouse

    location of default database for the warehouse

 

hiverserver2客户端连接端口<-->

    hive.server2.thrift.port

    10000

    Port number of HiveServer2 Thrift interface when hive.server2.transport.mode is 'binary'.

 

2.hive-env.sh配置

# Set HADOOP_HOME to point to a specific hadoop install directory

HADOOP_HOME=/mytest/hadoop-2.9.2

# Hive Configuration Directory can be controlled by:

  export HIVE_CONF_DIR=/mytest/apache-hive-1.2.2-bin/conf

# Folder containing extra ibraries required for hive compilation/execution can be controlled by:

  export HIVE_AUX_JARS_PATH=/mytest/apache-hive-1.2.2-bin/lib

你可能感兴趣的:(2、hive配置及说明)