Stopping the Flink job

You can stop the Apache Flink job for Case either from the Flink web console or from the command line.

Before you begin

  1. Make sure that you have configured your tools to work with your Kubernetes cluster environment.
  2. Create an OpenShift route or Kubernetes Ingress as instructed in Giving access to the Flink interface.

From the Flink console

Procedure

  1. From the Running Jobs menu, select dba/bai-icm.

    This job opens in a new page.

  2. Click Cancel to stop the job.

From the command line

About this task

Alternatively, you can stop the Flink job by running curl commands.

Procedure

  1. Log into the OCP cluster and switch to the project where CP4BA is deployed:
    oc login https://<cluster-ip>:<port> -u <cluster-admin> -p <password>
    oc project <cp4ba-namespace>
    
  2. Retrieve the Flink JobManager name:
    JOBMANAGER=$(oc get pods | grep insights-engine-flink | head -1 | awk '{print $1})
  3. Retrieve the Case Flink job ID:
    JOB_ID=$(oc exec -it -c flink-main-container $JOBMANAGER – flink list | grep bai-icm | awk '{print $4}')
  4. Cancel the Case Flink job using the job ID:
    oc exec -it $JOBMANAGER -- flink cancel $JOB_ID