You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by dd...@apache.org on 2009/03/11 05:32:07 UTC

svn commit: r752366 - /hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/MiniMRCluster.java

Author: ddas
Date: Wed Mar 11 04:32:06 2009
New Revision: 752366

URL: http://svn.apache.org/viewvc?rev=752366&view=rev
Log:
HADOOP-5392. Reverting the change in MiniMRCluster.java since it uses an API absent in 0.19 branch.

Modified:
    hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/MiniMRCluster.java

Modified: hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/MiniMRCluster.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/MiniMRCluster.java?rev=752366&r1=752365&r2=752366&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/MiniMRCluster.java (original)
+++ hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/MiniMRCluster.java Wed Mar 11 04:32:06 2009
@@ -61,7 +61,6 @@
    */
   class JobTrackerRunner implements Runnable {
     private JobTracker tracker = null;
-    private volatile boolean isActive = true;
     
     JobConf jc = null;
         
@@ -73,10 +72,6 @@
       return (tracker != null);
     }
         
-    public boolean isActive() {
-      return isActive;
-    }
-
     public int getJobTrackerPort() {
       return tracker.getTrackerPort();
     }
@@ -102,7 +97,6 @@
         tracker.offerService();
       } catch (Throwable e) {
         LOG.error("Job tracker crashed", e);
-        isActive = false;
       }
     }
         
@@ -117,7 +111,6 @@
       } catch (Throwable e) {
         LOG.error("Problem shutting down job tracker", e);
       }
-      isActive = false;
     }
   }
     
@@ -555,21 +548,6 @@
       }
     }
         
-    ClusterStatus status = jobTracker.getJobTracker().getClusterStatus(false);
-    while (jobTracker.isActive() && status.getJobTrackerState() == JobTracker.State.INITIALIZING) {
-      try {
-        LOG.info("JobTracker still initializing. Waiting.");
-        Thread.sleep(1000);
-      } catch(InterruptedException e) {}
-      status = jobTracker.getJobTracker().getClusterStatus(false);
-    }
-
-    if (!jobTracker.isActive() 
-        || status.getJobTrackerState() != JobTracker.State.RUNNING) {
-      // return if jobtracker has crashed
-      return;
-    }
- 
     // Set the configuration for the task-trackers
     this.jobTrackerPort = jobTracker.getJobTrackerPort();
     this.jobTrackerInfoPort = jobTracker.getJobTrackerInfoPort();