Parcourir la source

HADOOP-4933. Fixes a ConcurrentModificationException problem that shows up when the history viewer is accessed concurrently. Contributed by Amar Kamat.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@744000 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das il y a 16 ans
Parent
commit
5e30cb7edb
2 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 4 0
      CHANGES.txt
  2. 1 3
      src/mapred/org/apache/hadoop/mapred/JobHistory.java

+ 4 - 0
CHANGES.txt

@@ -168,6 +168,10 @@ Trunk (unreleased changes)
     HADOOP-5172. Disable misbehaving Chukwa unit test until it can be fixed.
     (Jerome Boulon via nigel)
 
+    HADOOP-4933. Fixes a ConcurrentModificationException problem that shows up
+    when the history viewer is accessed concurrently. 
+    (Amar Kamat via ddas)
+
 Release 0.20.0 - Unreleased
 
   INCOMPATIBLE CHANGES

+ 1 - 3
src/mapred/org/apache/hadoop/mapred/JobHistory.java

@@ -126,9 +126,6 @@ public class JobHistory {
     SUCCESS, FAILED, KILLED, MAP, REDUCE, CLEANUP, RUNNING, PREP, SETUP
   }
 
-  // temp buffer for parsed dataa
-  private static Map<Keys,String> parseBuffer = new HashMap<Keys, String>(); 
-
   /**
    * Initialize JobHistory files. 
    * @param conf Jobconf of the job tracker.
@@ -294,6 +291,7 @@ public class JobHistory {
     String data = line.substring(idx+1, line.length());
     
     Matcher matcher = pattern.matcher(data); 
+    Map<Keys,String> parseBuffer = new HashMap<Keys, String>();
 
     while(matcher.find()){
       String tuple = matcher.group(0);