Token导航 LogoToken导航TokenDH.com
研究检索可写文件github未标认证来源可访问许可证需确认审计通过

spark-history-clispark history CLI 搜索

Agent Skill

spark-history-cli 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

212

周安装

9

GitHub Stars

22

下载量

74
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:spark-history-cli(spark history CLI 搜索)
来源仓库:https://github.com/yaooqinn/spark-history-cli
仓库路径:skills/spark-history-cli
安装命令:
npx skills add https://github.com/yaooqinn/spark-history-cli --skill spark-history-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yaooqinn/spark-history-cli --skill spark-history-cli

简介

查询 Spark 应用程序配置与工作负载统计信息。

  • 支持作业、阶段、任务与 SQL 层级的性能分析。
  • 需配合 Spark 历史服务器使用,不替代 SHS 功能。
  • 事件日志视为敏感数据,下载前需用户明确授权。
  • 建议参考故障排查章节解决连接与超时问题。spark-history-cli 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

spark-history-cli

Use this skill when the task is about exploring or debugging data exposed by a running Apache Spark History Server.

Installation

pip install spark-history-cli

Or if not on PATH after install:

python -m spark_history_cli --json apps

Why use this skill

  • It gives you a purpose-built CLI instead of scraping the Spark History Server web UI.
  • It wraps the REST API cleanly and already handles attempt-ID resolution for multi-attempt apps.
  • It supports --json, which makes downstream reasoning and comparisons much easier.

Workflow

  1. Prefer the CLI over raw REST calls.
  2. Prefer --json unless the user explicitly wants a human-formatted table.
  3. Use --server <url> or SPARK_HISTORY_SERVER to point at the right SHS. If the user does not specify one, assume http://localhost:18080.
  4. Start broad, then drill down:

- list applications - choose the relevant app - inspect jobs, stages, executors, SQL executions, environment, or logs

  1. If the user says "latest app", "recent run", or similar, list apps first and choose the most relevant recent application before continuing.
  2. If the CLI is unavailable, install it with python -m pip install spark-history-cli if tool permissions allow it.

Command patterns

spark-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.zip

If spark-history-cli is not on PATH, use:

python -m spark_history_cli --json apps

What to reach for

  • apps for recent runs, durations, status, and picking candidates
  • app <id> for high-level details about one run
  • attempts for multi-attempt apps (list or show specific attempt details)
  • jobs, job <id> for job-level failures or progress
  • job-stages <id> for stages belonging to a job
  • stages, stage <id> for task/stage bottlenecks
  • stage-summary <id> for task metric quantiles (p5/p25/p50/p75/p95) — duration, GC, memory, shuffle, I/O
  • stage-tasks <id> for individual task details — sorted by runtime to find stragglers
  • executors --all for executor churn or skew investigations
  • sql for SQL execution history and plan graph data
  • sql-plan <id> for SQL plan extraction:

- --view full (default): full plan text - --view initial: only the Initial Plan (pre-AQE) - --view final: only the Final Plan (post-AQE) - --dot: Graphviz DOT output for visualizing the plan DAG - --json + --view: structured JSON with isAdaptive, sectionCount, plan, and sections - -o <file>: write output to file instead of stdout

  • sql-jobs <id> for jobs associated with a SQL execution (fetches all linked jobs by ID)
  • summary for a concise application overview: app info, resource config (driver/executor/shuffle), and workload stats (jobs/stages/tasks/SQL)
  • env for Spark config/runtime context
  • logs only when the user explicitly wants the event log archive saved locally

Practical guidance

  • Preserve the user's server URL if they gave one explicitly.
  • Summarize findings after retrieving JSON; do not dump raw JSON unless the user asked for it.
  • Treat event logs and benchmark history as potentially sensitive. Download them only when necessary and keep them local.
  • This CLI needs a running Spark History Server. It does not replace SHS and it does not parse raw event logs directly.

Troubleshooting

IssueSolution
Connection refusedSHS not running — start with $SPARK_HOME/sbin/start-history-server.sh
404 Not Found on appApp ID may include attempt suffix — use apps to list valid IDs
No apps listedCheck spark.history.fs.logDirectory points to the right event log path
ModuleNotFoundErrorCLI not installed — run pip install spark-history-cli
Wrong serverSet SPARK_HISTORY_SERVER env var or use --server <url>
Timeout on large appsSHS may be parsing event logs — wait and retry, or check SHS logs

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.95%
按下载量换算26

Claude

26.29%
按下载量换算19

Cursor

20.05%
按下载量换算15

Gemini CLI

9.14%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills