PrepAway - Latest Free Exam Questions & Answers

What occurs when you execute the command: Hdfs haadmin -failover nn01 nn02

Your cluster implements HDFS High Availability (HA). You two NameNodes are named nn01 and
nn02. What occurs when you execute the command:
Hdfs haadmin -failover nn01 nn02

PrepAway - Latest Free Exam Questions & Answers

A.
nn02 becomes the standby NameNode and nn02 becomes the active NameNode

B.
Nn01 is fenced, and nn01 becomes the active NameNode

C.
Nn01 is fenced, and nn02 becomes the active NameNode

D.
Nn01 becomes the standby NameNode and nn02 becomes the active NameNode

Explanation:
Failover- initiate a failover between two NameNodes
This subcommand causes a failover from the first provided NameNode to the second. If the first
NameNode is in the Standby state, this command simply transitions the second to the Active state
without error. If the first NameNode is in the Active state, an attempt will be made to gracefully
transition it to the Standby state. If this fails, the fencing methods (as configured by
dfs.ha.fencing.methods) will be attempted in order until one of the methods succeeds. Only after
this process will the second NameNode be transitioned to the Active state. If no fencing method
succeeds, the second NameNode will not be transitioned to the Active state, and an error will be
returned.
Reference:
HDFS High Availability Administration, HA Administration using the haadmin command

4 Comments on “What occurs when you execute the command: Hdfs haadmin -failover nn01 nn02

  1. Dev says:

    Also if you look at apache documentation, so C and D both should be correct.

    failover – initiate a failover between two NameNodes
    This subcommand causes a failover from the first provided NameNode to the second. If the first NameNode is in the Standby state, this command simply transitions the second to the Active state without error. If the first NameNode is in the Active state, an attempt will be made to gracefully transition it to the Standby state. If this fails, the fencing methods (as configured by dfs.ha.fencing.methods) will be attempted in order until one succeeds. Only after this process will the second NameNode be transitioned to the Active state. If no fencing method succeeds, the second NameNode will not be transitioned to the Active state, and an error will be returned.




    0



    0
  2. worgen says:

    should be B。
    from the definitive guide。
    The transition from the active namenode to the standby is managed by a new entity in the system called the failover controller. There are various failover controllers, but the default implementation uses ZooKeeper to ensure that only one namenode is active. Each namenode runs a lightweight failover controller process whose job it is to monitor its namenode for failures (using a simple heartbeating mechanism) and trigger a failover should a namenode fail.
    Failover may also be initiated manually by an administrator, for example, in the case of routine maintenance. This is known as a graceful failover, since the failover controller arranges an orderly transition for both namenodes to switch roles.
    In the case of an ungraceful failover, however, it is impossible to be sure that the failed namenode has stopped running. For example, a slow network or a network partition can trigger a failover transition, even though the previously active namenode is still running and thinks it is still the active namenode. The HA implementation goes to great lengths to ensure that the previously active namenode is prevented from doing any damage and causing corruption — a method known as fencing.




    0



    0

Leave a Reply

Your email address will not be published. Required fields are marked *