From 308460654a84f407d8716cd4803d6c8e66653455 Mon Sep 17 00:00:00 2001 From: Robert Kanter Date: Fri, 20 Mar 2015 13:11:58 -0700 Subject: [PATCH] MAPREDUCE-6282. Reuse historyFileAbsolute.getFileSystem in CompletedJob#loadFullHistoryData for code optimization. (zxu via rkanter) (cherry picked from commit d4f7e2507f4bb024444d172f94e74431bc2f319c) --- hadoop-mapreduce-project/CHANGES.txt | 4 ++++ .../java/org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index d69a02f966c..0ffbc28e136 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -26,6 +26,10 @@ Release 2.8.0 - UNRELEASED MAPREDUCE-5755. MapTask.MapOutputBuffer#compare/swap should have @Override annotation. (ozawa) + MAPREDUCE-6282. Reuse historyFileAbsolute.getFileSystem in + CompletedJob#loadFullHistoryData for code optimization. + (zxu via rkanter) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java index 1cf63d4a71b..6df82611d00 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java @@ -345,9 +345,7 @@ public class CompletedJob implements org.apache.hadoop.mapreduce.v2.app.job.Job JobHistoryParser parser = null; try { final FileSystem fs = historyFileAbsolute.getFileSystem(conf); - parser = - new JobHistoryParser(historyFileAbsolute.getFileSystem(conf), - historyFileAbsolute); + parser = new JobHistoryParser(fs, historyFileAbsolute); final Path jobConfPath = new Path(historyFileAbsolute.getParent(), JobHistoryUtils.getIntermediateConfFileName(jobId)); final Configuration conf = new Configuration();