本文整理匯總了Java中org.apache.flink.streaming.api.functions.co.CoProcessFunction類的典型用法代碼示例。如果您正苦於以下問題:Java CoProcessFunction類的具體用法?Java CoProcessFunction怎麽用?Java CoProcessFunction使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CoProcessFunction類屬於org.apache.flink.streaming.api.functions.co包,在下文中一共展示了CoProcessFunction類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: process
import org.apache.flink.streaming.api.functions.co.CoProcessFunction; //導入依賴的package包/類
/**
* Applies the given {@link CoProcessFunction} on the connected input streams,
* thereby creating a transformed output stream.
*
* <p>The function will be called for every element in the input streams and can produce zero or
* more output elements. Contrary to the {@link #flatMap(CoFlatMapFunction)} function, this
* function can also query the time and set timers. When reacting to the firing of set timers
* the function can directly emit elements and/or register yet more timers.
*
* @param coProcessFunction The {@link CoProcessFunction} that is called for each element
* in the stream.
*
* @param <R> The type of elements emitted by the {@code CoProcessFunction}.
*
* @return The transformed {@link DataStream}.
*/
@PublicEvolving
public <R> SingleOutputStreamOperator<R> process(
CoProcessFunction<IN1, IN2, R> coProcessFunction) {
TypeInformation<R> outTypeInfo = TypeExtractor.getBinaryOperatorReturnType(
coProcessFunction,
CoProcessFunction.class,
0,
1,
2,
TypeExtractor.NO_INDEX,
TypeExtractor.NO_INDEX,
TypeExtractor.NO_INDEX,
getType1(),
getType2(),
Utils.getCallLocationName(),
true);
return process(coProcessFunction, outTypeInfo);
}
示例2: CoProcessOperator
import org.apache.flink.streaming.api.functions.co.CoProcessFunction; //導入依賴的package包/類
public CoProcessOperator(CoProcessFunction<IN1, IN2, OUT> flatMapper) {
super(flatMapper);
}
示例3: ContextImpl
import org.apache.flink.streaming.api.functions.co.CoProcessFunction; //導入依賴的package包/類
ContextImpl(CoProcessFunction<IN1, IN2, OUT> function, ProcessingTimeService timerService) {
function.super();
this.timerService = checkNotNull(timerService);
}
示例4: KeyedCoProcessOperator
import org.apache.flink.streaming.api.functions.co.CoProcessFunction; //導入依賴的package包/類
public KeyedCoProcessOperator(CoProcessFunction<IN1, IN2, OUT> flatMapper) {
super(flatMapper);
}
示例5: ContextImpl
import org.apache.flink.streaming.api.functions.co.CoProcessFunction; //導入依賴的package包/類
ContextImpl(CoProcessFunction<IN1, IN2, OUT> function, TimerService timerService) {
function.super();
this.timerService = checkNotNull(timerService);
}
示例6: OnTimerContextImpl
import org.apache.flink.streaming.api.functions.co.CoProcessFunction; //導入依賴的package包/類
OnTimerContextImpl(CoProcessFunction<IN1, IN2, OUT> function, TimerService timerService) {
function.super();
this.timerService = checkNotNull(timerService);
}