You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2013/04/23 19:53:17 UTC
svn commit: r1471072 - in /incubator/mesos/trunk:
hadoop/mesos/src/java/org/apache/hadoop/mapred/MesosScheduler.java
support/apply-review.sh
Author: bmahler
Date: Tue Apr 23 17:53:17 2013
New Revision: 1471072
URL: http://svn.apache.org/r1471072
Log:
Fixed NullPointerException in MesosScheduler when using the Hadoop
Fair Scheduler as the underlying scheduler.
From: Guodong Wang <wa...@gmail.com>
Review: https://reviews.apache.org/r/10695
Modified:
incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/MesosScheduler.java
incubator/mesos/trunk/support/apply-review.sh
Modified: incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/MesosScheduler.java
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/MesosScheduler.java?rev=1471072&r1=1471071&r2=1471072&view=diff
==============================================================================
--- incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/MesosScheduler.java (original)
+++ incubator/mesos/trunk/hadoop/mesos/src/java/org/apache/hadoop/mapred/MesosScheduler.java Tue Apr 23 17:53:17 2013
@@ -224,11 +224,14 @@ public class MesosScheduler extends Task
// Let the underlying task scheduler do the actual task scheduling.
List<Task> tasks = taskScheduler.assignTasks(taskTracker);
- // Keep track of which TaskTracker contains which tasks.
- for (Task task : tasks) {
- LOG.info("Assigning task : " + task.getTaskID()
- + " to tracker " + tracker);
- mesosTrackers.get(tracker).hadoopTasks.add(task.getTaskID());
+ // The Hadoop Fair Scheduler is known to return null.
+ if (tasks != null) {
+ // Keep track of which TaskTracker contains which tasks.
+ for (Task task : tasks) {
+ LOG.info("Assigning task : " + task.getTaskID() + " to tracker "
+ + tracker);
+ mesosTrackers.get(tracker).hadoopTasks.add(task.getTaskID());
+ }
}
return tasks;
Modified: incubator/mesos/trunk/support/apply-review.sh
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/support/apply-review.sh?rev=1471072&r1=1471071&r2=1471072&view=diff
==============================================================================
--- incubator/mesos/trunk/support/apply-review.sh (original)
+++ incubator/mesos/trunk/support/apply-review.sh Tue Apr 23 17:53:17 2013
@@ -14,7 +14,7 @@ test ${#} -eq 1 || \
REVIEW=${1}
REVIEW_URL="https://reviews.apache.org/r/${REVIEW}"
-DIFF_URL="${REVIEW_URL}/diff/raw/"
+DIFF_URL="${REVIEW_URL}/diff/1/raw/"
atexit "rm -f ${REVIEW}.patch"
@@ -50,4 +50,4 @@ __EOF__
git commit -am "${MESSAGE}" || \
{ echo "${RED}Failed to commit patch${NORMAL}"; exit 1; }
-git commit --amend
\ No newline at end of file
+git commit --amend