public class StoreBasedTridentWindowManager extends AbstractTridentWindowManager<TridentBatchTuple>
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.
aggregator, delegateCollector, pendingTriggers, triggerId, windowManager, windowStore, windowTaskId| Constructor and Description |
|---|
StoreBasedTridentWindowManager(WindowConfig windowConfig,
String windowTaskId,
WindowsStore windowStore,
Aggregator aggregator,
BatchOutputCollector delegateCollector,
Long maxTuplesCacheSize,
Fields inputFields) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTuplesBatch(Object batchId,
List<TridentTuple> tuples)
Add received batch of tuples to cache/store and add them to
WindowManager. |
TridentTuple |
collectTridentTupleOrKey(TridentBatchTuple tridentBatchTuple,
List<String> keys) |
String |
getBatchTxnId(Object batchId) |
List<TridentTuple> |
getTridentTuples(List<TridentBatchTuple> tridentBatchTuples)
Return
TridentTuples from given tupleEvents. |
protected void |
initialize()
Load and initialize any resources into window manager before windowing for component/task is activated.
|
String |
keyOf(Object batchId) |
void |
onTuplesExpired(List<TridentBatchTuple> expiredTuples)
Handle expired tuple events which can be removing from cache or store.
|
getPendingTriggers, prepare, shutdownpublic StoreBasedTridentWindowManager(WindowConfig windowConfig, String windowTaskId, WindowsStore windowStore, Aggregator aggregator, BatchOutputCollector delegateCollector, Long maxTuplesCacheSize, Fields inputFields)
protected void initialize()
AbstractTridentWindowManagerLoad and initialize any resources into window manager before windowing for component/task is activated.
initialize in class AbstractTridentWindowManager<TridentBatchTuple>public void addTuplesBatch(Object batchId, List<TridentTuple> tuples)
ITridentWindowManagerAdd received batch of tuples to cache/store and add them to WindowManager.
public List<TridentTuple> getTridentTuples(List<TridentBatchTuple> tridentBatchTuples)
AbstractTridentWindowManagerReturn TridentTuples from given tupleEvents.
getTridentTuples in class AbstractTridentWindowManager<TridentBatchTuple>public TridentTuple collectTridentTupleOrKey(TridentBatchTuple tridentBatchTuple, List<String> keys)
public void onTuplesExpired(List<TridentBatchTuple> expiredTuples)
AbstractTridentWindowManagerHandle expired tuple events which can be removing from cache or store.
onTuplesExpired in class AbstractTridentWindowManager<TridentBatchTuple>Copyright © 2022 The Apache Software Foundation. All rights reserved.