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:
parent
86195ceb18
commit
3228351856
@ -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
|
||||
|
@ -20,6 +20,7 @@
|
||||
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 @@ void setNumSlotsPerReduce(int numSlotsPerReduce) {
|
||||
* 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 synchronized void initTasks()
|
||||
|
||||
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);
|
||||
|
||||
|
@ -2778,7 +2778,8 @@ private void updateNodeHealthStatus(TaskTrackerStatus trackerStatus) {
|
||||
*/
|
||||
synchronized boolean processHeartbeat(
|
||||
TaskTrackerStatus trackerStatus,
|
||||
boolean initialContact) {
|
||||
boolean initialContact)
|
||||
throws UnknownHostException {
|
||||
|
||||
getInstrumentation().heartbeat();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user