hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject hadoop git commit: MAPREDUCE-6059. Speed up history server startup time (Siqi Li via aw) (cherry picked from commit fd57ab2002f97dcc83d455a5e0c770c8efde77a4)
Date Thu, 05 Feb 2015 16:41:00 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 4cd9657b7 -> 2dc4af2b9


MAPREDUCE-6059. Speed up history server startup time (Siqi Li via aw)
(cherry picked from commit fd57ab2002f97dcc83d455a5e0c770c8efde77a4)

Conflicts:

	hadoop-mapreduce-project/CHANGES.txt


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2dc4af2b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2dc4af2b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2dc4af2b

Branch: refs/heads/branch-2
Commit: 2dc4af2b9379e5257dda4ea5fe551dc8e4af5226
Parents: 4cd9657
Author: Jason Lowe <jlowe@apache.org>
Authored: Thu Feb 5 16:40:09 2015 +0000
Committer: Jason Lowe <jlowe@apache.org>
Committed: Thu Feb 5 16:40:09 2015 +0000

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt                         | 2 ++
 .../apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java    | 8 ++++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2dc4af2b/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index 12fd8a0..7dfa454 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -48,6 +48,8 @@ Release 2.7.0 - UNRELEASED
     from key and value at the end of the iteration to save memory. 
     (Zhihai Xu via kasha)
 
+    MAPREDUCE-6059. Speed up history server startup time (Siqi Li via aw)
+
   BUG FIXES
 
     MAPREDUCE-6210. Use getApplicationAttemptId() instead of getApplicationId()

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2dc4af2b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
index c2ccdb8..6b9f146 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
@@ -263,6 +263,10 @@ public class HistoryFileManager extends AbstractService {
     public HistoryFileInfo get(JobId jobId) {
       return cache.get(jobId);
     }
+
+    public boolean isFull() {
+      return cache.size() >= maxSize;
+    }
   }
 
   /**
@@ -668,6 +672,10 @@ public class HistoryFileManager extends AbstractService {
     for (FileStatus fs : timestampedDirList) {
       // TODO Could verify the correct format for these directories.
       addDirectoryToSerialNumberIndex(fs.getPath());
+    }
+    for (int i= timestampedDirList.size() - 1;
+        i >= 0 && !jobListCache.isFull(); i--) {
+      FileStatus fs = timestampedDirList.get(i); 
       addDirectoryToJobListCache(fs.getPath());
     }
   }


Mime
View raw message