[
https://issues.apache.org/jira/browse/MAPREDUCE-7370?focusedWorklogId=783994&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-783994
]
ASF GitHub Bot logged work on MAPREDUCE-7370:
---------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Jun/22 23:05
Start Date: 22/Jun/22 23:05
Worklog Time Spent: 10m
Work Description: cnauroth commented on code in PR #4248:
URL: https://github.com/apache/hadoop/pull/4248#discussion_r904365716
##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/MultipleOutputs.java:
##########
@@ -570,8 +570,14 @@ public void setStatus(String status) {
*/
@SuppressWarnings("unchecked")
public void close() throws IOException, InterruptedException {
- for (RecordWriter writer : recordWriters.values()) {
- writer.close(context);
- }
+ recordWriters.values().parallelStream().forEach(writer -> {
Review Comment:
Additionally, if we agree with my assertion that it's important to preserve
the error contract, then it would be good to have a unit test that fakes an
`IOException` during `close()` and asserts that it propagates.
Issue Time Tracking
-------------------
Worklog Id: (was: 783994)
Time Spent: 1h 20m (was: 1h 10m)
> Parallelize MultipleOutputs#close call
> --------------------------------------
>
> Key: MAPREDUCE-7370
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7370
> Project: Hadoop Map/Reduce
> Issue Type: Improvement
> Affects Versions: 3.3.0
> Reporter: Prabhu Joseph
> Assignee: Ashutosh Gupta
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> This call takes more time when there are lot of files to close and there is a
> high latency to close. Parallelize MultipleOutputs#close call to improve the
> speed.
> {code}
> public void close() throws IOException {
> for (RecordWriter writer : recordWriters.values()) {
> writer.close(null);
> }
> }
> {code}
> Idea is from [[email protected]]
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]