Support Questions

Find answers, ask questions, and share your expertise

How does nameservice id works for HA, how does it resolve active NameNode?

avatar
New Contributor

As client has nothing to do which namenode is active, nameservice automatically transfers client requests to active namenode. So how does it resolve which NN is active.

1 ACCEPTED SOLUTION

avatar
Champion

The client does not know which is active / standy namenode it will only usess dfs.nameservices . 

DFS Client will determine which NameNode is the current Active, by using the either of the java classess which ever is implemented  ConfiguredFailoverProxyProvider and the RequestHedgingProxyProvider, then subsequently it will invoke the ids and followed by the host identification by using the properties in hdfs-site.xml ( please refer the below link for the properties .

 

https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.ht...

View solution in original post

3 REPLIES 3

avatar
Champion

The pre-requistes of configuring HA is zookeeper and FailoverController . 

then you should provide the type of  fencing for proof of concept you can  use shell 

 

 dfs.ha.fencing.methods 

 znode in ZooKeeper will be used by failover controllers to keep track of the active and standby nodes, and start the failover controllers if necessary . However you can also perform manual failover for any maintance activity . 

 

 

 

avatar
New Contributor

Thanks for the response. But my question is how does nameservice id resolve the active namenode. Whenever a query is submitted, client has no idea about active namenode, nameservice id directs it to active namenode. so the question is how does it resolve the active one. To put it more simple how does name resolution works in HA.

avatar
Champion

The client does not know which is active / standy namenode it will only usess dfs.nameservices . 

DFS Client will determine which NameNode is the current Active, by using the either of the java classess which ever is implemented  ConfiguredFailoverProxyProvider and the RequestHedgingProxyProvider, then subsequently it will invoke the ids and followed by the host identification by using the properties in hdfs-site.xml ( please refer the below link for the properties .

 

https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.ht...