hive配置


./hive --service metastore

初始化 将元数据存储在MySQL

 bin/schematool -initSchema -dbType mysql

hive-env.sh:

export HADOOP_HOME=/opt/module/hadoop

export HIVE_CONF_DIR=/opt/module/hive/conf

hive-site.xml:



javax.jdo.option.ConnectionURL
jdbc:mysql://hadoop102:3306/metastore?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.metastore.schema.verification
false


hive.cli.print.current.db
true


hive.cli.print.header
true



hive.server2.thrift.port
10000


hive.server2.thrift.bind.host
192.168.200.102

 

 

    hive.metastore.warehouse.dir

    /user/hive/warehouse

 

 

    hive.metastore.local

    false

 

   

     hive.metastore.uris

     thrift://hadoop102:9083

   

                  javax.jdo.option.ConnectionURL          jdbc:mysql://hadoop102:3306/metastore?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.metastore.schema.verification                false                                 hive.cli.print.current.db                 true                                 hive.cli.print.header                 true                                         hive.server2.thrift.port                 10000       
                        hive.server2.thrift.bind.host                192.168.200.102