enterprise · 2025 · DatVerse engineering portfolio
Hadoop MapReduce batch analytics — HDFS Streaming pipeline in Python
Three-stage Hadoop MapReduce pipeline (mapper → combiner → reducer) in plain Python via Hadoop Streaming, cluster-portable from single-node to multi-node.
- 3-stage MapReduce pipeline: mapper → combiner → reducer in Python over Hadoop Streaming architectural record
- Same scripts single-node and multi-node, cluster-portable from pseudo-distributed to full Hadoop cluster reproducibility property
Context
Modern lakehouse work doesn’t replace the need to know on-prem big-data tooling: buyers in regulated or air-gapped environments still ask whether the team can ship to a Hadoop cluster they already operate. The pipeline is the proof that the foundational MapReduce pattern is intact and runnable end-to-end.
Problem
A MapReduce job authored in Java forces a JVM dependency on every node and slows iteration. A Streaming job in Python (stdin/stdout piping) keeps the cluster Java-only on the runtime side and lets the analytics logic live in plain scripts that any data engineer can read.
Approach
A three-stage Hadoop Streaming pipeline: mapper emits per-record tuples, combiner does local-node aggregation before the network shuffle, reducer produces final cross-key aggregations. Pure stdin/stdout piping, no Hadoop-Java dependencies. Same scripts run on a pseudo-distributed single-node install for local development and on a full multi-node cluster for production-style runs.
Solution
mapper.pyparses tab-separated movie records (UID, title, genres, year, rating) and emits per-record key-value tuples.combiner.pyruns local-node aggregation before the network shuffle: the textbook MapReduce performance optimization that reduces shuffle volume.reducer.pyproduces final aggregations across genre, rating, and year dimensions.- Optional
years.txtfilter so the same pipeline can be re-run scoped to a subset of years without recompiling logic. - Hadoop-Streaming-compatible: pure stdin/stdout piping, runnable through any Hadoop 3.x cluster.
- Cluster-portable: same scripts on a pseudo-distributed single-node install or a full multi-node cluster.
- Final reducer output captured in
results.txtfor inspection and downstream consumption. - README covering prerequisites (Java 8 or 11, Hadoop 3.x, Python 3.x per node) and the exact
hadoop jar hadoop-streaming-*.jarinvocation.
Outcome
Above. Paired with the PySpark streaming pipeline, the combo demonstrates full-stack distributed-processing range (on-prem legacy MapReduce alongside modern lakehouse streaming) for buyers whose environment spans both worlds.
Have a similar project?
Send a short brief. We'll reply within one business day.
Start a project