Interface BlobTransferManager<T>

Type Parameters:
T - the type of the object from the underlying blob client to indicate the upload status. It can be a blob ID indicating the blob has been uploaded or an enum representing the status of the blob transfer.
All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
P2PBlobTransferManager<T>
All Known Implementing Classes:
NettyP2PBlobTransferManager

public interface BlobTransferManager<T> extends AutoCloseable
A BlobTransferManager is responsible for transferring blobs between two entities, either that Peer to Peer or node to a blob store and vice versa. The underlying blob client is responsible for the actual transfer of the blob.
  • Method Details

    • start

      void start() throws Exception
      Start the blob transfer manager and related resources
      Throws:
      Exception
    • get

      @Experimental CompletionStage<? extends InputStream> get(String storeName, int version, int partition, BlobTransferUtils.BlobTransferTableFormat requestTableFormat) throws VenicePeersNotFoundException
      Get the blobs for the given storeName and partition
      Parameters:
      storeName -
      version -
      partition -
      requestTableFormat - the table format defined in config (PLAIN_TABLE or BLOCK_BASED_TABLE).
      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.
    • put

      CompletionStage<T> put(String storeName, int version, int partition)
      Put the blob for the given storeName and partition
      Parameters:
      storeName -
      version -
      partition -
      Returns:
      the type of the object returned from the underlying blob client to indicate the upload status
    • close

      void close() throws Exception
      Close the blob transfer manager and related resources
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • getAggVersionedBlobTransferStats

      AggVersionedBlobTransferStats getAggVersionedBlobTransferStats()
      Get the blob transfer stats
      Returns:
      the blob transfer stats