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

Xiao Chen edited comment on HDFS-13539 at 5/9/18 5:55 PM:
----------------------------------------------------------

Failed tests does not look related.

For clarity:
- The synchronized changes are only for following best practice, I don't see 
any real issues from there that could cause the NPE
- Existing checks guards {{pos}} and {{blockEnd}} pretty well, to make sure 
{{blockSeekTo}} can return a valid {{currentLocatedBlock}}. This is presumably 
why the NPE is only seen on striped streams. But regardless, having the 
possibility of NPE will mask the original exception, so this patch proposed to 
improve on that end.


was (Author: xiaochen):
Failed tests does not look related.
The synchronized changes are only for following best practice, I don't see any 
real issues from there that could cause the NPE

> DFSInputStream NPE when reportCheckSumFailure
> ---------------------------------------------
>
>                 Key: HDFS-13539
>                 URL: https://issues.apache.org/jira/browse/HDFS-13539
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Xiao Chen
>            Assignee: Xiao Chen
>            Priority: Major
>         Attachments: HDFS-13539.01.patch
>
>
> We have seem the following exception with DFSStripedInputStream.
> {noformat}
> readDirect: FSDataInputStream#read error:
> NullPointerException: java.lang.NullPointerException
>         at 
> org.apache.hadoop.hdfs.DFSStripedInputStream.readWithStrategy(DFSStripedInputStream.java:402)
>         at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:831)
>         at 
> org.apache.hadoop.fs.FSDataInputStream.read(FSDataInputStream.java:147)
> {noformat}
> Line 402 is {{reportCheckSumFailure}}, and {{currentLocatedBlock}} is the 
> only possible null object. (Because {{currentLocatedBlock.getLocations()}} 
> cannot be null - {{LocatedBlock}} constructor checks {{locs}} and would 
> assign a {{EMPTY_LOCS}} if it's null)
> Original exception is masked by the NPE.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to