/** * Sets the parallelism and maximum parallelism of this operator to one. * And mark this operator cannot set a non-1 degree of parallelism. * * @return The operator with only one parallelism. */ @PublicEvolving public SingleOutputStreamOperator<T> forceNonParallel() { transformation.setParallelism(1); transformation.setMaxParallelism(1); nonParallel = true; return this; }
/** * Sets the parallelism for this operator. * * @param parallelism * The parallelism for this operator. * @return The operator with set parallelism. */ public SingleOutputStreamOperator<T> setParallelism(int parallelism) { Preconditions.checkArgument(canBeParallel() || parallelism == 1, "The parallelism of non parallel operator must be 1."); transformation.setParallelism(parallelism); return this; }
/** * Sets the parallelism for this sink. The degree must be higher than zero. * * @param parallelism The parallelism for this sink. * @return The sink with set parallelism. */ public CassandraSink<IN> setParallelism(int parallelism) { if (useDataStreamSink) { getSinkTransformation().setParallelism(parallelism); } else { getStreamTransformation().setParallelism(parallelism); } return this; }
/** * Sets the parallelism and maximum parallelism of this operator to one. * And mark this operator cannot set a non-1 degree of parallelism. * * @return The operator with only one parallelism. */ @PublicEvolving public SingleOutputStreamOperator<T> forceNonParallel() { transformation.setParallelism(1); transformation.setMaxParallelism(1); nonParallel = true; return this; }
/** * Sets the parallelism and maximum parallelism of this operator to one. * And mark this operator cannot set a non-1 degree of parallelism. * * @return The operator with only one parallelism. */ @PublicEvolving public SingleOutputStreamOperator<T> forceNonParallel() { transformation.setParallelism(1); transformation.setMaxParallelism(1); nonParallel = true; return this; }
/** * Sets the parallelism for this operator. * * @param parallelism * The parallelism for this operator. * @return The operator with set parallelism. */ public SingleOutputStreamOperator<T> setParallelism(int parallelism) { Preconditions.checkArgument(canBeParallel() || parallelism == 1, "The parallelism of non parallel operator must be 1."); transformation.setParallelism(parallelism); return this; }
/** * Sets the parallelism for this operator. * * @param parallelism * The parallelism for this operator. * @return The operator with set parallelism. */ public SingleOutputStreamOperator<T> setParallelism(int parallelism) { Preconditions.checkArgument(canBeParallel() || parallelism == 1, "The parallelism of non parallel operator must be 1."); transformation.setParallelism(parallelism); return this; }
/** * Sets the parallelism and maximum parallelism of this operator to one. * And mark this operator cannot set a non-1 degree of parallelism. * * @return The operator with only one parallelism. */ @PublicEvolving public SingleOutputStreamOperator<T> forceNonParallel() { transformation.setParallelism(1); transformation.setMaxParallelism(1); nonParallel = true; return this; }
/** * Sets the parallelism for this operator. The degree must be 1 or more. * * @param parallelism * The parallelism for this operator. * @return The operator with set parallelism. */ public SingleOutputStreamOperator<T> setParallelism(int parallelism) { Preconditions.checkArgument(parallelism > 0, "The parallelism of an operator must be at least 1."); Preconditions.checkArgument(canBeParallel() || parallelism == 1, "The parallelism of non parallel operator must be 1."); transformation.setParallelism(parallelism); return this; }