[prev in list] [next in list] [prev in thread] [next in thread]
List: mesos-commits
Subject: svn commit: r1367754 - /incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/Framewo
From: benh () apache ! org
Date: 2012-07-31 20:27:06
Message-ID: 20120731202706.D272F2388962 () eris ! apache ! org
[Download RAW message or body]
Author: benh
Date: Tue Jul 31 20:27:06 2012
New Revision: 1367754
URL: http://svn.apache.org/viewvc?rev=1367754&view=rev
Log:
Consider failed maps runnable when determining wheter to launch map
tasks (contributed by Charles Reiss,
https://reviews.apache.org/r/6187).
Modified:
incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/FrameworkScheduler.java
Modified: incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/FrameworkScheduler.java
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/hadoop/mesos/src/java/org/apac \
he/hadoop/mapred/FrameworkScheduler.java?rev=1367754&r1=1367753&r2=1367754&view=diff \
==============================================================================
--- incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/FrameworkScheduler.java \
(original)
+++ incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/FrameworkScheduler.java \
Tue Jul 31 20:27:06 2012 @@ -379,24 +379,19 @@ public class FrameworkScheduler \
implemen neededMaps += 1;
if (unassignedMaps < neededMaps) {
- /*
- // Figure out what locality level to allow using delay scheduling
- long now = System.currentTimeMillis();
- if (lastCanLaunchMapTime == -1)
- lastCanLaunchMapTime = now;
- int maxLevel; // Cache level to search for maps in
- if (lastMapWasLocal) {
- timeWaitedForLocalMap += now - lastCanLaunchMapTime;
- if (timeWaitedForLocalMap >= localityWait) {
- maxLevel = Integer.MAX_VALUE;
- } else {
- maxLevel = 1;
+ // 0. check for a failed map task to place. These tasks are not included
+ // in the "normal" lists of tasks in the JobInProgress object.
+ for (JobInProgress job: jobs) {
+ int state = job.getStatus().getRunState();
+ if (job.failedMaps != null && state == JobStatus.RUNNING) {
+ for (TaskInProgress tip : job.failedMaps) {
+ if (!tip.hasFailedOnMachine(host)) {
+ return true;
+ }
+ }
}
- } else {
- maxLevel = Integer.MAX_VALUE;
}
- lastCanLaunchMapTime = now;
- */
+
int maxLevel = Integer.MAX_VALUE;
// Look for a map with the required level
for (JobInProgress job: jobs) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic