Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page properties


ReasonDiscarded because discussion stalled and there's no intention to work on this for the moment.


Status

Current state:  Under DiscussionDiscarded

Discussion threadhttp://apache-flink-mailing-list-archive.1008284.n3.nabble.com/DISCUSS-FLIP-161-Configuration-through-environment-variables-td48094.html (discussion prior to FLIP)

...

For example, with an environment

Code Block
FLINK_CONFIG_KEY_A="Environment=A"
FLINK_CONFIG_KEY_B="Environment=B"

and a configuration file

...

  1. Prefix "FLINK_CONFIG_" → FLINK_CONFIG_key.A-b 
  2. Replace "." (period) with "_" (underscore) → FLINK_CONFIG_key_A-b 
  3. Replace "-" (dash) with "__" (double underscore) → FLINK_CONFIG_key_A__b 
  4. Uppercase → FLINK_CONFIG_KEY_A__B 

This provides a (semi-¹)bijective function between environment variable name and configuration key. More specifically, it allows parsing configuration keys from the environment without having to have prior knowledge of available configuration keys. Given an environment, we can look for all environment variables starting with the FLINK_CONFIG_ prefix and map them to their configuration key counterpart by following the inverse procedure:

...

As we can see, this yields the original (intended) configuration key, with the only difference being the casing. Configuration currently treats keys case-sensitively, but we propose to relax this requirement and treat them case-insensitively during the lookup of a specific key.

This mapping is not strictly bijective, but cases with consecutive periods or dashes in the key name are not considered here and should not (reasonably) be allowed. This should therefore be enforced in the implementation as well to prevent further development to run into such scenarios.

Implementation Notes

This proposal affects two code paths:

...