Package org.apache.storm.kafka.trident
Class TridentKafkaState<K,V>
- java.lang.Object
-
- org.apache.storm.kafka.trident.TridentKafkaState<K,V>
-
-
Constructor Summary
Constructors Constructor Description TridentKafkaState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginCommit(Long txid)
void
commit(Long txid)
void
prepare(Properties options)
Prepare this State.void
updateState(List<TridentTuple> tuples, TridentCollector collector)
Write the given tuples to Kafka.TridentKafkaState<K,V>
withKafkaTopicSelector(KafkaTopicSelector selector)
TridentKafkaState<K,V>
withTridentTupleToKafkaMapper(TridentTupleToKafkaMapper<K,V> mapper)
-
-
-
Method Detail
-
withTridentTupleToKafkaMapper
public TridentKafkaState<K,V> withTridentTupleToKafkaMapper(TridentTupleToKafkaMapper<K,V> mapper)
-
withKafkaTopicSelector
public TridentKafkaState<K,V> withKafkaTopicSelector(KafkaTopicSelector selector)
-
beginCommit
public void beginCommit(Long txid)
- Specified by:
beginCommit
in interfaceState
-
prepare
public void prepare(Properties options)
Prepare this State.- Parameters:
options
- The KafkaProducer config.
-
updateState
public void updateState(List<TridentTuple> tuples, TridentCollector collector)
Write the given tuples to Kafka.- Parameters:
tuples
- The tuples to write.collector
- The Trident collector.
-
-