public static interface IOpaquePartitionedTridentSpout.Emitter<PartitionsT,PartitionT extends ISpoutPartition,M>
Modifier and Type | Method and Description |
---|---|
void |
close() |
M |
emitPartitionBatch(TransactionAttempt tx,
TridentCollector collector,
PartitionT partition,
M lastPartitionMeta)
Emit a batch of tuples for a partition/transaction.
|
List<PartitionT> |
getOrderedPartitions(PartitionsT allPartitionInfo)
Sorts the partition info to produce an ordered list of partition.
|
default List<PartitionT> |
getPartitionsForTask(int taskId,
int numTasks,
List<PartitionT> allPartitionInfoSorted)
Get the partitions assigned to this task.
|
void |
refreshPartitions(List<PartitionT> partitionResponsibilities)
This method is called when this task is responsible for a new set of partitions.
|
M emitPartitionBatch(TransactionAttempt tx, TridentCollector collector, PartitionT partition, M lastPartitionMeta)
Return the metadata describing this batch that will be used as lastPartitionMeta for defining the parameters of the next batch.
void refreshPartitions(List<PartitionT> partitionResponsibilities)
partitionResponsibilities
- The partitions assigned to this taskList<PartitionT> getOrderedPartitions(PartitionsT allPartitionInfo)
allPartitionInfo
- The partition info for all partitions being processed by all spout tasksdefault List<PartitionT> getPartitionsForTask(int taskId, int numTasks, List<PartitionT> allPartitionInfoSorted)
taskId
- The id of this tasknumTasks
- The number of tasks for this spoutallPartitionInfoSorted
- The partition info for all partitions being processed by all spout tasks, sorted according to
getOrderedPartitions(java.lang.Object)
taskId
void close()
Copyright © 2023 The Apache Software Foundation. All rights reserved.