Implementation:ArroyoSystems Arroyo Checkpoint Api Types
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Streaming, Checkpointing, API |
| Last Updated | 2026-02-08 08:00 GMT |
Overview
Defines the API-level types for representing checkpoint metadata, checkpoint event spans, and checkpoint lifecycle phases used by the Arroyo REST API and controller.
Description
This module provides serializable types for checkpoint reporting in the Arroyo UI and API:
- Checkpoint -- top-level checkpoint info with epoch, backend name, start/finish times, and event spans.
- CheckpointEventSpan -- a time-bounded event within a checkpoint (start_time, finish_time, event name, description).
- SubtaskCheckpointGroup -- per-subtask checkpoint data including bytes written and event spans.
- OperatorCheckpointGroup -- per-operator checkpoint data aggregating subtask groups with metadata write timing.
- JobCheckpointEventType -- enum of checkpoint lifecycle phases: Checkpointing, CheckpointingOperators, WritingMetadata, Compacting, Committing.
- JobCheckpointSpan -- a timed span for a checkpoint phase with now() constructor and finish() method using SystemTime.
Usage
Use these types when building checkpoint detail views in the API, or when the controller needs to track and report checkpoint progress to the frontend.
Code Reference
Source Location
- Repository: ArroyoSystems_Arroyo
- File: crates/arroyo-rpc/src/api_types/checkpoints.rs
Signature
pub struct Checkpoint {
pub epoch: u32,
pub backend: String,
pub start_time: u64,
pub finish_time: Option<u64>,
pub events: Vec<CheckpointEventSpan>,
}
pub struct CheckpointEventSpan {
pub start_time: u64,
pub finish_time: u64,
pub event: String,
pub description: String,
}
pub enum JobCheckpointEventType {
Checkpointing, CheckpointingOperators, WritingMetadata, Compacting, Committing,
}
pub struct JobCheckpointSpan {
pub event: JobCheckpointEventType,
pub start_time: u64,
pub finish_time: Option<u64>,
}
impl JobCheckpointSpan {
pub fn now(event: JobCheckpointEventType) -> Self;
pub fn finish(&mut self);
}
Import
use arroyo_rpc::api_types::checkpoints::{
Checkpoint, CheckpointEventSpan, OperatorCheckpointGroup,
JobCheckpointEventType, JobCheckpointSpan,
};
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| epoch | u32 | Yes | Checkpoint epoch number |
| event | JobCheckpointEventType | Yes | The phase of the checkpoint lifecycle |
Outputs
| Name | Type | Description |
|---|---|---|
| JobCheckpointSpan | JobCheckpointSpan | A timed span recording when a checkpoint phase started and finished |
| CheckpointEventSpan | CheckpointEventSpan | API-level representation with event name and description |
Usage Examples
use arroyo_rpc::api_types::checkpoints::{JobCheckpointEventType, JobCheckpointSpan};
// Start tracking a checkpoint phase
let mut span = JobCheckpointSpan::now(JobCheckpointEventType::CheckpointingOperators);
// ... perform checkpointing work ...
// Mark the phase as complete
span.finish();
// Convert to API representation
let api_span: CheckpointEventSpan = span.into();
Related Pages
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment