Hive远程模式搭建

参考文章:

https://www.cnblogs.com/linbingdong/p/5829369.html

https://cwiki.apache.org/confluence/display/Hive/AdminManual+Metastore+Administration

部署:Hive的metastore和hiveserver2服务运行在bigdata4,mysql数据库同样运行在bigdata4。

HiveServer2服务启动的节点的hive-site.xml配置文件





  
    javax.jdo.option.ConnectionURL
    jdbc:mysql://10.173.32.6:3306/kyhive?createDatabaseIfNotExist=true&useSSL=false  
    
  
  
  
    javax.jdo.option.ConnectionDriverName
    com.mysql.jdbc.Driver
  
  
    javax.jdo.option.ConnectionUserName    
    root
  
  
    javax.jdo.option.ConnectionPassword    
    Gg/ru,.#5
  
  
    hive.cli.print.current.db
    true
  
  
    system:java.io.tmpdir
    /mnt/home/4800613/app/hive/tmpdir
  
  
    system:user.name
    4800613
  


  
    hive.aux.jars.path
    file:///mnt/home/4800613/hive/lib/json-serde-1.3.6-jar-with-dependencies.jar
  
  
    hive.metastore.warehouse.dir
    /user/4800613/hive/warehouse
  


  
    hive.support.concurrency
    true
  
   
     hive.exec.dynamic.partition.mode 
    nonstrict
   
  
    hive.txn.manager
    org.apache.hadoop.hive.ql.lockmgr.DbTxnManager
  
  
    hive.compactor.initiator.on
    true
  
  
    hive.compactor.worker.threads
    1
  
  
    hive.enforce.bucketing
    true
  


  
    hive.server2.thrift.bind.host
    bigdata4
  
  
    hive.server2.thrift.port
    10003
  
  
    hive.server2.thrift.min.worker.threads
    5
  
  
    hive.server2.thrift.max.worker.threads
    100
  

hive客户端的hive-site.xml设置,此处客户端在另一台主机,需要访问bigdata4的hiveserver2




  
    hive.metastore.warehouse.dir
    /user/4800613/hive/warehouse
  
  
    hive.metastore.local
    false
  
  
    hive.metastore.uris
    thrift://bigdata4:9083
  

 

你可能感兴趣的:(数据仓库)