Class ActiveState
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.ha.HAState
org.apache.hadoop.hdfs.server.namenode.ha.ActiveState
Active state of the namenode. In this state, namenode provides the namenode
service and handles operations of type
NameNode.OperationCategory.WRITE and
NameNode.OperationCategory.READ.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckOperation(HAContext context, NameNode.OperationCategory op) Check if an operation is supported in a given state.voidenterState(HAContext context) Method to be overridden by subclasses to perform steps necessary for entering a state.voidMethod to be overridden by subclasses to perform steps necessary for exiting a state.voidMove from the existing state to a new statebooleanMethods inherited from class org.apache.hadoop.hdfs.server.namenode.ha.HAState
getLastHATransitionTime, getServiceState, prepareToEnterState, prepareToExitState, setStateInternal, toString
-
Constructor Details
-
ActiveState
public ActiveState()
-
-
Method Details
-
checkOperation
Description copied from class:HAStateCheck if an operation is supported in a given state.- Specified by:
checkOperationin classHAState- Parameters:
context- HA contextop- Type of the operation.
-
shouldPopulateReplQueues
public boolean shouldPopulateReplQueues()- Specified by:
shouldPopulateReplQueuesin classHAState
-
setState
public void setState(HAContext context, HAState s) throws org.apache.hadoop.ha.ServiceFailedException Description copied from class:HAStateMove from the existing state to a new state -
enterState
Description copied from class:HAStateMethod to be overridden by subclasses to perform steps necessary for entering a state.- Specified by:
enterStatein classHAState- Parameters:
context- HA context- Throws:
org.apache.hadoop.ha.ServiceFailedException- on failure to enter the state.
-
exitState
Description copied from class:HAStateMethod to be overridden by subclasses to perform steps necessary for exiting a state.
-