Class CreatePipelineCommandHandler

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

public class CreatePipelineCommandHandler extends Object implements CommandHandler
Handler for create pipeline command received from SCM.
  • Constructor Details

    • CreatePipelineCommandHandler

      public CreatePipelineCommandHandler(org.apache.hadoop.hdds.conf.ConfigurationSource conf, Executor executor)
      Constructs a createPipelineCommand handler.
  • Method Details

    • handle

      public void handle(SCMCommand<?> command, OzoneContainer ozoneContainer, StateContext context, SCMConnectionManager connectionManager)
      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.
    • getCommandType

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

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

      public long getAverageRunTime()
      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
    • 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.