@Internal public class PatternSelectAdapter<IN,OUT> extends PatternProcessFunction<IN,OUT>
PatternSelectFunction with PatternProcessFunction.PatternProcessFunction.Context| 构造器和说明 |
|---|
PatternSelectAdapter(PatternSelectFunction<IN,OUT> selectFunction) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 org.apache.flink.api.common.functions.RichFunctionopen 在类中 org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void close()
throws Exception
close 在接口中 org.apache.flink.api.common.functions.RichFunctionclose 在类中 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 在类中 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–2023 The Apache Software Foundation. All rights reserved.