我使用hadoop 2.6.0和hbase 0.98.7,我爲hdfs/namenode配置了HA。我正在顯示活動的nn1和待機nn2。現在的問題是我無法爲hbase啓用高可用性,我也不知道如何將hbase與啓用HA的hdfs集成。此外,雖然做jps HMaster正在運行,但無法看到hbase的用戶界面。在apache hadoop2的HA模式下配置HBase所需的步驟?
我核心的site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://ha-cluster</value>
</property>
<property>
<name>dfs.journalnode.edits.dir</name>
<value>/opt/hadoop/HA/data/jn</value>
</property>
</configuration>
我HDFS SITE.XML
<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>/opt/hadoop/HA/data/namenode</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
<property>
<name>dfs.nameservices</name>
<value>ha-cluster</value>
</property>
<property>
<name>dfs.ha.namenodes.ha-cluster</name>
<value>nn1,nn2</value>
</property>
<property>
<name>dfs.namenode.rpc-address.ha-cluster.nn1</name>
<value>nn1.cluster.com:9000</value>
</property>
<property>
<name>dfs.namenode.rpc-address.ha-cluster.nn2</name>
<value>nn2.cluster.com:9000</value>
</property>
<property>
<name>dfs.namenode.http-address.ha-cluster.nn1</name>
<value>nn1.cluster.com:50070</value>
</property>
<property>
<name>dfs.namenode.http-address.ha-cluster.nn2</name>
<value>nn2.cluster.com:50070</value>
</property>
<property>
<name>dfs.namenode.shared.edits.dir</name>
<value>qjournal://nn1.cluster.com:8485;nn2.cluster.com:8485;dn1.cluster.com:8485/ha-cluster</value>
</property>
<property>
<name>dfs.client.failover.proxy.provider.ha-cluster</name>
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
</property>
<property>
<name>dfs.ha.automatic-failover.enabled</name>
<value>true</value>
</property>
<property>
<name>ha.zookeeper.quorum</name>
<value>nn1.cluster.com:2181,nn2.cluster.com:2181,dn1.cluster.com:2181</value>
</property>
<property>
<name>dfs.ha.fencing.methods</name>
<value>shell(/bin/true)</value>
</property>
<property>
<name>dfs.ha.fencing.ssh.private-key-files</name>
<value>/home/hadoop/.ssh/id_rsa</value>
</property>
</configuration>
我的HBase的site.xml
<configuration>
<property>
<name>hbase.master</name>
<value>test-hmaster-1-aws.icare.com:60000</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://ha-cluster/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>test-hmaster-1-aws.icare.com,test-hslave-1-aws.icare.com,test-kerberos-aws.icare.com</value>
</property>
</configuration>
首先,dfs.journalnode.edits.dir配置必須應用於不在core-site.xml中的hdfs-site.xml文件中。爲了看看有什麼不對,請提供HMaster日誌。 –