public class TransactionalTridentEventHubEmitter extends Object implements IPartitionedTridentSpout.Emitter<Partitions,Partition,Map<String,Object>>
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<String,Object> 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<String,Object> |
emitPartitionBatchNew(TransactionAttempt attempt,
TridentCollector collector,
Partition partition,
Map<String,Object> meta)
Emit a batch of tuples for a partition/transaction that’s never been emitted before.
|
List<Partition> |
getOrderedPartitions(Partitions partitions)
Sorts given partition info to produce an ordered list of partitions.
|
void |
refreshPartitions(List<Partition> partitionList)
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 TransactionalTridentEventHubEmitter(EventHubSpoutConfig spoutConfig)
public TransactionalTridentEventHubEmitter(EventHubSpoutConfig spoutConfig, int batchSize, ITridentPartitionManagerFactory pmFactory, IEventHubReceiverFactory recvFactory)
public void close()
close
in interface IPartitionedTridentSpout.Emitter<Partitions,Partition,Map<String,Object>>
public void emitPartitionBatch(TransactionAttempt attempt, TridentCollector collector, Partition partition, Map<String,Object> 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<String,Object>>
public Map<String,Object> emitPartitionBatchNew(TransactionAttempt attempt, TridentCollector collector, Partition partition, Map<String,Object> 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<String,Object>>
public List<Partition> getOrderedPartitions(Partitions partitions)
IPartitionedTridentSpout.Emitter
Sorts given partition info to produce an ordered list of partitions.
getOrderedPartitions
in interface IPartitionedTridentSpout.Emitter<Partitions,Partition,Map<String,Object>>
partitions
- The partition info for all partitions being processed by all spout taskspublic 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<String,Object>>
Copyright © 2020 The Apache Software Foundation. All rights reserved.