public class KafkaTridentTransactionalSpoutEmitter<K,V> extends Object implements IPartitionedTridentSpout.Emitter<List<Map<String,Object>>,KafkaTridentSpoutTopicPartition,Map<String,Object>>, Serializable
| Constructor and Description | 
|---|
| KafkaTridentTransactionalSpoutEmitter(KafkaTridentSpoutEmitter<K,V> emitter) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close() | 
| void | emitPartitionBatch(TransactionAttempt tx,
                  TridentCollector collector,
                  KafkaTridentSpoutTopicPartition partition,
                  Map<String,Object> partitionMeta)Emit a batch of tuples for a partition/transaction that has been emitted before, using the metadata created when it was first emitted. | 
| Map<String,Object> | emitPartitionBatchNew(TransactionAttempt tx,
                     TridentCollector collector,
                     KafkaTridentSpoutTopicPartition partition,
                     Map<String,Object> lastPartitionMeta)Emit a batch of tuples for a partition/transaction that’s never been emitted before. | 
| List<KafkaTridentSpoutTopicPartition> | getOrderedPartitions(List<Map<String,Object>> allPartitionInfo)Sorts given partition info to produce an ordered list of partitions. | 
| void | refreshPartitions(List<KafkaTridentSpoutTopicPartition> partitionResponsibilities)This method is called when this task is responsible for a new set of partitions. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPartitionsForTaskpublic KafkaTridentTransactionalSpoutEmitter(KafkaTridentSpoutEmitter<K,V> emitter)
public List<KafkaTridentSpoutTopicPartition> getOrderedPartitions(List<Map<String,Object>> allPartitionInfo)
IPartitionedTridentSpout.EmitterSorts given partition info to produce an ordered list of partitions.
getOrderedPartitions in interface IPartitionedTridentSpout.Emitter<List<Map<String,Object>>,KafkaTridentSpoutTopicPartition,Map<String,Object>>allPartitionInfo - The partition info for all partitions being processed by all spout taskspublic Map<String,Object> emitPartitionBatchNew(TransactionAttempt tx, TridentCollector collector, KafkaTridentSpoutTopicPartition partition, Map<String,Object> lastPartitionMeta)
IPartitionedTridentSpout.EmitterEmit a batch of tuples for a partition/transaction that’s never been emitted before. Return the metadata that can be used to reconstruct this partition/batch in the future.
emitPartitionBatchNew in interface IPartitionedTridentSpout.Emitter<List<Map<String,Object>>,KafkaTridentSpoutTopicPartition,Map<String,Object>>public void refreshPartitions(List<KafkaTridentSpoutTopicPartition> partitionResponsibilities)
IPartitionedTridentSpout.EmitterThis method is called when this task is responsible for a new set of partitions. Should be used to manage things like connections to brokers.
refreshPartitions in interface IPartitionedTridentSpout.Emitter<List<Map<String,Object>>,KafkaTridentSpoutTopicPartition,Map<String,Object>>public void emitPartitionBatch(TransactionAttempt tx, TridentCollector collector, KafkaTridentSpoutTopicPartition partition, Map<String,Object> partitionMeta)
IPartitionedTridentSpout.EmitterEmit a batch of tuples for a partition/transaction that has been emitted before, using the metadata created when it was first emitted.
emitPartitionBatch in interface IPartitionedTridentSpout.Emitter<List<Map<String,Object>>,KafkaTridentSpoutTopicPartition,Map<String,Object>>public void close()
close in interface IPartitionedTridentSpout.Emitter<List<Map<String,Object>>,KafkaTridentSpoutTopicPartition,Map<String,Object>>Copyright © 2022 The Apache Software Foundation. All rights reserved.