OUT - Output type of the operator.O - Type of the operator.public class SingleOutputStreamOperator<OUT,O extends SingleOutputStreamOperator<OUT,O>> extends DataStream<OUT>
DataStream with one predefined output type.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isSplit |
protected StreamOperator<?> |
operator |
counter, environment, id, iterationID, iterationWaitTime, parallelism, partitioner, streamGraph, typeInfo, unionizedStreams, userDefinedNames| Modifier | Constructor and Description |
|---|---|
protected |
SingleOutputStreamOperator(DataStream<OUT> dataStream) |
protected |
SingleOutputStreamOperator(StreamExecutionEnvironment environment,
org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo,
StreamOperator<?> operator) |
| Modifier and Type | Method and Description |
|---|---|
SingleOutputStreamOperator<OUT,O> |
broadcast()
Sets the partitioning of the
DataStream so that the output tuples
are broadcasted to every parallel instance of the next component. |
SingleOutputStreamOperator<OUT,O> |
copy()
Creates a copy of the
DataStream |
SingleOutputStreamOperator<OUT,O> |
disableChaining()
Turns off chaining for this operator so thread co-location will not be
used as an optimization.
|
SingleOutputStreamOperator<OUT,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<OUT,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<OUT,O> |
isolateResources()
Isolates the operator in its own resource group.
|
DataStream<OUT> |
name(String name)
Sets the name of the current data stream.
|
SingleOutputStreamOperator<OUT,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<OUT> 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(org.apache.flink.api.common.typeinfo.TypeInformation<OUT> typeInfo)
Adds a type information hint about the return type of this operator.
|
SingleOutputStreamOperator<OUT,O> |
setBufferTimeout(long timeoutMillis)
Sets the maximum time frequency (ms) for the flushing of the output
buffer.
|
SingleOutputStreamOperator<OUT,O> |
setParallelism(int parallelism)
Sets the parallelism for this operator.
|
SingleOutputStreamOperator<OUT,O> |
shuffle()
Sets the partitioning of the
DataStream so that the output tuples
are shuffled uniformly randomly to the next component. |
SingleOutputStreamOperator<OUT,O> |
startNewChain()
Starts a new task chain beginning at this operator.
|
SingleOutputStreamOperator<OUT,O> |
startNewResourceGroup()
By default all operators in a streaming job share the same resource
group.
|
addSink, aggregate, checkFieldRange, clean, connect, connectGraph, count, cross, every, fillInType, filter, flatMap, fold, getClassAtPos, getExecutionConfig, getExecutionEnvironment, getId, getParallelism, getType, groupBy, groupBy, groupBy, iterate, iterate, join, map, max, max, maxBy, maxBy, maxBy, maxBy, min, min, minBy, minBy, minBy, minBy, partitionByHash, partitionByHash, partitionByHash, print, printToErr, project, reduce, setConnectionType, split, sum, sum, transform, union, window, window, write, writeAsCsv, writeAsCsv, writeAsCsv, writeAsCsv, writeAsText, writeAsText, writeAsText, writeAsText, writeToSocketprotected boolean isSplit
protected StreamOperator<?> operator
protected SingleOutputStreamOperator(StreamExecutionEnvironment environment, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo, StreamOperator<?> operator)
protected SingleOutputStreamOperator(DataStream<OUT> dataStream)
public String getName()
public DataStream<OUT> name(String name)
public SingleOutputStreamOperator<OUT,O> setParallelism(int parallelism)
parallelism - The parallelism for this operator.public SingleOutputStreamOperator<OUT,O> setBufferTimeout(long timeoutMillis)
timeoutMillis - The maximum time between two output flushes.public SingleOutputStreamOperator<OUT,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<OUT>public SingleOutputStreamOperator<OUT,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<OUT>public SingleOutputStreamOperator<OUT,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<OUT>public SingleOutputStreamOperator<OUT,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<OUT>public SingleOutputStreamOperator<OUT,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<OUT>public SingleOutputStreamOperator<OUT,O> copy()
DataStreamDataStreamcopy in class DataStream<OUT>public SingleOutputStreamOperator<OUT,O> disableChaining()
StreamExecutionEnvironment.disableOperatorChaining()
however it is not advised for performance considerations.public SingleOutputStreamOperator<OUT,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(org.apache.flink.api.common.typeinfo.TypeInformation<OUT> 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<OUT> 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 hintpublic SingleOutputStreamOperator<OUT,O> startNewResourceGroup()
public SingleOutputStreamOperator<OUT,O> isolateResources()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.