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_r399693011
##########
File path:
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/FileInputFormat.java
##########
@@ -364,13 +364,29 @@ protected void addInputPathRecursively(List<FileStatus>
result,
if (stat.isDirectory()) {
addInputPathRecursively(result, fs, stat.getPath(), inputFilter);
} else {
- result.add(stat);
+ result.add(shrinkStatus(stat));
}
}
}
}
-
-
+
+ public static FileStatus shrinkStatus(FileStatus origStat) {
Review comment:
This is very much a user-facing class, and all public methods in this file
have Javadoc comments. I think it's appropriate here as well. There should be
a comment explaining what this is doing and why. When I first glanced at the
code, it looked like it was just making a copy of everything, and it didn't
look like it was shrinking anything at all.
----------------------------------------------------------------
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]