I am not sure if this can be achieved via flux or not although Storm 2.0 
introduced support for lambda expressions.

https://issues.apache.org/jira/browse/STORM-2490

I think, Taylor is the original author of flux. If there is a way to access 
this feature via flux... he might be able to tell.

-roshan

    On Wednesday, January 15, 2020, 10:44:32 AM PST, joe smith 
<[email protected]> wrote:  
 
  Anyone have info/tips?


    On Wednesday, December 4, 2019, 11:08:36 AM EST, joe smith 
<[email protected]> wrote:  
 
 Hi,
Would like to know if there is a way to write a lambda expression in storm flux 
so it can be used to create/define a component.
For example:



  - id: kafkaSpoutFields

    className: org.apache.storm.tuple.Fields

    constructorArgs:

      - [ key, value ]




  - id: byTopicRecordTranslator

    className: org.apache.storm.kafka.spout.ByTopicRecordTranslator

    constructorArgs:

      - "lambda r: new Values(r.key(), r.value())"

      - ref: kafkaSpoutFields




But the error returned saying it could not find a suitable constructor:




  Couldn't find a suitable constructor for class 
'org.apache.storm.kafka.spout.ByTopicRecordTranslator' with arguments '[lambda 
r: new Values(r.key(), r.value()), [key, value]]'.




Thanks




    

Reply via email to