spark

Optimize Apache Spark pipelines by minimizing shuffles and mitigating data skew.

25|3|Updated Jul 14, 2026
One-click install
npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill spark-nimadorostkar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spark
Source: https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/data/spark
Command: npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill spark-nimadorostkar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses performance bottlenecks in Apache Spark jobs, such as excessive shuffles, skewed data partitions, and inefficient memory usage, which often lead to slow execution or out-of-memory errors.

Core Features & Use Cases

  • Performance Tuning: Provides strategies for minimizing shuffles, implementing broadcast joins, and managing partition sizes.
  • Diagnostic Analysis: Guides the interpretation of the Spark UI to identify straggling tasks and memory pressure.
  • Use Case: When a production ETL job is failing due to a single straggling task, this skill helps identify the data skew and apply salting techniques to balance the workload across the cluster.

Quick Start

Use the spark skill to analyze the current execution plan and identify potential shuffle optimizations for the provided DataFrame.

Frequently Asked Questions about spark

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Apache Spark pipelines to reduce shuffle operations?

To optimize Spark pipelines and reduce shuffle operations, apply predicate pushdown, implement broadcast join strategies, and enable adaptive query execution to dynamically manage partition sizes and minimize data movement across the cluster.

What is the best way to fix data skew and straggling tasks in a Spark ETL job?

Fixing data skew in Spark ETL jobs involves identifying straggling tasks via the Spark UI and applying salting techniques to distribute skewed keys evenly, balancing the workload across the cluster to prevent out-of-memory errors.

How does adaptive query execution improve Spark performance tuning?

Adaptive query execution improves Spark performance by dynamically adjusting execution plans at runtime, optimizing shuffle partition sizes and join strategies based on actual data statistics to mitigate memory pressure and accelerate job completion.

Why does my Spark job fail with out-of-memory errors during large-scale ETL processing?

Spark jobs fail with out-of-memory errors during large-scale ETL processing due to inefficient memory usage and skewed data partitions, which you can resolve by diagnosing memory pressure in the Spark UI and tuning partition management.

Can I use broadcast joins to mitigate data skew in distributed Spark jobs?

Yes, you can use broadcast joins to mitigate data skew in distributed Spark jobs by sending smaller DataFrames to all worker nodes, avoiding expensive shuffle operations and reducing straggler tasks caused by uneven key distribution.

When should I not use salting techniques for Spark shuffle optimization?

You should avoid using salting techniques for Spark shuffle optimization when data distribution is relatively even, as the overhead of adding and removing salt keys outweighs the benefits and complicates adaptive query execution configurations.