[FLINK-40282][docs] Expand and correct the concepts Glossary - #28863
[FLINK-40282][docs] Expand and correct the concepts Glossary#28863nicusX wants to merge 1 commit into
Conversation
alpinegizmo
left a comment
There was a problem hiding this comment.
There are a few points where I either disagree, or think some additional clarification is needed.
| Checkpoints are triggered automatically and periodically while the Job is running, and are used to | ||
| recover from failures such as a TaskManager crash or a network problem: the Job restarts from the | ||
| latest completed Checkpoint. They are designed for low overhead and run mostly asynchronously, | ||
| without blocking record processing, apart from the short pause each Sub-Task takes to snapshot its |
There was a problem hiding this comment.
This characterization (the short pause ... to snapshot its state) is somewhat misleading, I think.
The synchronous phase of checkpointing a sub-task (during which record processing is blocked) takes care of some quick bookkeeping, plus snapshotting all non-keyed (operator) state and all on-heap timers, regardless of the state backend. Then the asynchronous phase takes care of snapshotting off-heap timers, keyed state, and in-flight buffers (for unaligned checkpoints). So the pause might not be short, but is less than the time required to snapshot all of a sub-task's state.
| with a variant of the Chandy-Lamport algorithm and written to [Checkpoint | ||
| Storage](#checkpoint-storage). | ||
|
|
||
| A Checkpoint contains the [State](#managed-state) of all stateful [Operators](#operator), but also |
There was a problem hiding this comment.
This makes it sound like kafka offsets, sink transaction metadata, etc aren't managed by Flink, but they are. They aren't keyed state, and they don't live in the state backend, but they are managed as operator state.
|
|
||
| #### Checkpoint Storage | ||
|
|
||
| The durable location where the [State Backend](#state-backend) writes the snapshot it takes during a |
There was a problem hiding this comment.
Checkpoints include more than just the state managed by the state backend. There's also the so-called checkpoint metadata, which includes non-keyed state being managed by Flink.
|
|
||
| Managed State describes application state which has been registered with the framework. For | ||
| Managed State describes Application State which has been registered with the framework. For | ||
| Managed State, Apache Flink will take care about persistence and rescaling among other things. |
There was a problem hiding this comment.
Managed state includes both keyed state and non-keyed state (also known as operator state).
|
|
||
| *Logical Partitioning* is how records and State are divided in the [Logical | ||
| Graph](#logical-graph) and the [Job Graph](#job-graph), in order to implement the semantics of an | ||
| operation. A `GROUP BY` in SQL or a `keyBy()` in the DataStream API, for example, requires the data to |
There was a problem hiding this comment.
Perhaps expand to say
A JOIN or GROUP BY in SQL, or a keyBy in ...
| When a Job is *stopped with a Savepoint*, every [Sub-Task](#sub-task) stops right after its State has | ||
| been snapshotted, which guarantees that no record is reprocessed when the Job is resumed. |
There was a problem hiding this comment.
"which guarantees that no record is reprocessed when the Job is resumed" -- nope, there is no such guarantee (unless something has recently changed that I'm unaware of).
| When a Job is *stopped with a Savepoint*, every [Sub-Task](#sub-task) stops right after its State has | ||
| been snapshotted, which guarantees that no record is reprocessed when the Job is resumed. | ||
|
|
||
| See [Checkpoints vs. Savepoints]({{< ref "docs/ops/state/checkpoints_vs_savepoints" >}}) for a |
There was a problem hiding this comment.
Savepoints are similar to checkpoints. See ...
| [state](#managed-state) is stored on each TaskManager (Java Heap of TaskManager or (embedded) | ||
| RocksDB). | ||
| For stream processing programs, the State Backend of a [Flink Job](#flink-job) holds the | ||
| [State](#managed-state) that the Job is actively working with, local to each |
There was a problem hiding this comment.
the state backend only holds the keyed state, not all of the managed state
| "Vertex ID" and generated from a [UID](#uid). | ||
| It is commonly exposed in logs, the REST API or metrics, and most importantly is how | ||
| operators are identified within [savepoints]({{< ref "docs/ops/state/savepoints" >}}). | ||
| Operators are identified within [Savepoints]({{< ref "docs/ops/state/savepoints" >}}). |
There was a problem hiding this comment.
Not just savepoints, but also checkpoints. I suggest introducing the term "snapshots" for situations like this.
|
|
||
| Watermarks are emitted at the Sources, based on a `WatermarkStrategy`. Each Source [Sub-Task](#sub-task) generates its own Watermarks independently. Event time advances independently in each [Physical Partition](#partition). When a Watermark reaches a Sub-Task, the Sub-Task advances its internal event-time clock and emits a new Watermark to its downstream Sub-Tasks. | ||
| A Sub-Task with several input Channels takes the *minimum* of the event times of its | ||
| inputs, which means a single lagging input holds back event time for the whole downstream graph. |
There was a problem hiding this comment.
... of its active inputs ...
What is the purpose of the change
The current Flink Glossary doc page has gaps, some inconsistencies, and ambiguities which may be confusing for new Flink users. It also focus on DataStream API exclusively.
This PR expands and fixes the Glossary page.
Brief change log
New entries (10)
coverage in the glossary
Corrected definitions
STREAMINGandBATCHmodes#Recordand#Function).Expanded entries
Flink Job, Logical Graph, Operator (adds Source/Sink Operators and a note that the docs use
"Operator" loosely for Task/Sub-Task), Operator Chain, Function (Python, UDF, PTF), Flink Cluster,
Flink JobManager, Flink JobMaster, Flink TaskManager, Sub-Task
Consistency
and lowercase in generic English use.
Flinkprefix (5 entries were misplaced). The pagesets
bookToc: false, so ordering is the only way to locate a term.JobGraph --> Job Graph, UID hash --> UID Hash
#jobgraph-->#job-graph, which is not referenced outside of this pageVerifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving): NoDocumentation
Was generative AI tooling used to co-author this PR?