@InterfaceAudience.Private public class NettyRpcFrameDecoder extends org.apache.hbase.thirdparty.io.netty.handler.codec.ByteToMessageDecoder
Modifier and Type | Field and Description |
---|---|
private NettyServerRpcConnection |
connection |
private static int |
FRAME_LENGTH_FIELD_LENGTH |
private int |
maxFrameLength |
private boolean |
requestTooBig |
private String |
requestTooBigMessage |
Constructor and Description |
---|
NettyRpcFrameDecoder(int maxFrameLength) |
Modifier and Type | Method and Description |
---|---|
protected void |
decode(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx,
org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf in,
List<Object> out) |
private org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader |
getHeader(org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf in,
int headerSize) |
private void |
handleTooBigRequest(org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf in) |
private static int |
readRawVarint32(org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf buffer)
Reads variable length 32bit int from buffer
This method is from ProtobufVarint32FrameDecoder in Netty and modified a little bit
to pass the cyeckstyle rule.
|
(package private) void |
setConnection(NettyServerRpcConnection connection) |
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
ensureNotSharable, handlerAdded, isSharable
private static int FRAME_LENGTH_FIELD_LENGTH
private final int maxFrameLength
private boolean requestTooBig
private String requestTooBigMessage
private NettyServerRpcConnection connection
public NettyRpcFrameDecoder(int maxFrameLength)
void setConnection(NettyServerRpcConnection connection)
protected void decode(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf in, List<Object> out) throws Exception
decode
in class org.apache.hbase.thirdparty.io.netty.handler.codec.ByteToMessageDecoder
Exception
private void handleTooBigRequest(org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf in) throws IOException
IOException
private org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader getHeader(org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf in, int headerSize) throws IOException
IOException
private static int readRawVarint32(org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf buffer)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.