hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientInitializer.java
@Override
  protected void initChannel(SocketChannel ch) throws Exception {
    ChannelPipeline p = ch.pipeline();

    p.addLast(new ProtobufVarint32FrameDecoder());
    p.addLast(new ProtobufDecoder(ContainerProtos
        .ContainerCommandResponseProto.getDefaultInstance()));

    p.addLast(new ProtobufVarint32LengthFieldPrepender());
    p.addLast(new ProtobufEncoder());

    p.addLast(new XceiverClientHandler(this.pipeline, this.semaphore));

  }
/**
   * This method will be called once when the Channel is registered. After
   * the method returns this instance will be removed from the
   * ChannelPipeline of the Channel.
   *
   * @param ch   Channel which was registered.
   * @throws Exception is thrown if an error occurs. In that case the
   *                   Channel will be closed.
   */
This method will be called once when the Channel is registered. After
the method returns this instance will be removed from the
ChannelPipeline of the Channel.

@param ch   Channel which was registered.
@throws Exception is thrown if an error occurs. In that case the
Channel will be closed.
This method will be called once when the Channel is registered . After the method returns this instance will be removed from the ChannelPipeline of the Channel . @param ch Channel which was registered . @throws Exception is thrown if an error occurs . In that case the Channel will be closed .
@Override
  protected void initChannel(SocketChannel ch) throws Exception {
    ChannelPipeline p = ch.pipeline();
    p.addLast(new ProtobufVarint32FrameDecoder());
    p.addLast(new ProtobufDecoder(ContainerProtos
        .ContainerCommandResponseProto.getDefaultInstance()));
    p.addLast(new ProtobufVarint32LengthFieldPrepender());
    p.addLast(new ProtobufEncoder());
    p.addLast(new XceiverClientHandler(this.pipeline, this.semaphore));
  }
@ Override protected void initChannel ( SocketChannel ch ) throws Exception { ChannelPipeline p = ch . pipeline ( ) ; p . addLast ( new ProtobufVarint32FrameDecoder ( ) ) ; p . addLast ( new ProtobufDecoder ( ContainerProtos . ContainerCommandResponseProto . getDefaultInstance ( ) ) ) ; p . addLast ( new ProtobufVarint32LengthFieldPrepender ( ) ) ; p . addLast ( new ProtobufEncoder ( ) ) ; p . addLast ( new XceiverClientHandler ( this . pipeline , this . semaphore ) ) ; }
This method will be called once when the Channel is registered.
This method will be called once when the Channel is registered .