mrjob is a Python package for writing and running Hadoop Streaming MapReduce jobs. It can target Elastic MapReduce, Google Cloud Dataproc, a private Hadoop cluster, or local test runs.
Overview
mrjob helps you author MapReduce-style jobs in Python and execute them on Hadoop Streaming backends. You define mapper, combiner, and reducer steps in classes such as MRJob, including pipelines where one map-reduce step feeds the next.
Execution backends include Amazon Elastic MapReduce, Google Cloud Dataproc, your own Hadoop installation, and a local mode for development. The library can launch Spark jobs on EMR or an existing Hadoop cluster and supports multi-step workflows.
Operational conveniences include uploading a source tree into the job environment, running setup scripts like make, setting environment variables, and installing Python packages from tarballs on EMR. Configuration is driven by an mrjob.conf file with documented search paths.
Cloud setup requires credentials for AWS or Google as described in the documentation, while using mrjob against a self-managed Hadoop cluster needs no extra library configuration beyond cluster access.
Key features
- Hadoop Streaming jobs in Python
- Run on EMR, Dataproc, or local Hadoop
- Multi-step MapReduce pipelines
- Spark job launch on EMR or Hadoop
- mrjob.conf for advanced setup
- Source tree upload and setup scripts
- Error log interpretation helpers
- SSH tunnel to EMR job tracker
Use cases
- Word frequency and log analysis at scale
- Batch data processing on rented Hadoop clusters
- Testing MapReduce logic locally before cloud runs
- Multi-stage ETL with chained reduce steps