stoty commented on code in PR #5974:
URL: https://github.com/apache/hbase/pull/5974#discussion_r1634744186


##########
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellModel.java:
##########
@@ -218,9 +218,10 @@ public Message messageFromObject() {
   }
 
   @Override
-  public ProtobufMessageHandler getObjectFromMessage(byte[] message) throws 
IOException {
+  public ProtobufMessageHandler getObjectFromMessage(CodedInputStream cis) 
throws IOException {
     Cell.Builder builder = Cell.newBuilder();
-    ProtobufUtil.mergeFrom(builder, message);
+    builder.mergeFrom(cis);

Review Comment:
   We can't use ProtobufUtil because of shading conflicts on branch-2.x.
   But I can add method to RestUtil.
   
   As for why call checkLastTagWas: Frankly, that's what the orginal code did.
   I think that the intention was  to have extra check to make double sure that 
we have read the data fully.
   It does not look epensive, so I left it in, but we can just remove it, and 
trust the error handling of the http libraries to throw an exception in case we 
don't get the full data.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to