jlowe commented on a change in pull request #1920: MAPREDUCE-7241. 
FileInputFormat listStatus with less memory footprint
URL: https://github.com/apache/hadoop/pull/1920#discussion_r400574855
 
 

 ##########
 File path: 
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestFileInputFormat.java
 ##########
 @@ -238,6 +238,44 @@ public void testListStatusErrorOnNonExistantDir() throws 
IOException {
     }
   }
 
+  @Test
+  public void testShrinkStatus() throws IOException {
+    Configuration conf = getConfiguration();
+    MockFileSystem mockFs =
+            (MockFileSystem) new Path("test:///").getFileSystem(conf);
+    Path dir1  = new Path("test:/a1");
+    RemoteIterator<LocatedFileStatus> statuses = 
mockFs.listLocatedStatus(dir1);
 
 Review comment:
   Thanks for the updates!   The unit test still has the problem I originally 
described -- it will pass even when the shrink implementation does not actually 
shrink anything.  Maybe the unit test should assert that the 
`LocatedFileStatus` received from the filesystem is using instances of 
`HdfsBlockLocation` (which it does after your recent changes) and the result of 
shrinking no longer has such instances?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to