Managing session for SQL jobs

By default, the SQL Stream jobs are running in a session cluster. This means that multiple Flink jobs run in the same YARN session sharing the cluster, allocated resources, the Job Manager and Task Managers. The session starts when you open the Streaming SQL Console. You can reset the session, and set the properties of the session using the Streaming SQL Console.

Resetting a session

When you reset your session, every configuration, temporary table and view, default database and catalog will be lost.

  1. Navigate to the Streaming SQL Console.
    1. Go to your cluster in Cloudera Manager.
    2. Click on SQL Stream Builder from the list of Services.
    3. Click on the SQLStreamBuilder Console.
    The Streaming SQL Console opens in a new window.
  2. Click Create Job or select a previous job on the Getting Started page.You are redirected to the Console page.

    You are redirected to the Console page.

  3. Select Session.
  4. Click Reset.

Configuring properties for a session

You can configure the session properties using the SET statement in the SQL window.

  1. Navigate to the Streaming SQL Console.
    1. Go to your cluster in Cloudera Manager.
    2. Click on SQL Stream Builder from the list of Services.
    3. Click on the SQLStreamBuilder Console.
    The Streaming SQL Console opens in a new window.
  2. Use the SET statement in the SQL Editor to configure a session property.
    Example:
    SET state.backend=rocksdb

    You can review all of the configurable parameters on the Properties tab of the Session window.

  3. Click Execute.