public class TransactionalTridentEventHubEmitter extends Object implements IPartitionedTridentSpout.Emitter<Partitions,Partition,Map>
Constructor and Description |
---|
TransactionalTridentEventHubEmitter(EventHubSpoutConfig spoutConfig) |
TransactionalTridentEventHubEmitter(EventHubSpoutConfig spoutConfig,
int batchSize,
ITridentPartitionManagerFactory pmFactory,
IEventHubReceiverFactory recvFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
emitPartitionBatch(TransactionAttempt attempt,
TridentCollector collector,
Partition partition,
Map meta)
Emit a batch of tuples for a partition/transaction that has been emitted before, using the metadata created when it was first emitted.
|
Map |
emitPartitionBatchNew(TransactionAttempt attempt,
TridentCollector collector,
Partition partition,
Map meta)
Emit a batch of tuples for a partition/transaction that’s never been emitted before.
|
List<Partition> |
getOrderedPartitions(Partitions partitions) |
void |
refreshPartitions(List<Partition> partitionList)
This method is called when this task is responsible for a new set of partitions.
|
public TransactionalTridentEventHubEmitter(EventHubSpoutConfig spoutConfig)
public TransactionalTridentEventHubEmitter(EventHubSpoutConfig spoutConfig, int batchSize, ITridentPartitionManagerFactory pmFactory, IEventHubReceiverFactory recvFactory)
public void close()
close
in interface IPartitionedTridentSpout.Emitter<Partitions,Partition,Map>
public void emitPartitionBatch(TransactionAttempt attempt, TridentCollector collector, Partition partition, Map meta)
IPartitionedTridentSpout.Emitter
Emit a batch of tuples for a partition/transaction that has been emitted before, using the metadata created when it was first emitted.
emitPartitionBatch
in interface IPartitionedTridentSpout.Emitter<Partitions,Partition,Map>
public Map emitPartitionBatchNew(TransactionAttempt attempt, TridentCollector collector, Partition partition, Map meta)
IPartitionedTridentSpout.Emitter
Emit a batch of tuples for a partition/transaction that’s never been emitted before. Return the metadata that can be used to reconstruct this partition/batch in the future.
emitPartitionBatchNew
in interface IPartitionedTridentSpout.Emitter<Partitions,Partition,Map>
public List<Partition> getOrderedPartitions(Partitions partitions)
getOrderedPartitions
in interface IPartitionedTridentSpout.Emitter<Partitions,Partition,Map>
public void refreshPartitions(List<Partition> partitionList)
IPartitionedTridentSpout.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 IPartitionedTridentSpout.Emitter<Partitions,Partition,Map>
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.