Interface XceiverServerSpi
- All Known Implementing Classes:
XceiverServerGrpc,XceiverServerRatis
public interface XceiverServerSpi
A server endpoint that acts as the communication layer for Ozone containers.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddGroup(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId, List<org.apache.hadoop.hdds.protocol.DatanodeDetails> peers) Join a new pipeline.default voidaddGroup(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId, List<org.apache.hadoop.hdds.protocol.DatanodeDetails> peers, List<Integer> priorityList) Join a new pipeline with priority.intGet server IPC port.List<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.PipelineReport> Get pipeline report for the XceiverServer instance.org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationTypeReturns the Replication type supported by this end-point.default List<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.MetadataStorageReportProto> Get storage report for the XceiverServer instance.booleanisExist(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId) Returns true if the given pipeline exist.default voidremoveGroup(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId) Exit a pipeline.voidstart()Starts the server.voidstop()Stops a running server.voidsubmitRequest(org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.ContainerCommandRequestProto request, org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineID) submits a containerRequest to be performed by the replication pipeline.
-
Method Details
-
start
Starts the server.- Throws:
IOException
-
stop
void stop()Stops a running server. -
getIPCPort
int getIPCPort()Get server IPC port. -
getServerType
org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationType getServerType()Returns the Replication type supported by this end-point.- Returns:
- enum -- {Stand_Alone, Ratis, Chained}
-
submitRequest
void submitRequest(org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.ContainerCommandRequestProto request, org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineID) throws IOException submits a containerRequest to be performed by the replication pipeline.- Parameters:
request- ContainerCommandRequest- Throws:
IOException
-
isExist
boolean isExist(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId) Returns true if the given pipeline exist.- Returns:
- true if pipeline present, else false
-
addGroup
default void addGroup(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId, List<org.apache.hadoop.hdds.protocol.DatanodeDetails> peers) throws IOException Join a new pipeline.- Throws:
IOException
-
addGroup
default void addGroup(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId, List<org.apache.hadoop.hdds.protocol.DatanodeDetails> peers, List<Integer> priorityList) throws IOException Join a new pipeline with priority.- Throws:
IOException
-
removeGroup
default void removeGroup(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId) throws IOException Exit a pipeline.- Throws:
IOException
-
getPipelineReport
List<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.PipelineReport> getPipelineReport()Get pipeline report for the XceiverServer instance.- Returns:
- list of report for each pipeline.
-
getStorageReport
default List<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.MetadataStorageReportProto> getStorageReport() throws IOExceptionGet storage report for the XceiverServer instance.- Returns:
- list of report for each storage location.
- Throws:
IOException
-