Clone Ooyala’s Spark Job Server
$ git clone https://github.com/ooyala/spark-jobserver
$ cd spark-jobserver
Using SBT, publish it to your local repository and run it
$ sbt publish-local
$ sbt
> re-start
WordCountExample walk-through
First, to package the test jar containing the WordCountExample:
sbt job-server-tests/package
Then go ahead and start the job server using the instructions above.
Let’s upload the jar:
curl --data-binary @job-server-tests/target/job-server-tests-0.3.1.jar localhost:8090/jars/test
OK⏎
The above jar is uploaded as app test
. Next, let’s start an ad-hoc word count job, meaning that the job server will create its own SparkContext, and return a job ID for subsequent querying:
curl -d "input.string = a b c a b see" 'localhost:8090/jobs?appName=test&classPath=spark.jobserver.WordCountExample'
{
"status": "STARTED",
"result": {
"jobId": "5453779a-f004-45fc-a11d-a39dae0f9bf4",
"context": "b7ea0eb5-spark.jobserver.WordCountExample"
}
}⏎
https://github.com/bigsnarfdude/spark-jobserver
https://github.com/fedragon/spark-jobserver-examples