Help Center> RES> API Reference> APIs (Old Version)> Job-related APIs> Querying the Job Details> Using DLF to Monitor Jobs and Restart Abnormal Tasks

Using DLF to Monitor Jobs and Restart Abnormal Tasks

RES provides an API for querying job details. The jobs.job_status field in the response body indicates the status of the current task.

This API is used to re-run the job with the same configurations.

The API used to query job details and API used to re-run jobs can be used to monitor the job status and determine whether to re-run a job based on the job status.

The preceding functions can also be dragged to the list of functions by using Data Lake Factory (DLF). The procedure is as follows:

  1. Log in to the DAYU management console. On the displayed page, click Data Development to enter the DLF page. Then click Develop Job.
  2. On the Workspace page, click Create Job.
    1. Change the job name to a name that you can identify. The value can contain only letters, digits, Chinese characters, hyphens (-), commas (,), and periods (.), and can contain 1 to 128 characters.
    2. Retain the default job type, creation mode, selected directory, job owner, job priority, and log path.
  3. Click OK. A message indicating that the job created successfully is displayed.
  4. Select RestClient under Data Integration from Node Library, drag two nodes to the blank area on the right, and set the relationship between the two nodes, as shown in Figure 1. For details about how to set the parameters of the RestClient node, see Data Lake Factory > User Guide > References > Nodes >Rest Client.
    Figure 1 Node configurations for job monitoring and task restart upon exceptions
    1. Configure the first node to query job details. For details about parameters for querying the job details, see the API for Querying the Job Details.
    2. Configure the second node to re-run the job. For details about the parameters for re-running a job, see the API for Re-running Jobs.

      The job on the second node is executed only when a nearline task (realtime stream task) fails.

  5. Choose Save > Test. Ensure that the functions are normal.
  6. On the right of the page, click Scheduling Setup and set the scheduling period and other parameters as required.
  7. On the job page, choose Monitoring > Monitor Job and click Submit. After the scheduling is complete, click on the left of the job name to view the scheduling details.

    For the pricing details of DLF, see DLF Purchase Guide.