Class NettyP2PBlobTransferManager

  • All Implemented Interfaces:
    BlobTransferManager<java.lang.Void>, P2PBlobTransferManager<java.lang.Void>, java.lang.AutoCloseable

    public class NettyP2PBlobTransferManager
    extends java.lang.Object
    implements P2PBlobTransferManager<java.lang.Void>
    Netty based P2P blob transfer manager implementation. Upon start, it starts the blob transfer service and the client, so it can receive requests from peers to serve blobs and in the meanwhile, it can make requests to other peers to fetch blobs.
    • Method Detail

      • start

        public void start()
                   throws java.lang.Exception
        Description copied from interface: BlobTransferManager
        Start the blob transfer manager and related resources
        Specified by:
        start in interface BlobTransferManager<java.lang.Void>
        Throws:
        java.lang.Exception
      • get

        public java.util.concurrent.CompletionStage<java.io.InputStream> get​(java.lang.String storeName,
                                                                             int version,
                                                                             int partition)
                                                                      throws VenicePeersNotFoundException
        Description copied from interface: BlobTransferManager
        Get the blobs for the given storeName and partition
        Specified by:
        get in interface BlobTransferManager<java.lang.Void>
        Returns:
        the InputStream of the blob. The return type is experimental and may change in the future.
        Throws:
        VenicePeersNotFoundException - when the peers are not found for the requested blob. Other exceptions may be thrown, but it's wrapped inside the CompletionStage.
      • close

        public void close()
                   throws java.lang.Exception
        Description copied from interface: BlobTransferManager
        Close the blob transfer manager and related resources
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface BlobTransferManager<java.lang.Void>
        Throws:
        java.lang.Exception