Loading...
Loading...
Query a running Apache Spark History Server from Copilot CLI. Use this whenever the user wants to inspect SHS applications, jobs, stages, executors, SQL executions, environment details, or event logs, especially when they mention Spark History Server, SHS, event log history, benchmark runs, or application IDs.
npx skill4agent add yaooqinn/spark-history-cli spark-history-clipip install spark-history-clipython -m spark_history_cli --json apps--json--json--server <url>SPARK_HISTORY_SERVERhttp://localhost:18080python -m pip install spark-history-clispark-history-cli --json --server http://localhost:18080 apps
spark-history-cli --json --server http://localhost:18080 app <app-id>
spark-history-cli --json --server http://localhost:18080 --app-id <app-id> jobs
spark-history-cli --json --server http://localhost:18080 --app-id <app-id> stages
spark-history-cli --json --server http://localhost:18080 --app-id <app-id> executors --all
spark-history-cli --json --server http://localhost:18080 --app-id <app-id> sql
spark-history-cli --json --server http://localhost:18080 --app-id <app-id> sql-plan <exec-id> --view final
spark-history-cli --server http://localhost:18080 --app-id <app-id> sql-plan <exec-id> --dot -o plan.dot
spark-history-cli --json --server http://localhost:18080 --app-id <app-id> sql-jobs <exec-id>
spark-history-cli --json --server http://localhost:18080 --app-id <app-id> summary
spark-history-cli --json --server http://localhost:18080 --app-id <app-id> env
spark-history-cli --server http://localhost:18080 --app-id <app-id> logs output.zipspark-history-cliPATHpython -m spark_history_cli --json appsappsapp <id>attemptsjobsjob <id>job-stages <id>stagesstage <id>stage-summary <id>stage-tasks <id>executors --allsqlsql-plan <id>--view full--view initial--view final--dot--json--viewisAdaptivesectionCountplansections-o <file>sql-jobs <id>summaryenvlogs| Issue | Solution |
|---|---|
| SHS not running — start with |
| App ID may include attempt suffix — use |
| No apps listed | Check |
| CLI not installed — run |
| Wrong server | Set |
| Timeout on large apps | SHS may be parsing event logs — wait and retry, or check SHS logs |