Hive 高可用搭建

Hive 高可用搭建

  • 节点
  • 配置文件
    • hive-site.xml (node2)
    • hive-site.xml (node3)

节点

NN-1 NN-2 DN ZK ZKFC JNN RS NM Hiveserver2 beeline
node1 ✔️ ✔️ ✔️ ✔️ ✔️
node2 ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
node3 ✔️ ✔️ ✔️ ✔️ ✔️
node4 ✔️ ✔️ ✔️

配置文件

hive-site.xml (node2)

<property>  
  <name>hive.metastore.warehouse.dirname>  
  <value>/user/hive/warehousevalue>  
property>  
<property>  
  <name>javax.jdo.option.ConnectionURLname>  
  <value>jdbc:mysql://node1:3306/hive?createDatabaseIfNotExist=truevalue>  
property>  
<property>  
  <name>javax.jdo.option.ConnectionDriverNamename>  
  <value>com.mysql.jdbc.Drivervalue>  
property>     
<property>  
  <name>javax.jdo.option.ConnectionUserNamename>  
  <value>rootvalue>  
property>  
<property>  
  <name>javax.jdo.option.ConnectionPasswordname>  
  <value>123value>  
property>
<property>
  <name>hive.server2.support.dynamic.service.discoveryname>
  <value>truevalue>
property>
<property>
  <name>hive.server2.zookeeper.namespacename>
  <value>hiveserver2_zkvalue>
property>
<property>
  <name>hive.zookeeper.quorumname>
  <value>node1:2181,node2:2181,node3:2181value>
property>
<property>
  <name>hive.zookeeper.client.portname>
  <value>2181value>
property>
<property>
  <name>hive.server2.thrift.bind.hostname>
  <value>node2value>
property>
<property>
  <name>hive.server2.thrift.portname>
  <value>10001value> 
property>

hive-site.xml (node3)

<property>  
  <name>hive.metastore.warehouse.dirname>  
  <value>/user/hive/warehousevalue>  
property>  
<property>  
  <name>javax.jdo.option.ConnectionURLname>  
  <value>jdbc:mysql://node1:3306/hive?createDatabaseIfNotExist=truevalue>  
property>  
<property>  
  <name>javax.jdo.option.ConnectionDriverNamename>  
  <value>com.mysql.jdbc.Drivervalue>  
property>     
<property>  
  <name>javax.jdo.option.ConnectionUserNamename>  
  <value>rootvalue>  
property>  
<property>  
  <name>javax.jdo.option.ConnectionPasswordname>  
  <value>123value>  
property>
<property>
  <name>hive.server2.support.dynamic.service.discoveryname>
  <value>truevalue>
property>
<property>
  <name>hive.server2.zookeeper.namespacename>
  <value>hiveserver2_zkvalue>
property>
<property>
  <name>hive.zookeeper.quorumname>
  <value>node1:2181,node2:2181,node3:2181value>
property>
<property>
  <name>hive.zookeeper.client.portname>
  <value>2181value>
property>
<property>
  <name>hive.server2.thrift.bind.hostname>
  <value>node3value>
property>
<property>
  <name>hive.server2.thrift.portname>
  <value>10001value> 
property>

你可能感兴趣的:(大数据,hive)