Spark Serverless Reliability And State Management logo

Spark Serverless Reliability And State Management

Community
vaquarkhan
spark-serverless-reliability-and-state-management

Enforces timeout-aware rollbacks, resumable checkpoints, and orphan cleanup for serverless Spark workloads on AWS Lambda, Glue, and similar runtimes. Use when writing or reviewing Spark jobs in serverless environments, S3 checkpoint patterns, partial-failure recovery, or IceGuard-style state management.

Overview

Publishervaquarkhan
Repositorydata-engineering-agent-skills
Skill namespark-serverless-reliability-and-state-management
Stars
60
Forks
8
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by vaquarkhan on GitHub. Read the source before you install it.

Installation

Install the Spark Serverless Reliability And State Management AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/vaquarkhan/data-engineering-agent-skills/tree/main/skills/spark-serverless-reliability-and-state-management
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vaquarkhan/data-engineering-agent-skills.git /tmp/data-engineering-agent-skills
mkdir -p .claude/skills
cp -r /tmp/data-engineering-agent-skills/skills/spark-serverless-reliability-and-state-management .claude/skills/spark-serverless-reliability-and-state-management
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Spark Serverless Reliability And State Management in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Spark Serverless Reliability And State Management on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Spark Serverless Reliability And State Management is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Spark Serverless Reliability And State Management

Overview

Serverless Spark hides cluster failures behind short-lived runtimes and opaque retries. Silent partial writes, orphaned checkpoints, and timeout-induced corruption are common when agents treat serverless Spark like a long-running cluster job. This skill forces explicit state boundaries, resumable progress, and cleanup before any publish path opens.

When to Use

  • implementing or reviewing Spark on AWS Lambda, AWS Glue serverless, or comparable short-lived runtimes
  • designing S3-backed checkpoints, progress markers, or staged write paths
  • recovering from timeout, OOM, or mid-batch partial failure without double-counting
  • translating IceGuard-style checkpoint and rollback patterns into agent workflows
  • hardening batch Spark that must survive cold starts, memory limits, and hard execution ceilings

Do not use this for always-on EMR or Databricks clusters unless the job also runs in a serverless path with hard time limits.

Workflow

  1. Classify execution risk before coding. Document:

    • maximum runtime and memory ceiling
    • input cardinality and partition fan-out
    • whether output is append, merge, or overwrite
    • downstream consumers that would see partial data
    • whether the job is restartable from a known offset or partition set
  2. Design a resumable checkpoint contract. Require:

    • durable progress markers in object storage (for example s3://.../checkpoints/{run_id}/)
    • explicit run identifiers tied to orchestration metadata
    • idempotent write semantics at the target grain
    • a manifest or _SUCCESS-style gate before publish
    • separation between staging prefixes and publish prefixes

    Load references/spark-serverless-reliability-patterns.md for checkpoint layout and orphan-detection patterns.

  3. Implement timeout-aware rollback. Before any publish:

    • detect incomplete partitions or missing manifest files
    • roll back staged outputs when the runtime approaches its ceiling
    • persist last-good checkpoint state for resume
    • block downstream publish when rollback is incomplete
    • emit structured failure context (run id, partition range, bytes written)
  4. Plan orphan and zombie cleanup. Include:

    • TTL or lifecycle rules for abandoned staging prefixes
    • a reconciliation job or hook that lists orphaned checkpoints older than N hours
    • explicit ownership for cleanup automation
    • guardrails against deleting in-flight runs
  5. Pair with observability before production. Load mcp-data-observability-integration when live execution plans, stage metrics, or cluster signals are needed to diagnose OOM or skew before rollout.

  6. Prove recovery paths in a bounded slice. Validate:

    • forced timeout mid-batch resumes without duplicate publish
    • rerun from checkpoint produces identical contract-compliant output
    • orphan cleanup does not remove active runs

Common Rationalizations

RationalizationReality
"Lambda will just retry the whole function."Retries can duplicate writes, leave orphaned staging data, and publish partial partitions.
"We can write directly to the final table path."Serverless timeouts make direct writes dangerous without staging and manifest gates.
"Checkpointing is only for streaming."Any resumable batch with hard runtime limits needs durable progress markers.
"Glue handles cleanup automatically."Managed runtimes do not guarantee orphan cleanup or rollback of partial lake writes.

Red Flags

  • writes go directly to publish paths with no staging boundary
  • no run id or checkpoint manifest exists
  • timeout handling is undefined
  • partial S3 prefixes have no orphan detection or TTL policy
  • resume logic cannot distinguish completed versus in-flight partitions
  • agents scale partitions without checking memory ceiling per task

Verification

  • Runtime limits, write mode, and idempotency grain are documented
  • Checkpoint and staging layout support safe resume
  • Timeout rollback and publish gating are explicit
  • Orphan cleanup ownership and detection exist
  • Recovery was proven on a bounded partition slice before full rollout

Frequently asked questions

What does the Spark Serverless Reliability And State Management AI skill do?

Enforces timeout-aware rollbacks, resumable checkpoints, and orphan cleanup for serverless Spark workloads on AWS Lambda, Glue, and similar runtimes. Use when writing or reviewing Spark jobs in serverless environments, S3 checkpoint patterns, partial-failure recovery, or IceGuard-style state management.

Why use Spark Serverless Reliability And State Management on TypingMind?

Because you install it once and use it with any model. Spark Serverless Reliability And State Management is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Spark Serverless Reliability And State Management in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/vaquarkhan/data-engineering-agent-skills/tree/main/skills/spark-serverless-reliability-and-state-management. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Spark Serverless Reliability And State Management?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Spark Serverless Reliability And State Management?

As many as you like. As long as a model supports skills, you can use Spark Serverless Reliability And State Management with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Spark Serverless Reliability And State Management AI skill free?

Yes. It is published on GitHub by vaquarkhan under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇