public class OpaqueTridentEventHubEmitter extends Object implements IOpaquePartitionedTridentSpout.Emitter<Partitions,Partition,Map>
A thin wrapper of TransactionalTridentEventHubEmitter for OpaqueTridentEventHubSpout
Constructor and Description |
---|
OpaqueTridentEventHubEmitter(EventHubSpoutConfig spoutConfig) |
OpaqueTridentEventHubEmitter(EventHubSpoutConfig spoutConfig,
int batchSize,
ITridentPartitionManagerFactory pmFactory,
IEventHubReceiverFactory recvFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map |
emitPartitionBatch(TransactionAttempt attempt,
TridentCollector collector,
Partition partition,
Map meta)
Emit a batch of tuples for a partition/transaction.
|
List<Partition> |
getOrderedPartitions(Partitions partitions) |
List<Partition> |
getPartitionsForTask(int taskId,
int numTasks,
List<Partition> allPartitionInfoSorted) |
void |
refreshPartitions(List<Partition> partitionList)
This method is called when this task is responsible for a new set of partitions.
|
public OpaqueTridentEventHubEmitter(EventHubSpoutConfig spoutConfig)
public OpaqueTridentEventHubEmitter(EventHubSpoutConfig spoutConfig, int batchSize, ITridentPartitionManagerFactory pmFactory, IEventHubReceiverFactory recvFactory)
public void close()
close
in interface IOpaquePartitionedTridentSpout.Emitter<Partitions,Partition,Map>
public Map emitPartitionBatch(TransactionAttempt attempt, TridentCollector collector, Partition partition, Map meta)
IOpaquePartitionedTridentSpout.Emitter
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.
emitPartitionBatch
in interface IOpaquePartitionedTridentSpout.Emitter<Partitions,Partition,Map>
public List<Partition> getOrderedPartitions(Partitions partitions)
getOrderedPartitions
in interface IOpaquePartitionedTridentSpout.Emitter<Partitions,Partition,Map>
public List<Partition> getPartitionsForTask(int taskId, int numTasks, List<Partition> allPartitionInfoSorted)
getPartitionsForTask
in interface IOpaquePartitionedTridentSpout.Emitter<Partitions,Partition,Map>
taskId
public void refreshPartitions(List<Partition> partitionList)
IOpaquePartitionedTridentSpout.Emitter
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.
refreshPartitions
in interface IOpaquePartitionedTridentSpout.Emitter<Partitions,Partition,Map>
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.