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. Select Session on the Console page.
  3. 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 window to configure a session property.
    Example:
    SET state.backend=rocksdb
  3. Click Execute.