Class ReconcileContainerCommandHandler
java.lang.Object
org.apache.hadoop.ozone.container.common.statemachine.commandhandler.ReconcileContainerCommandHandler
- All Implemented Interfaces:
CommandHandler
Handles commands from SCM to reconcile a container replica on this datanode with the replicas on its peers.
-
Constructor Summary
ConstructorsConstructorDescriptionReconcileContainerCommandHandler(ReplicationSupervisor supervisor, DNContainerOperationClient dnClient) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the average time this function takes to run.org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.SCMCommandProto.TypeReturns the command type that this command handler handles.intReturns number of times this handler has been invoked.intReturns the queued command count for this handler.longReturns the total time this function takes to run.voidhandle(SCMCommand command, OzoneContainer container, StateContext context, SCMConnectionManager connectionManager) Handles a given SCM command.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.ozone.container.common.statemachine.commandhandler.CommandHandler
getThreadPoolActivePoolSize, getThreadPoolMaxPoolSize, stop, updateCommandStatus
-
Constructor Details
-
ReconcileContainerCommandHandler
public ReconcileContainerCommandHandler(ReplicationSupervisor supervisor, DNContainerOperationClient dnClient)
-
-
Method Details
-
handle
public void handle(SCMCommand command, OzoneContainer container, StateContext context, SCMConnectionManager connectionManager) Description copied from interface:CommandHandlerHandles a given SCM command.- Specified by:
handlein interfaceCommandHandler- Parameters:
command- - SCM Commandcontainer- - Ozone Container.context- - Current Context.connectionManager- - The SCMs that we are talking to.
-
getCommandType
public org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.SCMCommandProto.Type getCommandType()Description copied from interface:CommandHandlerReturns the command type that this command handler handles.- Specified by:
getCommandTypein interfaceCommandHandler- Returns:
- Type
-
getQueuedCount
public int getQueuedCount()Description copied from interface:CommandHandlerReturns the queued command count for this handler.- Specified by:
getQueuedCountin interfaceCommandHandler- Returns:
- The number of queued commands inside this handler.
-
getInvocationCount
public int getInvocationCount()Description copied from interface:CommandHandlerReturns number of times this handler has been invoked.- Specified by:
getInvocationCountin interfaceCommandHandler- Returns:
- int
-
getAverageRunTime
public long getAverageRunTime()Description copied from interface:CommandHandlerReturns the average time this function takes to run.- Specified by:
getAverageRunTimein interfaceCommandHandler- Returns:
- long
-
getTotalRunTime
public long getTotalRunTime()Description copied from interface:CommandHandlerReturns the total time this function takes to run.- Specified by:
getTotalRunTimein interfaceCommandHandler- Returns:
- long
-
getMetricsName
-