Class CheckpointHandlers
- java.lang.Object
-
- org.apache.flink.runtime.rest.handler.job.checkpoints.CheckpointHandlers
-
public class CheckpointHandlers extends Object
HTTP handlers for asynchronous triggering of checkpoints.Drawing checkpoints is a potentially long-running operation. To avoid blocking HTTP connections, checkpoints must be drawn in two steps. First, an HTTP request is issued to trigger the checkpoint asynchronously. The request will be assigned a
TriggerId, which is returned in the response body. Next, the returnedTriggerIdshould be used to poll the status of the checkpoint until it is finished.A checkpoint is triggered by sending an HTTP
POSTrequest to/jobs/:jobid/checkpoints. The HTTP request may contain a JSON body to specify a customizedTriggerIdand aCheckpointType, e.g.,{ "triggerId": "7d273f5a62eb4730b9dea8e833733c1e", "checkpointType": "FULL" }If the body is omitted, or the field
checkpointTypeisnull, the default checkpointType ofCheckpointType.CONFIGUREDwill be used. As written above, the response will contain a request id, e.g.,{ "request-id": "7d273f5a62eb4730b9dea8e833733c1e" }To poll for the status of an ongoing checkpoint, an HTTP
GETrequest is issued to/jobs/:jobid/checkpoints/:checkpointtriggerid. If the specified checkpoint is still ongoing, the response will be{ "status": { "id": "IN_PROGRESS" } }If the specified checkpoints has completed, the status id will transition to
COMPLETED, and the response will additionally contain information about the savepoint, such as the location:{ "status": { "id": "COMPLETED" }, "operation": { "checkpointId": "123" } }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCheckpointHandlers.CheckpointStatusHandlerHTTP handler to query for the status of the checkpoint.static classCheckpointHandlers.CheckpointTriggerHandlerHandler for the checkpoint trigger operation.
-
Constructor Summary
Constructors Constructor Description CheckpointHandlers()
-