Use loop in job

Source: Internet
Author: User
Zookeeper

Use loop in job

In an unstable network environment, file transmission may occasionally experience timeout or Connection Reset. In this case, you need to wait a moment and try again. Give up and end the job after 10 retries. It is similar to using loops to solve such problems.
This example job demonstrates this loop scenario. The file transfer step is replaced by a virtual scenario (the probability of successful random number generation is 10%). If the process succeeds, the log report is successfully written, the other 90% reports failure logs report failure and continue, running up to 10 times; click Download example:
D
Let me remind you to use the method in this example when you cannot determine the number of loop executions. If it is possible to calculate the number of known cycles or cycles, it is best to generate these records in a separate conversion, and then copy them to the result set and pass them to a job, set the "execute for every input row" feature in the job to implement a finite loop. Please refer to another article.

Use loop in job

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.