# Install apache-spark with Homebrew

Engine for large-scale data processing. Version 4.1.2 via Homebrew; verified 2026-05-30.

## Install

```sh
sudo av install brew:apache-spark
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install apache-spark
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:apache-spark
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/apache-spark>
- **Version:** 4.1.2
- **Source summary:** Engine for large-scale data processing
- **Homepage:** <https://spark.apache.org/>
- **Repository:** <https://github.com/apache/spark>
- **Upstream docs:** <https://spark.apache.org/docs/latest>
- **License:** Apache-2.0
- **Source archive:** <https://www.apache.org/dyn/closer.lua?path=spark/spark-4.1.2/spark-4.1.2-bin-hadoop3.tgz>
- **Last updated:** 2026-05-30T11:05:46-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- docker-image-tool.sh (cli)
- find-spark-home (cli)
- load-spark-env.sh (cli)
- pyspark (cli)
- run-example (cli)
- spark-beeline (cli)
- spark-class (cli)
- spark-connect-shell (cli)
- spark-pipelines (cli)
- spark-shell (cli)
- spark-sql (cli)
- spark-submit (cli)
- sparkR (cli)
- docker-image-tool.sh (alias)
- find-spark-home (alias)
- load-spark-env.sh (alias)
- pyspark (alias)
- run-example (alias)
- spark-beeline (alias)
- spark-class (alias)
- spark-connect-shell (alias)
- spark-pipelines (alias)
- spark-shell (alias)
- spark-sql (alias)
- spark-submit (alias)
- sparkR (alias)

## Dependencies

- openjdk@21

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.1.2
- Package-manager updated: 2026-05-30
- Local data: ok
- Upstream repository: https://spark.apache.org/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Apache Spark is a general-purpose engine for large-scale data processing. For package-manager users, it is the canonical install that gives you `spark-submit`, language shells, SQL tooling, example runners, and runtime scripts for local and cluster-oriented workflows.

### Project history

Spark originated at the UC Berkeley AMPLab as a faster, more interactive alternative to earlier MapReduce-centered data processing systems. Its project history is closely tied to resilient distributed datasets, in-memory computation, and developer-friendly APIs for Scala, Python, Java, SQL, and R.

Spark became an Apache project and grew into a broad analytics engine rather than a single-purpose batch runner. The official project history notes its Apache Software Foundation path and the release line that made Spark a standard part of the big-data toolchain.

Over time Spark absorbed major adjacent workloads: Spark SQL and DataFrames for structured data, MLlib for machine learning, GraphX for graph processing, Structured Streaming for stream processing, and Spark Connect for client-server connectivity.

### Adoption history

Spark's adoption history is unusually deep for a package-manager formula because it crossed from research project to de facto data-platform component. It is used for ETL, interactive analytics, machine learning pipelines, and streaming workloads across local machines, YARN, Mesos-era clusters, Kubernetes, and managed cloud services.

The supplied Homebrew package data shows a CLI-heavy install surface: `spark-submit`, `spark-shell`, `pyspark`, `spark-sql`, `sparkR`, `spark-class`, and helper scripts. That executable set mirrors the way Spark became both an application runtime and a command-line toolbox.

### How it is used

The main package workflow is submitting applications with `spark-submit`, opening interactive shells with `spark-shell` or `pyspark`, running SQL through `spark-sql`, and configuring behavior through files in `$SPARK_HOME/conf`.

Spark users often install it locally even when production jobs run elsewhere, because the local CLI is useful for testing jobs, validating dependencies, developing notebooks or scripts, and matching cluster runtime behavior.

### Why package nerds care

Spark is a classic heavyweight formula: it is mostly scripts plus a large JVM distribution, but those scripts define the ergonomics of a whole data ecosystem. Packagers care about Java compatibility, Python/R bindings, shell wrappers, classpaths, examples, and config file layout.

It is also one of the packages that turns a laptop into a miniature data platform. A formula install can run local mode, submit to clusters, or serve as a client for remote compute, which makes it more than a simple CLI utility.

### Timeline

- 2009: Spark begins at UC Berkeley AMPLab.
- 2010: Spark is open sourced.
- 2013: Spark enters the Apache Incubator.
- 2014: Spark becomes an Apache top-level project.
- 2020s: Spark continues expanding SQL, streaming, Kubernetes, and client-server features.

### Related projects

- Apache Hadoop and YARN are central to Spark's early cluster deployment history.
- Apache Hive influenced Spark SQL's data-warehouse compatibility story.
- Delta Lake, Apache Iceberg, and Apache Hudi are common table-format companions in modern Spark deployments.

### Sources

- <https://github.com/apache/spark>
- <https://news.apache.org/foundation/entry/the_apache_software_foundation_announces50>
- <https://spark.apache.org/docs/latest>
- <https://spark.apache.org/docs/latest/configuration.html>
- <https://spark.apache.org/history.html>
- source_facts.executables


## Security Notes

broad file, network, media, or database tool signal. generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- broad file, network, media, or database tool signal
- generalized runtime or code generation signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: $SPARK_HOME/conf/spark-defaults.conf, $SPARK_HOME/conf/spark-env.sh, $SPARK_HOME/conf/log4j2.properties
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** apache-spark
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [openjdk@21](https://www.automicvault.com/pkg/brew/openjdk-21/) - Runtime dependency declared by Homebrew.
- [storm](https://www.automicvault.com/pkg/brew/storm/) - Shares av.db curated category or tags: apache, cli, data, data-processing.
- [apache-arrow](https://www.automicvault.com/pkg/brew/apache-arrow/) - Shares av.db curated category or tags: apache, cli, data.
- [apache-drill](https://www.automicvault.com/pkg/brew/apache-drill/) - Shares av.db curated category or tags: apache, cli, data.
- [apache-flink](https://www.automicvault.com/pkg/brew/apache-flink/) - Shares av.db curated category or tags: apache, cli, data.
- [apache-flink-cdc](https://www.automicvault.com/pkg/brew/apache-flink-cdc/) - Shares av.db curated category or tags: apache, cli, data.
- [apache-geode](https://www.automicvault.com/pkg/brew/apache-geode/) - Shares av.db curated category or tags: apache, cli, data.
- [apache-polaris](https://www.automicvault.com/pkg/brew/apache-polaris/) - Shares av.db curated category or tags: apache, cli, data.
- [avro-c](https://www.automicvault.com/pkg/brew/avro-c/) - Shares av.db curated category or tags: apache, cli, data.

## Combined YAML source

View the package source record on GitHub. [combined/apache-spark.yml](https://github.com/automic-vault/db/blob/main/combined/apache-spark.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
