Practical Spark Encoders + Teaching Kids Apache Spark
summary
Two short, concrete pieces: a classroom-ready garden-gnome RDD exercise that uses index cards to split work and demonstrates leader/worker failure recovery with Python examples and a promised Scala port; and a pragmatic fix for Spark Dataset blowups — a homemade compressed encoder that shrinks sparse or highly repeated fields so kilobyte inputs don’t explode into gigabytes and OOMs. Implementation forces string-based codegen with Janino and fragile implicits so upgrades break, and encoders remain row-based instead of columnar/Arrow which limits long-term performance.
AI-written summary · about
chapters (25)
- 0:00Intro
- 4:05Spark Flow Chart
- 4:39Why
- 6:01Gnomes
- 8:16Gnome Leader
- 8:36Splitting Up Work
- 10:30Best Dog
- 11:44The Gnomes
- 13:04Sleepy Gnome
- 13:39Gnome with the Blue Hat
- 14:47Mental Health State
- 17:03Topic Change
- 17:27Slides
- 18:00Custom Encoders
- 18:25Why Custom Encoders
- 20:19Custom Encoder Example
- 21:25Sparse Data
- 21:44Compression
- 22:13Code Generation
- 26:39Decoder
- 27:00Implicits
- 27:40Replacing Encoders
- 27:52Encoder Test Suite
- 28:09Encoder Problems
- 29:12Exceptions
