...
With the efforts in FLIP-24 and FLIP-91, Flink SQL client supports submitting queries but lacks further support for their lifecycles afterward which is crucial for streaming use cases. That means Flink SQL client users have to turn to other clients (e.g. CLI) or APIs (e.g. REST API) to manage the queries, like triggering savepoints or canceling queries, which makes the user experience of SQL client incomplete.
...
Since CANCEL QUERY
doesn’t trigger a savepoint, the result would be a simple OK, like the one returned by DDL.
...
CREATE SAVEPOINT
TRIGGER CREATE SAVEPOINT
statements trigger savepoints for the specified query, which is similar to `flink savepoint` in CLI.
Code Block | ||||
---|---|---|---|---|
| ||||
TRICREATE SAVEPOINT <query_id> |
The result would the savepoint path.
...
- QUERY (new)
- QUERIES (new)
- STOP (new)
- CANCEL (new)
- SAVEPOINT (already reserved)SAVEPOINTS (new)
Rejected Alternatives
An alternative approach to query monitoring is that the SQL client or gateway book keeps every query and is responsible for updating the query status through polling or callbacks. In that way, the query status is better maintained, and we wouldn’t lose track of the queries in cases that they’re cleaned up by the cluster or the cluster is unavailable.
...