You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Duo Zhang (Jira)" <ji...@apache.org> on 2022/08/04 08:30:00 UTC

[jira] [Comment Edited] (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=17575116#comment-17575116 ] 

Duo Zhang edited comment on HBASE-21587 at 8/4/22 8:29 AM:
-----------------------------------------------------------

For HBase 2.x, the coprocessor related APIs still use protobuf 2.5, I'm not sure if it will be a problem if you do not use CPs.

And what is the conflicts and compilation issues?

http://ci.hive.apache.org/job/hive-precommit/job/PR-3498/2/testReport/junit/org.apache.hadoop.hive.hbase/TestPutResultWritable/Testing___split_20___PostProcess___testPut/

This one? It seems that in hive you reference the protobuf messages in HBase directly. Usually this is not a good practise, but in general, it is true that in the big hadoop ecosystem we always reference each other's private classes...

https://github.com/apache/hive/blob/master/hbase-handler/src/java/org/apache/hadoop/hive/hbase/PutWritable.java

Here, in this class, please change to use the classes under 'org.apache.hadoop.hbase.shaded.protobuf' instead of ''org.apache.hadoop.hbase.protobuf'. Shout if you still have issues.

Thanks.



was (Author: apache9):
For HBase 2.x, the coprocessor related APIs still use protobuf 2.5, I'm not sure if it will be a problem if you do not use CPs.

And what is the conflicts and compilation issues?

http://ci.hive.apache.org/job/hive-precommit/job/PR-3498/2/testReport/junit/org.apache.hadoop.hive.hbase/TestPutResultWritable/Testing___split_20___PostProcess___testPut/

This one? It seems that in hive you reference the protobuf messages in HBase directly. Usually this is not a good practise, but in general, it is true that in the big hadoop ecosystem we always reference each others private classes...

https://github.com/apache/hive/blob/master/hbase-handler/src/java/org/apache/hadoop/hive/hbase/PutWritable.java

Here, in this class, please change to use the classes under 'org.apache.hadoop.hbase.shaded.protobuf' instead of ''org.apache.hadoop.hbase.protobuf'. Shout if you still have issues.

Thanks.


> 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
(v8.20.10#820010)