Skip to content
Back to skills

Apache Flink Knowledge Patch

ASecurity

Apache Flink

  • 25 stars
  • 0 votes
  • 0 copies
  • 12 views
  • Added September 5, 2026
developmentpythongojavasqldockerkubernetesapibackendsecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill apache-flink-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Apache Flink Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Apache Flink Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-apache-flink-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-apache-flink-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: apache-flink-knowledge-patch
description: Apache Flink
version: "2.3.0"
license: MIT
metadata:
  author: Nevaberry
---


# Apache Flink knowledge patch

Load this skill when migrating Flink APIs or configuration, developing SQL and
Table API jobs, deploying clusters, investigating state recovery, or working
with connectors, PyFlink, the Kubernetes Operator, or Flink Agents.
Use the topic references for complete details, examples, and release attribution.

## Reference index

| Reference | Topics |
| --- | --- |
| [Migration, APIs, and Configuration](references/migration-apis-and-configuration.md) | Removed APIs and settings, serialization, DataStream APIs, Flink Agents API migration and YAML declarations |
| [Connectors, Formats, and Python](references/connectors-formats-and-python.md) | Source and sink APIs, formats, PyFlink async functions, Flink Agents integrations and interoperability, artifact compatibility |
| [Observability, Security, and Operations](references/observability-security-and-operations.md) | JDK mitigation, logging, metrics, tracing, REST changes, Web UI, HistoryServer, operator and agent telemetry |
| [Runtime, Scheduling, and Deployment](references/runtime-scheduling-and-deployment.md) | Java, applications, Kubernetes and YARN, scheduling, watermarks, operator lifecycle, Flink Agents distribution, archives |
| [SQL, Table API, and Planning](references/sql-table-and-planning.md) | Materialized Tables, sink conflicts, Process Table Functions, inference, vector search, joins, types, views, compiled plans |
| [State, Checkpoints, and Storage](references/state-checkpoints-and-storage.md) | Async state, ForSt, RocksDB, recovery, checkpoints, sink commits, Flink Agents state and memory, native S3 |

## Breaking changes and deprecations

### Configuration and submission

For Flink 2 migration, convert legacy `flink-conf.yaml` to standard YAML in
`config.yaml` using the migration tool. The legacy parser is removed.
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.

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 removes `-u` and `--update`; put updates in a file and submit with
`sql-client.sh -f update.sql`.

### Java, serialization, and connector APIs

Flink 2 requires Java 11 at minimum; Java 17 is the default and recommended
version for Docker images and source builds. Java 21 is officially supported,
and Java 8 support ends.

Override `open(OpenContext)` for rich-function initialization. With
`RuntimeContext.getExecutionConfig()` removed, use the runtime context's
`createSerializer(...)`, `getGlobalJobParameters()`, or `isObjectReuseEnabled()`.
Implement `TypeInformation.createSerializer(SerializerConfig)` and compare
serializer snapshots with
`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. Legacy class and Kryo serializer registration methods
and their configuration keys are removed.

Use a key selector after removal of positional and named-field `keyBy`
overloads. Replace windowed join and co-group `with(...)` calls with `apply(...)`.
Sink V2 uses `Sink.createWriter(WriterInitContext)`. The old `Sink.InitContext`
overload and the `StatefulSink` and `TwoPhaseCommittingSink` interfaces are removed.
Connectors built on `SourceFunction`, `SinkFunction`, or Sink V1 need a
Flink 2-compatible release. See the references for all removed signatures.

### SQL semantics and state compatibility

`StreamingMultiJoinOperator` changes state management from upsert keys to unique
keys, a breaking change for upgrades using the experimental 2.1 operator.
Nested `ROW` types now honor `NOT NULL`, including in 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)` honor the target length.

Planning fails by default if the query's upsert key differs from the sink's
primary key. Explicitly select `ON CONFLICT DO NOTHING`, `ON CONFLICT DO ERROR`,
or `ON CONFLICT DO DEDUPLICATE`. To materialize and deduplicate updates, put
`ON CONFLICT DO DEDUPLICATE` after the query in `INSERT INTO`:

```sql
INSERT INTO target_table
SELECT * FROM source
ON CONFLICT DO DEDUPLICATE;
```

`DO ERROR` makes a conflict fail the running job.

### Flink Agents API and configuration 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 now 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 long-term memory configurations to Mem0, which replaces
the previous vector-store-based implementation in Python and Java.

## State and recovery quick reference

Flink can use remote storage as the primary store for working state. Enable
asynchronous state access for supported SQL joins, window aggregations, and group
aggregations; supported operators switch automatically when enabled:

```sql
SET 'table.exec.async-state.enabled' = 'true';
```

DataStream `process()` operators also support asynchronous state access.
DataStream API V2 is experimental; it includes partitioning, process functions,
state, timers, watermarks, and window and join extensions.

Adaptive Scheduler task-local recovery is opt-in. Set
`execution.state-recovery.from-local: true` and remove `state.backend.local-recovery`.
The new setting defaults to `false`. RocksDB recovery can use `s5cmd` to download
state files from S3. The keyed-state SQL connector reads keyed state from
checkpoints or savepoints for inspection and migration validation.

To checkpoint before restored channel state is fully consumed, enable both:

```yaml
execution.checkpointing.unaligned.recover-output-on-downstream.enabled: true
execution.checkpointing.unaligned.during-recovery.enabled: true
```

Both default to `false`; checkpointing during recovery requires downstream
output recovery. Sinks with an added topology are excluded from unaligned
checkpointing when unaligned checkpoints are enabled.

## SQL and Table API quick reference

### Materialized Tables

Materialized Tables support schema and query updates, and refresh jobs can run
on Kubernetes and YARN. In Flink 2.0, Paimon is the only supported catalog.
`FRESHNESS` is optional in `CREATE MATERIALIZED TABLE` and
`CREATE OR ALTER MATERIALIZED TABLE`; `MaterializedTableEnricher` can supply defaults.
Use `DISTRIBUTED BY` or `DISTRIBUTED INTO` for bucketing and
`SHOW MATERIALIZED TABLES;` for listing.

An explicit column list with optional watermarks and primary keys goes before
the defining `AS` query. `ALTER MATERIALIZED TABLE` can add, modify, or drop
metadata and computed columns, or rename the table.
`START_MODE` defaults to `FROM_BEGINNING`; later positions and resume modes
are detailed in the SQL reference. 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 historical replay.

### Functions, models, and change records

`ProcessTableFunction<T>` can emit rows from zero or more table inputs and access
managed state, event time, timers, and table changelogs. Partitioned table inputs
can use `ORDER BY` for temporal ordering, and Process Table Functions can handle
late records previously dropped. The FLIP-565 state-access improvements and
broadcast state are planned for a later release.

Use `ML_PREDICT` to apply a declared model to a stream in SQL. Java and Python
Table API programs can manage catalog models. For Table API prediction, resolve
a model with `fromModel(...)`, select inputs with `ColumnList.of(...)`, and pass
`"async" = "true"` in the options map to request asynchronous prediction.
`VECTOR_SEARCH` performs streaming similarity searches; use a lateral call for
each input row or a direct `FROM` call with an array for a constant query vector.

`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, into append-only records.
The 2.3 release covers basic conversions; `PARTITION BY`, `invalid_op_handling`,
and `produces_full_deletes` are planned for later releases.

## Scheduling, storage, and operations quick reference

`pipeline.watermark-alignment.buffer-size` defaults to `3`, delaying alignment
by three update intervals so sources pause later during backlog processing.
This can increase state in windowed and temporal operators; set it to `0` to
restore Flink 2.2 behavior. Backpressure and blocked time are excluded from a
subtask's watermark idleness timeout.

`jobmanager.adaptive-scheduler.executing.resource-stabilization-timeout` controls
how long the JobManager can wait after a resource change for sufficient resources
before scaling. `jobmanager.adaptive-scheduler.min-parallelism-increase` is deprecated.
Adaptive downstream channel selection is opt-in and applies to edges using
`RebalancePartitioner` or `RescalePartitioner`; see the runtime reference for settings.

Install `flink-s3-fs-native` in the plugins directory for native S3 access without
Hadoop filesystem libraries. The plugin is experimental in 2.3, registers `s3://`
and `s3a://`, supports IAM Roles for Service Accounts and exactly-once streaming
sinks, and uses `s3.*` options. The state and storage reference includes I/O examples.

Applications group jobs and expose application lifecycle REST endpoints and an
**Applications** tab. HA recovery re-executes incomplete session-mode applications
and matches jobs by name when recovering applications with multiple batch jobs.
Set `web.adaptive-scheduler.rescale-history.size` to a positive per-job count to
record rescale events; its default `0` disables history.

## JDK mitigation and operational compatibility

For CVE-2026-114938 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.
Until upgrading, append `-XX:-UseBASE64Intrinsics` to `env.java.opts.all`, preserving
existing JVM options. The flag requires Java 11 or later. Docker accepts the
setting through `FLINK_PROPERTIES`; with the Kubernetes Operator, place it under
`spec.flinkConfiguration` in the `FlinkDeployment`.

The security reference includes affected JDKs outside Flink's support matrix,
rebuilt image tags, image-cache behavior, and older operator Helm settings.
The connectors reference gives runtime-specific connector, CDC, Flink Agents,
Stateful Functions, and Flink ML artifacts. The runtime reference gives operator
compatibility, archived Helm charts, Flink downloads, and the maintenance policy.

Files in this skill

  • SKILL.md9.4 KB
  • coverage.json2 KB
  • references/connectors-formats-and-python.md4.2 KB
  • references/migration-apis-and-configuration.md6.1 KB
  • references/observability-security-and-operations.md3.8 KB
  • references/runtime-scheduling-and-deployment.md5.5 KB
  • references/sql-table-and-planning.md7.6 KB
  • references/state-checkpoints-and-storage.md4.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.