Configuring job settings
Job settings control how a job runs: its execution mode, parallelism, checkpointing, restart strategy, and Kubernetes resources. Each job has its own settings, which you save with the job.
Changing the settings of a job
- In the Streaming SQL Console, click Projects
in the left navigation pane, and click the name of your project.
The project opens, with the Explorer panel on the left. To open the Streaming SQL Console, see Accessing Cloudera SQL Stream Builder.
- Click the name of the job.
The job opens in the SQL editor.
- Click Job Settings.
The Job Settings panel opens. A marker indicates each value that you changed since the last save.
- Change the settings on the tabs, which are described in the following sections.
- From the Job Actions menu, click Save Job.
General tab
| Setting | Description |
|---|---|
| Execution Mode | SESSION runs the job in your session cluster. APPLICATION runs the job in its own Flink cluster. For more information, see Running a job in application mode and Configuring the session. |
| Runtime Mode | STREAMING, BATCH, or AUTOMATIC. You can change it only for jobs in application mode. |
| Job Parallelism (threads) | The number of parallel instances of the job. Each instance uses a slot. A value of 1 uses the fewest resources. If the source supports parallel reads, a higher value raises the maximum throughput. For Kafka, a value equal to the number of topic partitions is a good starting point. |
| Restore From Savepoint | Restores the state of the job from a savepoint when the job starts, and takes a savepoint when the job stops. For more information, see Managing savepoints for SQL jobs. |
| Savepoint Directory | The directory for savepoints. Displayed when Restore From Savepoint is on. |
| Enable Checkpointing | Turns on periodic checkpoints for fault tolerance. |
| Checkpoint Directory | The directory for checkpoints. |
| Checkpoint Mode | At Least Once or Exactly Once. |
| Checkpoint Interval (ms) | The time between checkpoint attempts. |
| Checkpoint Timeout (ms) | The maximum time that a checkpoint can take. |
| Tolerable Checkpoint Failures | The number of checkpoint failures after which the job fails. |
| Failure Restart Strategy | Enable Auto Recovery restarts a failed job with an increasing delay. Disable Auto Recovery does not restart a failed job. |
The checkpoint settings and the restart strategy are displayed after you turn on
Enable Checkpointing. Next to the directory fields, Set
global values opens the defaults that your Cloudera SQL Stream Builder (SSB) administrator sets for
all jobs. The default checkpoint and savepoint directories are in the bucket that is bound
to the default purpose of the engine instance. For more information, see Preparing storage for Cloudera Streaming Analytics.
A checkpoint or savepoint directory that you set must be in a bucket that is bound to the Cloudera Streaming Analytics engine instance. Jobs get the storage credentials of the bound buckets only. A path in another bucket fails with an access error.
Kubernetes Resources tab
The Kubernetes Settings of the job have the following fields:
- Deployment Mode
- Restart Failed Job
- Job Manager Replicas
- Job Manager Resource Config and Task Manager Resource Config, each with CPU Request, CPU Limit, Memory Request, Memory Limit, and Ephemeral Storage
If you leave a field empty, the job uses the default that your SSB administrator sets. The fields display the defaults as placeholders.
For the values of Deployment Mode and Restart Failed Job, and the other defaults, see Job settings reference.
Autoscaler tab
Tune how the Flink autoscaler scales the job, in the Autoscaler Settings: Enabled, Busy Time Aggregator, Target Utilization, Target Utilization Boundary, Metrics Window, Scale Up Max Factor, Scale Down Max Factor, Vertex Max Parallelism, and Vertex Min Parallelism.
The autoscaler changes the parallelism of the job. It does not add nodes to the compute cluster, because automatic scaling of the compute cluster is not available in this release. Leave enough capacity for the highest parallelism that you allow. For more information, see Cluster sizing and Unsupported features.
In session mode, the autoscaler settings of the first job that runs in the session define the session cluster. SSB ignores the autoscaler settings of later jobs.
Notifications tab
The Notifications tab is not available in this release.
Logging tab
Set a log configuration for the job, under Custom Log Configuration. For more information, see Configuring custom job logging.
For all settings with their defaults and valid values, see Job settings reference.
