This topic describes how to run and maintain a node, and troubleshoot errors based on logs.

When you configure recurrence and dependencies for batch synchronization node write_result, you have configured the batch synchronization node to run at 02:00 every Tuesday. After you commit this node, you need to wait until the next day to view the automatic execution result of this node. DataWorks allows you to run nodes in the following modes: test run, retroactive run, and periodic run. This helps you confirm the run time of each node instance, dependencies among node instances, and whether generated data is as expected.
  • Test run: Nodes are triggered manually. We recommend that you use this mode if you only want to check the run time and running of a single node.
  • Retroactive run: Nodes are triggered manually. We recommend that you use this mode if you want to check the run time of multiple nodes and dependencies among them, or if you want to reperform data analysis and computing from the specific root node.
  • Periodic run: Nodes are triggered automatically. After you commit a node, the scheduling system automatically generates and runs instances for the node from 00:00 the next day. When the scheduled time of each instance arrives, the scheduling system checks whether the ancestor instances of the instance have been run. If all the ancestor instances have been run, the scheduling system automatically triggers the instance without manual intervention.
Note The scheduling system generates instances for manually triggered nodes and auto triggered nodes based on the same rules.
  • The scheduling system generates instances of a node for each date within the validity period of a node, regardless whether the recurrence of the node is set to minutely, hourly, daily, weekly, or monthly.
  • The scheduling system only runs the instances generated for the specified run dates when the scheduled time arrives and generates operational logs for the instances.
  • The scheduling system does not run the instances generated for other dates. Instead, it directly changes the status of the instances to successful when the running conditions are met.

Test run

  1. On the DataStudio page, click the icon in the upper-left corner and choose All Products > Operation Center to go to the Operation Center page.
  2. In the left-side navigation pane, choose Cycle Task Maintenance > Cycle Task.
  3. Find the target node and click Test in the Actions column.
  4. In the Smoke Test dialog box that appears, set the Smoke Test Instance Name and Data Timestamp parameters and click OK.
  5. On the Test Instance page that appears, click an instance. The directed acyclic graph (DAG) of the instance appears on the right.
    Right-click the instance to view its dependencies and details, and stop or rerun this instance.
    Note
    • In test run mode, a node is triggered manually. When the scheduled time arrives, the scheduling system runs the corresponding instance immediately, no matter whether the ancestor instances have been run.
    • Batch synchronization node write_result is configured to run at 02:00 every Tuesday. According to the instance generation rules described earlier in this topic, if the data timestamp, which is one day before the run date, is set to Monday for a test run, the scheduling system runs the instance for batch synchronization node write_result at 02:00 on Tuesday. If the data timestamp is not set to Monday for the test run, the scheduling system changes the status of the instance to successful at 02:00 on Tuesday with no operational logs generated.

Retroactive run

A retroactive run is recommended if you want to check the run time of multiple nodes and dependencies among them, or if you want to reperform data analysis and computing from the specific root node.
  1. On the Operation Center page, choose Cycle Task Maintenance > Cycle Task in the left-side navigation pane.
  2. Find the target node and choose Patch Data > Current Node Retroactively in the Actions column.
  3. In the Patch Data dialog box that appears, set parameters and click OK.
    Parameter Description
    Retroactive Instance Name The name of the retroactive instance.
    Data Timestamp The data timestamp of the retroactive instance. The retroactive instance is run on the next day of the specified timestamp.
    Node The default value is the current node, which cannot be changed.
    Parallelism Specifies whether to concurrently run the node with other nodes. Select Disable or specify several nodes to run concurrently.
  4. On the Patch Data page that appears, click the retroactive instance to view the DAG of the instance.
    Right-click the instance to view its dependencies and details, and stop or rerun this instance.
    Note
    • In retroactive run mode, the running of an instance requires the instance running result of the previous day. For example, in the scenario where you configure retroactive instances to run from September 15, 2017 to September 18, 2017, if the instance on September 15 fails to run, the instance on September 16 cannot be run.
    • Batch synchronization node write_result is configured to run at 02:00 every Tuesday. According to the instance generation rules described earlier in this topic, if the data timestamp, which is one day before the run date, is set to Monday for a retroactive instance, the scheduling system runs the instance for batch synchronization node write_result at 02:00 on Tuesday. If the data timestamp is not set to Monday for the retroactive instance, the scheduling system changes the status of the instance to successful at 02:00 on Tuesday with no operational logs generated.

Periodic run

In periodic run mode, the scheduling system automatically triggers instances for all nodes based on the scheduling configuration. No menu item is provided for you to control the periodic run on the Operation Center page. You can view the instance information and operational logs in either of the following ways:
  • On the Operation Center page, choose Cycle Task Maintenance > Cycle Instance in the left-side navigation pane. On the page that appears, set parameters such as the data timestamp or run date, find an instance of batch synchronization node write_result, and then right-click the instance to view the instance information and operational logs.
  • On the Cycle Instance page, click an instance of the target node to view the DAG of the instance.
    Right-click the instance to view its dependencies and details, and stop or rerun this instance.
    Note
    • If an ancestor node has not been run, its descendant nodes are not run either.
    • If the initial status of an instance is pending, the scheduling system checks whether all its ancestor instances have been run when the scheduled time arrives.
    • The instance can be triggered and run only after all its ancestor instances have been run and the scheduled time arrives.
    • If an instance is pending, check whether all its ancestor instances have been run and whether the scheduled time arrives.