百度智能云

All Product Document

          MapReduce

          Scheduled Task

          Introduction

          The scheduled task can help you with scheduled activation of the cluster step. Plan the time policy and store the input data based on such a policy before creating the scheduled task. You can modify the time policy for the created scheduled task.

          Planning Preparation

          1. Plan the time policy, which is the time of automatically activating the cluster step. The example in this document is the automatic activation of clusters every half an hour from 19:55 on December 11, 2015 to 19:55 on December 18, 2015.
          2. Define the data storage address in BOS, and then store the input data according to the planned time policy. According to the time policy in the example, the addresses are bos://{bucket_name}/input/201512111955/data.txt, bos://{bucket_name}/input/201512112025/data.txt, bos://{bucket_name}/input/201512112055/data.txt, and so on.

          Create Scheduled Tasks

          1. In "Product Service>MapReduce>Baidu MapReduce-Timed Task" page, click "Create a Task" to enter the scheduled task creation page.
          2. Configure the "Task Parameters" section:

            • Enter the task name in the "Task Name" bar.
            • Select the cluster template for scheduled task setup in the "Cluster Template" bar.
          3. Configure the "Execution Policy" section:

            • Set the minutes, hours, and days of interval in the "Execution Frequency" bar. The minimum interval is not less than 5 minutes.
            • In the "Task Start Mode" bar, select "Start Now" to immediately execute the task, and select "Y-M-D H:M:S" to specify the time to start the task.
            • In the "Task End Mode" bar, select "Never End" to specify that the task has no end time, and select "Y-M-D H:M:S" to specify the time to end the task.
          4. Click "Add steps" in the "step Setup" section, and then set the step parameters in the pop-up dialog box by referring to the step 2 of Create a step. Enter the bos input\output address with the string %Y%m%d%H%M according to the time policy. Based on the time policy in the example, the bos input address is bos://{Bucket_name}/input/%Y%m%d%H%M/data.txt. The bos output address is bos://{Bucket_name}/output/%Y%m%d%H%M. After the step setup, click "OK" to complete the addition of a scheduled task.
          5. Click "Finish" to complete the creation of scheduled task.
          6. When activating clusters, the system can automatically match the folder corresponding to the string according to the input/output address. For example, when the cluster is activated at 15:38 of December 11, 2015, the data with address bos://{bucket_name}/input/201512111538/data.txt is called, and the running outcome is automatically output to the folder with address bos://{Bucket_name}/output/201512111538.
          7. You can view the created task in "Product Service>MapReduce>Baidu MapReduce-Timed Task" page.
          8. View the execution records of the created scheduled task by clicking "View Execution History".
          9. (Optional) Click "Stop" to pause the task, and click "Start" to restart the task.

          Modify Schedule Tasks

          You can modify the time policy and step for the created scheduled task. The specific operation steps are as follows:

          1. In "Product Service>MapReduce>Baidu MapReduce-Timed Task" page, click the created scheduled task to open the "Scheduled Task Details" page.
          2. Modify the time policy: In the "Execution Details" section, click "Adjust Execution Policy", set the new execution policy in the pop-up dialog box, and click "OK".
          3. Modify the step: In the "step Information" section, you can modify or delete the existing step by clicking the "Edit" or "Delete" button according to the step name. You can also add steps. Click "Add Steps", and then set the step parameters in the pop-up dialog box by referring to step 2 of [Create Steps](BMR/Operation Guide/Manage Steps/Create Steps.md).
          Previous
          Diagnosis and Tuning
          Next
          Hadoop-Manager