dengzhhu653 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_r399770285
 
 

 ##########
 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:
   The updated codes have made ```MockFileSystem.getFileBlockLocations``` 
return array of ```HdfsBlockLocation``` for regression and the unit test shows 
that the filestatus being shrunk has the same block location infos with the 
original.

----------------------------------------------------------------
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