Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-1301

Job chain with default process class (default agent)

    XMLWordPrintable

Details

    Description

      Use of process class

      • A job chain can be configured to use a specific process class for subsequent job nodes. This enables a more flexible configuration than assigning the process class to a specific job that would be used for all jobs chains.
      • Precedence of process class assignments in decreasing sequence:
        1. order
          • the assignment of a process class is not in scope of this feature
          • the assginment of a remote JobScheduler instance is supported
        2. job chain
        3. job
      Warning

      The precedence defined here is valid for the 1.9 releases of JobScheduler.
      Starting with version 1.10 the precedence will be changed, see JS-1450

      Behavior with JobScheduler Agents

      • Process classes are used to specify JobScheduler Agents for the execution of jobs and job chains.
      • Assigning a process class to a job chain specifies that job chain to be executed by a specific Agent or group of Agents.

      Implications

      • If an assigned process class is unknown, e.g. not yet configured, then any orders running will be moved to the error state.
        • JobScheduler will not wait for the process class to become available.
        • Users should therefore first configure the process class and then assign it to a job chain.
      • If a process class is exhausted, i.e. the maximum number of tasks are running, then the process class will wait for a task to become free.
        • Any tasks used by a process class are counted towards the maximum number of tasks of the job that is specified by job tasks="..."/>
        • This behavior is the same as before.
      • If an API job is already running and ready to process the next order and the job chain is configured for a different process class then the job will stop with an error.
        • Currently if a job is assigned a process class then this is required to be same process class as for the job chain.
        • Future releases might introduce a different behavior, e.g. restart of the task for a different process class.
        • Workaround: configure a postprocessing monitor which ends the task after every processing step:
          <job  title="check wether a file exists" order="yes" process_class="java_agent">
              <script  language="java" java_class="sos.scheduler.file.JobSchedulerExistsFile"/>
              <monitor  name="end_task" ordering="0">
                  <script  language="java:javascript">
                      <![CDATA[
          function spooler_process_after(spooler_process_result){
              spooler_task.end();
              return spooler_process_result;
          }
                      ]]>
                  </script>
              </monitor>
          
              <run_time />
          </job>
          
      • The order parameter scheduler.remote_scheduler
        • is currently not used for job chains with process classes that could include multiple JobScheduler Agents. Instead this parameter is used to assign a specific JobScheduler Agent to an order. This behavior will be reviewed in future releases.
        • is used for shell jobs, it is not valid for API jobs.

      Prospects

      • Future releases will drop the use of standalone jobs.
        • Therefore we shift the use of process classes from the job to the job chain and order.
        • In addition future release might support to assign individual process classes to job nodes.

      Configuration example

      <job_chain orders_recoverable="yes" process_class="/FOLDER_NAME/JS-1301" visible="yes">
          <job_chain_node error_state="ERROR" job="Test_JS-1301" next_state="SUCCESS" state="TEST"/>
          <job_chain_node state="SUCCESS"/>
          <job_chain_node state="ERROR"/>
      </job_chain>
      

      Attachments

        Issue Links

          Activity

            People

              jz Joacim Zschimmer
              jz Joacim Zschimmer
              Santiago Aucejo Petzoldt Santiago Aucejo Petzoldt
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 3 weeks
                  3w
                  Remaining:
                  Remaining Estimate - 3 weeks
                  3w
                  Logged:
                  Time Spent - Not Specified
                  Not Specified