TransportRequestHandler

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

Creating Instance

TransportRequestHandler takes the following to be created:

  • Netty’s Channel

  • TransportClient

  • RpcHandler

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

TransportRequestHandler is created when TransportContext is requested to create a ChannelHandler.

processRpcRequest Internal Method

void processRpcRequest(
  RpcRequest req)

processRpcRequest…​FIXME

processRpcRequest is used when TransportRequestHandler is requested to handle a request.

processFetchRequest Internal Method

void processFetchRequest(
  ChunkFetchRequest req)

processFetchRequest…​FIXME

processFetchRequest is used when TransportRequestHandler is requested to handle a request.

processOneWayMessage Internal Method

void processOneWayMessage(OneWayMessage req)

processOneWayMessage…​FIXME

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

processStreamRequest Internal Method

void processStreamRequest(final StreamRequest req)

processStreamRequest…​FIXME

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

Handling RequestMessages — handle Method

void handle(RequestMessage request)

handle branches off per the type of the input RequestMessage:

For unknown requests, handle simply throws a IllegalArgumentException.

Unknown request type: [request]

handle is part of MessageHandler abstraction.

Logging

Enable ALL logging level for org.apache.spark.network.server.TransportRequestHandler logger to see what happens inside.

Add the following line to conf/log4j.properties:

log4j.logger.org.apache.spark.network.server.TransportRequestHandler=ALL

Refer to Logging.