You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Rick Kellogg (JIRA)" <ji...@apache.org> on 2015/09/08 02:13:45 UTC

[jira] [Created] (STORM-1034) Create Fluent API for Kafka - SpoutConfig & TridentKafkaConfig

Rick Kellogg created STORM-1034:
-----------------------------------

             Summary: Create Fluent API for Kafka - SpoutConfig & TridentKafkaConfig 
                 Key: STORM-1034
                 URL: https://issues.apache.org/jira/browse/STORM-1034
             Project: Apache Storm
          Issue Type: Improvement
          Components: storm-kafka
    Affects Versions: 0.10.0, 0.9.4, 0.9.5
            Reporter: Rick Kellogg
            Assignee: Rick Kellogg


Create Fluent Java API for construction of SpoutConfig & TridentSpountConfig.  At present both of these classes have public instance variables and as such instantiation and validation is poor.

The use of a Fluent Java API will provide cleaner validation and the opportunity to deprecate properties while maintaining API compatibility.

Example:

SpoutConfig simpleConfig = new SpountConfigBuilder()
                                                        .topicName("topicA")
                                                        .kafkaBrokerHosts("hostname:2181")
                                                        .stormClientID("storm-client-id")
                                                         .schema(new SchemeAsMultiScheme ())
                                                         .build();
 



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