Updated on 2022-07-04 GMT+08:00

Performing Operations on a Job

After a job is created, you can perform operations on the job as required.

Editing a Job

You can edit a created job, for example, by modifying the SQL statement, job name, job description, or job configurations.

  1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
  2. In the row where the job you want to edit is located, click Edit in the Operation column to switch to the Edit page.
  3. Edit the job as required.

    For details about how to edit a Flink SQL job, see Step 5 to Step 7 in Creating a Flink SQL Job.

    For details about how to edit a user-defined Flink job, see Step 5 to Step 7 in Creating a User-Defined Flink Job.

Starting a Job

You can start a saved or stopped job.

  1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
  2. Use either of the following methods to start jobs:

    • Starting a single job

      Select a job and click Start in the Operation column.

      Alternatively, you can select the row where the job you want to start resides and click Start in the upper left of the job list.

    • Batch starting jobs

      Select the rows where the jobs you want to start reside and click Start in the upper left of the job list.

    After you click Start, the Start Flink Job page is displayed.

  1. On the Start Flink Job page, confirm the job information. If they are correct, click Start Now.

    After a job is started, you can view the job execution result in the Status column.

Stopping a job

You can stop a job in the Running or Submitting state.

  1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
  2. Stop a job using either of the following methods:

    • Stopping a job

      Locate the row that contains the job to be stopped, click More in the Operation column, and select Stop.

      Alternatively, you can select the row where the job you want to stop resides and click Stop in the upper left of the job list.

    • Batch stopping jobs

      Locate the rows where the jobs you want to stop reside and click Stop in the upper left of the job list.

  3. In the displayed Stop Job dialog box, click OK to stop the job.

    • Before stopping a job, you can trigger a savepoint to save the job status information. When you start the job again, you can choose whether to restore the job from the savepoint.
    • If you select Trigger savepoint, a savepoint is created. If Trigger savepoint is not selected, no savepoint is created. By default, the savepoint function is disabled.
    • The lifecycle of a savepoint starts when the savepoint is triggered and stops the job, and ends when the job is restarted. The savepoint is automatically deleted after the job is restarted.
    When a job is being stopped, the job status is displayed in the Status column of the job list. The details are as follows:
    • Stopping: indicates that the job is being stopped.
    • Stopped: indicates that the job is stopped successfully.
    • Stop failed: indicates that the job failed to be stopped.

Deleting a Job

If you do not need to use a job, perform the following operations to delete it. A deleted job cannot be restored. Therefore, exercise caution when deleting a job.

  1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
  1. Perform either of the following methods to delete jobs:

    • Deleting a single job

      Locate the row where the job you want to delete resides and click More > Delete in the Operation column.

      Alternatively, you can select the row where the job you want to delete resides and click Delete in the upper left of the job list.

    • Deleting jobs in batches

      Select the rows where the jobs you want to delete reside and click Delete in the upper left of the job list.

  2. Click OK.

Exporting a Job

You can export the created Flink jobs to an OBS bucket.

This mode is applicable to the scenario where a large number of jobs need to be created when you switch to another region, project, or user. In this case, you do not need to create a job. You only need to export the original job, log in to the system in a new region or project, or use a new user to import the job.

When switching to another project or user, you need to grant permissions to the new project or user. For details, see Managing Flink Job Permissions.

  1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
  1. Click Export Job in the upper right corner. The Export Job dialog box is displayed.
  2. Select the OBS bucket where the job is stored. Click Next.
  3. Select Job

    By default, configurations of all jobs are exported. You can enable the Custom Export function to export configurations of the desired jobs.

  4. Click Confirm to export the job.

Importing a Job

You can import the Flink job configuration file stored in the OBS bucket to the Flink Jobs page of DLI.

This mode is applicable to the scenario where a large number of jobs need to be created when you switch to another region, project, or user. In this case, you do not need to create a job. You only need to export the original job, log in to the system in a new region or project, or use a new user to import the job.

If you need to import a self-created job, you are advised to use the job creation function. For details, see Creating a Flink SQL job and Creating a Custom Flink Job.

  • When switching to another project or user, you need to grant permissions to the new project or user. For details, see Managing Flink Job Permissions.
  • Only jobs whose data format is the same as that of Flink jobs exported from DLI can be imported.
  1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
  1. Click Import Job in the upper right corner. The Import Job dialog box is displayed.
  2. Select the OBS bucket where the job configuration file to be imported is located. Click Next.
  3. Configure Same-Name Job Policy Click Next.

    • Select Overwrite job of the same name. If the name of the job to be imported already exists, the existing job configuration will be overwritten and the job status switches to Draft.
    • If Overwrite job of the same name is not selected and the name of the job to be imported already exists, the job will not be imported.

  4. Ensure that Select Configuration File and Configure Same-Name Job Policy are correctly configured. Click Confirm to export the job.

Modifying Name and Description

You can change the job name and description as required.

  1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
  2. In the Operation column of the job whose name and description need to be modified, choose More > Modify Name and Description. The Modify Name and Description dialog box is displayed. Change the name or modify the description of a job.
  3. Click OK.

Importing to a Savepoint

When migrating a job from CS to DLI, you can import the job data by importing to a savepoint.

Triggering a Savepoint

You can click Trigger Savepoint for jobs in the Running status to save the job status.