Class RunningDatanodeState
java.lang.Object
org.apache.hadoop.ozone.container.common.states.datanode.RunningDatanodeState
- All Implemented Interfaces:
DatanodeState
Class that implements handshake with SCM.
-
Constructor Summary
ConstructorsConstructorDescriptionRunningDatanodeState(org.apache.hadoop.hdds.conf.ConfigurationSource conf, SCMConnectionManager connectionManager, StateContext context) -
Method Summary
Modifier and TypeMethodDescriptionWait for execute to finish.voidclear()Clean up some resources.voidexecute(ExecutorService executor) Executes one or more tasks that is needed by this state.voidonEnter()Called before entering this state.voidonExit()Called After exiting this state.void
-
Constructor Details
-
RunningDatanodeState
public RunningDatanodeState(org.apache.hadoop.hdds.conf.ConfigurationSource conf, SCMConnectionManager connectionManager, StateContext context)
-
-
Method Details
-
onEnter
public void onEnter()Called before entering this state.- Specified by:
onEnterin interfaceDatanodeState
-
onExit
public void onExit()Called After exiting this state.- Specified by:
onExitin interfaceDatanodeState
-
execute
Executes one or more tasks that is needed by this state.- Specified by:
executein interfaceDatanodeState- Parameters:
executor- - ExecutorService
-
setExecutorCompletionService
-
await
public DatanodeStateMachine.DatanodeStates await(long duration, TimeUnit timeUnit) throws InterruptedException Wait for execute to finish.- Specified by:
awaitin interfaceDatanodeState- Parameters:
duration- - TimetimeUnit- - Unit of duration.- Throws:
InterruptedException
-
clear
public void clear()Description copied from interface:DatanodeStateClean up some resources.- Specified by:
clearin interfaceDatanodeState
-