public class KafkaTridentSpoutCoordinator<K,V> extends Object implements IOpaquePartitionedTridentSpout.Coordinator<List<Map<String,Object>>>, IPartitionedTridentSpout.Coordinator<List<Map<String,Object>>>, Serializable
Modifier and Type | Field and Description |
---|---|
static long |
TIMER_DELAY_MS |
Constructor and Description |
---|
KafkaTridentSpoutCoordinator(KafkaTridentSpoutConfig<K,V> kafkaSpoutConfig)
Creates a new coordinator based on the given spout config.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
List<Map<String,Object>> |
getPartitionsForBatch()
Gets the partitions for the following batches.
|
boolean |
isReady(long txid)
Indicates whether this coordinator is ready to commit the given transaction.
|
String |
toString() |
public static final long TIMER_DELAY_MS
public KafkaTridentSpoutCoordinator(KafkaTridentSpoutConfig<K,V> kafkaSpoutConfig)
Creates a new coordinator based on the given spout config.
kafkaSpoutConfig
- The spout config to usepublic boolean isReady(long txid)
IOpaquePartitionedTridentSpout.Coordinator
Indicates whether this coordinator is ready to commit the given transaction. The master batch coordinator will only begin committing if at least one coordinator indicates it is ready to commit.
isReady
in interface IOpaquePartitionedTridentSpout.Coordinator<List<Map<String,Object>>>
isReady
in interface IPartitionedTridentSpout.Coordinator<List<Map<String,Object>>>
txid
- The transaction idpublic List<Map<String,Object>> getPartitionsForBatch()
IOpaquePartitionedTridentSpout.Coordinator
Gets the partitions for the following batches. The emitter will be asked to refresh partitions when this value changes.
getPartitionsForBatch
in interface IOpaquePartitionedTridentSpout.Coordinator<List<Map<String,Object>>>
getPartitionsForBatch
in interface IPartitionedTridentSpout.Coordinator<List<Map<String,Object>>>
public void close()
Copyright © 2019 The Apache Software Foundation. All rights reserved.