saintstack commented on a change in pull request #1186: HBASE-19146 Update 
Protobuf to 3.11.4
URL: https://github.com/apache/hbase/pull/1186#discussion_r384848933
 
 

 ##########
 File path: 
hbase-protocol/src/main/java/org/apache/hadoop/hbase/util/ByteStringer.java
 ##########
 @@ -56,14 +55,16 @@ private ByteStringer() {
    * Wraps a byte array in a {@link ByteString} without copying it.
    */
   public static ByteString wrap(final byte[] array) {
-    return USE_ZEROCOPYBYTESTRING? HBaseZeroCopyByteString.wrap(array): 
ByteString.copyFrom(array);
+    return USE_ZEROCOPYBYTESTRING
+      ? UnsafeByteOperations.unsafeWrap(array)
+      : ByteString.copyFrom(array);
   }
 
   /**
    * Wraps a subset of a byte array in a {@link ByteString} without copying it.
    */
   public static ByteString wrap(final byte[] array, int offset, int length) {
-    return USE_ZEROCOPYBYTESTRING? HBaseZeroCopyByteString.wrap(array, offset, 
length):
+    return USE_ZEROCOPYBYTESTRING? UnsafeByteOperations.unsafeWrap(array, 
offset, length):
       ByteString.copyFrom(array, offset, length);
   }
 }
 
 Review comment:
   What is target for this fix?  What version?
   
   Looking at HBASE-23797, the result of the discussion around CPEPs, the idea 
is we'd remove hbase-protocol module.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to