Class GrpcReplicationClient

java.lang.Object
org.apache.hadoop.ozone.container.replication.GrpcReplicationClient
All Implemented Interfaces:
AutoCloseable

public class GrpcReplicationClient extends Object implements AutoCloseable
Client to read container data from gRPC.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    gRPC stream observer to CompletableFuture adapter.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GrpcReplicationClient(String host, int port, org.apache.hadoop.hdds.security.SecurityConfig secConfig, org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient certClient, CopyContainerCompression compression)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    download(long containerId, Path dir)
     
     
    org.apache.ratis.thirdparty.io.grpc.stub.StreamObserver<org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.SendContainerRequest>
    upload(org.apache.ratis.thirdparty.io.grpc.stub.StreamObserver<org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.SendContainerResponse> responseObserver)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GrpcReplicationClient

      public GrpcReplicationClient(String host, int port, org.apache.hadoop.hdds.security.SecurityConfig secConfig, org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient certClient, CopyContainerCompression compression) throws IOException
      Throws:
      IOException
  • Method Details

    • download

      public CompletableFuture<Path> download(long containerId, Path dir)
    • upload

      public org.apache.ratis.thirdparty.io.grpc.stub.StreamObserver<org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.SendContainerRequest> upload(org.apache.ratis.thirdparty.io.grpc.stub.StreamObserver<org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.SendContainerResponse> responseObserver)
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class Object