You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jun Yuan (Jira)" <ji...@apache.org> on 2021/02/11 21:56:00 UTC

[jira] [Comment Edited] (HBASE-25567) HRegionFileSystem.loadRegionInfoFileContent throws IOException occasionally

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

Jun Yuan edited comment on HBASE-25567 at 2/11/21, 9:55 PM:
------------------------------------------------------------

In RegionInfo.parseFrom(), the number of bytes read to pbuf is not necessarily equals to pbuf.length. Should use readFully() to read the intended number of bytes
{code:java}
int read = in.read(pbuf);
if (read != pblen) throw new IOException("read=" + read + ", wanted=" + pblen);
{code}







was (Author: jyuanca):
In HRegionFileSystem.loadRegionInfoFileContent(), the number of bytes read to pbuf is not necessarily equals to pbuf.length. Should use readFully() to read the intended number of bytes
{code:java}
int read = in.read(pbuf);
if (read != pblen) throw new IOException("read=" + read + ", wanted=" + pblen);
{code}






> HRegionFileSystem.loadRegionInfoFileContent throws IOException occasionally
> ---------------------------------------------------------------------------
>
>                 Key: HBASE-25567
>                 URL: https://issues.apache.org/jira/browse/HBASE-25567
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 2.1.4
>            Reporter: Jun Yuan
>            Priority: Major
>
> We invoked HRegionFileSystem.loadRegionInfoFileContent to read .regioninfo from hdfs, but get an exception occasionally
> {code:java}
> Caused by: java.io.IOException: read=3, wanted=4
>  at org.apache.hadoop.hbase.client.RegionInfo.parseFrom(RegionInfo.java:743)
>  at org.apache.hadoop.hbase.regionserver.HRegionFileSystem.loadRegionInfoFileContent(HRegionFileSystem.java:856){code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)