java.lang.Object
org.apache.hadoop.ozone.container.common.transport.server.XceiverServerGrpc
All Implemented Interfaces:
XceiverServerSpi

public final class XceiverServerGrpc extends Object implements XceiverServerSpi
Creates a Grpc server endpoint that acts as the communication layer for Ozone containers.
  • Constructor Summary

    Constructors
    Constructor
    Description
    XceiverServerGrpc(org.apache.hadoop.hdds.protocol.DatanodeDetails datanodeDetails, org.apache.hadoop.hdds.conf.ConfigurationSource conf, ContainerDispatcher dispatcher, org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient caClient)
    Constructs a Grpc server class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get 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.ReplicationType
    Returns the Replication type supported by this end-point.
    boolean
    isExist(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId)
    Returns true if the given pipeline exist.
    void
    Starts the server.
    void
    Stops a running server.
    void
    submitRequest(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.hadoop.ozone.container.common.transport.server.XceiverServerSpi

    addGroup, addGroup, getStorageReport, removeGroup
  • Constructor Details

    • XceiverServerGrpc

      public XceiverServerGrpc(org.apache.hadoop.hdds.protocol.DatanodeDetails datanodeDetails, org.apache.hadoop.hdds.conf.ConfigurationSource conf, ContainerDispatcher dispatcher, org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient caClient)
      Constructs a Grpc server class.
      Parameters:
      conf - - Configuration
  • Method Details

    • getIPCPort

      public int getIPCPort()
      Description copied from interface: XceiverServerSpi
      Get server IPC port.
      Specified by:
      getIPCPort in interface XceiverServerSpi
    • getServerType

      public org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationType getServerType()
      Returns the Replication type supported by this end-point.
      Specified by:
      getServerType in interface XceiverServerSpi
      Returns:
      enum -- {Stand_Alone, Ratis, Grpc, Chained}
    • start

      public void start() throws IOException
      Description copied from interface: XceiverServerSpi
      Starts the server.
      Specified by:
      start in interface XceiverServerSpi
      Throws:
      IOException
    • stop

      public void stop()
      Description copied from interface: XceiverServerSpi
      Stops a running server.
      Specified by:
      stop in interface XceiverServerSpi
    • submitRequest

      public void submitRequest(org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.ContainerCommandRequestProto request, org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineID) throws IOException
      Description copied from interface: XceiverServerSpi
      submits a containerRequest to be performed by the replication pipeline.
      Specified by:
      submitRequest in interface XceiverServerSpi
      Parameters:
      request - ContainerCommandRequest
      Throws:
      IOException
    • isExist

      public boolean isExist(org.apache.hadoop.hdds.protocol.proto.HddsProtos.PipelineID pipelineId)
      Description copied from interface: XceiverServerSpi
      Returns true if the given pipeline exist.
      Specified by:
      isExist in interface XceiverServerSpi
      Returns:
      true if pipeline present, else false
    • getPipelineReport

      public List<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.PipelineReport> getPipelineReport()
      Description copied from interface: XceiverServerSpi
      Get pipeline report for the XceiverServer instance.
      Specified by:
      getPipelineReport in interface XceiverServerSpi
      Returns:
      list of report for each pipeline.