Stopping the Flink job

You can stop the Apache Flink job for Case either 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