关注 spark技术分享,
撸spark源码 玩spark最佳实践

TransportRequestHandler

TransportRequestHandler

TransportRequestHandler is a MessageHandler of RequestMessage messages from Netty’s Channel.

TransportRequestHandler is created exclusively when TransportContext is requested to createChannelHandler.

Tip

Enable ERROR, WARN, TRACE logging level for org.apache.spark.network.server.TransportRequestHandler logger to see what happens inside.

Add the following line to conf/log4j.properties:

Refer to Logging.

processRpcRequest Internal Method

processRpcRequest…​FIXME

Note
processRpcRequest is used exclusively when TransportRequestHandler is requested to handle a RpcRequest request.

processFetchRequest Internal Method

processFetchRequest…​FIXME

Note
processFetchRequest is used exclusively when TransportRequestHandler is requested to handle a ChunkFetchRequest request.

processOneWayMessage Internal Method

processOneWayMessage…​FIXME

Note
processOneWayMessage is used exclusively when TransportRequestHandler is requested to handle a OneWayMessage request.

processStreamRequest Internal Method

processStreamRequest…​FIXME

Note
processStreamRequest is used exclusively when TransportRequestHandler is requested to handle a StreamRequest request.

Handling RequestMessages — handle Method

Note
handle is part of MessageHandler Contract to handle messages (aka requests).

handle branches off per the type of the input RequestMessage:

For unknown requests, handle simply throws a IllegalArgumentException.

Creating TransportRequestHandler Instance

TransportRequestHandler takes the following when created:

  • Netty’s Channel

  • TransportClient

  • RpcHandler

  • Maximum number of chunks allowed to be transferred at the same time

TransportRequestHandler initializes the internal registries and counters.

赞(0) 打赏
未经允许不得转载:spark技术分享 » TransportRequestHandler
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏