-
- Downloads
Merge pull request #293 from pwendell/standalone-driver
SPARK-998: Support Launching Driver Inside of Standalone Mode [NOTE: I need to bring the tests up to date with new changes, so for now they will fail] This patch provides support for launching driver programs inside of a standalone cluster manager. It also supports monitoring and re-launching of driver programs which is useful for long running, recoverable applications such as Spark Streaming jobs. For those jobs, this patch allows a deployment mode which is resilient to the failure of any worker node, failure of a master node (provided a multi-master setup), and even failures of the applicaiton itself, provided they are recoverable on a restart. Driver information, such as the status and logs from a driver, is displayed in the UI There are a few small TODO's here, but the code is generally feature-complete. They are: - Bring tests up to date and add test coverage - Restarting on failure should be optional and maybe off by default. - See if we can re-use akka connections to facilitate clients behind a firewall A sensible place to start for review would be to look at the `DriverClient` class which presents users the ability to launch their driver program. I've also added an example program (`DriverSubmissionTest`) that allows you to test this locally and play around with killing workers, etc. Most of the code is devoted to persisting driver state in the cluster manger, exposing it in the UI, and dealing correctly with various types of failures. Instructions to test locally: - `sbt/sbt assembly/assembly examples/assembly` - start a local version of the standalone cluster manager ``` ./spark-class org.apache.spark.deploy.client.DriverClient \ -j -Dspark.test.property=something \ -e SPARK_TEST_KEY=SOMEVALUE \ launch spark://10.99.1.14:7077 \ ../path-to-examples-assembly-jar \ org.apache.spark.examples.DriverSubmissionTest 1000 some extra options --some-option-here -X 13 ``` - Go in the UI and make sure it started correctly, look at the output etc - Kill workers, the driver program, masters, etc.
No related branches found
No related tags found
Showing
- core/pom.xml 10 additions, 0 deletionscore/pom.xml
- core/src/main/scala/org/apache/spark/deploy/Client.scala 151 additions, 0 deletionscore/src/main/scala/org/apache/spark/deploy/Client.scala
- core/src/main/scala/org/apache/spark/deploy/ClientArguments.scala 117 additions, 0 deletions.../main/scala/org/apache/spark/deploy/ClientArguments.scala
- core/src/main/scala/org/apache/spark/deploy/DeployMessage.scala 41 additions, 11 deletions...rc/main/scala/org/apache/spark/deploy/DeployMessage.scala
- core/src/main/scala/org/apache/spark/deploy/DriverDescription.scala 29 additions, 0 deletions...ain/scala/org/apache/spark/deploy/DriverDescription.scala
- core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala 7 additions, 6 deletions...main/scala/org/apache/spark/deploy/client/AppClient.scala
- core/src/main/scala/org/apache/spark/deploy/client/AppClientListener.scala 1 addition, 1 deletion...la/org/apache/spark/deploy/client/AppClientListener.scala
- core/src/main/scala/org/apache/spark/deploy/client/TestClient.scala 2 additions, 2 deletions...ain/scala/org/apache/spark/deploy/client/TestClient.scala
- core/src/main/scala/org/apache/spark/deploy/master/DriverInfo.scala 36 additions, 0 deletions...ain/scala/org/apache/spark/deploy/master/DriverInfo.scala
- core/src/main/scala/org/apache/spark/deploy/master/DriverState.scala 33 additions, 0 deletions...in/scala/org/apache/spark/deploy/master/DriverState.scala
- core/src/main/scala/org/apache/spark/deploy/master/FileSystemPersistenceEngine.scala 13 additions, 4 deletions...che/spark/deploy/master/FileSystemPersistenceEngine.scala
- core/src/main/scala/org/apache/spark/deploy/master/Master.scala 179 additions, 10 deletions...rc/main/scala/org/apache/spark/deploy/master/Master.scala
- core/src/main/scala/org/apache/spark/deploy/master/PersistenceEngine.scala 9 additions, 2 deletions...la/org/apache/spark/deploy/master/PersistenceEngine.scala
- core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala 18 additions, 2 deletions...ain/scala/org/apache/spark/deploy/master/WorkerInfo.scala
- core/src/main/scala/org/apache/spark/deploy/master/ZooKeeperPersistenceEngine.scala 12 additions, 2 deletions...ache/spark/deploy/master/ZooKeeperPersistenceEngine.scala
- core/src/main/scala/org/apache/spark/deploy/master/ui/IndexPage.scala 54 additions, 2 deletions...n/scala/org/apache/spark/deploy/master/ui/IndexPage.scala
- core/src/main/scala/org/apache/spark/deploy/worker/CommandUtils.scala 63 additions, 0 deletions...n/scala/org/apache/spark/deploy/worker/CommandUtils.scala
- core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala 234 additions, 0 deletions...n/scala/org/apache/spark/deploy/worker/DriverRunner.scala
- core/src/main/scala/org/apache/spark/deploy/worker/DriverWrapper.scala 31 additions, 0 deletions.../scala/org/apache/spark/deploy/worker/DriverWrapper.scala
- core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala 14 additions, 53 deletions...scala/org/apache/spark/deploy/worker/ExecutorRunner.scala
Loading
Please register or sign in to comment