Class ProtobufDecoder
java.lang.Object
org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter
org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
org.apache.hbase.thirdparty.io.netty.handler.codec.MessageToMessageDecoder<org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf>
org.apache.hadoop.hbase.io.asyncfs.ProtobufDecoder
- All Implemented Interfaces:
org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
,org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
@Private
public class ProtobufDecoder
extends org.apache.hbase.thirdparty.io.netty.handler.codec.MessageToMessageDecoder<org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf>
Modified based on io.netty.handler.codec.protobuf.ProtobufDecoder. The Netty's ProtobufDecode
supports unshaded protobuf messages (com.google.protobuf). Hadoop 3.3.0 and above relocates
protobuf classes to a shaded jar (hadoop-thirdparty), and so we must use reflection to detect
which one (relocated or not) to use. Do not use this to process HBase's shaded protobuf messages.
This is meant to process the protobuf messages in HDFS for the asyncfs use case.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler.Sharable
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.hbase.thirdparty.io.netty.handler.codec.MessageToMessageDecoder
acceptInboundMessage, channelRead
Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
LOG
-
protobufMessageLiteClass
-
protobufMessageLiteBuilderClass
-
HAS_PARSER
-
getParserForTypeMethod
-
newBuilderForTypeMethod
-
parseFromMethod
-
mergeFromMethod
-
buildMethod
-
parser
-
builder
-
-
Constructor Details
-
ProtobufDecoder
-
-
Method Details
-
decode
protected void decode(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf msg, List<Object> out) throws Exception - Specified by:
decode
in classorg.apache.hbase.thirdparty.io.netty.handler.codec.MessageToMessageDecoder<org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf>
- Throws:
Exception
-