Skip to content

TransportContext

= TransportContext

TransportContext is used to create a <> or <>.

== [[creating-instance]] Creating Instance

TransportContext takes the following to be created:

  • [[conf]] network:TransportConf.md[]
  • [[rpcHandler]] network:RpcHandler.md[]
  • [[closeIdleConnections]] closeIdleConnections flag (default: false)

TransportContext is created when:

  • ExternalShuffleClient is requested to storage:ExternalShuffleClient.md#init[initialize]

  • YarnShuffleService is requested to spark-on-yarn:spark-yarn-YarnShuffleService.md#serviceInit[serviceInit]

== [[createClientFactory]] createClientFactory Method

[source,java]

TransportClientFactory createClientFactory( List bootstraps)


createClientFactory...FIXME

createClientFactory is used when TransportContext is requested to <>.

== [[createChannelHandler]] createChannelHandler Method

[source, java]

TransportChannelHandler createChannelHandler( Channel channel, RpcHandler rpcHandler)


createChannelHandler...FIXME

createChannelHandler is used when TransportContext is requested to <>.

== [[initializePipeline]] initializePipeline Method

[source, java]

TransportChannelHandler initializePipeline( SocketChannel channel) // <1> TransportChannelHandler initializePipeline( SocketChannel channel, RpcHandler channelRpcHandler)


<1> Uses the <>

initializePipeline...FIXME

initializePipeline is used when:

  • TransportServer is requested to network:TransportServer.md#init[init]

  • TransportClientFactory is requested to network:TransportClientFactory.md#createClient[createClient]

== [[createServer]] Creating Server

[source, java]

TransportServer createServer() TransportServer createServer( int port, List bootstraps) TransportServer createServer( List bootstraps) TransportServer createServer( String host, int port, List bootstraps)


createServer simply creates a TransportServer (with the current TransportContext, the host, the port, the <> and the bootstraps).

createServer is used when:

  • NettyBlockTransferService is requested to storage:NettyBlockTransferService.md#createServer[createServer]

  • NettyRpcEnv is requested to startServer

  • ExternalShuffleService is requested to deploy:ExternalShuffleService.md#start[start]

  • Spark on YARN's YarnShuffleService is requested to serviceInit


Last update: 2020-10-06