After you create an E-MapReduce (EMR) cluster, you can create a project on the Data Platform tab. Then, you can edit jobs and schedule workflows in the project. You can also associate a cluster with the project, add project members, and configure global variables for the project.

Prerequisites

An EMR cluster is created. For more information, see Create a cluster.

Limits

You can use only an Alibaba Cloud account to create projects, add project members, and associate clusters with projects. If you log on to the EMR console by using a RAM user, the Create Project button and the Users and Cluster Settings pages are unavailable.

Create a project

  1. Go to the Data Platform tab.
    1. Log on to the Alibaba Cloud EMR console by using your Alibaba Cloud account.
    2. In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
    3. Click the Data Platform tab.
      If you use an Alibaba Cloud account, you can view all the projects within the account. If you use a RAM user, you can view only the projects on which you have development permissions. You can use your Alibaba Cloud account to grant development permissions to a RAM user. For more information, see Manage RAM users.
  2. In the upper-right corner of the Projects section, click Create Project.
  3. In the Create Project dialog box, configure Project Name and Project Description and select an existing resource group from the Select Resource Group drop-down list.
    Note If you do not select a resource group, the project is added to the default resource group. For more information about how to use resource groups, see Use resource groups.
  4. Click Create.
    In the Projects section, you can view and manage the project you created.

View the basic information about a project

  1. Go to the Data Platform tab.
    1. Log on to the Alibaba Cloud EMR console by using your Alibaba Cloud account.
    2. In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
    3. Click the Data Platform tab.
  2. Go to the Projects tab.
    1. In the Projects section, click the ID of your project.
    2. Click the Projects tab.
  3. View the basic information about the project.
    On the Basic Information page, you can view the following information about the project: project name, creation time, description, and the user who created the project.

Configure general information

We recommend that you enable the security mode on the General Configuration page if you want to manage permissions on jobs that are run in Data Platform of the EMR console.

After you enable the security mode, you must add the EMR user account that is used to submit jobs on the Users page. For more information, see Manage user accounts. If you log on to the EMR console by using your Alibaba Cloud account and submit a job in a project for which the security mode is enabled, the job is run by the hadoop user by default. If you log on to the EMR console by using a RAM user and submit a job in a project for which the security mode is enabled, the job is run by the EMR user account that has the same name as the RAM user by default.

  1. Go to the Data Platform tab.
    1. Log on to the Alibaba Cloud EMR console by using your Alibaba Cloud account.
    2. In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
    3. Click the Data Platform tab.
  2. Go to the Projects tab.
    1. In the Projects section, click the ID of your project.
    2. Click the Projects tab.
  3. Configure Security Mode.
    1. In the left-side navigation pane, click General Configuration.
    2. Turn on or off Security Mode based on your business requirements.
      Notice After you enable the security mode, Shell and Hive jobs cannot be run in the project.

Manage RAM users

Perform the following steps to add or revoke project development permissions to or from a RAM user:

  1. Go to the Data Platform tab.
    1. Log on to the Alibaba Cloud EMR console by using your Alibaba Cloud account.
    2. In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
    3. Click the Data Platform tab.
  2. Go to the Projects tab.
    1. In the Projects section, click the ID of your project.
    2. Click the Projects tab.
  3. In the left-side navigation pane, click Users.
  4. On the Users page, add or remove users based on your business requirements.
    • Add a RAM user.
      1. In the upper-right corner of the Users page, click Add User.
      2. In the Add User dialog box, select the RAM user that you want to add and click Add.
        You can view information about the added RAM user on the Users page.
        Note The added RAM user becomes a member of the project and is granted the permissions to view and develop jobs and workflows in the project.
    • Remove a RAM user.

      On the Users page, find the RAM user that you want to remove and click Delete in the Actions column.

Configure cluster resources

Perform the following steps to configure cluster resources for a project. This way, jobs in the project can run in the cluster that is associated with the project:

  1. Go to the Data Platform tab.
    1. Log on to the Alibaba Cloud EMR console by using your Alibaba Cloud account.
    2. In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
    3. Click the Data Platform tab.
  2. Go to the Projects tab.
    1. In the Projects section, click the ID of your project.
    2. Click the Projects tab.
  3. In the left-side navigation pane, click Cluster Settings.
  4. On the Cluster Settings page, perform the following operations:
    • Associate a cluster with the project.
      1. Click Add Cluster in the upper-right corner.
      2. In the Add Cluster dialog box, select a resource group and a cluster.

        In the Add Cluster dialog box, select a purchased subscription or pay-as-you-go cluster from the Select Cluster drop-down list. Clusters that are created by using a cluster template are not supported.

      3. Click OK.

        On the Cluster Settings page, you can view the information about the associated cluster.

    • Modify cluster configurations.
      1. Find the cluster whose configurations you want to modify and click Change Configuration in the Actions column.
      2. In the Change Configuration dialog box, configure the parameters that are described in the following table.
        Parameter Description
        Default Job Submission User The default user who submits jobs to the associated cluster in the project. The default value is hadoop. The default user is unique.
        Default Job Submission Queue The default queue to which jobs are submitted in the project. Default value: default.
        Job Submission User Whitelist The users who can submit jobs in the project to the associated cluster. Separate multiple users with commas (,).
        Job Submission Queue Whitelist The queues to which jobs can be submitted in the project. Separate multiple queues with commas (,).
        Client whitelist Specify the clients that can submit jobs. You can select the master node of the existing EMR cluster or a node of the gateway cluster that is associated with the EMR cluster. Self-managed gateway clusters that are deployed on ECS instances are not supported.
      3. Click OK.
    • Disassociate a cluster from the project.

      On the Cluster Settings page, find the cluster that you want to disassociate and click Delete in the Actions column.

Define variables

Perform the following steps to configure project-level custom variables, which can be used as global variables for jobs in a project:

  1. Go to the Data Platform tab.
    1. Log on to the Alibaba Cloud EMR console by using your Alibaba Cloud account.
    2. In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
    3. Click the Data Platform tab.
  2. Go to the Projects tab.
    1. In the Projects section, click the ID of your project.
    2. Click the Projects tab.
  3. In the left-side navigation pane, click Custom Variable.
  4. On the Custom Variable page, you can add or remove custom variables based on your business requirements.
    • Add a custom variable.
      1. Click Add in the upper-right corner.
      2. In the Add Custom Variable dialog box, configure Variable Name and Value, and specify whether to encrypt the value of the variable. If you want to encrypt the value, turn on Set as Password.
        The variable is called in the format of ${VariableName} in a job. For example, a variable named ENV_ABC is added, the value of the variable is 12345, and Set as Password is not turned on. In this example, a job that has the following content is run:
        echo ${ENV_ABC}
        The following output is returned:
        12345
        The effect of configuring the variable is equivalent to running the following script:
        export ENV_ABC=12345
      3. Click OK.

        On the Custom Variable page, you can view the information about the added variable.

    • Remove a custom variable.

      On the Custom Variable page, find the custom variable that you want to remove and click Delete in the Action column.