MAPREDUCE-2489. Jobsplits with random hostnames can make the queue unusable (jeffrey naisbit via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1156821 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mahadev Konar 2011-08-11 20:42:28 +00:00
parent 86195ceb18
commit 3228351856
3 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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);

View File

@ -2778,7 +2778,8 @@ public class JobTracker implements MRConstants, InterTrackerProtocol,
*/
synchronized boolean processHeartbeat(
TaskTrackerStatus trackerStatus,
boolean initialContact) {
boolean initialContact)
throws UnknownHostException {
getInstrumentation().heartbeat();