Skip to content


= TransportContext

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

== [[creating-instance]] Creating Instance

TransportContext takes the following to be created:

  • [[conf]][]
  • [[rpcHandler]][]
  • [[closeIdleConnections]] closeIdleConnections flag (default: false)

TransportContext is created when:

  • ExternalShuffleClient is requested to[initialize]

  • YarnShuffleService is requested to[serviceInit]

== [[createClientFactory]] createClientFactory Method


TransportClientFactory createClientFactory( List bootstraps)


createClientFactory is used when TransportContext is requested to <>.

== [[createChannelHandler]] createChannelHandler Method

[source, java]

TransportChannelHandler createChannelHandler( Channel channel, RpcHandler rpcHandler)


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 is used when:

  • TransportServer is requested to[init]

  • TransportClientFactory is requested to[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[createServer]

  • NettyRpcEnv is requested to startServer

  • ExternalShuffleService is requested to start

  • Spark on YARN's YarnShuffleService is requested to serviceInit

Last update: 2020-12-16
Back to top