官术网_书友最值得收藏!

Chains and steps

As mentioned earlier, a chain consists of multiple steps that are logically connected together. We cannot say anything about the behavior of these steps in the job chain. In order to know when these steps are going to be executed, we have to know what rules are applied to them. All steps have a name. We are going to reference these names of steps in our rules, which we will define later. Now, let's return to the backup example and list the steps there:

  1. SHUTDOWN: Take the database offline in a clean way.
  2. COPYFILES: Copy the database files to a remote location.
  3. STARTUP: Start up the database for a normal operation.

Without rules, nothing much will happen. The Scheduler will be looking for a step to start, but will be unable to find it. As soon as the Scheduler finds itself in a situation where it is given a chain and it cannot determine what to do next, the job gets a special job status—CHAIN_STALLED. This status means that the Scheduler does not know how to handle the chain. The chain will probably remain in this state indefinitely, unless we manually take over. If we ever find our job in such a state, it means that we have not taken into account all possible combinations of outcomes that the steps can have. Defining a good set of rules will mostly prevent us from getting in this state. Let's go to the rules now.

主站蜘蛛池模板: 平安县| 冷水江市| 巫溪县| 山丹县| 包头市| 盖州市| 漯河市| 平度市| 南京市| 阿瓦提县| 三门县| 汽车| 泽库县| 陆川县| 连州市| 西乌珠穆沁旗| 石首市| 灵丘县| 额敏县| 且末县| 小金县| 鹤山市| 太原市| 金塔县| 枝江市| 靖州| 巴南区| 长宁县| 青海省| 嘉鱼县| 鄂温| 长泰县| 泽库县| 乌兰察布市| 石屏县| 浙江省| 广水市| 博爱县| 荆门市| 安乡县| 新密市|