Search in sources :

Example 1 with ProtobufVarint32FrameDecoder

use of org.apache.hbase.thirdparty.io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder in project hbase by apache.

the class FanOutOneBlockAsyncDFSOutput method setupReceiver.

private void setupReceiver(int timeoutMs) {
    AckHandler ackHandler = new AckHandler(timeoutMs);
    for (Channel ch : datanodeInfoMap.keySet()) {
        ch.pipeline().addLast(new IdleStateHandler(timeoutMs, timeoutMs / 2, 0, TimeUnit.MILLISECONDS), new ProtobufVarint32FrameDecoder(), new ProtobufDecoder(PipelineAckProto.getDefaultInstance()), ackHandler);
        ch.config().setAutoRead(true);
    }
}
Also used : Channel(org.apache.hbase.thirdparty.io.netty.channel.Channel) IdleStateHandler(org.apache.hbase.thirdparty.io.netty.handler.timeout.IdleStateHandler) ProtobufVarint32FrameDecoder(org.apache.hbase.thirdparty.io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder)

Aggregations

Channel (org.apache.hbase.thirdparty.io.netty.channel.Channel)1 ProtobufVarint32FrameDecoder (org.apache.hbase.thirdparty.io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder)1 IdleStateHandler (org.apache.hbase.thirdparty.io.netty.handler.timeout.IdleStateHandler)1