Implementing GraphState
The heart of the topology will be a Trident state implementation responsible for translating Trident tuples into graph structures and persisting them. Recall that a Trident state implementation consists of three components:
StateFactory
: TheStateFactory
interface defines the method Trident uses to create the persistentState
objects.State
: The TridentState
interface defines thebeginCommit()
andcommit()
methods that are called before and after a Trident batch partition is written to the backing store. If the write succeeds (that is, all tuples are processed without error), Trident will call thecommit()
method.StateUpdater
: TheStateUpdater
interface defines theupdateState()
method that is called to update the state, ...
Get Storm Blueprints: Patterns for Distributed Real-time Computation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.