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_r399693801
 
 

 ##########
 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:
   This test doesn't test what we care about in this change.  `MockFileSystem` 
doesn't return a derived class of `BlockLocation` so nothing shrinks.  This 
test passes if `shrinkStatus` simply returned the original status, showing it 
really isn't a useful test for verifying we don't regress and start caching 
large location statuses again.

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