public class IncrementalAggregateTimeWindowFunction extends IncrementalAggregateWindowFunction<TimeWindow>
param: windowStartPos the start position of window param: windowEndPos the end position of window param: finalRowArity The arity of the final output row
Constructor and Description |
---|
IncrementalAggregateTimeWindowFunction(int numGroupingKey,
int numAggregates,
scala.Option<Object> windowStartPos,
scala.Option<Object> windowEndPos,
int finalRowArity) |
Modifier and Type | Method and Description |
---|---|
void |
apply(Tuple key,
TimeWindow window,
Iterable<Row> records,
Collector<CRow> out)
Calculate aggregated values output by aggregate buffer, and set them into output
Row based on the mapping relation between intermediate aggregate data and output data.
|
void |
open(Configuration parameters)
Initialization method for the function.
|
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public void open(Configuration parameters)
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 IncrementalAggregateWindowFunction<TimeWindow>
parameters
- The configuration containing the parameters attached to the contract.Configuration
public void apply(Tuple key, TimeWindow window, Iterable<Row> records, Collector<CRow> out)
IncrementalAggregateWindowFunction
apply
in interface WindowFunction<Row,CRow,Tuple,TimeWindow>
apply
in class IncrementalAggregateWindowFunction<TimeWindow>
key
- (undocumented)window
- (undocumented)records
- (undocumented)out
- (undocumented)Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.