MAPREDUCE-7317. Add latency information in FileOutputCommitter.mergePaths. (#2624)
Contributed by Jungtaek Lim. Change-Id: Iaff2f55e5378c22ce8a92ae776f5aba3f0fc304e
This commit is contained in:
parent
2d124f2f5e
commit
ebdacedc83
|
@ -38,6 +38,7 @@ import org.apache.hadoop.mapreduce.TaskAttemptID;
|
|||
|
||||
import org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting;
|
||||
import org.apache.hadoop.thirdparty.com.google.common.base.Preconditions;
|
||||
import org.apache.hadoop.util.DurationInfo;
|
||||
import org.apache.hadoop.util.Progressable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -454,9 +455,9 @@ public class FileOutputCommitter extends PathOutputCommitter {
|
|||
*/
|
||||
private void mergePaths(FileSystem fs, final FileStatus from,
|
||||
final Path to, JobContext context) throws IOException {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Merging data from " + from + " to " + to);
|
||||
}
|
||||
try (DurationInfo d = new DurationInfo(LOG,
|
||||
false,
|
||||
"Merging data from %s to %s", from, to)) {
|
||||
reportProgress(context);
|
||||
FileStatus toStat;
|
||||
try {
|
||||
|
@ -494,6 +495,7 @@ public class FileOutputCommitter extends PathOutputCommitter {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void reportProgress(JobContext context) {
|
||||
if (context instanceof Progressable) {
|
||||
|
|
Loading…
Reference in New Issue