hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1156821 - in /hadoop/common/trunk/mapreduce: CHANGES.txt src/java/org/apache/hadoop/mapred/JobInProgress.java src/java/org/apache/hadoop/mapred/JobTracker.java
Date Thu, 11 Aug 2011 20:42:28 GMT
Author: mahadev
Date: Thu Aug 11 20:42:28 2011
New Revision: 1156821

URL: http://svn.apache.org/viewvc?rev=1156821&view=rev
Log:
MAPREDUCE-2489. Jobsplits with random hostnames can make the queue unusable (jeffrey naisbit
via mahadev)

Modified:
    hadoop/common/trunk/mapreduce/CHANGES.txt
    hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobInProgress.java
    hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java

Modified: hadoop/common/trunk/mapreduce/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/mapreduce/CHANGES.txt?rev=1156821&r1=1156820&r2=1156821&view=diff
==============================================================================
--- hadoop/common/trunk/mapreduce/CHANGES.txt (original)
+++ hadoop/common/trunk/mapreduce/CHANGES.txt Thu Aug 11 20:42:28 2011
@@ -212,6 +212,9 @@ Trunk (unreleased changes)
     MAPREDUCE-2705. Permits parallel multiple task launches. 
     (Thomas Graves via ddas)
 
+    MAPREDUCE-2489. Jobsplits with random hostnames can make the queue 
+    unusable (jeffrey naisbit via mahadev)
+
   OPTIMIZATIONS
 
     MAPREDUCE-2026. Make JobTracker.getJobCounters() and

Modified: hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobInProgress.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobInProgress.java?rev=1156821&r1=1156820&r2=1156821&view=diff
==============================================================================
--- hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobInProgress.java (original)
+++ hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobInProgress.java Thu
Aug 11 20:42:28 2011
@@ -20,6 +20,7 @@ package org.apache.hadoop.mapred;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.net.UnknownHostException;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -622,7 +623,7 @@ public class JobInProgress {
    * at {@link JobTracker#initJob(JobInProgress)} for more details.
    */
   public synchronized void initTasks() 
-  throws IOException, KillInterruptedException {
+  throws IOException, KillInterruptedException, UnknownHostException {
     if (tasksInited.get() || isComplete()) {
       return;
     }
@@ -653,6 +654,11 @@ public class JobInProgress {
 
     checkTaskLimits();
 
+    // Sanity check the locations so we don't create/initialize unnecessary tasks
+    for (TaskSplitMetaInfo split : taskSplitMetaInfo) {
+      NetUtils.verifyHostnames(split.getLocations());
+    }
+
     jobtracker.getInstrumentation().addWaitingMaps(getJobID(), numMapTasks);
     jobtracker.getInstrumentation().addWaitingReduces(getJobID(), numReduceTasks);
 

Modified: hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=1156821&r1=1156820&r2=1156821&view=diff
==============================================================================
--- hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java Thu Aug
11 20:42:28 2011
@@ -2778,7 +2778,8 @@ public class JobTracker implements MRCon
    */
   synchronized boolean processHeartbeat(
                                  TaskTrackerStatus trackerStatus, 
-                                 boolean initialContact) {
+                                 boolean initialContact)
+                                 throws UnknownHostException {
     
     getInstrumentation().heartbeat();
 



Mime
View raw message