Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1808#discussion_r96730015
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpoutConfig.java
 ---
    @@ -235,41 +355,116 @@ public Builder(Map<String, Object> kafkaProps, 
KafkaSpoutStreams kafkaSpoutStrea
                 this.firstPollOffsetStrategy = firstPollOffsetStrategy;
                 return this;
             }
    -
    +        
             /**
    -         * Sets partition refresh period in milliseconds in manual 
partition assignment model. Default is 2s.
    -         * @param partitionRefreshPeriodMs time in milliseconds
    +         * Sets the retry service for the spout to use.
    +         * @param retryService the new retry service
    +         * @return the builder (this).
              */
    -        public Builder<K, V> setPartitionRefreshPeriodMs(long 
partitionRefreshPeriodMs) {
    -            this.partitionRefreshPeriodMs = partitionRefreshPeriodMs;
    +        public Builder<K, V> setRetry(KafkaSpoutRetryService retryService) 
{
    +            if (retryService == null) {
    +                throw new NullPointerException("retryService cannot be 
null");
    +            }
    +            this.retryService = retryService;
                 return this;
             }
     
    +        public Builder<K, V> setRecordTranslator(RecordTranslator<K, V> 
translator) {
    +            this.translator = translator;
    +            return this;
    +        }
    +        
    +        public Builder<K, V> setRecordTranslator(Func<ConsumerRecord<K, 
V>, List<Object>> func, Fields fields) {
    --- End diff --
    
    Would probably be good to put javadoc on this one and the one below, it's 
not obvious from the interface/parameter names what it does


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to