Permalink
Browse files

Bug fixes for passing the JAR URIs correctly

  • Loading branch information...
1 parent bb19ee7 commit b1b9a749c19554b53ea97d4af10d7443478c247b @mateiz mateiz committed Apr 14, 2012
@@ -116,6 +116,7 @@ class Executor extends org.apache.mesos.Executor with Logging {
// each URL has a unique file name so that no local filenames will clash
// in this process. This is guaranteed by MesosScheduler.
val uris = System.getProperty("spark.jar.uris", "")
+ logInfo("spark.jar.uris = " + uris)
val localFiles = ArrayBuffer[String]()
for (uri <- uris.split(",").filter(_.size > 0)) {
val url = new URL(uri)
@@ -149,6 +150,7 @@ class Executor extends org.apache.mesos.Executor with Logging {
// Download a file from a given URL to the local filesystem
private def downloadFile(url: URL, localPath: String) {
+ logInfo("Downloading " + url + " to " + localPath)
val in = url.openStream()
val out = new FileOutputStream(localPath)
Utils.copyStream(in, out, true)
@@ -76,9 +76,6 @@ private class MesosScheduler(
// URIs of JARs to pass to executor
var jarUris: String = ""
- // Create an ExecutorInfo for our tasks
- val executorInfo = createExecutorInfo()
-
// Sorts jobs in reverse order of run ID for use in our priority queue (so lower IDs run first)
private val jobOrdering = new Ordering[Job] {
override def compare(j1: Job, j2: Job): Int = {
@@ -108,7 +105,7 @@ private class MesosScheduler(
setDaemon(true)
override def run {
val sched = MesosScheduler.this
- driver = new MesosSchedulerDriver(sched, frameworkName, executorInfo, master)
+ driver = new MesosSchedulerDriver(sched, frameworkName, createExecutorInfo(), master)
try {
val ret = driver.run()
logInfo("driver.run() returned with code " + ret)
@@ -176,7 +176,6 @@ class SimpleJob(
return Some(TaskDescription.newBuilder()
.setTaskId(taskId)
.setSlaveId(offer.getSlaveId)
- .setExecutor(sched.executorInfo)
.setName(taskName)
.addResources(cpuRes)
.setData(ByteString.copyFrom(serializedTask))

0 comments on commit b1b9a74

Please sign in to comment.