Class WindowTridentProcessor
- java.lang.Object
-
- org.apache.storm.trident.windowing.WindowTridentProcessor
-
- All Implemented Interfaces:
Serializable
,TridentProcessor
,TupleReceiver
public class WindowTridentProcessor extends Object implements TridentProcessor
TridentProcessor
implementation for windowing operations on trident stream.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WindowTridentProcessor.TriggerInfo
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_INMEMORY_TUPLE_CACHE_LIMIT
static String
TRIGGER_COUNT_PREFIX
static String
TRIGGER_FIELD_NAME
static String
TRIGGER_INPROCESS_PREFIX
static String
TRIGGER_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 void
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)
TridentTuple.Factory
getOutputFactory()
static String
getWindowTriggerInprocessIdPrefix(String windowTaskId)
static String
getWindowTriggerTaskPrefix(String windowTaskId)
void
prepare(Map<String,Object> topoConf, TopologyContext context, TridentContext tridentContext)
void
startBatch(ProcessorContext processorContext)
String
triggerKey(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:
prepare
in interfaceTridentProcessor
-
cleanup
public void cleanup()
- Specified by:
cleanup
in interfaceTridentProcessor
-
startBatch
public void startBatch(ProcessorContext processorContext)
- Specified by:
startBatch
in interfaceTridentProcessor
-
execute
public void execute(ProcessorContext processorContext, String streamId, TridentTuple tuple)
- Specified by:
execute
in interfaceTupleReceiver
-
flush
public void flush()
- Specified by:
flush
in interfaceTupleReceiver
-
finishBatch
public void finishBatch(ProcessorContext processorContext)
- Specified by:
finishBatch
in interfaceTridentProcessor
-
getOutputFactory
public TridentTuple.Factory getOutputFactory()
- Specified by:
getOutputFactory
in interfaceTridentProcessor
-
triggerKey
public String triggerKey(int triggerId)
-
-