forked from alteryx/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request alteryx#148 from squito/include_appId
Include appId in executor cmd line args add the appId back into the executor cmd line args. I also made a pretty lame regression test, just to make sure it doesn't get dropped in the future. not sure it will run on the build server, though, b/c `ExecutorRunner.buildCommandSeq()` expects to be abel to run the scripts in `bin`.
- Loading branch information
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
core/src/test/scala/org/apache/spark/deploy/worker/ExecutorRunnerTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.apache.spark.deploy.worker | ||
|
||
import java.io.File | ||
import org.scalatest.FunSuite | ||
import org.apache.spark.deploy.{ExecutorState, Command, ApplicationDescription} | ||
|
||
class ExecutorRunnerTest extends FunSuite { | ||
|
||
test("command includes appId") { | ||
def f(s:String) = new File(s) | ||
val sparkHome = sys.props("user.dir") | ||
val appDesc = new ApplicationDescription("app name", 8, 500, Command("foo", Seq(),Map()), | ||
sparkHome, "appUiUrl") | ||
val appId = "12345-worker321-9876" | ||
val er = new ExecutorRunner(appId, 1, appDesc, 8, 500, null, "blah", "worker321", f(sparkHome), | ||
f("ooga"), ExecutorState.RUNNING) | ||
|
||
assert(er.buildCommandSeq().last === appId) | ||
} | ||
} |