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
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 Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the blob transfer manager and related resourcesCompletionStage<? extends InputStream>
get
(String storeName, int version, int partition, BlobTransferUtils.BlobTransferTableFormat requestTableFormat) Get the blobs for the given storeName and partitionGet the blob transfer statsPut the blob for the given storeName and partitionvoid
start()
Start the blob transfer manager and related resources
-
Method Details
-
start
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
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
Close the blob transfer manager and related resources- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getAggVersionedBlobTransferStats
AggVersionedBlobTransferStats getAggVersionedBlobTransferStats()Get the blob transfer stats- Returns:
- the blob transfer stats
-