storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joe smith <water4...@yahoo.com>
Subject Using Lambda with Storm Flux
Date Wed, 04 Dec 2019 16:08:36 GMT
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





Mime
View raw message