All Products
Search
Document Center

E-MapReduce:Configure a Hadoop MapReduce job

Last Updated:Mar 26, 2026

Configure a Hadoop MapReduce job in the EMR Data Platform to submit MapReduce workloads to your cluster.

Prerequisites

Before you begin, ensure that you have:

Step 1: Open the job editor

  1. Log on to the Alibaba Cloud EMR console.

  2. In the top navigation bar, select the region where your cluster resides and select a resource group.

  3. Click the Data Platform tab.

  4. In the Projects section, find your project and click Edit Job in the Actions column.

Step 2: Create a MapReduce job

  1. In the Edit Job pane on the left, right-click the folder where you want to create the job and select Create Job.

  2. In the Create Job dialog box, fill in the following fields:

    FieldDescription
    NameEnter a name for the job.
    Description(Optional) Enter a description.
    Job TypeSelect MR to create a Hadoop MapReduce job.
  3. Click OK.

Step 3: Configure the job content

In the Content field, enter the command-line parameters for your job. Start from the argument that comes after hadoop jar — do not include hadoop jar itself.

The full command format is:

hadoop jar <jar-file-path> [MainClass] -D <key>=<value> ...

In the Content field, enter everything after hadoop jar:

<jar-file-path> [MainClass] -D <key>=<value> ...

Example: Sleep job (no data input or output)

The sleep job submits mapper and reducer tasks that sleep for a specified period, without reading or writing data. In Hadoop 2.6.0, it is packaged in hadoop-mapreduce-client-jobclient-2.6.0-tests.jar.

Full submission command:

hadoop jar /path/to/hadoop-mapreduce-client-jobclient-2.6.0-tests.jar sleep -m 3 -r 3 -mt 100 -rt 100

Content field entry (omit hadoop jar):

/path/to/hadoop-mapreduce-client-jobclient-2.6.0-tests.jar sleep -m 3 -r 3 -mt 100 -rt 100

The parameters -m 3 -r 3 -mt 100 -rt 100 configure 3 mappers, 3 reducers, and a 100 ms sleep time for each task.

Example: Job with OSS input and output paths

For jobs that read or write data, specify the input and output paths. EMR supports both Hadoop Distributed File System (HDFS) and OSS paths. To use OSS, set the paths to OSS paths:

jar ossref://emr/checklist/jars/chengtao/hadoop/hadoop-mapreduce-examples-2.6.0.jar randomtextwriter -D mapreduce.randomtextwriter.totalbytes=320000 oss://emr/checklist/data/chengtao/hadoop/Wordcount/Input
Note To use a JAR file stored in OSS, click + Enter an OSS path at the bottom of the page. In the OSS File dialog box, set File Prefix to OSSREF and specify File Path. The system automatically fills in the OSS path for the JAR file.

Step 4: Save the job

Click Save.

What's next

  • Schedule the job in a workflow to automate execution.

  • Associate your project with a cluster to run the job.