CLI for querying the Apache Spark History Server REST API
Project description
spark-history-cli
A CLI for querying the Apache Spark History Server REST API.
Prerequisites
- Python 3.10+
- A running Spark History Server (default:
http://localhost:18080)
Start the History Server:
$SPARK_HOME/sbin/start-history-server.sh
Installation
cd spark-history-cli
pip install -e .
Or install from PyPI:
pip install spark-history-cli
Install as a Copilot CLI skill
spark-history-cli install-skill
This installs the bundled skill to ~/.copilot/skills/spark-history-cli.
If Copilot CLI is already running, reload skills with:
/skills reload
Then verify with /skills list and invoke it with prompts like:
Use /spark-history-cli to inspect the latest completed SHS application.
Usage
REPL Mode (default)
spark-history-cli
# or specify a server:
spark-history-cli --server http://my-shs:18080
One-Shot Commands
# List applications
spark-history-cli apps
spark-history-cli apps --status completed --limit 10
# Application details
spark-history-cli app <app-id>
# Jobs, stages, executors (requires --app-id or 'use' in REPL)
spark-history-cli --app-id <id> jobs
spark-history-cli --app-id <id> stages
spark-history-cli --app-id <id> executors --all
spark-history-cli --app-id <id> sql
spark-history-cli --app-id <id> env
# Download event logs
spark-history-cli --app-id <id> logs output.zip
# JSON output for scripting/agents
spark-history-cli --json apps
spark-history-cli --json --app-id <id> jobs
REPL Commands
apps List applications
app <id> Show app details and set as current
use <id> Set current app context
jobs List jobs for current app
job <id> Show job details
stages List stages
stage <id> [attempt] Show stage details
executors [--all] List executors
sql [id] List or show SQL executions
rdds List cached RDDs
env Show environment/config
logs [path] Download event logs
version Show Spark version
server <url> Change server URL
status Show session state
help Show help
quit Exit
Environment Variables
SPARK_HISTORY_SERVER— Default server URL (overrideshttp://localhost:18080)
API Coverage
Wraps all 20 endpoints of the Spark History Server REST API (/api/v1/):
- Applications (list, get, attempts)
- Jobs (list, get)
- Stages (list, get, attempts, task summary, task list)
- Executors (active, all)
- SQL Executions (list, get with plan graph)
- Storage (RDD list, detail)
- Environment
- Event Logs (download as ZIP)
- Miscellaneous Processes
- Version
License
Apache License 2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spark_history_cli-1.0.1.tar.gz.
File metadata
- Download URL: spark_history_cli-1.0.1.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af4754f87f296f098a84aaa2e8d38ccb7fc991e034b95763bb68d2498efc418b
|
|
| MD5 |
10e3ec2917c1967b82646cf0b3873c52
|
|
| BLAKE2b-256 |
baefe31f02435748cb84327cfbef2210a0bd12ab1f3a8396feef483e0c86d221
|
Provenance
The following attestation bundles were made for spark_history_cli-1.0.1.tar.gz:
Publisher:
publish.yml on yaooqinn/spark-history-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spark_history_cli-1.0.1.tar.gz -
Subject digest:
af4754f87f296f098a84aaa2e8d38ccb7fc991e034b95763bb68d2498efc418b - Sigstore transparency entry: 1120828382
- Sigstore integration time:
-
Permalink:
yaooqinn/spark-history-cli@723091fb09691f3fd1dcda6842543d718353c156 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/yaooqinn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@723091fb09691f3fd1dcda6842543d718353c156 -
Trigger Event:
release
-
Statement type:
File details
Details for the file spark_history_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: spark_history_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 23.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8b3292d913717e9e7b4302e2aa3637965bcf362b9994cc57d63098ef0461159
|
|
| MD5 |
2d2f372bdb9011ba48c78d863319b852
|
|
| BLAKE2b-256 |
e693437a3e04e0719be79cd7a259cfc7ed50f440f77829c8316a2e813b041ce2
|
Provenance
The following attestation bundles were made for spark_history_cli-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on yaooqinn/spark-history-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spark_history_cli-1.0.1-py3-none-any.whl -
Subject digest:
a8b3292d913717e9e7b4302e2aa3637965bcf362b9994cc57d63098ef0461159 - Sigstore transparency entry: 1120828447
- Sigstore integration time:
-
Permalink:
yaooqinn/spark-history-cli@723091fb09691f3fd1dcda6842543d718353c156 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/yaooqinn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@723091fb09691f3fd1dcda6842543d718353c156 -
Trigger Event:
release
-
Statement type: