Modifying Enrichment Properties Using Flux (Advanced)

Some of the tuning enrichment properties can only be modified using Flux. However, if you manually change your Flux file, if you perform an upgrade, Ambari will overwrite all of your changes. Be sure to save your Flux changes prior to performing an upgrade.

You can find the enrichment Flux file at $METRON_HOME/flux/enrichment/remote.yaml.

The following table lists the enrichment properties you can modify in the flux file:

Category Flux Property or Function Flux Section Location
Kafka spout session.timeout.ms line 201, id: kafkaProps
enable.auto.commit line 201, id: kafkaProps
setPollTimeoutMs line 230, id: kafkaConfig
setMaxUncommittedOffsets line 230, id: kafkaConfig
setOffsetCommitPeriodMs line 230, id: kafkaConfig

You can add Kafka spout properties or functions using two methods:

Flux properties - Flux → kafkaProps

Add a new key/value to the kafkaProps section HashMap on line 201. For example, if you want to set the Kafka Spout consumer'ssession.timeout.ms to 30 seconds, add the following:

       -   name: "put"
           args:
               - "session.timeout.ms"
               - 30000
Flux functions - Flux → kafkaConfig

Add a new setter to the kafkaConfig object section on line 230. For example, if you want to set the Kafka Spout consumer's poll timeout to 200 milliseconds, add the following under configMethods:

         -   name: "setPollTimeoutMs"
             args:
                 - 200