storm.trident.testing
Class FeederBatchSpout.FeederCoordinator

java.lang.Object
  extended by storm.trident.testing.FeederBatchSpout.FeederCoordinator
All Implemented Interfaces:
ITridentSpout.BatchCoordinator<java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>>>
Enclosing class:
FeederBatchSpout

public class FeederBatchSpout.FeederCoordinator
extends java.lang.Object
implements ITridentSpout.BatchCoordinator<java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>>>


Constructor Summary
FeederBatchSpout.FeederCoordinator(int numPartitions)
           
 
Method Summary
 void close()
          Release any resources from this coordinator.
 java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>> initializeTransaction(long txid, java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>> prevMetadata)
          Create metadata for this particular transaction id which has never been emitted before.
 boolean isReady(long txid)
           
 void success(long txid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeederBatchSpout.FeederCoordinator

public FeederBatchSpout.FeederCoordinator(int numPartitions)
Method Detail

initializeTransaction

public java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>> initializeTransaction(long txid,
                                                                                                               java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>> prevMetadata)
Description copied from interface: ITridentSpout.BatchCoordinator
Create metadata for this particular transaction id which has never been emitted before. The metadata should contain whatever is necessary to be able to replay the exact batch for the transaction at a later point. The metadata is stored in Zookeeper. Storm uses the Kryo serializations configured in the component configuration for this spout to serialize and deserialize the metadata.

Specified by:
initializeTransaction in interface ITridentSpout.BatchCoordinator<java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>>>
Parameters:
txid - The id of the transaction.
prevMetadata - The metadata of the previous transaction
Returns:
the metadata for this new transaction

close

public void close()
Description copied from interface: ITridentSpout.BatchCoordinator
Release any resources from this coordinator.

Specified by:
close in interface ITridentSpout.BatchCoordinator<java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>>>

success

public void success(long txid)
Specified by:
success in interface ITridentSpout.BatchCoordinator<java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>>>

isReady

public boolean isReady(long txid)
Specified by:
isReady in interface ITridentSpout.BatchCoordinator<java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>>>