Describe, Update and Delete Confluent Manager for Apache Flink Applications

There are different ways to interact with a Confluent Manager for Apache Flink Application resource.

Describe an application

You can check the current state of an Application by fetching the resource. The following example shows how to use the REST API or the Confluent CLI to describe an application:

The following example show how to use the REST API to describe an application:

curl -v -H "Content-Type: application/json" \
http://cmf:8080/cmf/api/v1/environments/env-1/applications/app-1

Update an application

You can make changes to an application by updating it. Common operations are rescaling, suspending and resuming an application.

  • To scale an application up or down, you have to adjust the spec.job.parallelism field.
  • You can suspend an application by setting the spec.job.state field to suspended and it is resumed by setting the field to running.
  • You can resume an application by setting the spec.job.state field to running.

CMF provides Application Instances to track application updates. Each update results in a new application instance.

The following example shows how to update an application with the REST API. The example uses a POST request to update the resource with an adjusted resource file app-1.json:

curl -v -H "Content-Type: application/json" \
-X POST http://cmf:8080/cmf/api/v1/environments/env-1/applications \
-d @/path/to/app-1.json

Delete an application

You can delete an application by deleting the application resource using the REST API or the Confluent CLI. This will also delete the corresponding Flink cluster.

The following example shows how you can delete a statement with the REST API:

curl -v -H "Content-Type: application/json" \
-X DELETE http://cmf:8080/cmf/api/v1/environments/env-1/applications/app-1

Inspect an application with the Flink WebUI

Apache Flink provides a WebUI that you can use to inspect a Flink job. By default, this WebUI is not accessible, but the Confluent CLI features a command to port-forward requests to the Flink WebUI, and make it available locally.

The following command starts port forwarding, which exposes the Flink WebUI on port 8088:

confluent --environment env-1 --port 8088 flink application web-ui-forward app-1

You can access the WebUI of the application’s Flink cluster with a browser at http://localhost:8088.