Class ClosePipelineCommandHandler
java.lang.Object
org.apache.hadoop.ozone.container.common.statemachine.commandhandler.ClosePipelineCommandHandler
- All Implemented Interfaces:
CommandHandler
Handler for close pipeline command received from SCM.
-
Constructor Summary
ConstructorsConstructorDescriptionClosePipelineCommandHandler(BiFunction<org.apache.ratis.protocol.RaftPeer, org.apache.ratis.grpc.GrpcTlsConfig, org.apache.ratis.client.RaftClient> newRaftClient, Executor executor) Constructs a closePipelineCommand handler.ClosePipelineCommandHandler(org.apache.hadoop.hdds.conf.ConfigurationSource conf, Executor executor) Constructs a closePipelineCommand handler. -
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 ozoneContainer, StateContext context, SCMConnectionManager connectionManager) Handles a given SCM command.booleanisPipelineCloseInProgress(UUID pipelineID) Returns true if pipeline close is in progress, else false.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
-
ClosePipelineCommandHandler
public ClosePipelineCommandHandler(org.apache.hadoop.hdds.conf.ConfigurationSource conf, Executor executor) Constructs a closePipelineCommand handler. -
ClosePipelineCommandHandler
public ClosePipelineCommandHandler(BiFunction<org.apache.ratis.protocol.RaftPeer, org.apache.ratis.grpc.GrpcTlsConfig, org.apache.ratis.client.RaftClient> newRaftClient, Executor executor) Constructs a closePipelineCommand handler.
-
-
Method Details
-
isPipelineCloseInProgress
Returns true if pipeline close is in progress, else false.- Returns:
- boolean
-
handle
public void handle(SCMCommand<?> command, OzoneContainer ozoneContainer, StateContext context, SCMConnectionManager connectionManager) Handles a given SCM command.- Specified by:
handlein interfaceCommandHandler- Parameters:
command- - SCM CommandozoneContainer- - 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()Returns the command type that this command handler handles.- Specified by:
getCommandTypein interfaceCommandHandler- Returns:
- Type
-
getInvocationCount
public int getInvocationCount()Returns number of times this handler has been invoked.- Specified by:
getInvocationCountin interfaceCommandHandler- Returns:
- int
-
getAverageRunTime
public long getAverageRunTime()Returns 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
-
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.
-