當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。