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:15:45 UTC

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

     [ https://issues.apache.org/jira/browse/STORM-1034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Kellogg updated STORM-1034:
--------------------------------
    Description: 
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:

{code:title=Bar.java|borderStyle=solid}
SpoutConfig simpleConfig = new SpountConfigBuilder()
                                                        .topicName("topicA")
                                                        .kafkaBrokerHosts("hostname:2181")
                                                        .stormClientID("storm-client-id")
                                                         .schema(new SchemeAsMultiScheme ())
                                                         .build();
{code}
 

  was:
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();
 


> 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:
> {code:title=Bar.java|borderStyle=solid}
> SpoutConfig simpleConfig = new SpountConfigBuilder()
>                                                         .topicName("topicA")
>                                                         .kafkaBrokerHosts("hostname:2181")
>                                                         .stormClientID("storm-client-id")
>                                                          .schema(new SchemeAsMultiScheme ())
>                                                          .build();
> {code}
>  



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