Class DeleteContainerCommandHandler

java.lang.Object
org.apache.hadoop.ozone.container.common.statemachine.commandhandler.DeleteContainerCommandHandler
All Implemented Interfaces:
CommandHandler

public class DeleteContainerCommandHandler extends Object implements CommandHandler
Handler to process the DeleteContainerCommand from SCM.
  • Constructor Details

    • DeleteContainerCommandHandler

      public DeleteContainerCommandHandler(int threadPoolSize, Clock clock, int queueSize, String threadNamePrefix)
    • DeleteContainerCommandHandler

      protected DeleteContainerCommandHandler(Clock clock, ThreadPoolExecutor executor, int queueSize)
  • Method Details

    • handle

      public void handle(SCMCommand<?> command, OzoneContainer ozoneContainer, StateContext context, SCMConnectionManager connectionManager)
      Description copied from interface: CommandHandler
      Handles a given SCM command.
      Specified by:
      handle in interface CommandHandler
      Parameters:
      command - - SCM Command
      ozoneContainer - - Ozone Container.
      context - - Current Context.
      connectionManager - - The SCMs that we are talking to.
    • getQueuedCount

      public int getQueuedCount()
      Description copied from interface: CommandHandler
      Returns the queued command count for this handler.
      Specified by:
      getQueuedCount in interface CommandHandler
      Returns:
      The number of queued commands inside this handler.
    • getCommandType

      public org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.SCMCommandProto.Type getCommandType()
      Description copied from interface: CommandHandler
      Returns the command type that this command handler handles.
      Specified by:
      getCommandType in interface CommandHandler
      Returns:
      Type
    • getInvocationCount

      public int getInvocationCount()
      Description copied from interface: CommandHandler
      Returns number of times this handler has been invoked.
      Specified by:
      getInvocationCount in interface CommandHandler
      Returns:
      int
    • getTimeoutCount

      public int getTimeoutCount()
    • getAverageRunTime

      public long getAverageRunTime()
      Description copied from interface: CommandHandler
      Returns the average time this function takes to run.
      Specified by:
      getAverageRunTime in interface CommandHandler
      Returns:
      long
    • getTotalRunTime

      public long getTotalRunTime()
      Description copied from interface: CommandHandler
      Returns the total time this function takes to run.
      Specified by:
      getTotalRunTime in interface CommandHandler
      Returns:
      long
    • getThreadPoolMaxPoolSize

      public int getThreadPoolMaxPoolSize()
      Description copied from interface: CommandHandler
      Returns the maximum number of threads allowed in the thread pool for this handler. If the subclass does not override this method, the default implementation will return -1, indicating that the maximum pool size is not applicable or not defined.
      Specified by:
      getThreadPoolMaxPoolSize in interface CommandHandler
      Returns:
      The maximum number of threads allowed in the thread pool, or -1 if not applicable or not defined.
    • getThreadPoolActivePoolSize

      public int getThreadPoolActivePoolSize()
      Description copied from interface: CommandHandler
      Returns the number of threads currently executing tasks in the thread pool for this handler.If the subclass does not override this method, the default implementation will return -1, indicating that the number of active threads is not applicable or not defined.
      Specified by:
      getThreadPoolActivePoolSize in interface CommandHandler
      Returns:
      The number of threads currently executing tasks in the thread pool, or -1 if not applicable or not defined.
    • stop

      public void stop()
      Description copied from interface: CommandHandler
      Override for any command with an internal threadpool, and stop the executor when this method is invoked.
      Specified by:
      stop in interface CommandHandler