Help Center/ DataArts Studio/ Best Practices/ Configuring Alarms for Jobs in DataArts Factory of DataArts Studio
Updated on 2024-11-12 GMT+08:00

Configuring Alarms for Jobs in DataArts Factory of DataArts Studio

If a large number of big data jobs are scheduled on DataArts Factory, there may be the following pain points:

  • Job failures may not be found: Most offline big data jobs are executed in the early morning. If a job fails, you may not know and handle the failure in a timely manner.
  • The data supplement period is short: If too many upstream jobs fail and retried, the execution time of downstream core services may be prolonged and exceed the baseline. As a result, impact on services is detected too late and remedial measures cannot be adopted in time.

To address these pain points, you can configure job alarms to detect job scheduling and execution problems in a timely manner and prolong the period for resolving the problems.

  • Configure job node retry upon a failure and configure job failure alarms: By configuring them, you can minimize job failures during peak hours. Even if a job fails, O&M engineers can receive notifications and respond in a timely manner to prevent severer faults.
  • Configure job timeout alarms: This allows you to detect potential risks with jobs in advance and determine whether the required data can be generated on the current day. In this way, you have more time to handle possible errors and reduce the impact of faults.

Prerequisites

You have created a data development job and configured scheduling for the job.

Configuring Job Node Retry upon a Failure

You can enable retry for the nodes of key jobs one by one or in a batch. This section uses the latter as an example.

  1. Log in to the DataArts Studio console by following the instructions in Accessing the DataArts Studio Instance Console.
  2. On the DataArts Studio console, locate a workspace and click DataArts Factory.
  3. In the left navigation pane of DataArts Factory, choose Development > Develop Job.
  4. Click in the job directory and select Show Check Box.
    Figure 1 Clicking Show Check Box

  5. Select target jobs, click , and select Configure Job.

    If you want to choose CDM jobs, choose only file migration jobs or data migration jobs (for which data import to phase tables is enabled). If you select a data migration job for which data import to phase tables is disabled, data may be repeatedly written when the job is retried upon a failure, resulting in data inconsistency after the migration.

    Figure 2 Configure Job

  6. In the Configure Job dialog box, configure retry upon failures.
    • Retry upon Failure: Select Yes to enable retry upon a failure for all nodes of the selected jobs.
    • Retry upon Timeout: Set this parameter as needed. If a timeout interval is configured for a job node, the node can be retried upon an execution timeout.
    • Maximum Retries: Set this parameter as needed. If the value is too large, execution time for downstream jobs may be shortened.
    • Retry Interval (seconds): Set this parameter as needed. If the value is too large, execution time for downstream jobs may be shortened.
    Figure 3 Configuring retry upon a failure

  7. Click OK.

Configuring Job Failure Alarms

You can enable failure alarms for a single job or all jobs on the Manage Notification page. This section uses the latter as an example.

  1. On the DataArts Studio console, locate a workspace and click DataArts Factory.
  2. In the navigation pane on the DataArts Factory page, choose Monitoring > Manage Notification.
  3. On the Manage Notification page, click Configure Notification. In the displayed dialog box, set the following parameters:
    • Notification Scope: You are advised to select All jobs. Notifications will be sent when existing and new jobs run improperly or fail.
    • Notification Type: Select Abnormal. When a job is not running properly or fails, a notification is sent to notify the user of the abnormality.

      You can also set Max. Notifications and Min. Notification Interval after a job becomes abnormal or fails and before the job is restored.

      You can set Max. Notifications to a value from 1 to 50. If the default value 1 is used, Min. Notification Interval is not displayed.

      You can set Min. Notification Interval to a value from 5 to 60.

    • Notification Mode: You are advised to select By topic.
      • Notification management depends on SMN, which may incur fees. For pricing details, contact the SMN support.
      • Multiple message topics can be configured for a job. When the job is successfully executed or fails to be executed, notifications can be sent to multiple subscribers.
    • Topic Name: Select an SMN message topic. If no proper topic is available, click View Topic to go to the SMN console and create one.

      Currently, topics can be subscribed to only by SMS, email, or HTTP.

    • Notification: whether to enable notification. This option is enabled by default.
    Figure 4 Configuring notifications

  4. Click OK.

Configuring Job Timeout Alarms

Before configuring timeout alarms for a job, ensure that you have configured notifications of the Abnormal type for the job by following the instructions in Configuring Job Failure Alarms. The job instance timeout interval can be configured only for a single job. After the configuration is complete, if the execution of a job instance times out, a notification will be sent.

  1. On the DataArts Studio console, locate a workspace and click DataArts Factory.
  2. In the left navigation pane of DataArts Factory, choose Development > Develop Job.
  3. In the job directory, double-click a job to access the job development page.
  4. On the job development page, click the Basic Info tab on the right of the canvas to set the following parameters:
    • Execution Timeout: Set the timeout duration for the job instance. If you do not set this parameter or set it to 0, this parameter does not take effect. If you have configured notifications for the job by referring to Configuring Job Failure Alarms, and the execution of the job instance times out, the system sends a notification, and the job keeps running.
    • Exclude Waiting Time from Instance Timeout Duration: Set whether to exclude the instance waiting time from the timeout duration of the instance.
      Figure 5 Configuring the instance timeout duration
  5. Click Submit.