beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-2369) HadoopFileSystem: NullPointerException on match of non existing resource
Date Fri, 26 May 2017 23:27:04 GMT

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

ASF GitHub Bot commented on BEAM-2369:
--------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/beam/pull/3237


> HadoopFileSystem: NullPointerException on match of non existing resource
> ------------------------------------------------------------------------
>
>                 Key: BEAM-2369
>                 URL: https://issues.apache.org/jira/browse/BEAM-2369
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>    Affects Versions: 2.0.0
>            Reporter: Michael Luckey
>            Assignee: Davor Bonaci
>
> Testcase:
> {code}
>   @Test
>   public void testMatchForNonExistentFile() throws Exception {
>     create("testFileAA", "testDataAA".getBytes());
>     // ensure files exist
>     assertArrayEquals("testDataAA".getBytes(), read("testFileAA"));
>     List<MatchResult> matchResults = fileSystem.match(
>             ImmutableList.of(testPath("testFileA").toString()));
>     assertEquals(Status.NOT_FOUND, Iterables.getOnlyElement(matchResults).status());
>   }
> {code}
> throws NullPointerException
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.beam.sdk.io.hdfs.HadoopFileSystem.match(HadoopFileSystem.java:87)
> 	at org.apache.beam.sdk.io.hdfs.HadoopFileSystemTest.testMatchForNonExistentFile(HadoopFileSystemTest.java:187)
> {noformat}
> as the underlying hadoop implementation returns null:
> {noformat}
>      * When the input pattern "looks" like just a simple filename, and we
>      * can't find it, we return null rather than an empty array.
>      * This is a special case which the shell relies on.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message