1 Reply Latest reply: Jul 19, 2012 1:12 AM by Renato Bonomini RSS

Chain Controller Query

kalyani.sastry@barclays.com

In the chain controller, there are several parameters like

 

a) Hour  Mask

b) Day of week Mask

c) Day of Month mask

d) Execute after time

e) Apply mask Validation

f) Enqueueable

g) Parallelism

h) Continue on error

 

 

Can someone elaborate on the masks above and what exactly should be the values that the parameter called Parallelism can take?

What will setting enqueueable to true or false do to the tasks in the chain?

 

An early feedback will be much appreciated.

 

Thanks and Regards,

Kalyani

  • 1. Chain Controller Query
    Renato Bonomini

    Hello Kalyani,

    these parameters are used for advanced scheduling of chains.

     

    [Daily,Weekly,Monhtly] masks can be used to further specify when a chain is allowed to run: they work like a bit mask, where

    • 0 = don't run
    • 1 = run

     

    The daily mask starts at 00:00

    The weekly mask starts on Sunday.

    The monthly mask starts on the 1st day of the month.

     

    For example, if you don't want your chain to run on Sundays

    • you schedule execution frequency to daily
    • you  specify the weekly mask 0111111
    • the task will start on sunday but its execution skipped

     

    "Apply Mask Validation" can be used to maintain the setup of masks but temporarily disable them (e.g. if you need to run the chain for recovery or run it manually BUT you don't want to delete the configured masks).

     

    Parallelism

    A chain can run multiple tasks in parallel, if no value is specified this assumes the default of 1 which means serial execution of tasks.

    In some BCO releases, this option has been labelled "Time Forecasting Models Execution Parallelism", please ignore anything but 'Parallelism' (the parameter is not related to Time Forecasting Models').

     

    A value of 0 means execute all tasks in parallel

    A value of 1 means execute tasks in sequence

    A value >1 control how many tasks are concurrently running (for the specific chain)

    No value means default to 1.

     

    For example, let's say you have an ETL engine with 4 CPUs, in order to run up to 4 ETL tasks at all times:

    • create a chain
    • associate all tasks running on the ETL to that chain
    • configure parallelism to 4
    • when the chain runs
      • 4 tasks are started
      • as soon as a task is done, the next one starts

     

    Enqueueable

    This setting control whether requesting a new run of a chain task will enqueue a new execution or not.

    True: if you request to run the chain while it is already running, it will be executed again as soon as finished.

    False:  if you request to run the chain while it is already running, the request is discarded

    [I go by heart, hope I remember this right]

     

    Other options

     

    Execute After time

     

    Specify if a chain needs to start after a specific hour of the day. This becomes useful if you schedule a chain in a chain.

    For example

    • Chain A contains chains B and C (in this order)
    • Chain A is scheduled at 7 AM
    • Chain B can start right away
    • Chain C has to start after 11 AM, regardingless the time to execute chain B: in this case you use 'Execute After Time'

     

    Continue on error

    False: if a task exits with FAILURE status, the chain is stopped and no further task is executed.

    True: if a task exits with FAILURE status, the chain continues on.

     

    Example of a chain with tasks A,B and C.

    You would use false when, if A or B fails, you don't want B or C to run.

    E.g. tasks A materializes some tables needed by tasks B and C.

     

    Cheers,

    Renato