You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/03/28 18:31:33 UTC

[GitHub] [hadoop] jlowe commented on a change in pull request #1920: MAPREDUCE-7241. FileInputFormat listStatus with less memory footprint

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org