Package org.apache.spark.network.server

Examples of org.apache.spark.network.server.TransportChannelHandler


   * be used to communicate on this channel. The TransportClient is directly associated with a
   * ChannelHandler to ensure all users of the same channel get the same TransportClient object.
   */
  public TransportChannelHandler initializePipeline(SocketChannel channel) {
    try {
      TransportChannelHandler channelHandler = createChannelHandler(channel);
      channel.pipeline()
        .addLast("encoder", encoder)
        .addLast("frameDecoder", NettyUtils.createFrameDecoder())
        .addLast("decoder", decoder)
        // NOTE: Chunks are currently guaranteed to be returned in the order of request, but this
View Full Code Here


  private TransportChannelHandler createChannelHandler(Channel channel) {
    TransportResponseHandler responseHandler = new TransportResponseHandler(channel);
    TransportClient client = new TransportClient(channel, responseHandler);
    TransportRequestHandler requestHandler = new TransportRequestHandler(channel, client,
      rpcHandler);
    return new TransportChannelHandler(client, responseHandler, requestHandler);
  }
View Full Code Here

    final AtomicReference<TransportClient> clientRef = new AtomicReference<TransportClient>();

    bootstrap.handler(new ChannelInitializer<SocketChannel>() {
      @Override
      public void initChannel(SocketChannel ch) {
        TransportChannelHandler clientHandler = context.initializePipeline(ch);
        clientRef.set(clientHandler.getClient());
      }
    });

    // Connect to the remote server
    long preConnect = System.currentTimeMillis();
View Full Code Here

TOP

Related Classes of org.apache.spark.network.server.TransportChannelHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.