T - The type of the elements in this StreamO - Type of the operator.public class SingleOutputStreamOperator<T,O extends SingleOutputStreamOperator<T,O>> extends DataStream<T>
DataStream with one predefined output type.environment, transformation| Modifier | Constructor and Description |
|---|---|
protected |
SingleOutputStreamOperator(StreamExecutionEnvironment environment,
StreamTransformation<T> transformation) |
| Modifier and Type | Method and Description |
|---|---|
SingleOutputStreamOperator<T,O> |
broadcast()
Sets the partitioning of the
DataStream so that the output tuples
are broadcasted to every parallel instance of the next component. |
SingleOutputStreamOperator<T,O> |
disableChaining()
Turns off chaining for this operator so thread co-location will not be
used as an optimization.
|
SingleOutputStreamOperator<T,O> |
forward()
Sets the partitioning of the
DataStream so that the output tuples
are forwarded to the local subtask of the next component (whenever
possible). |
String |
getName()
Gets the name of the current data stream.
|
SingleOutputStreamOperator<T,O> |
global()
Sets the partitioning of the
DataStream so that the output values
all go to the first instance of the next processing operator. |
SingleOutputStreamOperator<T,O> |
isolateResources()
Isolates the operator in its own resource group.
|
SingleOutputStreamOperator<T,O> |
name(String name)
Sets the name of the current data stream.
|
SingleOutputStreamOperator<T,O> |
rebalance()
Sets the partitioning of the
DataStream so that the output tuples
are distributed evenly to instances of the next component in a Round-robin
fashion. |
O |
returns(Class<T> typeClass)
Adds a type information hint about the return type of this operator.
|
O |
returns(String typeInfoString)
Adds a type information hint about the return type of this operator.
|
O |
returns(TypeInformation<T> typeInfo)
Adds a type information hint about the return type of this operator.
|
SingleOutputStreamOperator<T,O> |
setBufferTimeout(long timeoutMillis)
Sets the maximum time frequency (ms) for the flushing of the output
buffer.
|
protected DataStream<T> |
setConnectionType(StreamPartitioner<T> partitioner)
Internal function for setting the partitioner for the DataStream
|
SingleOutputStreamOperator<T,O> |
setParallelism(int parallelism)
Sets the parallelism for this operator.
|
SingleOutputStreamOperator<T,O> |
shuffle()
Sets the partitioning of the
DataStream so that the output tuples
are shuffled uniformly randomly to the next component. |
SingleOutputStreamOperator<T,O> |
startNewChain()
Starts a new task chain beginning at this operator.
|
SingleOutputStreamOperator<T,O> |
startNewResourceGroup()
By default all operators in a streaming job share the same resource
group.
|
addSink, assignTimestamps, clean, coGroup, connect, countWindowAll, countWindowAll, filter, flatMap, getExecutionConfig, getExecutionEnvironment, getId, getParallelism, getTransformation, getType, iterate, iterate, join, keyBy, keyBy, keyBy, map, partitionByHash, partitionByHash, partitionByHash, partitionCustom, partitionCustom, partitionCustom, print, printToErr, project, split, timeWindowAll, timeWindowAll, transform, union, windowAll, write, writeAsCsv, writeAsCsv, writeAsCsv, writeAsCsv, writeAsText, writeAsText, writeAsText, writeAsText, writeToSocketprotected SingleOutputStreamOperator(StreamExecutionEnvironment environment, StreamTransformation<T> transformation)
public String getName()
public SingleOutputStreamOperator<T,O> name(String name)
public SingleOutputStreamOperator<T,O> setParallelism(int parallelism)
parallelism - The parallelism for this operator.public SingleOutputStreamOperator<T,O> setBufferTimeout(long timeoutMillis)
timeoutMillis - The maximum time between two output flushes.public SingleOutputStreamOperator<T,O> broadcast()
DataStreamDataStream so that the output tuples
are broadcasted to every parallel instance of the next component.
This setting only effects the how the outputs will be distributed between the parallel instances of the next processing operator.
broadcast in class DataStream<T>public SingleOutputStreamOperator<T,O> shuffle()
DataStreamDataStream so that the output tuples
are shuffled uniformly randomly to the next component.
This setting only effects the how the outputs will be distributed between the parallel instances of the next processing operator.
shuffle in class DataStream<T>public SingleOutputStreamOperator<T,O> forward()
DataStreamDataStream so that the output tuples
are forwarded to the local subtask of the next component (whenever
possible).
This setting only effects the how the outputs will be distributed between the parallel instances of the next processing operator.
forward in class DataStream<T>public SingleOutputStreamOperator<T,O> rebalance()
DataStreamDataStream so that the output tuples
are distributed evenly to instances of the next component in a Round-robin
fashion.
This setting only effects the how the outputs will be distributed between the parallel instances of the next processing operator.
rebalance in class DataStream<T>public SingleOutputStreamOperator<T,O> global()
DataStreamDataStream so that the output values
all go to the first instance of the next processing operator. Use this
setting with care since it might cause a serious performance bottleneck
in the application.global in class DataStream<T>public SingleOutputStreamOperator<T,O> disableChaining()
Chaining can be turned off for the whole
job by StreamExecutionEnvironment.disableOperatorChaining()
however it is not advised for performance considerations.
public SingleOutputStreamOperator<T,O> startNewChain()
public O returns(String typeInfoString)
Type hints are important in cases where the Java compiler throws away generic type information necessary for efficient execution.
This method takes a type information string that will be parsed. A type information string can contain the following types:
Integer, String, etc.
Integer[],
String[], etc.
Tuple1<TYPE0>,
Tuple2<TYPE0, TYPE1>, etc.org.my.MyPojo<myFieldName=TYPE0,myFieldName2=TYPE1>, etc.java.lang.Class, etc.
org.my.CustomClass[],
org.my.CustomClass$StaticInnerClass[], etc.
DoubleValue,
StringValue, IntegerValue, etc.Tuple2<TYPE0,TYPE1>[], etc.Writable<org.my.CustomWritable>Enum<org.my.CustomEnum>"Tuple2<String,Tuple2<Integer,org.my.MyJob$Pojo<word=String>>>"typeInfoString - type information string to be parsedpublic O returns(TypeInformation<T> typeInfo)
Type hints are important in cases where the Java compiler throws away generic type information necessary for efficient execution.
This method takes an instance of TypeInformation such as:
BasicTypeInfoBasicArrayTypeInfoTupleTypeInfoPojoTypeInfoWritableTypeInfoValueTypeInfotypeInfo - type information as a return type hintpublic O returns(Class<T> typeClass)
Type hints are important in cases where the Java compiler throws away generic type information necessary for efficient execution.
This method takes a class that will be analyzed by Flink's type extraction capabilities.
Examples for classes are:
Integer.class, String.class, etc.MyPojo.classTuple1.class,Tuple2.class, etc. are not sufficient.String[].class, etc.typeClass - class as a return type hintprotected DataStream<T> setConnectionType(StreamPartitioner<T> partitioner)
DataStreamsetConnectionType in class DataStream<T>partitioner - Partitioner to set.public SingleOutputStreamOperator<T,O> startNewResourceGroup()
Please note that local executions have by default as many available task slots as the environment parallelism, so in order to start a new resource group the degree of parallelism for the operators must be decreased from the default.
public SingleOutputStreamOperator<T,O> isolateResources()
All subsequent operators are assigned to the default resource group.
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.