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, wait
getPartitionsForTask
public KafkaTridentTransactionalSpoutEmitter(KafkaTridentSpoutEmitter<K,V> emitter)
public List<KafkaTridentSpoutTopicPartition> getOrderedPartitions(List<Map<String,Object>> allPartitionInfo)
IPartitionedTridentSpout.Emitter
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.Emitter
emitPartitionBatchNew
in interface IPartitionedTridentSpout.Emitter<List<Map<String,Object>>,KafkaTridentSpoutTopicPartition,Map<String,Object>>
public void refreshPartitions(List<KafkaTridentSpoutTopicPartition> partitionResponsibilities)
IPartitionedTridentSpout.Emitter
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.Emitter
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 © 2023 The Apache Software Foundation. All rights reserved.