elhussienysabry/Spark-Docker
Acerca de
Comprehensive Apache Spark 4.2.1 Learning & Engineering Lab: 76 notebooks, distributed standalone Docker cluster, deep execution internals, and interview preparation.
Aprendizaje y educaciónWhat you can do
- Real distributed cluster — one master and two workers, with live Spark UIs, event logs, and post-run history.
- 81 curriculum notebooks — 77 core topics across 14 modules plus four end-to-end business case studies.
- Hands-on throughout — runnable examples, controlled experiments, production failure modes, and interview questions in every core topic.
- Observable internals — inspect DAGs, shuffle files, memory spills, task retries, and executor loss rather than only reading about them.
Crecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalApache Spark Learning Lab
A self-contained Apache Spark 4.2.1 lab that runs a real standalone cluster in Docker and teaches distributed data engineering through 81 curriculum notebooks, from fundamentals to production-style case studies.
The stack includes a Spark master, two workers, a Spark History Server, and JupyterLab. Everything runs locally and starts with one command.
Features
- Real distributed cluster — one master and two workers, with live Spark UIs, event logs, and post-run history.
- 81 curriculum notebooks — 77 core topics across 14 modules plus four end-to-end business case studies.
- Hands-on throughout — runnable examples, controlled experiments, production failure modes, and interview questions in every core topic.
- Observable internals — inspect DAGs, shuffle files, memory spills, task retries, and executor loss rather than only reading about them.
- Advanced coverage — execution internals, memory and shuffle tuning, fault tolerance, deployment, graph processing, and PySpark internals.
- Deterministic datasets — synthetic retail, log, streaming, telecom, fraud, and logistics data that regenerate identically.
- Automated checks — notebook JSON/AST validation and local link checking in CI.
Technology
| Layer | Stack |
|---|---|
| Runtime | Apache Spark 4.2.1, PySpark 4.2.1 |
| Languages | Python 3.13, Java 21, Scala 2.13 |
| Interface | JupyterLab 4, Spark Web UIs, Spark History Server |
| Platform | Docker Engine 24+, Docker Compose v2+ |
| Libraries | pandas 2.3, PyArrow 25, NumPy 2.5 |
Quick start
Prerequisites: Docker Engine 24+ with Compose v2, at least 8 GB RAM (16 GB
recommended), 15 GB free disk space, and ports 4040, 4041, 7077, 8080–8082,
8888, and 18080 available.
git clone https://github.com/elhussienysabry/Spark-Docker.git
cd Spark-Docker
cp .env.example .env # optional; defaults work for local use
docker compose up -d
docker compose ps
Open the services:
| Service | URL |
|---|---|
| JupyterLab | http://localhost:8888/?token=spark |
| Spark Master UI | http://localhost:8080 |
| Worker 1 / Worker 2 UI | http://localhost:8081 / http://localhost:8082 |
| Spark History Server | http://localhost:18080 |
| Spark Driver UI (while a job runs) | http://localhost:4040 (Jupyter) / http://localhost:4041 (spark-submit) |
Start with
notebooks/00_environment_and_spark_setup/00_spark_environment.ipynb
to verify driver-worker communication. make help lists the available shortcuts, and
make test runs the sample batch jobs.
Project structure
.
├── notebooks/ # 81 curriculum notebooks, two quickstarts, and a template
├── apps/ # sample spark-submit jobs
├── data/ # deterministic synthetic datasets
├── docs/ # guides, roadmap, architecture, and case-study notes
├── conf/ # shared Spark configuration
├── scripts/ # generators and validation tools
├── docker-compose.yml
├── Dockerfile.spark
└── Makefile
The curriculum is organized as notebooks/00_environment_and_spark_setup/ through
notebooks/13_end_to_end_projects/, with business case studies in
notebooks/14_business_case_studies/. See the
topic index for every notebook.
Documentation
| Guide | What it covers |
|---|---|
| Learning roadmap | 12-week path from setup to production, with milestones and role paths |
| Topic index | All 77 core topics with priority, effort, prerequisites, and experiments |
| Case studies | Four runnable end-to-end projects: e-commerce, telecom, fraud, and logistics |
| Datasets | Dataset inventory, container paths, and regeneration commands |
| Spark architecture | Execution lifecycle, memory layout, networking, and schedulers |
| Use cases | Real-world scenarios mapped to every core notebook |
| Business context | How Spark fits into a data platform, and when another tool is better |
| Interview preparation | Questions across junior, mid, senior, and staff levels |
| Common mistakes | Production antipatterns with before/after fixes |
| Production checklist | Readiness checks for cluster sizing, storage, shuffle, memory, and streaming |
| Full documentation index | Complete list of guides and references |
For setup, operations, and troubleshooting details, see the quickstart, operations guide, and troubleshooting guide.
Contributing
Contributions are welcome. Read the contributing guide before opening a pull request, and follow the code of conduct. Report security issues according to the security policy.
Run the validation suite before submitting changes:
make validate # notebook JSON/AST checks plus local link checks
docker compose config # validate the Compose file
License
This project is licensed under the MIT License. See LICENSE for details.
Copyright (c) 2026 Elhussieny Sabry.
Explorar proyectos relacionados
Cargando…