Class KafkaTridentTransactionalSpoutEmitter<K,V> 
java.lang.Object
org.apache.storm.kafka.spout.trident.KafkaTridentTransactionalSpoutEmitter<K,V> 
- All Implemented Interfaces:
- Serializable,- IPartitionedTridentSpout.Emitter<List<Map<String,- Object>>, - KafkaTridentSpoutTopicPartition, - Map<String, - Object>> 
public class KafkaTridentTransactionalSpoutEmitter<K,V> 
extends Object
implements IPartitionedTridentSpout.Emitter<List<Map<String,Object>>,KafkaTridentSpoutTopicPartition,Map<String,Object>>, Serializable    
- See Also:
- 
Constructor SummaryConstructorsConstructorDescription
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()emitBatchNew(TransactionAttempt tx, TridentCollector collector, Set<KafkaTridentSpoutTopicPartition> partitions, Map<KafkaTridentSpoutTopicPartition, Map<String, Object>> lastPartitionMetaMap) Emit a batch of tuples for the partitions that's never been emitted before.getOrderedPartitions(List<Map<String, Object>> allPartitionInfo) Sorts given partition info to produce an ordered list of partitions.voidreEmitPartitionBatch(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.voidrefreshPartitions(List<KafkaTridentSpoutTopicPartition> partitionResponsibilities) This method is called when this task is responsible for a new set of partitions.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.trident.spout.IPartitionedTridentSpout.EmittergetPartitionsForTask
- 
Constructor Details- 
KafkaTridentTransactionalSpoutEmitter
 
- 
- 
Method Details- 
getOrderedPartitionspublic List<KafkaTridentSpoutTopicPartition> getOrderedPartitions(List<Map<String, Object>> allPartitionInfo) Description copied from interface:IPartitionedTridentSpout.EmitterSorts given partition info to produce an ordered list of partitions.- Specified by:
- getOrderedPartitionsin interface- IPartitionedTridentSpout.Emitter<List<Map<String,- Object>>, - KafkaTridentSpoutTopicPartition, - Map<String, - Object>> 
- Parameters:
- allPartitionInfo- The partition info for all partitions being processed by all spout tasks
- Returns:
- sorted list of partitions being processed by all the tasks. The ordering must be consistent for all tasks.
 
- 
emitBatchNewpublic Map<KafkaTridentSpoutTopicPartition,Map<String, emitBatchNewObject>> (TransactionAttempt tx, TridentCollector collector, Set<KafkaTridentSpoutTopicPartition> partitions, Map<KafkaTridentSpoutTopicPartition, Map<String, Object>> lastPartitionMetaMap) Description copied from interface:IPartitionedTridentSpout.EmitterEmit a batch of tuples for the partitions that's never been emitted before. Return the metadata that can be used to reconstruct this partition/batch in the future.- Specified by:
- emitBatchNewin interface- IPartitionedTridentSpout.Emitter<List<Map<String,- Object>>, - KafkaTridentSpoutTopicPartition, - Map<String, - Object>> 
 
- 
refreshPartitionsDescription copied from interface: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.- Specified by:
- refreshPartitionsin interface- IPartitionedTridentSpout.Emitter<List<Map<String,- Object>>, - KafkaTridentSpoutTopicPartition, - Map<String, - Object>> 
 
- 
reEmitPartitionBatchpublic void reEmitPartitionBatch(TransactionAttempt tx, TridentCollector collector, KafkaTridentSpoutTopicPartition partition, Map<String, Object> partitionMeta) Description copied from interface:IPartitionedTridentSpout.EmitterEmit a batch of tuples for a partition/transaction that has been emitted before, using the metadata created when it was first emitted.- Specified by:
- reEmitPartitionBatchin interface- IPartitionedTridentSpout.Emitter<List<Map<String,- Object>>, - KafkaTridentSpoutTopicPartition, - Map<String, - Object>> 
 
- 
closepublic void close()- Specified by:
- closein interface- IPartitionedTridentSpout.Emitter<List<Map<String,- Object>>, - KafkaTridentSpoutTopicPartition, - Map<String, - Object>> 
 
 
-