public class StoreBasedTridentWindowManager extends AbstractTridentWindowManager<TridentBatchTuple>
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()
AbstractTridentWindowManagerinitialize in class AbstractTridentWindowManager<TridentBatchTuple>public void addTuplesBatch(Object batchId, List<TridentTuple> tuples)
ITridentWindowManagerWindowManager.public List<TridentTuple> getTridentTuples(List<TridentBatchTuple> tridentBatchTuples)
AbstractTridentWindowManagerTridentTuples from given tupleEvents.getTridentTuples in class AbstractTridentWindowManager<TridentBatchTuple>public TridentTuple collectTridentTupleOrKey(TridentBatchTuple tridentBatchTuple, List<String> keys)
public void onTuplesExpired(List<TridentBatchTuple> expiredTuples)
AbstractTridentWindowManageronTuplesExpired in class AbstractTridentWindowManager<TridentBatchTuple>Copyright © 2023 The Apache Software Foundation. All rights reserved.