Apache Spark Optimization with Scala

Apache Spark Optimization with Scala

Unlock the secrets to writing high-performance code with Apache Spark with Scala. Our course covers essential tools and techniques to optimize your applications, ensuring they run blazing fast. Learn from industry experts and master the practices used by top developers to enhance your coding efficiency and effectiveness.

Goal

Why the $&*(# is my Spark job running so slow?

I’ve had my fair share of pain with Spark, and if you’re reading this, you’ve probably seen this too: you run a 4-line job on a gig of data, with two innocent joins, and it takes a bloody hour to run. Or another one: you have an hour long job which was progressing smoothly, until the task 1149/1150 where it hangs, and after two more hours you decide to kill it because you don’t know if it’s you or a bug in Spark. Usually, PIBKAC - problem is between keyboard and chair - but in desperation, the only idea you have is turn it off and on again.

Then you go like, “hm, maybe my Spark cluster is too small, let me bump some CPU and mem”. Then… same thing. Amazon’s probably laughing now and you’re paying for it. So this has to be the million dollar question.

This is the only course on the web where you can learn how to optimize Spark jobs and master Spark optimization techniques. With the strategies you learn in this Spark optimization course you will save yourself time, headaches and money.

Let’s improve that Spark performance.

In this Spark optimization course, we cut the weeds at the root. We dive deep into Spark performance optimization and you will learn how it works under the hood. We’ll see that we have incredible leverage, IF we write intelligent code, and you will do exactly that. You will learn 20+ Spark optimization techniques and strategies. Each of them individually can give at least a 2x perf boost for your jobs (some of them even 10x), and I show it on camera.

Skills You'll Learn

What you’ll learn:

  • You’ll understand Spark internals and how Spark works behind the scenes
  • You’ll be able to predict in advance if a job will take a long time
  • You’ll diagnose performance problems in the Spark UI
  • You’ll write smart joins with no shuffles
  • You’ll organize your data intelligently so expensive operations are no longer a problem
  • You’ll use RDD capabilities for bespoke, high-performance jobs
  • You’ll leverage the JVM for high-performance Spark jobs
  • You’ll save hours of computation time in this course alone (let alone in prod!)

Plus some extra perks:

  • You’ll have access to the entire code I write on camera (~1400 LOC)
  • You’ll be invited to our private Slack room where I’ll share latest updates, discounts, talks, conferences, and recruitment opportunities
  • (soon) You’ll have access to the takeaway slides
  • (soon) You’ll be able to download the videos for your offline view

Skills you’ll get:

  • Deep understanding of Spark internals so you can predict job performance
    • stage & task decomposition
    • reading query plans before jobs will run
    • reading DAGs while jobs are running
    • performance differences between the different Spark APIs
    • packaging and deploying a Spark app
    • configuring Spark in 3 different ways
  • DataFrame and Spark SQL Optimizations
    • understanding join mechanics and why they are expensive
    • writing broadcast joins, or what to do when you join a large and a small DataFrame
    • write pre-join optimizations: column pruning, pre-partitioning
    • bucketing for fast access
    • fixing data skews, “straggling” tasks and OOMs
  • Optimizing RDDs
    • using broadcast joins “manually”
    • cogrouping RDDs in multi-way joins
    • fixing data skews
    • writing optimizations that Spark doesn’t generate for us
  • Optimizing key-value RDDs, as most useful transformations need them
    • using the different _byKey methods intelligently
    • reusing JVM objects for when performance is critical and even a few seconds count
    • using the powerful iterator-to-iterator pattern for arbitrary efficient processing

This course is for Scala and Spark programmers who need to improve the run time of their jobs. If you’ve never done Scala or Spark, this course is not for you.

Meet Rock the JVM

Daniel Ciocîrlan

I'm a software engineer and the founder of Rock the JVM.

I'm a software engineer and the founder of Rock the JVM. I started the Rock the JVM project out of love for Scala and the technologies it powers - they are all amazing tools and I want to share as much of my experience with them as I can.

As of February 2024, I've taught Java, Scala, Kotlin and related tech (e.g. Cats, ZIO, Spark) to 100000+ students at various levels and I've held live training sessions for some of the best companies in the industry, including Adobe and Apple. I've also taught university students who now work at Google and Facebook (among others), I've held Hour of Code for 7-year-olds and I've taught more than 35000 kids to code.

I have a Master's Degree in Computer Science and I wrote my Bachelor and Master theses on Quantum Computation. Before starting to learn programming, I won medals at international Physics competitions.

What's Included

Loading...

Take this course now!

Apache Spark Optimization with Scala - Lifetime License

Loading...

Just the course with a one-time payment

  • 9 hours of 4K content
  • 1400 lines of code written
  • All PDF slides
  • Access to the private Rock the JVM community
  • Free updates
  • Lifetime access
Get Now

All-Access Membership

Loading...
/monthly

All of the Rock the JVM courses

  • 320 hours of 4K content
  • 60660 lines of code written
  • All Scala courses
  • All Kotlin courses
  • All ZIO courses
  • All Typelevel courses
  • All Apache Flink courses
  • All Apache Spark courses
  • All Akka/Pekko courses
Join Now
The Apache Spark Bundle with Scala

The Apache Spark Bundle with Scala

Become a Apache Spark and big data expert from scratch with our all-inclusive course bundle: master everything you need using Scala in one complete package, at a discount

100% Money Back Guarantee

If you're not happy with this course, I want you to have your money back. If that happens, contact me with a copy of your welcome email and I will refund you the course.

Less than 0.05% of students refunded a course on the entire site, and every payment was returned in less than 72 hours.

FAQ