public abstract class RowTimeUnboundedOver extends ProcessFunctionWithCleanupState<CRow,CRow> implements Compiler<GeneratedAggregations>, Logging
param: genAggregations Generated aggregate helper function param: intermediateType the intermediate row tye which the state saved param: inputType the input row tye which the state saved
ProcessFunction.Context, ProcessFunction.OnTimerContext
Constructor and Description |
---|
RowTimeUnboundedOver(GeneratedAggregationsFunction genAggregations,
TypeInformation<Row> intermediateType,
TypeInformation<CRow> inputType,
StreamQueryConfig queryConfig) |
Modifier and Type | Method and Description |
---|---|
protected GeneratedAggregations |
function() |
void |
onTimer(long timestamp,
ProcessFunction.OnTimerContext ctx,
Collector<CRow> out)
Called when a watermark arrived.
|
void |
open(Configuration config)
Initialization method for the function.
|
protected CRow |
output() |
void |
processElement(CRow inputC,
ProcessFunction.Context ctx,
Collector<CRow> out)
Puts an element from the input stream into state if it is not late.
|
abstract void |
processElementsWithSameTimestamp(List<Row> curRowList,
Row lastAccumulator,
Collector<CRow> out)
Process the same timestamp datas, the mechanism is different between
rows and range window.
|
cleanupState, initCleanupTimeState, isProcessingTimeTimer, maxRetentionTime, minRetentionTime, needToCleanupState, registerProcessingCleanupTimer, stateCleaningEnabled
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public RowTimeUnboundedOver(GeneratedAggregationsFunction genAggregations, TypeInformation<Row> intermediateType, TypeInformation<CRow> inputType, StreamQueryConfig queryConfig)
protected CRow output()
protected GeneratedAggregations function()
public void open(Configuration config)
RichFunction
The configuration object passed to the function can be used for configuration and initialization. The configuration contains all parameters that were configured on the function in the program composition.
public class MyMapper extends FilterFunction<String> {
private String searchString;
public void open(Configuration parameters) {
this.searchString = parameters.getString("foo");
}
public boolean filter(String value) {
return value.equals(searchString);
}
}
By default, this method does nothing.
open
in interface RichFunction
open
in class AbstractRichFunction
config
- The configuration containing the parameters attached to the contract.Configuration
public void processElement(CRow inputC, ProcessFunction.Context ctx, Collector<CRow> out)
processElement
in class ProcessFunction<CRow,CRow>
inputC
- The input value.ctx
- The ctx to register timer or get current timeout
- The collector for returning result values.
public void onTimer(long timestamp, ProcessFunction.OnTimerContext ctx, Collector<CRow> out)
onTimer
in class ProcessFunction<CRow,CRow>
timestamp
- The timestamp of the firing timer.ctx
- The ctx to register timer or get current timeout
- The collector for returning result values.public abstract void processElementsWithSameTimestamp(List<Row> curRowList, Row lastAccumulator, Collector<CRow> out)
curRowList
- (undocumented)lastAccumulator
- (undocumented)out
- (undocumented)Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.