Skip to content

TransportContext

Creating Instance

TransportContext takes the following to be created:

  • TransportConf
  • RpcHandler
  • closeIdleConnections flag
  • isClientOnly flag

TransportContext is created when:

  • ExternalBlockStoreClient is requested to init
  • ExternalShuffleService is requested to start
  • NettyBlockTransferService is requested to init
  • NettyRpcEnv is created and requested to downloadClient
  • YarnShuffleService (Spark on YARN) is requested to serviceInit

Creating Server

TransportServer createServer(
  int port,
  List<TransportServerBootstrap> bootstraps)
TransportServer createServer(
  String host,
  int port,
  List<TransportServerBootstrap> bootstraps)

createServer creates a TransportServer (with the RpcHandler and the input arguments).

createServer is used when:

  • YarnShuffleService (Spark on YARN) is requested to serviceInit
  • ExternalShuffleService is requested to start
  • NettyBlockTransferService is requested to createServer
  • NettyRpcEnv is requested to startServer

Creating TransportClientFactory

TransportClientFactory createClientFactory() // (1)
TransportClientFactory createClientFactory(
  List<TransportClientBootstrap> bootstraps)
  1. Uses empty bootstraps

createClientFactory creates a TransportClientFactory (with itself and the given TransportClientBootstraps).

createClientFactory is used when:

  • ExternalBlockStoreClient is requested to init
  • NettyBlockTransferService is requested to init
  • NettyRpcEnv is created and requested to downloadClient