public class CheckpointHandlers extends Object
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 returned TriggerId should be used to poll the
status of the checkpoint until it is finished.
A checkpoint is triggered by sending an HTTP POST request to /jobs/:jobid/checkpoints. The HTTP request may contain a JSON body to specify a customized
TriggerId and a CheckpointType, e.g.,
{ "triggerId": "7d273f5a62eb4730b9dea8e833733c1e", "checkpointType": "FULL" }
If the body is omitted, or the field checkpointType is null, the default
checkpointType of CheckpointType.CONFIGURED will 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 GET request 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"
}
}
| Modifier and Type | Class and Description |
|---|---|
static class |
CheckpointHandlers.CheckpointStatusHandler
HTTP handler to query for the status of the checkpoint.
|
static class |
CheckpointHandlers.CheckpointTriggerHandler
Handler for the checkpoint trigger operation.
|
| Constructor and Description |
|---|
CheckpointHandlers() |
Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.