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
TridentTuple s 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, shutdown
public StoreBasedTridentWindowManager(WindowConfig windowConfig, String windowTaskId, WindowsStore windowStore, Aggregator aggregator, BatchOutputCollector delegateCollector, Long maxTuplesCacheSize, Fields inputFields)
protected void initialize()
AbstractTridentWindowManager
Load 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)
ITridentWindowManager
Add received batch of tuples to cache/store and add them to WindowManager
.
public List<TridentTuple> getTridentTuples(List<TridentBatchTuple> tridentBatchTuples)
AbstractTridentWindowManager
Return TridentTuple
s from given tupleEvents
.
getTridentTuples
in class AbstractTridentWindowManager<TridentBatchTuple>
public TridentTuple collectTridentTupleOrKey(TridentBatchTuple tridentBatchTuple, List<String> keys)
public void onTuplesExpired(List<TridentBatchTuple> expiredTuples)
AbstractTridentWindowManager
Handle 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.