use of alluxio.network.protocol.RPCMessageEncoder in project alluxio by Alluxio.
the class PipelineHandler method initChannel.
@Override
protected void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast("frameDecoder", RPCMessage.createFrameDecoder());
pipeline.addLast("RPCMessageDecoder", new RPCMessageDecoder());
pipeline.addLast("RPCMessageEncoder", new RPCMessageEncoder());
pipeline.addLast("dataServerHandler", mDataServerHandler);
pipeline.addLast("dataServerBlockReadHandler", new DataServerBlockReadHandler(NettyExecutors.BLOCK_READER_EXECUTOR, mWorker.getBlockWorker(), mFileTransferType));
pipeline.addLast("dataServerUfsBlockReadHandler", new DataServerUfsBlockReadHandler(NettyExecutors.UFS_BLOCK_READER_EXECUTOR, mWorker.getBlockWorker()));
pipeline.addLast("dataServerBlockWriteHandler", new DataServerBlockWriteHandler(NettyExecutors.BLOCK_WRITER_EXECUTOR, mWorker.getBlockWorker()));
// DataServerFileReadHandler is deprecated. It is here for backward compatibility.
pipeline.addLast("dataServerFileReadHandler", new DataServerUFSFileReadHandler(NettyExecutors.UFS_BLOCK_READER_EXECUTOR, mWorker.getFileSystemWorker()));
pipeline.addLast("dataServerFileWriteHandler", new DataServerUFSFileWriteHandler(NettyExecutors.FILE_WRITER_EXECUTOR, mWorker.getFileSystemWorker()));
}
Aggregations