Package org.apache.storm.kafka.spout
Class KafkaSpoutConfig<K,V> 
java.lang.Object
org.apache.storm.kafka.spout.internal.CommonKafkaSpoutConfig<K,V>
 
org.apache.storm.kafka.spout.KafkaSpoutConfig<K,V> 
- All Implemented Interfaces:
- Serializable
KafkaSpoutConfig defines the required configuration to connect a consumer to a consumer group, as well as the subscribing topics.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic enumThis enum controls when the tuple with theConsumerRecordfor an offset is marked as processed, i.e.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final longstatic final KafkaSpoutConfig.ProcessingGuaranteestatic final KafkaSpoutRetryServicestatic final KafkaTupleListenerstatic final org.slf4j.LoggerFields inherited from class org.apache.storm.kafka.spout.internal.CommonKafkaSpoutConfigDEFAULT_FIRST_POLL_OFFSET_STRATEGY, DEFAULT_PARTITION_REFRESH_PERIOD_MS, DEFAULT_POLL_TIMEOUT_MS, DEFAULT_START_TS
- 
Constructor SummaryConstructorsConstructorDescriptionKafkaSpoutConfig(KafkaSpoutConfig.Builder<K, V> builder) Creates a new KafkaSpoutConfig using a Builder.
- 
Method SummaryModifier and TypeMethodDescriptionstatic KafkaSpoutConfig.Builder<String,String> Factory method that creates a Builder with String key/value deserializers.static KafkaSpoutConfig.Builder<String,String> Factory method that creates a Builder with String key/value deserializers.static KafkaSpoutConfig.Builder<String,String> Factory method that creates a Builder with String key/value deserializers.intintlongbooleanbooleanvoidsetConsumerGroupId(String groupId) toString()Methods inherited from class org.apache.storm.kafka.spout.internal.CommonKafkaSpoutConfiggetFirstPollOffsetStrategy, getKafkaProps, getPartitionRefreshPeriodMs, getPollTimeoutMs, getStartTimeStamp, getTopicFilter, getTopicPartitioner, getTranslator
- 
Field Details- 
DEFAULT_OFFSET_COMMIT_PERIOD_MSpublic static final long DEFAULT_OFFSET_COMMIT_PERIOD_MS- See Also:
 
- 
DEFAULT_MAX_RETRIESpublic static final int DEFAULT_MAX_RETRIES- See Also:
 
- 
DEFAULT_MAX_UNCOMMITTED_OFFSETSpublic static final int DEFAULT_MAX_UNCOMMITTED_OFFSETS- See Also:
 
- 
DEFAULT_RETRY_SERVICE
- 
DEFAULT_PROCESSING_GUARANTEE
- 
DEFAULT_TUPLE_LISTENER
- 
LOGpublic static final org.slf4j.Logger LOG
- 
DEFAULT_METRICS_TIME_BUCKET_SIZE_SECONDSpublic static final int DEFAULT_METRICS_TIME_BUCKET_SIZE_SECONDS- See Also:
 
 
- 
- 
Constructor Details- 
KafkaSpoutConfigCreates a new KafkaSpoutConfig using a Builder.- Parameters:
- builder- The Builder to construct the KafkaSpoutConfig from
 
 
- 
- 
Method Details- 
builderpublic static KafkaSpoutConfig.Builder<String,String> builder(String bootstrapServers, String... topics) Factory method that creates a Builder with String key/value deserializers.- Parameters:
- bootstrapServers- The bootstrap servers for the consumer
- topics- The topics to subscribe to
- Returns:
- The new builder
 
- 
builderpublic static KafkaSpoutConfig.Builder<String,String> builder(String bootstrapServers, Set<String> topics) Factory method that creates a Builder with String key/value deserializers.- Parameters:
- bootstrapServers- The bootstrap servers for the consumer
- topics- The topics to subscribe to
- Returns:
- The new builder
 
- 
builderpublic static KafkaSpoutConfig.Builder<String,String> builder(String bootstrapServers, Pattern topics) Factory method that creates a Builder with String key/value deserializers.- Parameters:
- bootstrapServers- The bootstrap servers for the consumer
- topics- The topic pattern to subscribe to
- Returns:
- The new builder
 
- 
getOffsetsCommitPeriodMspublic long getOffsetsCommitPeriodMs()
- 
getProcessingGuarantee
- 
isTupleTrackingEnforcedpublic boolean isTupleTrackingEnforced()
- 
getConsumerGroupId
- 
setConsumerGroupId
- 
getMaxUncommittedOffsetspublic int getMaxUncommittedOffsets()
- 
getRetryService
- 
getTupleListener
- 
isEmitNullTuplespublic boolean isEmitNullTuples()
- 
getMetricsTimeBucketSizeInSecspublic int getMetricsTimeBucketSizeInSecs()
- 
toString- Overrides:
- toStringin class- CommonKafkaSpoutConfig<K,- V> 
 
 
-