Running a job in application mode

Application mode runs a job in its own Flink cluster instead of your session cluster. A problem in one job, or in the session cluster, then does not affect your production jobs.

In session mode, all of your jobs share the resources of your session cluster. A failure of that cluster affects every one of those jobs. In application mode, Cloudera SQL Stream Builder (SSB) creates a dedicated Flink cluster for the job through the Flink Kubernetes Operator. The Flink cluster is deleted when the job stops.

  1. 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.
  2. Click the name of the job.
    The job opens in the SQL editor.
  3. Click Job Settings.
    The Job Settings panel opens, on the General tab.
  4. In Execution Mode, select APPLICATION.
  5. In Runtime Mode, select the runtime mode of the job.
    • STREAMING: The default streaming execution mode.
    • BATCH: Batch-style execution for bounded applications.
    • AUTOMATIC: The system decides based on the boundedness of the sources.
  6. Optional: Optional: On the Kubernetes Resources tab, set the resources of the job.
    Each job in application mode has its own JobManager and TaskManagers. Size them for the job. For more information, see Configuring job settings.
  7. From the Job Actions menu, click Save Job.
  8. Click the Execute job icon.
    The job runs in its own cluster.

You can also set Flink options for a job with SET statements in the same job, for example the state backend. This works in session mode and in application mode. For more information, see State backends.