twalthr opened a new pull request #16150:
URL: https://github.com/apache/flink/pull/16150
## What is the purpose of the change
This adds support for prefix syntax in `ConfigOption`s of map type.
Current syntax 1:
```
value.avro-confluent.properties = schema: 1, other-prop: 2
```
Additional syntax 2:
```
value.avro-confluent.properties.schema = 1
value.avro-confluent.properties.other-prop = 2
```
Syntax 1 has precedence and is the default when calling `WritableConfig.set`.
Thus, we still advertise syntax 1 with constant key spaces.
However, esp. when working with connectors, formats, or other external
systems, it is useful to forward property maps unchanged. Syntax 2 is more
convenient for users that define options via strings. Syntax 2 is used already
in the project by custom parsers at multiple locations and was requested
multiple times by different teams. By introducing syntax 2, we simplify the
code base for connector implementers.
## Brief change log
- Search for prefixes if ConfigOption has a map type
- Everything else works as before.
## Verifying this change
This change added tests and can be verified as follows: `ConfigurationTest`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: yes
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? not applicable
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]