Browse Source

HADOOP-1636. Make the number of jobs kept in memory configurable.
Contributed by Michael Bieniosek.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@559886 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 18 years ago
parent
commit
90e32788db
3 changed files with 11 additions and 2 deletions
  1. 2 1
      CHANGES.txt
  2. 7 0
      conf/hadoop-default.xml
  3. 2 1
      src/java/org/apache/hadoop/mapred/JobTracker.java

+ 2 - 1
CHANGES.txt

@@ -2,7 +2,8 @@ Hadoop Change Log
 
 
 Trunk (unreleased changes)
-
+  1. HADOOP-1636.  Allow configuration of the number of jobs kept in memory
+     by the JobTracker. (Michael Bieniosek via omalley)
 
 Branch 0.14 (unreleased changes)
 

+ 7 - 0
conf/hadoop-default.xml

@@ -599,6 +599,13 @@ creations/deletions), or "all".</description>
   </description>
 </property>
 
+<property>
+  <name>mapred.jobtracker.completeuserjobs.maximum</name>
+  <value>100</value>
+  <description>The maximum number of complete jobs per user to keep around before delegating them to the job history.
+  </description>
+</property>
+
 <property>
   <name>mapred.child.java.opts</name>
   <value>-Xmx200m</value>

+ 2 - 1
src/java/org/apache/hadoop/mapred/JobTracker.java

@@ -71,7 +71,7 @@ public class JobTracker implements MRConstants, InterTrackerProtocol, JobSubmiss
    * The maximum no. of 'completed' (successful/failed/killed)
    * jobs kept in memory per-user. 
    */
-  static final int MAX_COMPLETE_USER_JOBS_IN_MEMORY = 100;
+  final int MAX_COMPLETE_USER_JOBS_IN_MEMORY;
     
   /**
    * Used for formatting the id numbers
@@ -621,6 +621,7 @@ public class JobTracker implements MRConstants, InterTrackerProtocol, JobSubmiss
     TASK_ALLOC_EPSILON = conf.getFloat("mapred.jobtracker.taskalloc.loadbalance.epsilon", 0.2f);
     PAD_FRACTION = conf.getFloat("mapred.jobtracker.taskalloc.capacitypad", 
                                  0.01f);
+    MAX_COMPLETE_USER_JOBS_IN_MEMORY = conf.getInt("mapred.jobtracker.completeuserjobs.maximum", 100);
 
     // This is a directory of temporary submission files.  We delete it
     // on startup, and can delete any files that we're done with