Janitor の権限と入力ルール
このページでは、Janitor の各操作に必要な権限と、値を保存するときに Janitor が確認するルールを一覧にしています。エラーメッセージを調べるときや、チームのアクセス権限を計画するときに使ってください。
権限
Janitor は 2 つの権限を使います。管理者がポータルの role を通じて付与します。ポータルの role と権限を参照してください。
| 操作 | maintenance:read | maintenance:manage |
|---|---|---|
| job、実行、ステップの詳細、設定の表示 | はい | はい |
| Dry run による実行の確認 | はい | はい |
| job の作成、job の一括作成 | — | はい |
| job のスケジュールやオプションの変更 | — | はい |
| job の無効化・再有効化、job の削除 | — | はい |
| Run による実行の開始 | — | はい |
| Reset state | — | はい |
| Stop run | — | はい |
| 設定の変更 | — | はい |
| すべてのメンテナンスの一時停止・再開 | — | はい |
Dry run は実行を開始せず、何も変更しないため、maintenance:read だけで使えます。
ORPHAN CLEANUP に追加の承認はありません。maintenance:manage があれば誰でもオンにできます。
入力ルール
次の範囲外の値は、Janitor が拒否します。保持期間のルールは、設定と各 job の両方に同じように適用されます。
| フィールド | 場所 | 最小 | 最大 |
|---|---|---|---|
| Max concurrent runs | Settings → Concurrency | 1 | 100 |
| Max concurrent runs per catalog | Settings → Concurrency | 1 | Max concurrent runs の値 |
| Max manual runs | Settings → Concurrency | 1 | Max concurrent runs の値 |
| Max concurrents start | Settings → Concurrency | 1 | Max concurrent runs の値 |
| Schedule checker (s) | Settings → Schedule | 10 | 3600 |
| Query timeout (s) | Settings → Schedule | 30 | 3600 |
| Snapshot retention (days) | Settings と各 job | 7 | 365 |
| Orphan retention (days) | Settings と各 job | 7 | 365 |
たとえば Max concurrent runs が 5 の場合、残りの 3 つの上限は 1~5 の範囲で設定できます。
その他のルール:
- メンテナンスウィンドウを設定した場合、job のスケジュールの次回の実行はウィンドウ内である必要があります。ウィンドウは日付をまたいでもかまいません。たとえば
22:00~06:00です。 - Exclude table patterns は正規表現で、大文字と小文字を区別しません。
デフォルト値
| 設定 | デフォルト |
|---|---|
| Max concurrent runs | 1 |
| Max concurrents start | 1 |
| OPTIMIZE | オン |
| EXPIRE SNAPSHOTS | オン、保持期間 7 日 |
| ORPHAN CLEANUP | オフ、保持期間 7 日 |
メッセージ
エラー
次のいずれかが表示された場合、Janitor は変更を保存しません。
| メッセージ | 対処 |
|---|---|
max_concurrent_runs_per_catalog must not exceed max_concurrent_runs ({value}) | Max concurrent runs per catalog を下げるか、Max concurrent runs を上げてください。 |
max_manual_runs must not exceed max_concurrent_runs ({value}) | Max manual runs を下げるか、Max concurrent runs を上げてください。 |
max_jobs_started_per_tick must not exceed max_concurrent_runs ({value}) | Max concurrents start を下げるか、Max concurrent runs を上げてください。 |
Snapshot retention must be at least 7 days. Setting a shorter period may cause maintenance operations to behave unexpectedly. | 7 日以上を選んでください。 |
Orphan file retention must be at least 7 days. Setting a shorter period may cause maintenance operations to behave unexpectedly. | 7 日以上を選んでください。 |
The scheduled time derived from the cron expression falls outside the configured maintenance window ({start} – {end}). Please adjust the cron or contact your Platform Admin. | ウィンドウ内の時刻を選ぶか、管理者にウィンドウの変更を依頼してください。 |
警告
Janitor は変更を保存しますが、次の警告を表示します。
| メッセージ | 意味 |
|---|---|
Orphan file retention is shorter than snapshot retention. Files referenced by unexpired snapshots may be incorrectly removed. | 保持中の snapshot がまだ使っているファイルを、ORPHAN CLEANUP が削除する可能性があります。Orphan retention (days) を Snapshot retention (days) 以上にしてください。 |
実行のメッセージ
| メッセージ | 意味 |
|---|---|
Maintenance is globally paused | すべてのメンテナンスが一時停止されています。再開されるまで Run は拒否されます。 |
Run is not cancellable | 実行はすでに終わっているため、停止できません。 |
Cancelled by operator | 誰かが実行を停止したか、emergency の一時停止で実行が止まりました。 |
Cleared by operator | 誰かが job で Reset state を使いました。 |