You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Solomon Duskis (JIRA)" <ji...@apache.org> on 2018/12/11 21:37:00 UTC
[jira] [Commented] (HBASE-21587) Improve support for protobuf 3
[ https://issues.apache.org/jira/browse/HBASE-21587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16718040#comment-16718040 ]
Solomon Duskis commented on HBASE-21587:
----------------------------------------
I commented on the grpc thread, and I'll also comment here. This issue is related to a pretty complex issue relating to dependency management. There are a variety of approaches on this issue that can be discussed at length, but the most pragmatic approach, IMHO, is to use 'hbase-shaded-client' to get around this issue.
> Improve support for protobuf 3
> ------------------------------
>
> Key: HBASE-21587
> URL: https://issues.apache.org/jira/browse/HBASE-21587
> Project: HBase
> Issue Type: Improvement
> Reporter: Mya Pitzeruse
> Priority: Major
>
> {{HBaseZeroCopyByteString}} extends {{LiteralByteString}} which was removed in protobuf 3. The class was marked as package private, so hbase needed to do a package trick to get to the underlying class.
> [https://github.com/apache/hbase/blob/025ddce868eb06b4072b5152c5ffae5a01e7ae30/hbase-protocol/src/main/java/com/google/protobuf/HBaseZeroCopyByteString.java#L18]
> ejona86 references this problem in grpc-java:
> [https://github.com/grpc/grpc-java/issues/3035#issuecomment-360851817]
> The {{HBaseZeroCopyByteString}} class appears to only be used by {{ByteStringer}} class.
> [https://github.com/apache/hbase/blob/025ddce868eb06b4072b5152c5ffae5a01e7ae30/hbase-protocol/src/main/java/org/apache/hadoop/hbase/util/ByteStringer.java#L42-L49]
> I think a simple change can be made to the {{ByteStringer}} class to support both proto2 and proto3.
> Proto3 offers an {{UnsafeByteOperations}} class that can be used in place of the {{HBaseZeroCopyByteString}} class.
> [https://github.com/protocolbuffers/protobuf/blob/master/java/core/src/main/java/com/google/protobuf/UnsafeByteOperations.java#L97]
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)