-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-25876 Add retry if we fail to read all bytes of the protobuf ma… #3251
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataInputStream has a readFully method, so I think here we could just use that one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me do your suggestion instead. Thanks.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…gic marker (#3251) Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by Anoop Sam John <anoopsamjohn@apache.org>
…gic marker