Browse Source

HADOOP-627. Fix some synchronization problems in MiniMRCluster. Contributed by Nigel.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@467502 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 years ago
parent
commit
f6b8336657
2 changed files with 6 additions and 3 deletions
  1. 3 0
      CHANGES.txt
  2. 3 3
      src/test/org/apache/hadoop/mapred/MiniMRCluster.java

+ 3 - 0
CHANGES.txt

@@ -47,6 +47,9 @@ Trunk (unreleased changes)
 13. HADOOP-634.  Add missing license to many files.
     (Nigel Daley via cutting)
 
+14. HADOOP-627.  Fix some synchronization problems in MiniMRCluster
+    that sometimes caused unit tests to fail.  (Nigel Daley via cutting)
+
 
 Release 0.7.2 - 2006-10-18
 

+ 3 - 3
src/test/org/apache/hadoop/mapred/MiniMRCluster.java

@@ -78,11 +78,11 @@ public class MiniMRCluster {
      * An inner class to run the task tracker.
      */
     class TaskTrackerRunner implements Runnable {
-        TaskTracker tt;
+        volatile TaskTracker tt;
         // the localDirs for this taskTracker
         String[] localDir;
-        boolean isInitialized = false;
-        boolean isDead = false;
+        volatile boolean isInitialized = false;
+        volatile boolean isDead = false;
         int numDir;       
         TaskTrackerRunner(int numDir) {
           this.numDir = numDir;