[ 
https://issues.apache.org/jira/browse/HBASE-21587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575063#comment-17575063
 ] 

Ayush Saxena commented on HBASE-21587:
--------------------------------------

Hitting the same issue, tried replacing hbase-client with hbase-shaded client, 
but seems that started conflicting with hadoop-common and keeping it provided 
scope doesn't work? Why the shaded one conflicts with hadoop-common? the change 
started giving me Compilation issues..

I am trying to upgrade protobuf in Hive and it requires a Hbase upgrade as 
well, since Hbase shaded protobuf in ver 2.
So, when trying to upgrade, I observed Hbase does hold instances of 
protobuf-2.5.0 and once you remove proto-2.5.0 it cries for missing 
LiteralByteString, which is from protobuf 2.5.0. As said above I replaced 
hbase-client with hbase-shaded-client, but the catch is If I change it, it 
conflicts with some hadoop-common stuff and start getting compilation 
issues.([https://github.com/apache/hive/pull/3498/files#diff-311d647cb893cde96d15653dac73c48ee52493ed831a7bf6453e7ba7a011adb0L147-R154]),
 I kept scope provided here, but that doesn’t solve my problem


Any pointers here?

> 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)

Reply via email to