hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1076971 - in /hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred: JobHistory.java JobTracker.java
Date Fri, 04 Mar 2011 03:27:01 GMT
Author: omalley
Date: Fri Mar  4 03:27:01 2011
New Revision: 1076971

URL: http://svn.apache.org/viewvc?rev=1076971&view=rev
Log:
commit 25e0347cbc64d2e2238bb457e963f108272873f5
Author: Yahoo\! <ltucker@yahoo-inc.com>
Date:   Thu Aug 13 09:38:53 2009 -0700

    Applying patch 2935902.mr817delta.patch

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java
    hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java?rev=1076971&r1=1076970&r2=1076971&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java
Fri Mar  4 03:27:01 2011
@@ -197,6 +197,9 @@ public class JobHistory {
     }
 
     void moveToDone(final JobID id) {
+      if (disableHistory) {
+        return;
+      }
       final List<Path> paths = new ArrayList<Path>();
       final Path historyFile = fileManager.getHistoryFile(id);
       if (historyFile == null) {

Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=1076971&r1=1076970&r2=1076971&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
Fri Mar  4 03:27:01 2011
@@ -519,15 +519,19 @@ public class JobTracker implements MRCon
             }
           }
           synchronized (userToJobsMap) {
-            for (Map.Entry<String, ArrayList<JobInProgress>> entry : 
-                userToJobsMap.entrySet()) {
-              String user = entry.getKey();
+            Iterator<Map.Entry<String, ArrayList<JobInProgress>>> 
+                userToJobsMapIt = userToJobsMap.entrySet().iterator();
+            while (userToJobsMapIt.hasNext()) {
+              Map.Entry<String, ArrayList<JobInProgress>> entry = 
+                userToJobsMapIt.next();
               ArrayList<JobInProgress> userJobs = entry.getValue();
               Iterator<JobInProgress> it = userJobs.iterator();
               while (it.hasNext() && 
                   userJobs.size() > MAX_COMPLETE_USER_JOBS_IN_MEMORY) {
                 JobInProgress jobUser = it.next();
                 if (retiredJobs.contains(jobUser)) {
+                  LOG.info("Removing from userToJobsMap: " + 
+                      jobUser.getJobID());
                   it.remove();
                 } else if (minConditionToRetire(jobUser, now)) {
                   LOG.info("User limit exceeded. Marking job: " + 
@@ -537,7 +541,7 @@ public class JobTracker implements MRCon
                 }
               }
               if (userJobs.isEmpty()) {
-                userToJobsMap.remove(user);
+                userToJobsMapIt.remove();
               }
             }
           }



Mime
View raw message