Spark Structured Streaming vs DStream: A Decision Guide
Decide between Spark Structured Streaming and the legacy DStream API for new real-time pipelines on Spark 3.x.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Decide between Spark Structured Streaming and the legacy DStream API for new real-time pipelines on Spark 3.x.
Pick a watermark delay by measuring event lateness, then verify with state-store metrics and console output.
Rollup's incremental materialized view refresh reduces recomputation overhead by up to 90% for Spark workloads, but requires careful configuration around partition keys, trigger intervals, and join complexity to avoid fallback to full refresh.
Adaptive Query Execution in Spark 3.x can resize shuffle partitions and handle skewed joins automatically, but it changes runtime plans and output file counts.
Spark 3.x Adaptive Query Execution reoptimizes shuffle partitioning, join strategy and skew handling at runtime using actual shuffle statistics instead of static estimates.
Enable Spark 3.x Adaptive Query Execution to coalesce shuffle partitions and prune joins at runtime, then verify with explain and the Spark UI before rolling it out.
Spark's static optimizer often picks expensive joins and creates tiny shuffle partitions when table statistics are stale. Adaptive Query Execution re-optimizes the physical plan at runtime using actual cardinalities, coalescing partitions and switching join strategies on the fly.
Learn how to diagnose and resolve Java heap space OutOfMemoryErrors during Apache Spark shuffles, including identifying data skew and optimizing shuffle partitions.
Spark's Adaptive Query Execution re-optimizes plans at runtime, but only if you understand its limits. Learn how to fix skewed join stragglers, configure partition coalescing, and verify the final plan in the Spark UI.