Class CloseContainerCommand
java.lang.Object
org.apache.hadoop.ozone.protocol.commands.SCMCommand<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CloseContainerCommandProto>
org.apache.hadoop.ozone.protocol.commands.CloseContainerCommand
- All Implemented Interfaces:
org.apache.hadoop.hdds.server.events.IdentifiableEventPayload
public class CloseContainerCommand
extends SCMCommand<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CloseContainerCommandProto>
Asks datanode to close a container.
-
Constructor Summary
ConstructorsConstructorDescriptionCloseContainerCommand(long containerID, org.apache.hadoop.hdds.scm.pipeline.PipelineID pipelineID) CloseContainerCommand(long containerID, org.apache.hadoop.hdds.scm.pipeline.PipelineID pipelineID, boolean force) -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongstatic CloseContainerCommandgetFromProtobuf(org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CloseContainerCommandProto closeContainerProto) org.apache.hadoop.hdds.scm.pipeline.PipelineIDorg.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CloseContainerCommandProtogetProto()Gets the protobuf message of this object.org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.SCMCommandProto.TypegetType()Returns the type of this command.inthashCode()booleanisForce()toString()Methods inherited from class org.apache.hadoop.ozone.protocol.commands.SCMCommand
contributesToQueueSize, getDeadline, getEncodedToken, getId, getTerm, hasExpired, setDeadline, setEncodedToken, setTerm
-
Constructor Details
-
CloseContainerCommand
public CloseContainerCommand(long containerID, org.apache.hadoop.hdds.scm.pipeline.PipelineID pipelineID) -
CloseContainerCommand
public CloseContainerCommand(long containerID, org.apache.hadoop.hdds.scm.pipeline.PipelineID pipelineID, boolean force)
-
-
Method Details
-
getType
public org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.SCMCommandProto.Type getType()Returns the type of this command.- Specified by:
getTypein classSCMCommand<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CloseContainerCommandProto>- Returns:
- Type
-
getProto
public org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CloseContainerCommandProto getProto()Description copied from class:SCMCommandGets the protobuf message of this object.- Specified by:
getProtoin classSCMCommand<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CloseContainerCommandProto>- Returns:
- A protobuf message.
-
getFromProtobuf
public static CloseContainerCommand getFromProtobuf(org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CloseContainerCommandProto closeContainerProto) -
getContainerID
public long getContainerID() -
getPipelineID
public org.apache.hadoop.hdds.scm.pipeline.PipelineID getPipelineID() -
isForce
public boolean isForce() -
toString
- Overrides:
toStringin classSCMCommand<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CloseContainerCommandProto>
-
hashCode
public int hashCode() -
equals
-