All Products
Search
Document Center

E-MapReduce:Configure a Hadoop MapReduce job

Last Updated:Jul 17, 2026

Configure a Hadoop MapReduce job to submit mapper and reducer tasks to your E-MapReduce cluster.

Prerequisites

Ensure you have created a project. For more information, see project management.

Procedure

  1. Go to the Projects page in Data Platform.

    1. Log in to the E-MapReduce console with your Alibaba Cloud account.

    2. In the top navigation bar, select the region and resource group.

    3. Click the Data Development tab.

  2. In the row of the project you want to edit, click Edit Job.

  3. Create a Hadoop MapReduce job.
    1. On the left side of the page, right-click the target folder and select Create Job.
    2. In the Create Job dialog box, enter a Job Name and Description, then select MR from the Job Type drop-down list.
      A Hadoop MapReduce job is submitted using the following command:
      hadoop jar xxx.jar [MainClass] -D xxx ....
    3. Click OK.
  4. Edit the job content.
    1. In the content field, enter the command-line arguments required to submit the job.
      Enter the arguments that follow the hadoop jar command: the path to the JAR file, then [MainClass], and other command-line arguments.
      For example, a Hadoop sleep job submits mapper and reducer tasks that each sleep for a specified time without reading or writing data. In Hadoop 2.6.0, this job is packaged in the hadoop-mapreduce-client-jobclient-2.6.0-tests.jar file. To submit this job from the command line, run:
      hadoop jar /path/to/hadoop-mapreduce-client-jobclient-2.6.0-tests.jar sleep -m 3 -r 3 -mt 100 -rt 100
      To configure this job in E-MapReduce, enter the following in the content input box:
      /path/to/hadoop-mapreduce-client-jobclient-2.6.0-tests.jar sleep -m 3 -r 3 -mt 100 -rt 100
      Note You can also click + Enter an OSS path, set File Prefix to OSSREF, and then select your file from File Path. The system automatically completes the OSS path for the Hadoop MapReduce script.
    2. Click Save.
      The sleep job in the preceding example has no data input or output. If your job needs to read data and write results, such as a WordCount job, you must specify the input and output paths.
      Data can be read from and written to HDFS on the E-MapReduce cluster or OSS. To use OSS, specify OSS paths for input and output.
      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