Apache Spark

Apache Spark

Deep technical articles on this topic.

144Articles
144Topics covered
Articles in this category

All 144 articles, sorted alphabetically

Advertisement
ARTICLE · 01

Spark Accumulators

Write-only counters across executors.

Read article
ARTICLE · 02

Spark Actions vs Transformations

Lazy transformations. Eager actions.

Read article
ARTICLE · 03

Spark Adaptive Query Execution (AQE)

How AQE reoptimizes Spark queries at runtime based on actual data statistics.

Read article
ARTICLE · 04

Spark AQE architecture

Deep-dive on Adaptive Query Execution: query stages at shuffle boundaries, MapOutputStatistics-driven re-planning, partition coalescing and advisory s…

Read article
ARTICLE · 05

Spark Architecture

The internal architecture of Spark: how the driver orchestrates executors via the cluster manager, and how task scheduling works.

Read article
ARTICLE · 06

Spark Arrow

How Apache Arrow accelerates Spark's Python + R + native integrations.

Read article
ARTICLE · 07

Spark + Avro

Row-based with schema evolution.

Read article
ARTICLE · 08

Spark Broadcast Variables

Ship small data to all executors once.

Read article
ARTICLE · 09

Spark Broadcast Hints

Force broadcast join.

Read article
ARTICLE · 10

Spark Broadcast Join

How broadcast join avoids shuffle by broadcasting the small side to every executor.

Read article
ARTICLE · 11

Spark broadcast joins -- avoiding the shuffle for large-small joins

Deep-dive on Spark broadcast joins: the join/shuffle problem, broadcasting the small side to avoid shuffling the large side, the auto-broadcast thresh…

Read article
ARTICLE · 12

Spark cache() + persist()

Store in memory for reuse.

Read article
ARTICLE · 13

Spark Cache Strategy

When to cache + storage level.

Read article
ARTICLE · 14

Spark Catalyst Optimizer

SQL query optimizer.

Read article
ARTICLE · 15

Spark Cost-Based Optimizer

Uses stats for plan selection.

Read article
ARTICLE · 16

Spark Checkpointing

Break lineage. Write to reliable storage.

Read article
ARTICLE · 17

Spark Cluster Managers

Standalone, YARN, K8s, Mesos.

Read article
ARTICLE · 18

Spark coalesce vs repartition

Reduce vs shuffle partitions.

Read article
ARTICLE · 19

Spark Columnar Processing

Vectorized reads + processing.

Read article
ARTICLE · 20

Spark DataFrame Complex Types

Array, Map, Struct handling.

Read article
ARTICLE · 21

Spark Connect

3.4+. Thin client model.

Read article
ARTICLE · 22

Spark Connect architecture

Deep-dive on Apache Spark Connect: the DataFrame API as an unresolved protobuf logical-plan builder, the gRPC channel, the Connect server's analy…

Read article
ARTICLE · 23

Spark Connected Components

Graph component detection.

Read article
ARTICLE · 24

Spark Cost Optimization

Cluster sizing + spot + Delta.

Read article
ARTICLE · 25

Spark DAG (Directed Acyclic Graph)

Logical plan of transformations.

Read article
ARTICLE · 26

Spark Data Skew Handling

AQE + salting + broadcast.

Read article
ARTICLE · 27

Spark on Databricks

Managed Spark + Delta + notebooks.

Read article
ARTICLE · 28

Spark DataFrame API

Schema-aware. Catalyst optimization.

Read article
ARTICLE · 29

Spark DataFrame and Dataset

How DataFrames add schema and columnar optimization to Spark, how Datasets extend DataFrames with type safety, and when to use each.

Read article
ARTICLE · 30

Spark on GCP Dataproc

Managed Spark on GCP. Fast startup.

Read article
ARTICLE · 31

Spark Dataset API

Typed DataFrame. Scala only.

Read article
ARTICLE · 32

Spark Debugging

How to debug Spark: driver logs, executor logs, UI, remote debug.

Read article
ARTICLE · 33

Delta Lake architecture

Deep-dive on Delta Lake: ACID commit, transaction log, time travel, schema enforcement, Z-order + optimize, vacuum, MERGE + UPDATE.

Read article
ARTICLE · 34

Delta Lake

How Delta Lake adds ACID transactions, schema evolution, and time travel to Spark data lakes.

Read article
ARTICLE · 35

Delta Lake Architecture in Depth

A 2500-word walkthrough of Delta Lake: transaction log, Parquet data files, checkpoints, OPTIMIZE + Z-ORDER, MERGE, time travel, streaming, VACUUM.

Read article
ARTICLE · 36

Spark Driver + Executor

Driver coordinates, executors run tasks.

Read article
ARTICLE · 37

Spark DStreams (Legacy)

First-gen streaming. Deprecated.

Read article
ARTICLE · 38

Spark Dynamic Allocation

How dynamic allocation adds/removes executors based on workload demand.

Read article
ARTICLE · 39

Spark dynamic allocation architecture

Deep-dive on Spark dynamic allocation: the ExecutorAllocationManager's backlog and idle timers, exponential ramp-up, external…

Read article
ARTICLE · 40

Spark on AWS EMR

Managed Hadoop-Spark on AWS.

Read article
ARTICLE · 41

Spark Encryption

How to enable encryption for Spark: shuffle files, RPC, at-rest storage.

Read article
ARTICLE · 42

Spark Execution Architecture in Depth

A 2500-word walkthrough of Apache Spark's execution architecture: SparkSession, driver, cluster manager, Catalyst, DAG, execu…

Read article
ARTICLE · 43

Spark Execution Model

How Spark turns a user program into jobs, jobs into stages, and stages into tasks. The DAG scheduler and task scheduler working together.

Read article
ARTICLE · 44

Spark Executor Sizing

Cores + memory per executor.

Read article
ARTICLE · 45

Spark EXPLAIN Plans

Physical plan inspection.

Read article
ARTICLE · 46

Spark GC Tuning

G1GC + heap sizing.

Read article
ARTICLE · 47

Spark GPU Acceleration

How NVIDIA RAPIDS accelerates Spark SQL on GPUs.

Read article
ARTICLE · 48

Spark GraphFrames

DataFrame-based graph API.

Read article
ARTICLE · 49

Spark GraphX

How GraphX enables distributed graph algorithms on Spark.

Read article
ARTICLE · 50

Spark HBase Connector

Read/write HBase from Spark.

Read article
ARTICLE · 51

Spark History Server

How to use the Spark History Server to analyze finished jobs.

Read article
ARTICLE · 52

Apache Hudi with Spark

How Hudi enables streaming-first data lakes with upserts + incremental queries.

Read article
ARTICLE · 53

Spark + Hudi architecture

Deep-dive on Spark with Apache Hudi: write path (upsert/insert), read path (snapshot/incremental/CDC), procedures, timeline, catalog.

Read article
ARTICLE · 54

Apache Iceberg with Spark

How Iceberg brings ACID + time travel + schema evolution to Spark data lakes.

Read article
ARTICLE · 55

Spark + Iceberg architecture

Deep-dive on Spark integration with Iceberg: extension, write/read paths, procedures, Catalyst push-down, streaming, MERGE, catalogs.

Read article
ARTICLE · 56

Spark + JDBC

Read from RDBMS. Partition scans.

Read article
ARTICLE · 57

Spark Join Strategy Hints

Force broadcast, merge, shuffle_hash.

Read article
ARTICLE · 58

Spark JSON Read/Write

Schema inference + explicit.

Read article
ARTICLE · 59

Spark + Jupyter Integration

PySpark in notebooks.

Read article
ARTICLE · 60

Koalas → Spark Pandas API Migration

How Koalas was renamed and integrated into Spark's pandas API.

Read article
ARTICLE · 61

Spark Kryo Serialization

How Kryo serialization speeds up Spark shuffles and cache versus default Java serialization.

Read article
ARTICLE · 62

Spark on Kubernetes architecture

Deep-dive on Spark on Kubernetes: operator, driver/executor pods, K8s scheduler, dynamic allocation, external shuffle, node pools.

Read article
ARTICLE · 63

Spark on Kubernetes

How Spark deploys on Kubernetes as native workload.

Read article
ARTICLE · 64

Spark Lineage + Fault Tolerance

Recompute lost partitions from lineage.

Read article
ARTICLE · 65

Apache Livy

Submit + monitor Spark via HTTP.

Read article
ARTICLE · 66

Spark Memory Tuning

executor.memory + fractions.

Read article
ARTICLE · 67

Spark Version Migration Strategies

How to migrate between Spark versions safely.

Read article
ARTICLE · 68

Spark ML Overview

What Spark ML provides: DataFrame-based ML pipelines at scale.

Read article
ARTICLE · 69

Spark ML Classification

LR, RF, GBT, DecisionTree.

Read article
ARTICLE · 70

Spark ML Clustering

KMeans, GMM, LDA, BisectingKMeans.

Read article
ARTICLE · 71

Spark ML Cross-Validation

CV + parameter grid search.

Read article
ARTICLE · 72

Spark ML Feature Engineering

VectorAssembler + scalers + one-hot.

Read article
ARTICLE · 73

Spark ML Model Persistence

Save + load models.

Read article
ARTICLE · 74

Spark ML Pipelines

How to build Spark ML Pipelines: chained transformers + estimators.

Read article
ARTICLE · 75

Spark ML Recommendation

ALS collaborative filtering.

Read article
ARTICLE · 76

Spark ML Regression

LinearRegression, RF, GLM.

Read article
ARTICLE · 77

Spark ML Transformers + Estimators

Feature engineering foundation.

Read article
ARTICLE · 78

Spark MLlib

What MLlib is: legacy RDD-based ML. When to use vs spark.ml.

Read article
ARTICLE · 79

Spark MLlib Introduction

Distributed ML library.

Read article
ARTICLE · 80

Spark Monitoring

Spark UI + metrics + Prometheus.

Read article
ARTICLE · 81

Spark on Kubernetes

K8s cluster manager. Modern default.

Read article
ARTICLE · 82

Spark Operator on K8s

CRD-based Spark app management.

Read article
ARTICLE · 83

Spark + ORC

Columnar alternative to Parquet.

Read article
ARTICLE · 84

Apache Spark Overview

What Spark is, how RDDs and DataFrames give in-memory distributed computing, and where Spark fits versus MapReduce, Flink, and modern warehouses.

Read article
ARTICLE · 85

Spark PageRank

Classic algorithm on GraphFrames.

Read article
ARTICLE · 86

Spark Pandas API

How Spark's pandas API provides pandas-like interface on Spark.

Read article
ARTICLE · 87

Spark Pandas UDFs

Vectorized. Fast Python UDFs.

Read article
ARTICLE · 88

Spark Parquet Read + Write

Columnar default.

Read article
ARTICLE · 89

Partition pruning -- skipping data you don't need to read

Deep-dive on Spark partition pruning: avoiding reading data (the fastest scan is the one you never do), static partition pruning (filter on the partit…

Read article
ARTICLE · 90

Spark Partitioning

How partitioning affects Spark performance: partition count, key selection, skew handling.

Read article
ARTICLE · 91

Spark Persistence

How cache() and persist() reuse computed RDDs/DataFrames across actions.

Read article
ARTICLE · 92

Spark Predicate Pushdown

Push filters to storage.

Read article
ARTICLE · 93

Spark Push-Based Shuffle

3.2+. Server-side merge.

Read article
ARTICLE · 94

PySpark Performance

How to optimize PySpark: pandas UDFs, arrow, catalyst.

Read article
ARTICLE · 95

Spark RDDs

How RDDs represent distributed collections with lineage-based recovery, when to use them, and why DataFrames replaced them for most workloads.

Read article
ARTICLE · 96

Spark RDD Deep Dive

Resilient Distributed Dataset. Low-level API.

Read article
ARTICLE · 97

Spark S3 Optimization

S3A committer + tuning.

Read article
ARTICLE · 98

Spark Salting for Skew Joins

Random prefix key. Split hot keys.

Read article
ARTICLE · 99

Spark Secrets Management

How to manage secrets in Spark: never in code, injection at runtime.

Read article
ARTICLE · 100

Spark Security

Kerberos + Ranger + TLS + encrypted shuffle.

Read article
ARTICLE · 101

Spark Shuffle

How Spark shuffle works internally, why it's usually the slowest phase, and how to minimize shuffle bytes.

Read article
ARTICLE · 102

Spark shuffle architecture

Deep-dive on Spark shuffle: map output + partitioner + external shuffle service + reduce fetch, plus push-based shuffle and AQE.

Read article
ARTICLE · 103

Spark Shuffle Deep Dive

Data redistribution. Expensive.

Read article
ARTICLE · 104

Spark Shuffle Hash Join

Alternative. Not default.

Read article
ARTICLE · 105

Spark External Shuffle Service

How external shuffle service enables executor removal without losing shuffle files.

Read article
ARTICLE · 106

Spark Shuffle Tuning

Reduce shuffle + tune partitions.

Read article
ARTICLE · 107

Spark Sort-Merge Join

Default for large tables. Both shuffled + sorted.

Read article
ARTICLE · 108

Spark on Spot Instances

Cost savings + resilience.

Read article
ARTICLE · 109

Spark SQL

How Spark SQL provides ANSI-compatible SQL over any DataFrame source (Parquet, Delta, JDBC, Kafka), the query engine architecture, and Thrift server.

Read article
ARTICLE · 110

Spark SQL Config Tuning

shuffle.partitions + others.

Read article
ARTICLE · 111

Spark SQL Functions

Built-in functions library.

Read article
ARTICLE · 112

Spark SQL optimizer architecture

Deep-dive on Catalyst optimizer: analyzer, rule-based rewrites, cost model, physical planner, Tungsten codegen, AQE, and extensions.

Read article
ARTICLE · 113

Spark Stages and Tasks

How stages are built from transformations, how tasks are the unit of parallelism, and how partition count drives everything.

Read article
ARTICLE · 114

Spark Statistics + CBO

Table stats for cost-based decisions.

Read article
ARTICLE · 115

Spark Structured Streaming Deduplication

How to deduplicate streaming records via dropDuplicates.

Read article
ARTICLE · 116

Spark Structured Streaming Stateful Operations

How stateful operations work in Structured Streaming: state store, checkpointing.

Read article
ARTICLE · 117

Spark Structured Streaming Watermarking

How watermarks handle late-arriving data in streaming.

Read article
ARTICLE · 118

Spark Structured Streaming Architecture in Depth

A 2500-word walkthrough of Spark Structured Streaming: sources, streaming DataFrame, watermarks, state store, aggregations, sinks, checkpointing, exac…

Read article
ARTICLE · 119

Spark Streaming Checkpointing

Fault tolerance state.

Read article
ARTICLE · 120

Spark Streaming Deduplication

dropDuplicates with watermark.

Read article
ARTICLE · 121

Spark Streaming Event vs Processing Time

Semantic differences.

Read article
ARTICLE · 122

Spark Streaming Exactly-Once

Idempotent sink + checkpointing.

Read article
ARTICLE · 123

Spark Streaming foreachBatch

Custom per-batch logic.

Read article
ARTICLE · 124

Spark Streaming Joins

Stream-static, stream-stream.

Read article
ARTICLE · 125

Structured streaming + Kafka architecture

Deep-dive on Spark structured streaming + Kafka: offset tracking, checkpoint, exactly-once, rate limits, schema, restart.

Read article
ARTICLE · 126

Spark Streaming Kafka Source

Read from Kafka topics.

Read article
ARTICLE · 127

Spark Streaming Output Modes

Append, Update, Complete.

Read article
ARTICLE · 128

Spark Streaming Sinks

Kafka, files, foreach, Delta.

Read article
ARTICLE · 129

Spark Streaming Sources

Kafka, Kinesis, files, socket.

Read article
ARTICLE · 130

Spark Streaming Stateful Operations

flatMapGroupsWithState + agg.

Read article
ARTICLE · 131

Spark Streaming Triggers

Micro-batch cadence.

Read article
ARTICLE · 132

Structured streaming watermark architecture

Deep-dive on Spark structured streaming watermarks: event time, watermark math, state, trigger, output modes, late data, checkpoint.

Read article
ARTICLE · 133

Spark Streaming Watermarking

Late event handling.

Read article
ARTICLE · 134

Spark Structured Streaming

DataFrame-based streaming.

Read article
ARTICLE · 135

Spark Structured Streaming state

Deep-dive on Spark Structured Streaming state management: keyed state stores, checkpointing for exactly-once recovery, watermarks bounding state and h…

Read article
ARTICLE · 136

Spark Triangle Count

Graph triangle enumeration.

Read article
ARTICLE · 137

Spark Troubleshooting

The common Spark issues (OOM, skew, slow shuffle, straggler tasks) and how to diagnose + fix.

Read article
ARTICLE · 138

Spark Tungsten Execution Engine

Memory + CPU optimizations.

Read article
ARTICLE · 139

Spark Tungsten -- pushing performance to the metal

Deep-dive on Spark's Project Tungsten: the JVM overhead problem (object memory, GC, virtual calls), off-heap managed memory, …

Read article
ARTICLE · 140

Spark UDF Deep Dive

Slower than built-ins. Costs codegen.

Read article
ARTICLE · 141

Spark UI

How to read the Spark UI to understand job execution: jobs, stages, tasks, SQL plans.

Read article
ARTICLE · 142

spark_ui_deep

Read article
ARTICLE · 143

Spark Wide vs Narrow Dependencies

Shuffle boundary.

Read article
ARTICLE · 144

Spark Window Functions

OVER PARTITION BY. Running totals + top-N.

Read article