ジョブキューはQueue Handlerによって管理されます。各QueueハンドラはそのJob Queueを管理し、3つのハンドラがプリインストールされています:

  • system : システムジョブ(クリーンアップ、パフォーマンス、バックアップジョブ)のデフォルトハンドラ
  • service
  • default : ユーザ・ジョブ(Materialization、Replication、SQLジョブ)のデフォルト・ハンドラ。

SYSADMIN.createQueueHandlerプロシージャを使用して追加のハンドラを作成し、SYSADMIN.editQueueHandlerプロシージャを使用して既存のハンドラを編集することができます。QueueハンドラをDropする必要がある場合、SYSADMIN.dropQueueHandler プロシージャを使用してDrop することができます(プリインストールされている3つのハンドラはDrop できません)。キューハンドラの統計はSYSADMIN.JobQueueStatsテーブルで利用可能です。 各キューハンドラのスレッドプールステータスはSYSADMIN.JobQueueHandlersStatsテーブルで利用可能です。

Queue Handlerはスケジュールのパラメータです。CreateScheduleUpdateScheduleプロシージャには、キューハンドラを指定するためのオプションのqueueHandlerパラメータがあります。queueHandlerが設定されていない場合、デフォルトのハンドラが使用されます ( システムジョブにはsystemが、その他のジョブにはdefaultが使用されます)。

Queue Handler は、並列での実行可能なジョブ数を定義する特別なthreadCountパラメータを持っています。同じQueue Handlerを持つ他のジョブはQueueに入れられ、このHandlerで実行されている他のジョブが終了すると実行を開始します。プリインストールされたQueue Handlerの場合、threadCountには以下の値があります:

Queue handler

threadCount value

system

2

service

2

default

15

ジョブがキューにある間、ジョブとスケジュールに対して以下のアクションがサポートされます:

To view the full table, click the expand button in its top right corner

Action

Description

Status

Failure reason

Stop job

The job will not run

INTERRUPTED

'The job was stopped.'

Disable job

The job remains QUEUED until it tries starting

NOT_STARTED If the job is not enabled until that time

'The schedule with id=<> did not run because its job (id=<>) is disabled.'

Delete job

 The job will not run

INTERRUPTED

'The job was deleted.'

Disable schedule

Disabling the schedule after it has already placed the job in a queue does not affect the job. The job remains in the queue and runs as if nothing happens. Subsequent job run that was to be triggered by this disabled schedule will not start

-

-

Delete schedule

Deleting a schedule after it has already placed a job in a queue does not affect the job. The job remains in the queue and runs as if nothing happened

-

-

特定のキューにあるすべてのジョブはSYSADMIN.JobQueueテーブルで閲覧することができ、キューをクリーニングするにはSYSADMIN.cleanupJobQueueプロシージャを使用します。キューの合計サイズはMAX_JOB_QUEUE_SIZEオプションで管理されます (Default: 10000 )。

実行中のユーザージョブの数は、<max active plans value> - <system jobs thread count> - <service jobs thread count> - 1を超えることはできません。この制限に達した場合、ジョブは以下の理由でキューに入れられます:"システムの設定が間違っています。max-active-plansの値がすべてのQueue Handlerスレッドの合計+1以上になるようにJob Queueを設定してください。