hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11626) Comment ReadStatistics to indicate that it tracks the actual read occurred
Date Mon, 02 Mar 2015 22:20:05 GMT

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

Colin Patrick McCabe commented on HADOOP-11626:
-----------------------------------------------

bq. Colin Patrick McCabe This case has already been handled in DFSInputStream#updateReadStatistics.

Ah, good catch.

{code}
1143	          String errMessage = String.format(
1144	              "truncated return from reader.read(): excpected %d, got %d",
1145	              len, nread);
{code}

The log message should be capitalized.  Probably something like "Unexpected short read" would
be better.  "truncated return" sounds like something that could be a normal expected return
(to me, at least).  Also, we should put the name of the DN (or possibly block reader) that
is getting the short read in there somewhere.

> Comment ReadStatistics to indicate that it tracks the actual read occurred
> --------------------------------------------------------------------------
>
>                 Key: HADOOP-11626
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11626
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: Lei (Eddy) Xu
>            Assignee: Lei (Eddy) Xu
>            Priority: Trivial
>         Attachments: HADOOP-11626.000.patch, HADOOP-11626.001.patch
>
>
> In {{DFSOutputStream#actualGetFromOneDataNode()}}, it updates the {{ReadStatistics}}
even the read is failed:
> {code}
>         int nread = reader.readAll(buf, offset, len);
>         updateReadStatistics(readStatistics, nread, reader);
>         if (nread != len) {
>           throw new IOException("truncated return from reader.read(): " +
>                                 "excpected " + len + ", got " + nread);
>         }
> {code}
> It indicates that {{ReadStatistics}} tracks actual read occurred. Need to add comment
to {{ReadStatistics}} to make this clear.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message