init(blockDataManager: BlockDataManager): Unit
BlockTransferService
BlockTransferService is a contract for specialized ShuffleClient objects that can fetch and upload blocks in synchronously and asynchronously.
|
Note
|
BlockTransferService is a private[spark] abstract class.
|
|
Note
|
NettyBlockTransferService is the only available implementation of BlockTransferService Contract. |
BlockTransferService Contract
Every BlockTransferService offers the following:
-
initthat accepts BlockDataManager for storing or fetching blocks. It is assumed that the method is called before the service is considered fully operational. -
portthe service listens to.port: Int -
hostNamethe service listens to.hostName: String
-
uploadBlockto upload a block (ofManagedBufferidentified byBlockId) to a remotehostnameandport.uploadBlock( hostname: String, port: Int, execId: String, blockId: BlockId, blockData: ManagedBuffer, level: StorageLevel, classTag: ClassTag[_]): Future[Unit] -
Synchronous (and hence blocking)
fetchBlockSyncto fetch one blockblockId(that corresponds to the ShuffleClient parent’s asynchronous fetchBlocks).fetchBlockSync( host: String, port: Int, execId: String, blockId: String): ManagedBufferfetchBlockSyncis a mere wrapper around fetchBlocks to fetch oneblockIdblock that waits until the fetch finishes. -
Synchronous (and hence blocking)
uploadBlockSyncto upload a block (ofManagedBufferidentified byBlockId) to a remotehostnameandport.uploadBlockSync( hostname: String, port: Int, execId: String, blockId: BlockId, blockData: ManagedBuffer, level: StorageLevel, classTag: ClassTag[_]): UnituploadBlockSyncis a mere wrapper around uploadBlock that waits until the upload finishes.
NettyBlockTransferService - Netty-Based BlockTransferService
|
Caution
|
FIXME |