Class WindowTridentProcessor
- java.lang.Object
-
- org.apache.storm.trident.windowing.WindowTridentProcessor
-
- All Implemented Interfaces:
Serializable,TridentProcessor,TupleReceiver
public class WindowTridentProcessor extends Object implements TridentProcessor
TridentProcessorimplementation for windowing operations on trident stream.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWindowTridentProcessor.TriggerInfo
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_INMEMORY_TUPLE_CACHE_LIMITstatic StringTRIGGER_COUNT_PREFIXstatic StringTRIGGER_FIELD_NAMEstatic StringTRIGGER_INPROCESS_PREFIXstatic StringTRIGGER_PREFIX
-
Constructor Summary
Constructors Constructor Description WindowTridentProcessor(WindowConfig windowConfig, String uniqueWindowId, WindowsStoreFactory windowStoreFactory, Fields inputFields, Aggregator aggregator, boolean storeTuplesInStore)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()voidexecute(ProcessorContext processorContext, String streamId, TridentTuple tuple)voidfinishBatch(ProcessorContext processorContext)voidflush()static StringgenerateWindowTriggerKey(String windowTaskId, int triggerId)static ObjectgetBatchTxnId(Object batchId)TridentTuple.FactorygetOutputFactory()static StringgetWindowTriggerInprocessIdPrefix(String windowTaskId)static StringgetWindowTriggerTaskPrefix(String windowTaskId)voidprepare(Map<String,Object> topoConf, TopologyContext context, TridentContext tridentContext)voidstartBatch(ProcessorContext processorContext)StringtriggerKey(int triggerId)
-
-
-
Field Detail
-
TRIGGER_INPROCESS_PREFIX
public static final String TRIGGER_INPROCESS_PREFIX
- See Also:
- Constant Field Values
-
TRIGGER_PREFIX
public static final String TRIGGER_PREFIX
- See Also:
- Constant Field Values
-
TRIGGER_COUNT_PREFIX
public static final String TRIGGER_COUNT_PREFIX
- See Also:
- Constant Field Values
-
TRIGGER_FIELD_NAME
public static final String TRIGGER_FIELD_NAME
- See Also:
- Constant Field Values
-
DEFAULT_INMEMORY_TUPLE_CACHE_LIMIT
public static final long DEFAULT_INMEMORY_TUPLE_CACHE_LIMIT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WindowTridentProcessor
public WindowTridentProcessor(WindowConfig windowConfig, String uniqueWindowId, WindowsStoreFactory windowStoreFactory, Fields inputFields, Aggregator aggregator, boolean storeTuplesInStore)
-
-
Method Detail
-
getWindowTriggerInprocessIdPrefix
public static String getWindowTriggerInprocessIdPrefix(String windowTaskId)
-
generateWindowTriggerKey
public static String generateWindowTriggerKey(String windowTaskId, int triggerId)
-
prepare
public void prepare(Map<String,Object> topoConf, TopologyContext context, TridentContext tridentContext)
- Specified by:
preparein interfaceTridentProcessor
-
cleanup
public void cleanup()
- Specified by:
cleanupin interfaceTridentProcessor
-
startBatch
public void startBatch(ProcessorContext processorContext)
- Specified by:
startBatchin interfaceTridentProcessor
-
execute
public void execute(ProcessorContext processorContext, String streamId, TridentTuple tuple)
- Specified by:
executein interfaceTupleReceiver
-
flush
public void flush()
- Specified by:
flushin interfaceTupleReceiver
-
finishBatch
public void finishBatch(ProcessorContext processorContext)
- Specified by:
finishBatchin interfaceTridentProcessor
-
getOutputFactory
public TridentTuple.Factory getOutputFactory()
- Specified by:
getOutputFactoryin interfaceTridentProcessor
-
triggerKey
public String triggerKey(int triggerId)
-
-