SPARK-1806 (addendum) Use non-deprecated methods in Mesos 0.18
The update to Mesos 0.18 caused some deprecation warnings in the build. The change to the non-deprecated version is straightforward as it emulates what the Mesos driver does with the deprecated method anyway (c5aa1dd221/src/sched/sched.cpp (L1354)
)
Author: Sean Owen <sowen@cloudera.com>
Closes #920 from srowen/SPARK-1806 and squashes the following commits:
8d76b6a [Sean Owen] Use non-deprecated methods in Mesos 0.18
This commit is contained in:
parent
ab7c62d573
commit
4ca0625669
|
@ -207,10 +207,12 @@ private[spark] class CoarseMesosSchedulerBackend(
|
|||
.addResources(createResource("cpus", cpusToUse))
|
||||
.addResources(createResource("mem", sc.executorMemory))
|
||||
.build()
|
||||
d.launchTasks(offer.getId, Collections.singletonList(task), filters)
|
||||
d.launchTasks(
|
||||
Collections.singleton(offer.getId), Collections.singletonList(task), filters)
|
||||
} else {
|
||||
// Filter it out
|
||||
d.launchTasks(offer.getId, Collections.emptyList[MesosTaskInfo](), filters)
|
||||
d.launchTasks(
|
||||
Collections.singleton(offer.getId), Collections.emptyList[MesosTaskInfo](), filters)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ private[spark] class MesosSchedulerBackend(
|
|||
// Reply to the offers
|
||||
val filters = Filters.newBuilder().setRefuseSeconds(1).build() // TODO: lower timeout?
|
||||
for (i <- 0 until offers.size) {
|
||||
d.launchTasks(offers(i).getId, mesosTasks(i), filters)
|
||||
d.launchTasks(Collections.singleton(offers(i).getId), mesosTasks(i), filters)
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
|
Loading…
Reference in a new issue