AbsaOSS / hyperdrive

Extensible streaming ingestion pipeline on top of Apache Spark
Apache License 2.0
44 stars 13 forks source link

Retain and map global to local config in abstract factories #153

Closed kevinwallimann closed 4 years ago

kevinwallimann commented 4 years ago

With #82, transformers only get their subset of the configuration. That's because the prefixes are dynamic to support multiple (and multiple instances of the same) transformers. However, some transformers need properties from other components, e.g. the ConfluentAvroDecodingTransformer (#128) needs the reader.kafka.topic. To support that, the method getMappingFromRetainedGlobalConfigToLocalConfig(globalConfig: Configuration): Map[String, String] should be added to the StreamTransformerFactory trait. The StreamTransformerAbstractFactory should then extract and map the configuration values according to getMappingFromRetainedGlobalConfigToLocalConfig and add the values with the new keys to the config-subset which is passed to factory.apply.

If mapped keys conflict, an error should be thrown

Comments