Rate This Document
Findability
Accuracy
Completeness
Readability

Enabling OmniStream for SQL

This section describes how to start a Flink cluster and enable OmniStream in SQL scenarios.

  1. Access the flink_jm_8c32g container and start the Flink cluster.
    docker exec -it flink_jm_8c32g /bin/bash
    source /etc/profile
    cd /usr/local/flink-1.16.3/bin
    ./start-cluster.sh

    Each time you exit and access the container again, you need to run the source /etc/profile command to reload the environment variables. This ensures that the dependencies are properly detected when running tasks.

  2. Check whether the Job Manager and Task Manager are started successfully.
    1. Check the flink_jm_8c32g container for the StandaloneSessionClusterEntrypoint process.
      source /etc/profile
      jps

      If the StandaloneSessionClusterEntrypoint process exists, the Job Manager is started successfully.

    2. Access the flink_tm1_8c32g and flink_tm2_8c32g containers and check for the TaskManagerRunner process. The following commands use the flink_tm1_8c32g container as an example:
      docker exec -it flink_tm1_8c32g /bin/bash
      source /etc/profile
      jps

      If the TaskManagerRunner process exists, the Task Manager is started successfully.

  3. Start Nexmark in the flink_jm_8c32g container.
    docker exec -it flink_jm_8c32g /bin/bash
    source /etc/profile
    cd /usr/local/nexmark/bin
    ./setup_cluster.sh
  4. Access the flink_tm1_8c32g and flink_tm2_8c32g containers and check whether Nexmark is started successfully. The following commands use the flink_tm1_8c32g container as an example:
    docker exec -it flink_tm1_8c32g /bin/bash
    source /etc/profile
    jps
    exit

    If the CpuMetricSender process exists, Nexmark is started successfully.

  5. Execute the Nexmark test case Query0 in the flink_jm_8c32g container.
    1
    2
    3
    4
    5
    docker exec -it flink_jm_8c32g /bin/bash
    source /etc/profile
    cd /usr/local/nexmark/bin
    sh run_query.sh q0
    exit
    

    View the execution result. The expected result is that the test case runs successfully without any errors.

  6. View the latest .out log file of Flink in the container that hosts the Task Manager.
    1
    2
    docker exec -it flink_tm1_8c32g /bin/bash
    cd /usr/local/flink-1.16.3/log
    
    • If the log contains "Shared Memory Metric Manager Loading Succeed", the native SO library has been loaded.
    • If the log contains "welcome to native", OmniStream has been enabled successfully.