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

  • A cluster is created. For more information, see Create a cluster.
  • You have logged on to the Alibaba Cloud EMR console by using your Alibaba Cloud account.
    Note You can use only your Alibaba Cloud account to create a project, add project members, and associate a cluster with the project. That is, the Create Project button and the Users and Cluster Settings pages are available only when you log on to the EMR console by using your Alibaba Cloud account.

Create a project

  1. Click the Data Platform tab.
    If you use an Alibaba Cloud account, you can view all projects under your account. If you are a RAM user, you can view only the projects on which you have the development permissions. You must use an Alibaba Cloud account to grant the development permissions to a RAM user. For more information, see Manage RAM users.
  2. Click Create Project in the upper-right corner.
  3. In the Create Project dialog box, specify Project Name and Project Description, and select an existing resource group from the Select Resource Group drop-down list.
    Note If no resource group is specified, 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 created project.

View the basic information of a project

  1. Click the Data Platform tab.
  2. In the Projects section of the page that appears, click the ID of the project that contains the basic information you want to view.
  3. Click the Projects tab.
    In the Basic Information section, you can view the following information about the project: project name, creation time, description, and the user who created the project.

Perform general configuration

Notice After you enable the security mode, Shell and Hive jobs cannot run.

The security mode is suitable for the scenarios where you want to manage permissions on the running jobs on the Data Platform tab of the EMR console.

By default, if you submit jobs in a project where the security mode is enabled, the EMR user account that has the same username as your RAM user is used to submit the jobs. For an Alibaba Cloud account, the hadoop user account is used to submit the jobs by default. 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.

Manage RAM users

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

  1. Click the Data Platform tab.
  2. In the Projects section of the page that appears, click the ID of the project that contains the basic information you want to view.
  3. Click the Projects tab.
  4. In the left-side navigation pane, click Users.
  5. On the Users page, perform the following operations:
    • Add a RAM user.
      1. Click Add User in the upper-right corner.
      2. In the Add User dialog box, select the required RAM user under your Alibaba Cloud account.
      3. Click Add.

        On the Users page, you can view the information about the added RAM user.

      Note The RAM user will become a member of the project and have 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 of a project so that jobs in the project can run on the associated cluster:

  1. Click the Data Platform tab.
  2. In the Projects section of the page that appears, click the ID of the project that contains the basic information you want to view.
  3. Click the Projects tab.
  4. In the left-side navigation pane, click Cluster Settings.
  5. 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 purchased subscription or pay-as-you-go cluster from the Select Cluster drop-down list. Clusters 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.

    • Disassociate the cluster from the project.

      On the Cluster Settings page, click Delete in the Actions column to disassociate the cluster from the project.

    • Modify configurations.
      1. On the Cluster Settings page, click Change Configuration in the Actions column.
      2. In the Change Configuration dialog box, configure the parameters 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. If you do not specify this parameter, jobs will be submitted to the default queue.
        Job Submission User Whitelist The users who can submit jobs to the associated cluster. Separate multiple users with commas (,).
        Job Submission Queue Whitelist The queues of the associated cluster in which jobs in the project can run. Separate multiple queues with commas (,).
      3. Configure a client whitelist that contains 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. Gateway clusters created in the ECS console are not supported.
      4. Click OK.

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. Click the Data Platform tab.
  2. In the Projects section of the page that appears, click the ID of the project that contains the basic information you want to view.
  3. Click the Projects tab.
  4. In the left-side navigation pane, click Custom Variable.
  5. On the page that appears, perform the following operations based on your requirements:
    • Add a custom variable.
      1. Click Add in the upper-right corner.
      2. In the Add Custom Variable dialog box, specify Variable Name and Value.
        You can determine whether to encrypt the variable value based on your requirements. Variables are specified in the format of ${ VariableName}. Assume that you add a variable named ENV_ABC, with the value of 12345, and Set as Password is not turned on for a Shell job. The following job content is shown:
        echo ${ENV_ABC}
        The following result is obtained:
        12345
        The effect of setting the variable is equivalent to running the following script:
        export ENV_ABC=12345
      3. Click OK.

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

    • Remove a custom variable.

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