Hive搭建 ha高可用集群
第一步 修改hdfs-site.xml
<configuration>
<!--指定hdfs的nameservice为rootcloud,需要和core-site.xml中的保持一致 -->
<property>
<name>dfs.nameservices</name>
<value> rootcloud </value>
</property>
<!-- cluster1下面有两个NameNode,分别是nn1,nn2 -->
<property>
<name>dfs.ha.namenodes .rootcloud </name>
<value>nn1,nn2</value>
</property>
<!-- nn1的RPC通信地址 -->
<property>
<name>dfs.namenode.rpc-address.cluster1.nn1</name>
<value>hadoop01:8020</value>
</property>
<property>
<name>dfs.namenode.servicerpc-address.rootcloud.nn1</name>
<value>hadoop01:8021</value>
</property>
<!-- nn1的http通信地址 -->
<property>
<name>dfs.namenode.http-address.cluster1.nn1</name>
<value> hadoop01:50070</value>
</property>
<!-- nn2的RPC通信地址 -->