Class KafkaTridentSpoutCoordinator<K,V>
java.lang.Object
org.apache.storm.kafka.spout.trident.KafkaTridentSpoutCoordinator<K,V>
- All Implemented Interfaces:
Serializable,IOpaquePartitionedTridentSpout.Coordinator<List<Map<String,,Object>>> IPartitionedTridentSpout.Coordinator<List<Map<String,Object>>>
public class KafkaTridentSpoutCoordinator<K,V>
extends Object
implements IOpaquePartitionedTridentSpout.Coordinator<List<Map<String,Object>>>, IPartitionedTridentSpout.Coordinator<List<Map<String,Object>>>, Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKafkaTridentSpoutCoordinator(KafkaTridentSpoutConfig<K, V> kafkaSpoutConfig) Creates a new coordinator based on the given spout config. -
Method Summary
-
Field Details
-
TIMER_DELAY_MS
public static final long TIMER_DELAY_MS- See Also:
-
-
Constructor Details
-
KafkaTridentSpoutCoordinator
Creates a new coordinator based on the given spout config.- Parameters:
kafkaSpoutConfig- The spout config to use
-
-
Method Details
-
isReady
public boolean isReady(long txid) Description copied from interface:IOpaquePartitionedTridentSpout.CoordinatorIndicates 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.- Specified by:
isReadyin interfaceIOpaquePartitionedTridentSpout.Coordinator<K>- Specified by:
isReadyin interfaceIPartitionedTridentSpout.Coordinator<K>- Parameters:
txid- The transaction id- Returns:
- true if this coordinator is ready to commit, false otherwise.
-
getPartitionsForBatch
Description copied from interface:IOpaquePartitionedTridentSpout.CoordinatorGets the partitions for the following batches. The emitter will be asked to refresh partitions when this value changes.- Specified by:
getPartitionsForBatchin interfaceIOpaquePartitionedTridentSpout.Coordinator<K>- Specified by:
getPartitionsForBatchin interfaceIPartitionedTridentSpout.Coordinator<K>- Returns:
- The partitions for the following batches.
-
close
public void close()- Specified by:
closein interfaceIOpaquePartitionedTridentSpout.Coordinator<K>- Specified by:
closein interfaceIPartitionedTridentSpout.Coordinator<K>
-
toString
-