Skip to content

Commit 80ca72c

Browse files
committed
Mark context-per-jvm as experimental, and default to false in deploy configs
1 parent 8fc1edf commit 80ca72c

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Also see [Chinese docs / 中文](doc/chinese/job-server.md).
3232
- [Authentication](#authentication)
3333
- [Deployment](#deployment)
3434
- [Manual steps](#manual-steps)
35+
- [Context per JVM](#context-per-jvm)
3536
- [Configuring Spark Jobserver meta data Database backend](#configuring-spark-jobserver-meta-data-database-backend)
3637
- [Chef](#chef)
3738
- [Architecture](#architecture)
@@ -79,7 +80,7 @@ Spark Job Server is now included in Datastax Enterprise 4.8!
7980
- *"Spark as a Service"*: Simple REST interface (including HTTPS) for all aspects of job, context management
8081
- Support for Spark SQL, Hive, Streaming Contexts/jobs and custom job contexts! See [Contexts](doc/contexts.md).
8182
- LDAP Auth support via Apache Shiro integration
82-
- Separate JVM per SparkContext for isolation
83+
- Separate JVM per SparkContext for isolation (EXPERIMENTAL)
8384
- Supports sub-second low-latency jobs via long-running job contexts
8485
- Start and stop job contexts for RDD sharing and low-latency jobs; change resources on restart
8586
- Kill running jobs via stop context and delete job
@@ -120,7 +121,7 @@ Alternatives:
120121
* EC2 Deploy scripts - follow the instructions in [EC2](doc/EC2.md) to spin up a Spark cluster with job server and an example application.
121122
* EMR Deploy instruction - follow the instruction in [EMR](doc/EMR.md)
122123

123-
NOTE: Spark Job Server runs `SparkContext`s in their own, forked JVM process when the config option `spark.jobserver.context-per-jvm` is set to `true`. In local development mode, this is set to false by default, while the deployment templates have this set to true for production deployment. See [Deployment](#deployment) section for more info.
124+
NOTE: Spark Job Server can optionally run `SparkContext`s in their own, forked JVM process when the config option `spark.jobserver.context-per-jvm` is set to `true`. In local development mode, this is set to false by default, while the deployment templates have this set to true for production deployment. See [Deployment](#deployment) section for more info.
124125

125126
## Development mode
126127

@@ -449,10 +450,16 @@ The `server_start.sh` script uses `spark-submit` under the hood and may be passe
449450
450451
NOTE: by default the assembly jar from `job-server-extras`, which includes support for SQLContext and HiveContext, is used. If you face issues with all the extra dependencies, consider modifying the install scripts to invoke `sbt job-server/assembly` instead, which doesn't include the extra dependencies.
451452
452-
NOTE: Each context is a separate process launched using spark-submit, via the included `manager_start.sh` script.
453+
### Context per JVM
454+
455+
NOTE: Each context can be a separate process launched using spark-submit, via the included `manager_start.sh` script, if `context-per-jvm` is set to true.
453456
You may want to set `deploy.manager-start-cmd` to the correct path to your start script and customize the script.
454457
Also, the extra processes talk to the master HTTP process via random ports using the Akka Cluster gossip protocol. If for some reason the separate processes causes issues, set `spark.jobserver.context-per-jvm` to `false`, which will cause the job server to use a single JVM for all contexts.
455458
459+
Among the known issues:
460+
- Launched contexts do not shut down by themselves. You need to manually kill each separate process, or do `-X DELETE /contexts/<context-name>`
461+
- Custom error messages are not serialized back to HTTP
462+
456463
Log files are separated out for each context (assuming `context-per-jvm` is `true`) in their own subdirs under the `LOG_DIR` configured in `settings.sh` in the deployed directory.
457464
458465
Note: to test out the deploy to a local staging dir, or package the job server for Mesos,

job-server/config/ec2.conf.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spark {
1313
port = 8090
1414
jar-store-rootdir = /tmp/jobserver/jars
1515

16-
context-per-jvm = true
16+
context-per-jvm = false
1717

1818
jobdao = spark.jobserver.io.JobFileDAO
1919

job-server/config/local.conf.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spark {
1515
port = 8090
1616
jar-store-rootdir = /tmp/jobserver/jars
1717

18-
context-per-jvm = true
18+
context-per-jvm = false
1919

2020
jobdao = spark.jobserver.io.JobFileDAO
2121

0 commit comments

Comments
 (0)