当前位置: 首页>>代码示例>>Java>>正文


Java CoProcessFunction类代码示例

本文整理汇总了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);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:37,代码来源:ConnectedStreams.java

示例2: CoProcessOperator

import org.apache.flink.streaming.api.functions.co.CoProcessFunction; //导入依赖的package包/类
public CoProcessOperator(CoProcessFunction<IN1, IN2, OUT> flatMapper) {
	super(flatMapper);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:4,代码来源:CoProcessOperator.java

示例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);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:CoProcessOperator.java

示例4: KeyedCoProcessOperator

import org.apache.flink.streaming.api.functions.co.CoProcessFunction; //导入依赖的package包/类
public KeyedCoProcessOperator(CoProcessFunction<IN1, IN2, OUT> flatMapper) {
	super(flatMapper);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:4,代码来源:KeyedCoProcessOperator.java

示例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);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:KeyedCoProcessOperator.java

示例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);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:KeyedCoProcessOperator.java


注:本文中的org.apache.flink.streaming.api.functions.co.CoProcessFunction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。