---
title: "Unlocking Efficiency and Performance: Navigating the Spark 3 and EMR 6 Upgrade Journey at Slack"
description: "Slack migrated 60+ EMR clusters serving 40+ teams from EMR 5 (Spark 2.4/Hive 2) to EMR 6 with Spark 3 as the single compute engine."
url: "https://swe.quest/articles/unlocking-efficiency-and-performance-navigating-the-spark-3-and-emr-6-upgrade-56a4dac14be6617c"
canonical: "https://slack.engineering/unlocking-efficiency-and-performance-navigating-the-spark-3-and-emr-6-upgrade-journey-at-slack/"
source: "Slack Engineering"
published: "2024-07-02"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["data-pipelines","analytics","performance","cloud","refactoring"]
---

# Unlocking Efficiency and Performance: Navigating the Spark 3 and EMR 6 Upgrade Journey at Slack

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2024-07-02, 9 min read, Case study. Original: [https://slack.engineering/unlocking-efficiency-and-performance-navigating-the-spark-3-and-emr-6-upgrade-journey-at-slack/](https://slack.engineering/unlocking-efficiency-and-performance-navigating-the-spark-3-and-emr-6-upgrade-journey-at-slack/)

## Summary

Slack migrated 60+ EMR clusters serving 40+ teams from EMR 5 (Spark 2.4/Hive 2) to EMR 6 with Spark 3 as the single compute engine. Old and new clusters ran side by side during the year-long move. A shared Hive Metastore upgraded from 2.3 to 3.1 via Hive Schema Tool, parallel Bazel builds for Spark 2 and 3 JARs, and an Airflow operator flag to route jobs between cluster versions made that possible. Code changes covered replacing RAND()-based skew salting with AQE, setting storeAssignmentPolicy to Legacy, and disabling convertMetastoreParquet to avoid schema-merge StackOverflowErrors. Exact-match validation with Trino except/count queries preceded the switch, and most pipelines then ran 30–60% faster (some 90%), helped by AQE skew-join handling, shuffle partition coalescing and the EMRFS S3-optimized committer.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)

## Prerequisites

- Apache Spark basics ([easy posts on Data pipelines](https://swe.quest/tags/data-pipelines.md?difficulty=easy))
- Hive Metastore
- AWS EMR ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- Apache Airflow ([easy posts on Data pipelines](https://swe.quest/tags/data-pipelines.md?difficulty=easy))

## Keywords

Apache Spark 3, AWS EMR, Hive Metastore, Adaptive Query Execution, Apache Airflow, Bazel, Trino, EMRFS S3-optimized committer

## Related posts

- [From SSH to REST: A Security-Driven Modernization of Slack’s EMR Data Pipelines](https://swe.quest/articles/from-ssh-to-rest-a-security-driven-modernization-of-slack-s-emr-data-pipelines-36e08660699cdbd7.md): Slack Engineering · 2026-05-05 · Medium · 13 min read · Data pipelines, Security, Refactoring & migrations, Cloud platforms, Scheduling
  Slack replaced 700+ SSH-based Airflow operators that ran jobs directly on EMR master nodes with REST-based submission through Quarry, its internal job gateway.
- [Data Lineage at Slack](https://swe.quest/articles/data-lineage-at-slack-fbf2aa4b9e9054d0.md): Slack Engineering · 2021-08-17 · Medium · 8 min read · Data pipelines, Privacy, Analytics & OLAP
  Slack built a central Data Lineage Service that automatically captures table- and column-level lineage by hooking Airflow success callbacks and dashboard audit logs, then parsing the submitted SQL with ANTLR (backed by a large unit-test suite).
- [Tulip: Modernizing Meta’s data platform](https://swe.quest/articles/tulip-modernizing-meta-s-data-platform-bf66bcea6e73303c.md): Meta Engineering · 2023-01-26 · Medium · 9 min read · Data pipelines, Refactoring & migrations, Schema migrations, Analytics & OLAP, Testing
  Meta migrated its exabyte-scale analytics logging platform from legacy Hive Text Delimited and JSON serialization to the Tulip format across more than 30,000 logging schemas, sharply cutting bytes logged per second while schema counts stayed flat.
- [From Spreadsheets to DuckLake: A Data Engineer's Road to DuckDB](https://swe.quest/articles/from-spreadsheets-to-ducklake-a-data-engineer-s-road-to-duckdb-befcab104cb9bbfa.md): DuckDB · 2026-10-29 · Medium · 6 min read · Analytics & OLAP, Data pipelines, Databases, SQL
  Data engineer Matt Martin traces his path from copy-pasting Excel reports through Teradata, BigQuery and heavyweight Spark clusters to DuckDB, which let him query local CSVs, S3 Parquet files and Iceberg tables in a few lines of SQL with no JVM or cluster.
- [Scaling SaaS security: Reco’s migration from Postgres to ClickHouse Cloud](https://swe.quest/articles/scaling-saas-security-reco-s-migration-from-postgres-to-clickhouse-cloud-644c039f853be147.md): ClickHouse · 2025-11-17 · Medium · 6 min read · Analytics & OLAP, PostgreSQL, Stream processing, Performance engineering, Cost optimization
  Reco, a SaaS security platform ingesting 10-12 billion JSON events weekly, moved over 90% of its workload from Postgres to ClickHouse Cloud.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
