/** * Creates a new {@code SplitTransformation} from the given input and {@code OutputSelector}. * * @param input The input {@code StreamTransformation} * @param outputSelector The output selector */ public SplitTransformation(StreamTransformation<T> input, OutputSelector<T> outputSelector) { super("Split", input.getOutputType(), input.getParallelism()); this.input = input; this.outputSelector = outputSelector; }
/** * Sets the name of this sink. This name is * used by the visualization and logging during runtime. * * @return The named sink. */ public DataStreamSink<T> name(String name) { transformation.setName(name); return this; }
@Override public DataStreamSink<T> setUidHash(String uidHash) { transformation.setUidHash(uidHash); return this; }
/** * Sets the name of this sink. This name is * used by the visualization and logging during runtime. * * @return The named sink. */ public CassandraSink<IN> name(String name) { if (useDataStreamSink) { getSinkTransformation().setName(name); } else { getStreamTransformation().setName(name); } 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; }
@Override public DataStreamSink<T> setParallelism(int parallelism) { transformation.setParallelism(parallelism); return this; }
@Override public DataStreamSink<T> uid(String uid) { transformation.setUid(uid); return this; }
@Override public DataStreamSink<T> slotSharingGroup(String slotSharingGroup) { transformation.setSlotSharingGroup(slotSharingGroup); return this; } }
@Override public DataStreamSink<T> disableChaining() { this.transformation.setChainingStrategy(ChainingStrategy.NEVER); return this; }
/** * Gets the parallelism for this operator. * * @return The parallelism set for this operator. */ public int getParallelism() { return transformation.getParallelism(); }
/** * Gets the type of the stream. * * @return The type of the datastream. */ public TypeInformation<T> getType() { return transformation.getOutputType(); }
/** * Sets the name of the current data stream. This name is * used by the visualization and logging during runtime. * * @return The named operator. */ public SingleOutputStreamOperator<T> name(String name){ transformation.setName(name); return this; }
/** * Gets the name of the current data stream. This name is * used by the visualization and logging during runtime. * * @return Name of the stream. */ public String getName() { return transformation.getName(); }
/** * Creates a new {@code PartitionTransformation} from the given input and * {@link StreamPartitioner}. * * @param input The input {@code StreamTransformation} * @param partitioner The {@code StreamPartitioner} */ public PartitionTransformation(StreamTransformation<T> input, StreamPartitioner<T> partitioner) { super("Partition", input.getOutputType(), input.getParallelism()); this.input = input; this.partitioner = partitioner; }
@Override public DataStreamSink<T> name(String name) { transformation.setName(name); 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 DataStreamSink<T> setParallelism(int parallelism) { transformation.setParallelism(parallelism); return this; }
/** * Returns the {@code TypeInformation} for the elements from the first input. */ public TypeInformation<IN2> getInputType2() { return input2.getOutputType(); }
/** * Creates a new {@code SelectionTransformation} from the given input that only selects * the streams with the selected names. * * @param input The input {@code StreamTransformation} * @param selectedNames The names from the upstream {@code SplitTransformation} that this * {@code SelectTransformation} selects. */ public SelectTransformation(StreamTransformation<T> input, List<String> selectedNames) { super("Select", input.getOutputType(), input.getParallelism()); this.input = input; this.selectedNames = selectedNames; }
/** * Returns the {@code TypeInformation} for the elements of the input. */ public TypeInformation<IN> getInputType() { return input.getOutputType(); }
/** * Returns the {@code TypeInformation} for the elements from the first input. */ public TypeInformation<IN1> getInputType1() { return input1.getOutputType(); }