hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7049) TestByteRangeInputStream.testPropagatedClose fails and throw NPE on branch-2
Date Fri, 19 Sep 2014 04:04:34 GMT

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

Juan Yu commented on HDFS-7049:

Looks like Hadoop QA tried to apply the patch to trunk, but this patch is just for branch-2.

> TestByteRangeInputStream.testPropagatedClose fails and throw NPE on branch-2
> ----------------------------------------------------------------------------
>                 Key: HDFS-7049
>                 URL: https://issues.apache.org/jira/browse/HDFS-7049
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Juan Yu
>            Assignee: Juan Yu
>            Priority: Minor
>         Attachments: HDFS-7049-branch-2.002.patch, HDFS-7049-branch-2.patch
> On branch-2, TestByteRangeInputStream.testPropagatedClose throw NPE when HftpFileSystem$RangeHeaderUrlOpener.connect
> This is due to fix of HDFS-6143 "WebHdfsFileSystem open should throw FileNotFoundException
for non-existing paths"
> public ByteRangeInputStream(URLOpener o, URLOpener r) throws IOException {
>     this.originalURL = o;
>     this.resolvedURL = r;
>     getInputStream();
>   }
> the getInputStream() will be called in constructor now to verify if file exists.
> Since we just try to test if ByteRangeInputStream#close is called at proper time, we
could mock(ByteRangeInputStream.class, CALLS_REAL_METHODS) for testing to avoid the NPE issue.
> I believe the trunk version already does this, we just need to merge the test from trunk.

This message was sent by Atlassian JIRA

View raw message