[ 
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)

Reply via email to