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

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.

主站蜘蛛池模板: 大竹县| 双峰县| 尚志市| 凭祥市| 衡阳市| 瓦房店市| 南皮县| 桓仁| 阿拉善盟| 静安区| 尤溪县| 顺昌县| 胶南市| 屏边| 古蔺县| 雅江县| 南京市| 澄城县| 错那县| 泰和县| 鄂托克前旗| 巩义市| 吴旗县| 莱西市| 哈密市| 辰溪县| 京山县| 灵武市| 会昌县| 霍林郭勒市| 东港市| 新余市| 临西县| 砀山县| 济南市| 湘潭县| 临泉县| 铅山县| 黄浦区| 平湖市| 乌恰县|