You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Daniel Klessing (JIRA)" <ji...@apache.org> on 2016/08/23 08:31:20 UTC

[jira] [Created] (STORM-2051) Flux should support the builder pattern

Daniel Klessing created STORM-2051:
--------------------------------------

             Summary: Flux should support the builder pattern
                 Key: STORM-2051
                 URL: https://issues.apache.org/jira/browse/STORM-2051
             Project: Apache Storm
          Issue Type: Improvement
          Components: Flux
    Affects Versions: 1.0.2
            Reporter: Daniel Klessing


While trying to work with {{Flux}} and the {{storm-kafka-client}} package we noticed that they are incompatible, unfortunately, as the needed {{KafkaSpoutConfig}} is based on the builder pattern. Unless some hacky method is used it will not be possible to configure a {{KafkaSpout}} and instantiate/use it with a Flux-based topology.

Flux could be enhanced to support the builder pattern with the following yaml configuration as a proposal:

{code}
builder:
  - id: "spoutConfigBuilder"
    className: "org.apache.storm.kafka.spout.KafkaSpoutConfig.Builder"
    builderMethod: "build"
    constructorArgs:
      - [...]
    properties:
      - [...]
    configMethods:
      - [...]
components:
  - id: "spoutConfig"
    className: "org.apache.storm.kafka.spout.KafkaSpoutConfig"
    builderRef: "spoutConfigBuilder"
spouts:
  - id: "kafkaSpout"
    className: "org.apache.storm.kafka.spout.KafkaSpout"
    constructorArgs:
      - ref: "spoutConfig"
{code}

Unfortunately, for now, we are busy with other tasks so we cannot work on a patch for Flux. But we thought it's better to report / suggest this enhancement nevertheless.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)