@Internal public class PatternSelectAdapter<IN,OUT> extends PatternProcessFunction<IN,OUT>
PatternSelectFunction with PatternProcessFunction.PatternProcessFunction.Context| Constructor and Description |
|---|
PatternSelectAdapter(PatternSelectFunction<IN,OUT> selectFunction) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
open(org.apache.flink.configuration.Configuration parameters) |
void |
processMatch(Map<String,List<IN>> match,
PatternProcessFunction.Context ctx,
org.apache.flink.util.Collector<OUT> out)
Generates resulting elements given a map of detected pattern events.
|
public PatternSelectAdapter(PatternSelectFunction<IN,OUT> selectFunction)
public void open(org.apache.flink.configuration.Configuration parameters)
throws Exception
open in interface org.apache.flink.api.common.functions.RichFunctionopen in class org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void close()
throws Exception
close in interface org.apache.flink.api.common.functions.RichFunctionclose in class org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void processMatch(Map<String,List<IN>> match, PatternProcessFunction.Context ctx, org.apache.flink.util.Collector<OUT> out) throws Exception
PatternProcessFunctionTimeContext.timestamp() in this case returns the time of the
last element that was assigned to the match, resulting in this partial match being finished.
processMatch in class PatternProcessFunction<IN,OUT>match - map containing the found pattern. Events are identified by their names.ctx - enables access to time features and emitting results through side outputsout - Collector used to output the generated elementsException - This method may throw exceptions. Throwing an exception will cause the
operation to fail and may trigger recovery.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.