Details
-
Bug
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
2.0.0
-
None
Description
Testcase:
@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()); }
throws NullPointerException
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)
as the underlying hadoop implementation returns null:
* 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.
Attachments
Issue Links
- links to