Class StoreBasedTridentWindowManager
java.lang.Object
org.apache.storm.trident.windowing.AbstractTridentWindowManager<TridentBatchTuple>
org.apache.storm.trident.windowing.StoreBasedTridentWindowManager
- All Implemented Interfaces:
ITridentWindowManager
This window manager uses
WindowsStore
for storing tuples and other trigger related information. It maintains tuples cache of
maxCachedTuplesSize
without accessing store for getting them.-
Field Summary
Fields inherited from class org.apache.storm.trident.windowing.AbstractTridentWindowManager
aggregator, delegateCollector, pendingTriggers, triggerId, windowManager, windowStore, windowTaskId
-
Constructor Summary
ConstructorDescriptionStoreBasedTridentWindowManager
(WindowConfig windowConfig, String windowTaskId, WindowsStore windowStore, Aggregator aggregator, BatchOutputCollector delegateCollector, Long maxTuplesCacheSize, Fields inputFields) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTuplesBatch
(Object batchId, List<TridentTuple> tuples) Add received batch of tuples to cache/store and add them toWindowManager
.collectTridentTupleOrKey
(TridentBatchTuple tridentBatchTuple, List<String> keys) getBatchTxnId
(Object batchId) getTridentTuples
(List<TridentBatchTuple> tridentBatchTuples) ReturnTridentTuple
s from giventupleEvents
.protected void
Load and initialize any resources into window manager before windowing for component/task is activated.void
onTuplesExpired
(List<TridentBatchTuple> expiredTuples) Handle expired tuple events which can be removing from cache or store.Methods inherited from class org.apache.storm.trident.windowing.AbstractTridentWindowManager
getPendingTriggers, prepare, shutdown
-
Constructor Details
-
StoreBasedTridentWindowManager
public StoreBasedTridentWindowManager(WindowConfig windowConfig, String windowTaskId, WindowsStore windowStore, Aggregator aggregator, BatchOutputCollector delegateCollector, Long maxTuplesCacheSize, Fields inputFields)
-
-
Method Details
-
initialize
protected void initialize()Description copied from class:AbstractTridentWindowManager
Load and initialize any resources into window manager before windowing for component/task is activated.- Specified by:
initialize
in classAbstractTridentWindowManager<TridentBatchTuple>
-
addTuplesBatch
Description copied from interface:ITridentWindowManager
Add received batch of tuples to cache/store and add them toWindowManager
. -
getBatchTxnId
-
keyOf
-
getTridentTuples
Description copied from class:AbstractTridentWindowManager
ReturnTridentTuple
s from giventupleEvents
.- Specified by:
getTridentTuples
in classAbstractTridentWindowManager<TridentBatchTuple>
-
collectTridentTupleOrKey
public TridentTuple collectTridentTupleOrKey(TridentBatchTuple tridentBatchTuple, List<String> keys) -
onTuplesExpired
Description copied from class:AbstractTridentWindowManager
Handle expired tuple events which can be removing from cache or store.- Specified by:
onTuplesExpired
in classAbstractTridentWindowManager<TridentBatchTuple>
-