Class CommandStatus

java.lang.Object
org.apache.hadoop.ozone.protocol.commands.CommandStatus
Direct Known Subclasses:
DeleteBlockCommandStatus

public class CommandStatus extends Object
A class that is used to communicate status of datanode commands.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Builder class for CommandStatus.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    getFromProtoBuf(org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CommandStatus cmdStatusProto)
    Returns a CommandStatus from the protocol buffers.
     
    org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CommandStatus
    Returns a CommandStatus from the protocol buffers.
    org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CommandStatus.Status
     
    org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.SCMCommandProto.Type
     
    void
    Marks the command status as executed.
    void
    Marks the command status as failed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getType

      public org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.SCMCommandProto.Type getType()
    • getCmdId

      public Long getCmdId()
    • getStatus

      public org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CommandStatus.Status getStatus()
    • getMsg

      public String getMsg()
    • markAsExecuted

      public void markAsExecuted()
      Marks the command status as executed.
    • markAsFailed

      public void markAsFailed()
      Marks the command status as failed.
    • getFromProtoBuf

      public CommandStatus getFromProtoBuf(org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CommandStatus cmdStatusProto)
      Returns a CommandStatus from the protocol buffers.
      Parameters:
      cmdStatusProto - - protoBuf Message
      Returns:
      CommandStatus
    • getProtoBufMessage

      public org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CommandStatus getProtoBufMessage()
      Returns a CommandStatus from the protocol buffers.
      Returns:
      StorageContainerDatanodeProtocolProtos.CommandStatus