Created on 05-26-2018 03:13 AM - edited 09-16-2022 06:16 AM
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.
Created 05-27-2018 08:49 AM
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 .
Created on 05-26-2018 08:00 PM - edited 05-26-2018 08:01 PM
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 .
Created 05-27-2018 01:28 AM
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.
Created 05-27-2018 08:49 AM
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 .