Class WindowTridentProcessor
java.lang.Object
org.apache.storm.trident.windowing.WindowTridentProcessor
- All Implemented Interfaces:
Serializable
,TridentProcessor
,TupleReceiver
TridentProcessor
implementation for windowing operations on trident stream.- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionWindowTridentProcessor
(WindowConfig windowConfig, String uniqueWindowId, WindowsStoreFactory windowStoreFactory, Fields inputFields, Aggregator aggregator, boolean storeTuplesInStore) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
void
execute
(ProcessorContext processorContext, String streamId, TridentTuple tuple) void
finishBatch
(ProcessorContext processorContext) void
flush()
static String
generateWindowTriggerKey
(String windowTaskId, int triggerId) static Object
getBatchTxnId
(Object batchId) static String
getWindowTriggerInprocessIdPrefix
(String windowTaskId) static String
getWindowTriggerTaskPrefix
(String windowTaskId) void
prepare
(Map<String, Object> topoConf, TopologyContext context, TridentContext tridentContext) void
startBatch
(ProcessorContext processorContext) triggerKey
(int triggerId)
-
Field Details
-
TRIGGER_INPROCESS_PREFIX
- See Also:
-
TRIGGER_PREFIX
- See Also:
-
TRIGGER_COUNT_PREFIX
- See Also:
-
TRIGGER_FIELD_NAME
- See Also:
-
DEFAULT_INMEMORY_TUPLE_CACHE_LIMIT
public static final long DEFAULT_INMEMORY_TUPLE_CACHE_LIMIT- See Also:
-
-
Constructor Details
-
WindowTridentProcessor
public WindowTridentProcessor(WindowConfig windowConfig, String uniqueWindowId, WindowsStoreFactory windowStoreFactory, Fields inputFields, Aggregator aggregator, boolean storeTuplesInStore)
-
-
Method Details
-
getWindowTriggerInprocessIdPrefix
-
getWindowTriggerTaskPrefix
-
getBatchTxnId
-
generateWindowTriggerKey
-
prepare
public void prepare(Map<String, Object> topoConf, TopologyContext context, TridentContext tridentContext) - Specified by:
prepare
in interfaceTridentProcessor
-
cleanup
public void cleanup()- Specified by:
cleanup
in interfaceTridentProcessor
-
startBatch
- Specified by:
startBatch
in interfaceTridentProcessor
-
execute
- Specified by:
execute
in interfaceTupleReceiver
-
flush
public void flush()- Specified by:
flush
in interfaceTupleReceiver
-
finishBatch
- Specified by:
finishBatch
in interfaceTridentProcessor
-
getOutputFactory
- Specified by:
getOutputFactory
in interfaceTridentProcessor
-
triggerKey
-