Copying Jobs

This section describes how to copy new MRS jobs. Only clusters whose version is MRS 1.7.2 or earlier support job replication.

Background

Currently, all types of jobs except for Spark SQL and Distcp jobs can be copied.

Procedure

  1. Log in to the MRS console.

  2. Click image1 in the upper-left corner on the management console and select a region and project.

  3. Choose Clusters > Active Clusters, select a running cluster, and click its name to switch to the cluster details page.

  4. Click Jobs.

  5. In the Operation column corresponding to the to-be-copied job, choose More > Copy.

    The Copy Job dialog box is displayed.

  6. Set job parameters, and click OK.

    Table 1 describes job configuration information.

    After being successfully submitted, a job changes to the Running state by default. You do not need to manually execute the job.

    Table 1 Job parameters

    Parameter

    Description

    Name

    Job name. It contains 1 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.

    Note

    You are advised to set different names for different jobs.

    Program Path

    Path of the program package to be executed. The following requirements must be met:

    • Contains a maximum of 1,023 characters, excluding special characters such as ;|&><'$. The parameter value cannot be empty or full of spaces.

    • The path of the program to be executed can be stored in HDFS or OBS. The path varies depending on the file system.

      • OBS: The path must start with s3a://. Example: s3a://wordcount/program/xxx.jar

      • HDFS: The path must start with /user. For details about how to import data to HDFS, see Importing Data.

    • For SparkScript, the path must end with .sql. For MapReduce and Spark, the path must end with .jar. The .sql and .jar are case-insensitive.

    Parameters

    Key parameter for program execution. The parameter is specified by the function of the user's program. MRS is only responsible for loading the parameter. Multiple parameters are separated by space.

    Configuration method: Package name.Class name

    The parameter contains a maximum of 150,000 characters. It cannot contain special characters ;|&><'$, but can be left blank.

    Note

    When entering a parameter containing sensitive information (for example, login password), you can add an at sign (@) before the parameter name to encrypt the parameter value. This prevents the sensitive information from being persisted in plaintext. When you view job information on the MRS management console, the sensitive information is displayed as *.

    Example: username=admin @password=admin_123

    Import From

    Path for inputting data

    Data can be stored in HDFS or OBS. The path varies depending on the file system.

    • OBS: The path must start with s3a://.

    • HDFS: The path must start with /user. For details about how to import data to HDFS, see Importing Data.

    The parameter contains a maximum of 1,023 characters, excluding special characters such as ;|&>,<'$, and can be left blank.

    Export To

    Path for outputting data

    Note

    • When setting this parameter, select OBS or HDFS. Select a file directory or manually enter a file directory, and click OK.

    • If you add the hadoop-mapreduce-examples-x.x.x.jar sample program or a program similar to hadoop-mapreduce-examples-x.x.x.jar, enter a directory that does not exist.

    Data can be stored in HDFS or OBS. The path varies depending on the file system.

    • OBS: The path must start with s3a://.

    • HDFS: The path must start with /user.

    The parameter contains a maximum of 1,023 characters, excluding special characters such as ;|&>,<'$, and can be left blank.

    Log Path

    Path for storing job logs that record job running status.

    Data can be stored in HDFS or OBS. The path varies depending on the file system.

    • OBS: The path must start with s3a://.

    • HDFS: The path must start with /user.

    The parameter contains a maximum of 1,023 characters, excluding special characters such as ;|&>,<'$, and can be left blank.