saintstack commented on a change in pull request #3251:
URL: https://github.com/apache/hbase/pull/3251#discussion_r631026244
##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
##########
@@ -964,8 +965,7 @@ public static HRegionInfo parseFrom(final DataInputStream
in) throws IOException
}
//assumption: if Writable serialization, it should be longer than pblen.
- int read = in.read(pbuf);
- if (read != pblen) throw new IOException("read=" + read + ", wanted=" +
pblen);
+ IOUtils.readFully(in, pbuf, 0, pblen);
Review comment:
Let me do your suggestion instead. Thanks.
--
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]