|
HDFS High Availability
|
|
|
Why High Availability :
Without HA implemented on the HDFS NameNode, the NameNode is a single point of failure for the entire filesystem. A SecondaryNameNode, while helpful in reducing recovery times and providing an alternate storage location for the NameNode’s metadata, is not a high availability or hot standby solution. When can a NameNode become unavailable: - Unplanned Reasons: hardware or software failure. - Planned Reasons: Restart for software upgrade or configuration change. How is HA implemented at high level:
![]()
Impact of HA on Secondary NN:
The Standby NameNode performs the checkpointing
functions normally provided by the SecondaryNameNode, so in a HA
configuration the SecondaryNameNode is no longer required.
|
|
|
Fencing:
|
|
|
Types of Failover:
Failover of a NameNode, or changing the state of a
NameNode from standby to active, can be either
1)automatic (system-detected and initiated)
or 2)manual (user-initiated).
![]() |
|
|
Deploying HA:
![]() |
|
|
Following Shows examples of above
mentioned properties:
In core-site.xml we set
fs.defaultFS property to hdfs://testhacluster
Following property values are set in hdfs-site.xml
property>
<name>dfs.nameservices</name> <value>testhacluster</value> </property>
<property>
<name>dfs.ha.namenodes.testhacluster</name> <value>nn1,nn2</value> </property>
<property>
<name>dfs.namenode.rpc-address.testhacluster.nn1</name> <value>namenode1:8020</value> </property>
<property>
<name>dfs.namenode.rpc-address.testhacluster.nn2</name> <value>namenode2:8020</value> </property>
<property>
<name>dfs.namenode.http-address.testhacluster.nn1</name> <value>namenode1:50070</value> </property>
<property>
<name>dfs.namenode.http-address.testhacluster.nn2</name> <value>namenode2:50070</value> </property>
<property>
<name>dfs.namenode.shared.edits.dir</name> <value>qjournal://journalnode1:8485/testhacluster</value> </property>
<property>
<name>dfs.journalnode.edits.dir</name> <value>/tmp/dfs/jn</value> </property>
<property>
<name>dfs.client.failover.proxy.provider.testhacluster</name> <value>org.apache.hadoop.hdfs.server.namenode.ha.Configured FailoverProxyProvider</value> </property>
<property>
<name>dfs.ha.fencing.methods</name> <value>shell(/bin/true)</value> </property>
<property>
<name>dfs.ha.automatic-failover.enabled</name> <value>false</value> </property |
Sunday, 5 May 2019
HDFS High Availability
Subscribe to:
Post Comments (Atom)



No comments:
Post a Comment