Support Questions

Find answers, ask questions, and share your expertise

Name node Manual failover

avatar
Rising Star

Hi All ,

I am familiar with Cloudera manager there is an option in it to fail over the Name node manually.

Could some body tell me how can do it in Ambari.

Thanks in Advance

Abdul

1 ACCEPTED SOLUTION

avatar

@Abdul Shihab

Go to edge node, sudo to hdfs user

Get a valid kerberos ticket

Run this below command

hdfs haadmin -failover [--forceactive] <serviceId> <serviceId>]

Example:

hdfs haadmin -failover -forceactive namenode1(active) namenode1(standby)

If you want to do it from Ambari just restart active namenode, during this process it will make standby as active and after restarted namenode came up it will move to standby but this is not recommended best practice

View solution in original post

2 REPLIES 2

avatar

@Abdul Shihab

Go to edge node, sudo to hdfs user

Get a valid kerberos ticket

Run this below command

hdfs haadmin -failover [--forceactive] <serviceId> <serviceId>]

Example:

hdfs haadmin -failover -forceactive namenode1(active) namenode1(standby)

If you want to do it from Ambari just restart active namenode, during this process it will make standby as active and after restarted namenode came up it will move to standby but this is not recommended best practice

avatar
Contributor

If the automatic failover is enabled in the cluster, to trigger the failover from Ambari, do not restart the active NameNode but shutdown the zkfc daemon on the active NN machine (note that to restart the NN in a large cluster may take a long time). Restart that zkfc daemon after the failover happens.