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


Java ChainingStrategy.ALWAYS属性代码示例

本文整理汇总了Java中org.apache.flink.streaming.api.operators.ChainingStrategy.ALWAYS属性的典型用法代码示例。如果您正苦于以下问题:Java ChainingStrategy.ALWAYS属性的具体用法?Java ChainingStrategy.ALWAYS怎么用?Java ChainingStrategy.ALWAYS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.flink.streaming.api.operators.ChainingStrategy的用法示例。


在下文中一共展示了ChainingStrategy.ALWAYS属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isChainable

private boolean isChainable(StreamEdge edge, boolean isChainingEnabled) {
	StreamNode upStreamVertex = edge.getSourceVertex();
	StreamNode downStreamVertex = edge.getTargetVertex();

	StreamOperator<?> headOperator = upStreamVertex.getOperator();
	StreamOperator<?> outOperator = downStreamVertex.getOperator();

	return downStreamVertex.getInEdges().size() == 1
			&& outOperator != null
			&& headOperator != null
			&& upStreamVertex.isSameSlotSharingGroup(downStreamVertex)
			&& outOperator.getChainingStrategy() == ChainingStrategy.ALWAYS
			&& (headOperator.getChainingStrategy() == ChainingStrategy.HEAD ||
			headOperator.getChainingStrategy() == ChainingStrategy.ALWAYS)
			&& (edge.getPartitioner() instanceof ForwardPartitioner)
			&& upStreamVertex.getParallelism() == downStreamVertex.getParallelism()
			&& isChainingEnabled;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:18,代码来源:StreamGraphHasherV1.java

示例2: isChainable

public static boolean isChainable(StreamEdge edge, StreamGraph streamGraph) {
	StreamNode upStreamVertex = edge.getSourceVertex();
	StreamNode downStreamVertex = edge.getTargetVertex();

	StreamOperator<?> headOperator = upStreamVertex.getOperator();
	StreamOperator<?> outOperator = downStreamVertex.getOperator();

	return downStreamVertex.getInEdges().size() == 1
			&& outOperator != null
			&& headOperator != null
			&& upStreamVertex.isSameSlotSharingGroup(downStreamVertex)
			&& outOperator.getChainingStrategy() == ChainingStrategy.ALWAYS
			&& (headOperator.getChainingStrategy() == ChainingStrategy.HEAD ||
				headOperator.getChainingStrategy() == ChainingStrategy.ALWAYS)
			&& (edge.getPartitioner() instanceof ForwardPartitioner)
			&& upStreamVertex.getParallelism() == downStreamVertex.getParallelism()
			&& streamGraph.isChainingEnabled();
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:18,代码来源:StreamingJobGraphGenerator.java

示例3: AsyncWaitOperator

public AsyncWaitOperator(
		AsyncFunction<IN, OUT> asyncFunction,
		long timeout,
		int capacity,
		AsyncDataStream.OutputMode outputMode) {
	super(asyncFunction);
	chainingStrategy = ChainingStrategy.ALWAYS;

	Preconditions.checkArgument(capacity > 0, "The number of concurrent async operation should be greater than 0.");
	this.capacity = capacity;

	this.outputMode = Preconditions.checkNotNull(outputMode, "outputMode");

	this.timeout = timeout;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:15,代码来源:AsyncWaitOperator.java

示例4: EventTimeOrderingOperator

/**
 * Creates an event time-based reordering operator.
 */
public EventTimeOrderingOperator() {
    chainingStrategy = ChainingStrategy.ALWAYS;
}
 
开发者ID:pravega,项目名称:flink-connectors,代码行数:6,代码来源:EventTimeOrderingOperator.java

示例5: TimestampsAndPeriodicWatermarksOperator

public TimestampsAndPeriodicWatermarksOperator(AssignerWithPeriodicWatermarks<T> assigner) {
	super(assigner);
	this.chainingStrategy = ChainingStrategy.ALWAYS;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:4,代码来源:TimestampsAndPeriodicWatermarksOperator.java

示例6: ExtractTimestampsOperator

public ExtractTimestampsOperator(TimestampExtractor<T> extractor) {
	super(extractor);
	chainingStrategy = ChainingStrategy.ALWAYS;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:4,代码来源:ExtractTimestampsOperator.java

示例7: TimestampsAndPunctuatedWatermarksOperator

public TimestampsAndPunctuatedWatermarksOperator(AssignerWithPunctuatedWatermarks<T> assigner) {
	super(assigner);
	this.chainingStrategy = ChainingStrategy.ALWAYS;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:4,代码来源:TimestampsAndPunctuatedWatermarksOperator.java

示例8: PointAssignMap

public PointAssignMap(MapFunction<IN, OUT> mapper) {
    super(mapper);
    chainingStrategy = ChainingStrategy.ALWAYS;
}
 
开发者ID:wangyangjun,项目名称:StreamBench,代码行数:4,代码来源:PointAssignMap.java


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