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 TypeMethodDescriptionvoidclose()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 statsintNumber of replicas currently holding a receive channel.Put the blob for the given storeName and partitionvoidstart()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, VenicePeersAllFailedException 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 no peers are found for the requested blob.VenicePeersAllFailedException- when peers are found but all peers sequentially fail to complete the blob transfer. 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:
closein interfaceAutoCloseable- Throws:
Exception
-
getAggVersionedBlobTransferStats
AggVersionedBlobTransferStats getAggVersionedBlobTransferStats()Get the blob transfer stats- Returns:
- the blob transfer stats
-
getTransferStatusTrackingManager
BlobTransferStatusTrackingManager getTransferStatusTrackingManager() -
getInFlightReceiveCount
int getInFlightReceiveCount()Number of replicas currently holding a receive channel. A channel is counted from the moment it is opened until the transfer drains, which is the window over which it consumes the receiver's direct memory, so this is the quantity a receive-side admission check has to look at.
-