Class BatchSpoutExecutor.EmptyCoordinator

    • Constructor Detail

      • EmptyCoordinator

        public EmptyCoordinator()
    • Method Detail

      • initializeTransaction

        public Object initializeTransaction​(long txid,
                                            Object prevMetadata,
                                            Object currMetadata)
        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 JSON encoding to store the metadata. Only simple types such as numbers, booleans, strings, lists, and maps should be used.

        Specified by:
        initializeTransaction in interface ITridentSpout.BatchCoordinator<Object>
        Parameters:
        txid - The id of the transaction.
        prevMetadata - The metadata of the previous transaction
        currMetadata - The metadata for this transaction the last time it was initialized. null if this is the first attempt
        Returns:
        the metadata for this new transaction