Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Apache Flink Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-apache-flink-knowledge-patch-nevaberry-plugins)
---
name: apache-flink-knowledge-patch
description: Apache Flink
version: "2.3.0"
license: MIT
metadata:
author: Nevaberry
---
# Apache Flink compatibility guidance
Load this skill for Flink migrations, SQL and Table API work, state recovery,
deployment, observability, and Python or connector compatibility. It also covers
the Kubernetes Operator and Flink Agents. Use the topic references for complete
API removals, configuration defaults, fixes, examples, and product attribution.
| Reference | Topics |
| --- | --- |
| [Deployment, Scheduling, and Storage](references/deployment-scheduling-and-storage.md) | Application lifecycle, scheduling, filesystems, Kubernetes Operator, Agents declarations, archives |
| [Migration and Java APIs](references/migration-and-java-apis.md) | Configuration migration, removed APIs, serializers, source and sink implementations, Agents API migration |
| [Operations, Observability, and Security](references/operations-observability-and-security.md) | JDK mitigation, dependencies, REST, metrics, tracing, retention, Agents logs and retries |
| [Python and Connector Compatibility](references/python-and-connector-compatibility.md) | PyFlink, asynchronous functions, formats, runtime compatibility, Agents distributions and cross-language integration |
| [SQL, Table API, and Models](references/sql-table-and-models.md) | SQL semantics, joins, Materialized Tables, Process Table Functions, inference, vector search, Agents models and prompts |
| [State, Checkpoints, and Watermarks](references/state-checkpoints-and-watermarks.md) | Asynchronous state, ForSt, RocksDB, checkpoints, watermarks, Agents durable actions and memory |
## Breaking changes and deprecations
### Cluster configuration and submission
Flink removes the legacy `flink-conf.yaml` parser. Use the migration tool to
convert the file to standard YAML in `config.yaml`. Per-job deployment is removed;
SQL Gateway can submit SQL jobs in application mode. For Kubernetes application
submissions, replace `flink run-application` with `flink run -t kubernetes-application`.
`sql-client.sh` removes `-u` and `--update`. Put the update in a SQL file and submit
it with `sql-client.sh -f update.sql`. The migration reference lists the removed
state, shuffle, SQL, and serializer configuration keys.
### Java configuration, lifecycle, and serialization
Use `configuration.get(option)` and `configuration.set(option, value)` with a
`ConfigOption<T>` instead of accessors such as `getInteger()` and `setLong()`.
Direct execution environment setters such as `setRestartStrategy(...)` and
`setStateBackend(...)` were removed in favor of configuration options.
Override `open(OpenContext)` for `RichFunction` initialization.
`RuntimeContext.getExecutionConfig()` was removed; call `createSerializer(...)`,
`getGlobalJobParameters()`, or `isObjectReuseEnabled()` on the runtime context.
Implement `TypeInformation.createSerializer(SerializerConfig)` and
`TypeSerializerSnapshot.resolveSchemaCompatibility(TypeSerializerSnapshot<T> oldSnapshot)`.
Built-in serializers for `Map`, `List`, and `Set` are enabled by default, and Kryo
moves to 5.6. Check that saved state from 1.x restores in 2.x before relying on it
for an upgrade. Sink V2 uses `Sink.createWriter(WriterInitContext)`; the old
`Sink.InitContext` overload, `StatefulSink`, and `TwoPhaseCommittingSink` are removed.
Flink 2.0 requires at least Java 11, defaults to and recommends Java 17 for Docker
images and source builds, officially supports Java 21, and ends Java 8 support.
DataStream API V2 is experimental when choosing an API for a new job.
### SQL types and multi-join state
Nested `ROW` types honor field nullability, including casts. Update queries that
relied on discarded constraints, or set `table.legacy-nested-row-nullability` to
`true` to restore the previous behavior. `TIME(p)` casts honor precision from 0 to
3; invalid strings such as `'25:00:00'` raise a runtime exception. Casts between
`BINARY(n)` and `VARBINARY(n)` use the target type's declared length.
`StreamingMultiJoinOperator` changes state management from upsert keys to unique
keys, a breaking change for upgrades of jobs using the experimental 2.1 operator.
### Sink key conflicts
Planning fails by default if the query's upsert key differs from the sink's
primary key. Select `ON CONFLICT DO NOTHING`, `ON CONFLICT DO ERROR`, or
`ON CONFLICT DO DEDUPLICATE` explicitly. `DO ERROR` makes a conflict fail the
running job. To materialize and deduplicate updates, put the clause after the query:
```sql
INSERT INTO target_table
SELECT * FROM source
ON CONFLICT DO DEDUPLICATE;
```
### Checkpoint and watermark API migration
`CheckpointConfig` removes `setCheckpointStorage(...)`,
`enableExternalizedCheckpoints(...)`, and `setExternalizedCheckpointCleanup(...)`.
Use typed checkpointing options for storage and externalized checkpoint retention.
`WatermarkGeneratorSupplier.Context.getInputActivityClock()` exposes the input
activity clock; the two-argument `WatermarksWithIdleness(generator, timeout)`
constructor is removed.
### Flink Agents API and memory migration
Flink Agents 0.3.0 is a preview release. Its APIs and configuration options are
experimental and may change incompatibly in later releases.
In Java, replace `@Action(listenEvents = {InputEvent.class})` with
`@Action(listenEventTypes = {InputEvent.EVENT_TYPE})`; in Python, replace
`@action(InputEvent)` with `@action(InputEvent.EVENT_TYPE)`.
Replace Java `chat(messages, params)` with `chat(messages, promptArgs, modelParams)`
and Python `chat(messages, **kwargs)` with `chat(messages, prompt_args, **kwargs)`.
The connection-layer parameter is named `modelParams`. Set an explicit model name
in chat model setups that relied on the default. Configure the action state store
backend explicitly; Apache Fluss is supported alongside Kafka. Migrate existing
long-term memory configurations to Mem0 in both Python and Java.
## JDK mitigation
On x86-64 CPUs with AVX-512 VBMI, upgrade Java 17.0.6–17.0.21 to 17.0.21.1 or later
and Java 21–21.0.13 to 21.0.13.1 or later for CVE-2026-114938. Until upgrading,
append `-XX:-UseBASE64Intrinsics` to `env.java.opts.all`, preserving existing JVM
options; the flag requires Java 11 or later. Docker accepts this through
`FLINK_PROPERTIES`, and the Kubernetes Operator through `spec.flinkConfiguration`
in the `FlinkDeployment`. The security reference includes the other affected JDK
lines, rebuilt image tags, image-cache behavior, and older operator Helm settings.
## Asynchronous state and checkpoint recovery
Remote storage can be the primary store for working state. Enable asynchronous
state for supported SQL operators, including joins, window aggregations, and group
aggregations; Flink switches supported operators automatically:
```sql
SET 'table.exec.async-state.enabled' = 'true';
```
DataStream `process()` operators can use asynchronous state. The keyed-state SQL
connector reads keyed state from checkpoints or savepoints for inspection and
migration validation. RocksDB recovery can use `s5cmd` to download state from S3.
The Adaptive Scheduler honors `execution.state-recovery.from-local`, default
`false`. Set it to `true` for task-local recovery and remove
`state.backend.local-recovery`. For checkpoints before restored channel state is
fully consumed, enable both options below. Both default to `false`; checkpointing
during recovery requires downstream output recovery.
```yaml
execution.checkpointing.unaligned.recover-output-on-downstream.enabled: true
execution.checkpointing.unaligned.during-recovery.enabled: true
```
Sinks with an added topology are excluded from unaligned checkpointing.
Backpressured or blocked time is excluded from a subtask's watermark idleness
timeout. `pipeline.watermark-alignment.buffer-size` defaults to `3`, delaying
alignment by three update intervals so sources pause later during backlog
processing. This can increase windowed and temporal operator state; set it to `0`
to restore Flink 2.2 behavior.
## SQL models, joins, and streaming functions
Use `ML_PREDICT` to apply a declared model to a stream; built-in and custom model
providers are supported. In the Table API, resolve a model with `fromModel(...)`,
select input columns with `ColumnList.of(...)`, and request asynchronous prediction
with `"async" = "true"` in the options map:
```java
Table predictions = tEnv.fromModel("my_model")
.predict(inputTable, ColumnList.of("text"), Map.of("async", "true"));
```
`VECTOR_SEARCH` performs streaming similarity search. Use a lateral call for a
vector from each input row, `DESCRIPTOR` for the indexed column, and `TOP_K` for
the result limit per search. A constant query vector can be passed as an array to
`COLUMN_TO_QUERY` in a direct `FROM` call. `VARIANT` preserves nested array, map
with string keys, and scalar types; use `PARSE_JSON` or `TRY_PARSE_JSON` on JSON text.
Eligible streaming joins can use delta joins, enabled by default. Enable multi-join
for cascaded streaming `INNER` and `LEFT` joins sharing at least one key:
```sql
SET 'table.optimizer.multi-join.enabled' = 'true';
```
A `ProcessTableFunction<T>` can emit rows from zero or more table inputs and access
managed state, event time, timers, and table changelogs. Process Table Functions
can handle late records that were previously dropped; `ORDER BY` on a partitioned
table argument delivers temporal order within each partition. The state-access
improvements and broadcast state proposed in FLIP-565 are planned for a later release.
`FROM_CHANGELOG` converts append-only rows carrying an operation column into a
dynamic table, with `op_mapping` for custom CDC codes. `TO_CHANGELOG` converts a
dynamic table, including an upsert or retract stream, to append-only change records.
Only basic conversions are covered in 2.3; `PARTITION BY`, `invalid_op_handling`,
and `produces_full_deletes` are planned for later releases.
## Materialized Tables
Paimon is the only supported Materialized Table catalog in Flink 2.0. Refresh jobs
can run on Kubernetes and YARN. `FRESHNESS` is optional in
`CREATE MATERIALIZED TABLE` and `CREATE OR ALTER MATERIALIZED TABLE`;
`MaterializedTableEnricher` can supply custom defaults such as freshness inferred
from upstream tables.
Place explicit columns, optional watermarks, and primary keys before the `AS`
query. `ALTER MATERIALIZED TABLE` can add, modify, or drop metadata and computed
columns, or rename the table. `START_MODE` defaults to `FROM_BEGINNING`; the SQL
reference details later start positions and modes that reuse previous offsets.
A defining-query change can require full reprocessing if the optimizer produces
an entirely new physical plan. Compatible changes such as adding a nullable column
can avoid replaying historical data.
## Deployment and operations
The native `flink-s3-fs-native` filesystem is experimental in 2.3. Install it in
the plugins directory for `s3://` and `s3a://` access without Hadoop libraries;
it supports exactly-once streaming sinks and IAM Roles for Service Accounts.
Adaptive downstream channel selection is opt-in and applies to edges using
`RebalancePartitioner` or `RescalePartitioner`; it chooses the least-loaded channel
among those examined, with a default maximum traversal of four channels.
Applications group jobs. During HA recovery, Flink automatically re-executes
incomplete session-mode applications and matches jobs by name when recovering an
application with multiple batch jobs. The deployment reference includes application
REST endpoints, archive defaults, and exceptional-termination behavior.
Set `web.adaptive-scheduler.rescale-history.size` to a positive per-job count for
rescale history; `0` disables it. OpenTelemetry gRPC exports support `gzip`
compression with default `none`, and batch splitting with default `0` disabled.
The operations reference gives the option names, metrics, traces, and retention controls.
## Python and connector selection
PyFlink adds Python 3.12 support and drops Python 3.8 support. Implement
`AsyncFunction.async_invoke` as a coroutine returning a list of output records;
override `timeout` for fallback records and use `AsyncDataStream.unordered_wait`
to emit results as requests complete. The Python reference includes the full example.
Use the connector release that lists the Flink runtime minor. Connectors built on
`SourceFunction`, `SinkFunction`, or Sink V1 need a Flink 2-compatible release.
The compatibility reference preserves connector, CDC, Agents, Stateful Functions,
and Flink ML runtime mappings, plus Agents cross-language actions and Agent Skills.