Class NettyP2PBlobTransferManager
java.lang.Object
com.linkedin.davinci.blobtransfer.NettyP2PBlobTransferManager
- All Implemented Interfaces:
BlobTransferManager<Void>,P2PBlobTransferManager<Void>,AutoCloseable
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AggVersionedBlobTransferStatsprotected final NettyFileTransferClientprotected final BlobFinder -
Constructor Summary
ConstructorsConstructorDescriptionNettyP2PBlobTransferManager(P2PBlobTransferService blobTransferService, NettyFileTransferClient nettyClient, BlobFinder peerFinder, String baseDir, AggVersionedBlobTransferStats aggVersionedBlobTransferStats) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the blob transfer manager and related resourcesget(String storeName, int version, int partition, BlobTransferUtils.BlobTransferTableFormat tableFormat) Get the blobs for the given storeName and partitionGet the blob transfer statsvoidstart()Start the blob transfer manager and related resourcesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.davinci.blobtransfer.P2PBlobTransferManager
put
-
Field Details
-
nettyClient
-
aggVersionedBlobTransferStats
-
peerFinder
-
-
Constructor Details
-
NettyP2PBlobTransferManager
public NettyP2PBlobTransferManager(P2PBlobTransferService blobTransferService, NettyFileTransferClient nettyClient, BlobFinder peerFinder, String baseDir, AggVersionedBlobTransferStats aggVersionedBlobTransferStats)
-
-
Method Details
-
start
Description copied from interface:BlobTransferManagerStart the blob transfer manager and related resources- Specified by:
startin interfaceBlobTransferManager<Void>- Throws:
Exception
-
get
public CompletionStage<InputStream> get(String storeName, int version, int partition, BlobTransferUtils.BlobTransferTableFormat tableFormat) throws VenicePeersNotFoundException Description copied from interface:BlobTransferManagerGet the blobs for the given storeName and partition- Specified by:
getin interfaceBlobTransferManager<Void>tableFormat- 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.
-
close
Description copied from interface:BlobTransferManagerClose the blob transfer manager and related resources- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBlobTransferManager<Void>- Throws:
Exception
-
getAggVersionedBlobTransferStats
Get the blob transfer stats- Specified by:
getAggVersionedBlobTransferStatsin interfaceBlobTransferManager<Void>- Returns:
- the blob transfer stats
-