Class KafkaTridentSpoutEmitter<K,V> 
java.lang.Object
org.apache.storm.kafka.spout.trident.KafkaTridentSpoutEmitter<K,V> 
- All Implemented Interfaces:
- Serializable
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionKafkaTridentSpoutEmitter(KafkaTridentSpoutConfig<K, V> kafkaSpoutConfig, TopologyContext topologyContext) Create a new Kafka spout emitter.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()emitBatchNew(TransactionAttempt tx, TridentCollector collector, Set<KafkaTridentSpoutTopicPartition> partitions, Map<KafkaTridentSpoutTopicPartition, Map<String, Object>> lastBatchMetaMap) Emit a new batch.getOrderedPartitions(List<Map<String, Object>> allPartitionInfo) Get the input partitions in sorted order.getPartitionsForTask(int taskId, int numTasks, List<KafkaTridentSpoutTopicPartition> allPartitionInfoSorted) Get the partitions that should be handled by this task.voidreEmitPartitionBatch(TransactionAttempt tx, TridentCollector collector, KafkaTridentSpoutTopicPartition currBatchPartition, Map<String, Object> currBatch) Emit a batch that has already been emitted.voidrefreshPartitions(List<KafkaTridentSpoutTopicPartition> partitionResponsibilities) Prepare the emitter to handle the input partitions.final StringtoString()
- 
Constructor Details- 
KafkaTridentSpoutEmitterpublic KafkaTridentSpoutEmitter(KafkaTridentSpoutConfig<K, V> kafkaSpoutConfig, TopologyContext topologyContext) Create a new Kafka spout emitter.- Parameters:
- kafkaSpoutConfig- The kafka spout config
- topologyContext- The topology context
 
 
- 
- 
Method Details- 
reEmitPartitionBatchpublic void reEmitPartitionBatch(TransactionAttempt tx, TridentCollector collector, KafkaTridentSpoutTopicPartition currBatchPartition, Map<String, Object> currBatch) Emit a batch that has already been emitted.
- 
emitBatchNewpublic Map<KafkaTridentSpoutTopicPartition,Map<String, emitBatchNewObject>> (TransactionAttempt tx, TridentCollector collector, Set<KafkaTridentSpoutTopicPartition> partitions, Map<KafkaTridentSpoutTopicPartition, Map<String, Object>> lastBatchMetaMap) Emit a new batch.
- 
getOrderedPartitionspublic List<KafkaTridentSpoutTopicPartition> getOrderedPartitions(List<Map<String, Object>> allPartitionInfo) Get the input partitions in sorted order.
- 
getPartitionsForTaskpublic List<KafkaTridentSpoutTopicPartition> getPartitionsForTask(int taskId, int numTasks, List<KafkaTridentSpoutTopicPartition> allPartitionInfoSorted) Get the partitions that should be handled by this task.
- 
refreshPartitionsPrepare the emitter to handle the input partitions.
- 
closepublic void close()
- 
toString
 
-