public static interface IOpaquePartitionedTridentSpout.Emitter<Partitions,Partition extends ISpoutPartition,M>
Modifier and Type | Method and Description |
---|---|
void |
close() |
M |
emitPartitionBatch(TransactionAttempt tx,
TridentCollector collector,
Partition partition,
M lastPartitionMeta)
Emit a batch of tuples for a partition/transaction.
|
List<Partition> |
getOrderedPartitions(Partitions allPartitionInfo) |
List<Partition> |
getPartitionsForTask(int taskId,
int numTasks,
List<Partition> allPartitionInfoSorted) |
void |
refreshPartitions(List<Partition> partitionResponsibilities)
This method is called when this task is responsible for a new set of partitions.
|
M emitPartitionBatch(TransactionAttempt tx, TridentCollector collector, Partition partition, M lastPartitionMeta)
Emit a batch of tuples for a partition/transaction.
Return the metadata describing this batch that will be used as lastPartitionMeta for defining the parameters of the next batch.
void refreshPartitions(List<Partition> partitionResponsibilities)
This method is called when this task is responsible for a new set of partitions. Should be used to manage things like connections to brokers.
List<Partition> getOrderedPartitions(Partitions allPartitionInfo)
List<Partition> getPartitionsForTask(int taskId, int numTasks, List<Partition> allPartitionInfoSorted)
taskId
void close()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.