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
-
Constructor Summary
ConstructorDescriptionKafkaTridentSpoutCoordinator
(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.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.- Specified by:
isReady
in interfaceIOpaquePartitionedTridentSpout.Coordinator<K>
- Specified by:
isReady
in 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.Coordinator
Gets the partitions for the following batches. The emitter will be asked to refresh partitions when this value changes.- Specified by:
getPartitionsForBatch
in interfaceIOpaquePartitionedTridentSpout.Coordinator<K>
- Specified by:
getPartitionsForBatch
in interfaceIPartitionedTridentSpout.Coordinator<K>
- Returns:
- The partitions for the following batches.
-
close
public void close()- Specified by:
close
in interfaceIOpaquePartitionedTridentSpout.Coordinator<K>
- Specified by:
close
in interfaceIPartitionedTridentSpout.Coordinator<K>
-
toString
-