Spark Job Server exposes HTTP endpoints to upload jars, manage Spark contexts, and run or query jobs on a cluster. It targets low-latency and shared-context Spark workloads.
Overview
Spark Job Server provides a RESTful interface for submitting and managing Apache Spark jobs, application jars, and job contexts. It was created to offer Spark as a network service so applications can launch work without embedding full Spark bootstrapping in each client.
The server supports ad-hoc jobs that spin up transient contexts and persistent contexts that reuse SparkContext instances for faster startup and shared RDD or DataFrame caching. Named objects let jobs store and retrieve cached datasets by name across related jobs. Both asynchronous and synchronous job APIs are available, with synchronous calls suited to short jobs.
Functionality covers Spark SQL, Hive, streaming contexts, Python, Scala, and Java jobs, jar upload separated from execution, job stop and context lifecycle control, and optional authentication through Apache Shiro or Keycloak. Deployments work with Spark standalone, Mesos, YARN client mode, and EMR-style clusters, with optional high-availability and per-context JVM isolation.
Job metadata persists through a pluggable DAO. Developers implement the SparkJob trait in separate projects, package jars, and submit them via HTTP. Docker images bundle Spark with the server for quick trials, and shell scripts support remote or packaged cluster deployment.
Key features
- REST job and context management
- Persistent and transient Spark contexts
- Named RDD and DataFrame sharing
- Jar upload before job execution
- Sync and async job result APIs
- Python, Scala, and Java jobs
- Shiro and Keycloak authentication
- Spark SQL, Hive, and streaming support
Use cases
- Shared low-latency Spark micro-jobs
- Central jar deployment for Spark apps
- REST-driven analytics services
- Repeated jobs on warm contexts
- Cluster Spark job orchestration