Class StreamNode
- java.lang.Object
-
- org.apache.flink.streaming.api.graph.StreamNode
-
- All Implemented Interfaces:
Serializable
@Internal public class StreamNode extends Object implements Serializable
Class representing the operators in the streaming programs, with all their properties.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StreamNode(Integer id, String slotSharingGroup, String coLocationGroup, StreamOperator<?> operator, String operatorName, Class<? extends TaskInvokable> jobVertexClass)StreamNode(Integer id, String slotSharingGroup, String coLocationGroup, StreamOperatorFactory<?> operatorFactory, String operatorName, Class<? extends TaskInvokable> jobVertexClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInEdge(StreamEdge inEdge)voidaddInputRequirement(int inputIndex, StreamConfig.InputRequirement inputRequirement)voidaddOutEdge(StreamEdge outEdge)booleanequals(Object o)org.apache.flink.api.common.attribute.AttributegetAttribute()longgetBufferTimeout()StringgetCoLocationGroup()IntermediateDataSetIDgetConsumeClusterDatasetId()Optional<OperatorCoordinator.Provider>getCoordinatorProvider(String operatorName, OperatorID operatorID)intgetId()List<Integer>getInEdgeIndices()List<StreamEdge>getInEdges()org.apache.flink.api.common.io.InputFormat<?,?>getInputFormat()Map<Integer,StreamConfig.InputRequirement>getInputRequirements()Class<? extends TaskInvokable>getJobVertexClass()Map<org.apache.flink.core.memory.ManagedMemoryUseCase,Integer>getManagedMemoryOperatorScopeUseCaseWeights()Set<org.apache.flink.core.memory.ManagedMemoryUseCase>getManagedMemorySlotScopeUseCases()intgetMaxParallelism()Get the maximum parallelism for this stream node.org.apache.flink.api.common.operators.ResourceSpecgetMinResources()StreamOperator<?>getOperator()StringgetOperatorDescription()StreamOperatorFactory<?>getOperatorFactory()StringgetOperatorName()List<Integer>getOutEdgeIndices()List<StreamEdge>getOutEdges()org.apache.flink.api.common.io.OutputFormat<?>getOutputFormat()intgetParallelism()org.apache.flink.api.common.operators.ResourceSpecgetPreferredResources()StringgetSlotSharingGroup()org.apache.flink.api.common.typeutils.TypeSerializer<?>getStateKeySerializer()org.apache.flink.api.java.functions.KeySelector<?,?>[]getStatePartitioners()StringgetTransformationUID()org.apache.flink.api.common.typeutils.TypeSerializer<?>getTypeSerializerOut()org.apache.flink.api.common.typeutils.TypeSerializer<?>[]getTypeSerializersIn()StringgetUserHash()inthashCode()booleanisOutputOnlyAfterEndOfStream()booleanisSameSlotSharingGroup(StreamNode downstreamVertex)booleanisSupportsConcurrentExecutionAttempts()voidsetAttribute(org.apache.flink.api.common.attribute.Attribute attribute)voidsetBufferTimeout(Long bufferTimeout)voidsetCoLocationGroup(String coLocationGroup)voidsetConsumeClusterDatasetId(IntermediateDataSetID consumeClusterDatasetId)voidsetInputFormat(org.apache.flink.api.common.io.InputFormat<?,?> inputFormat)voidsetManagedMemoryUseCaseWeights(Map<org.apache.flink.core.memory.ManagedMemoryUseCase,Integer> operatorScopeUseCaseWeights, Set<org.apache.flink.core.memory.ManagedMemoryUseCase> slotScopeUseCases)voidsetMaxParallelism(int maxParallelism)Set the maximum parallelism for this stream node.voidsetOperatorDescription(String operatorDescription)voidsetOperatorFactory(StreamOperatorFactory<?> streamOperatorFactory)voidsetOutputFormat(org.apache.flink.api.common.io.OutputFormat<?> outputFormat)voidsetParallelism(Integer parallelism)voidsetResources(org.apache.flink.api.common.operators.ResourceSpec minResources, org.apache.flink.api.common.operators.ResourceSpec preferredResources)voidsetSerializerOut(org.apache.flink.api.common.typeutils.TypeSerializer<?> typeSerializerOut)voidsetSerializersIn(org.apache.flink.api.common.typeutils.TypeSerializer<?>... typeSerializersIn)voidsetSlotSharingGroup(String slotSharingGroup)voidsetStateKeySerializer(org.apache.flink.api.common.typeutils.TypeSerializer<?> stateKeySerializer)voidsetStatePartitioners(org.apache.flink.api.java.functions.KeySelector<?,?>... statePartitioners)voidsetSupportsConcurrentExecutionAttempts(boolean supportsConcurrentExecutionAttempts)voidsetUserHash(String userHash)StringtoString()
-
-
-
Constructor Detail
-
StreamNode
@VisibleForTesting public StreamNode(Integer id, @Nullable String slotSharingGroup, @Nullable String coLocationGroup, @Nullable StreamOperator<?> operator, String operatorName, Class<? extends TaskInvokable> jobVertexClass)
-
StreamNode
public StreamNode(Integer id, @Nullable String slotSharingGroup, @Nullable String coLocationGroup, @Nullable StreamOperatorFactory<?> operatorFactory, String operatorName, Class<? extends TaskInvokable> jobVertexClass)
-
-
Method Detail
-
addInEdge
public void addInEdge(StreamEdge inEdge)
-
addOutEdge
public void addOutEdge(StreamEdge outEdge)
-
getOutEdges
public List<StreamEdge> getOutEdges()
-
getInEdges
public List<StreamEdge> getInEdges()
-
getId
public int getId()
-
setAttribute
public void setAttribute(org.apache.flink.api.common.attribute.Attribute attribute)
-
getAttribute
public org.apache.flink.api.common.attribute.Attribute getAttribute()
-
getParallelism
public int getParallelism()
-
setParallelism
public void setParallelism(Integer parallelism)
-
getMaxParallelism
public int getMaxParallelism()
Get the maximum parallelism for this stream node.- Returns:
- Maximum parallelism
-
setMaxParallelism
public void setMaxParallelism(int maxParallelism)
Set the maximum parallelism for this stream node.- Parameters:
maxParallelism- Maximum parallelism to be set
-
getMinResources
public org.apache.flink.api.common.operators.ResourceSpec getMinResources()
-
getPreferredResources
public org.apache.flink.api.common.operators.ResourceSpec getPreferredResources()
-
setResources
public void setResources(org.apache.flink.api.common.operators.ResourceSpec minResources, org.apache.flink.api.common.operators.ResourceSpec preferredResources)
-
setManagedMemoryUseCaseWeights
public void setManagedMemoryUseCaseWeights(Map<org.apache.flink.core.memory.ManagedMemoryUseCase,Integer> operatorScopeUseCaseWeights, Set<org.apache.flink.core.memory.ManagedMemoryUseCase> slotScopeUseCases)
-
getManagedMemoryOperatorScopeUseCaseWeights
public Map<org.apache.flink.core.memory.ManagedMemoryUseCase,Integer> getManagedMemoryOperatorScopeUseCaseWeights()
-
getManagedMemorySlotScopeUseCases
public Set<org.apache.flink.core.memory.ManagedMemoryUseCase> getManagedMemorySlotScopeUseCases()
-
getBufferTimeout
public long getBufferTimeout()
-
setBufferTimeout
public void setBufferTimeout(Long bufferTimeout)
-
getOperator
public StreamOperator<?> getOperator()
-
getOperatorFactory
@Nullable public StreamOperatorFactory<?> getOperatorFactory()
-
getOperatorName
public String getOperatorName()
-
getOperatorDescription
public String getOperatorDescription()
-
setOperatorDescription
public void setOperatorDescription(String operatorDescription)
-
setSerializersIn
public void setSerializersIn(org.apache.flink.api.common.typeutils.TypeSerializer<?>... typeSerializersIn)
-
getTypeSerializersIn
public org.apache.flink.api.common.typeutils.TypeSerializer<?>[] getTypeSerializersIn()
-
getTypeSerializerOut
public org.apache.flink.api.common.typeutils.TypeSerializer<?> getTypeSerializerOut()
-
setSerializerOut
public void setSerializerOut(org.apache.flink.api.common.typeutils.TypeSerializer<?> typeSerializerOut)
-
getJobVertexClass
public Class<? extends TaskInvokable> getJobVertexClass()
-
getInputFormat
public org.apache.flink.api.common.io.InputFormat<?,?> getInputFormat()
-
setInputFormat
public void setInputFormat(org.apache.flink.api.common.io.InputFormat<?,?> inputFormat)
-
getOutputFormat
public org.apache.flink.api.common.io.OutputFormat<?> getOutputFormat()
-
setOutputFormat
public void setOutputFormat(org.apache.flink.api.common.io.OutputFormat<?> outputFormat)
-
setSlotSharingGroup
public void setSlotSharingGroup(@Nullable String slotSharingGroup)
-
getSlotSharingGroup
@Nullable public String getSlotSharingGroup()
-
setCoLocationGroup
public void setCoLocationGroup(@Nullable String coLocationGroup)
-
getCoLocationGroup
@Nullable public String getCoLocationGroup()
-
isSameSlotSharingGroup
public boolean isSameSlotSharingGroup(StreamNode downstreamVertex)
-
getStatePartitioners
public org.apache.flink.api.java.functions.KeySelector<?,?>[] getStatePartitioners()
-
setStatePartitioners
public void setStatePartitioners(org.apache.flink.api.java.functions.KeySelector<?,?>... statePartitioners)
-
getStateKeySerializer
public org.apache.flink.api.common.typeutils.TypeSerializer<?> getStateKeySerializer()
-
setStateKeySerializer
public void setStateKeySerializer(org.apache.flink.api.common.typeutils.TypeSerializer<?> stateKeySerializer)
-
getTransformationUID
public String getTransformationUID()
-
getUserHash
public String getUserHash()
-
setUserHash
public void setUserHash(String userHash)
-
addInputRequirement
public void addInputRequirement(int inputIndex, StreamConfig.InputRequirement inputRequirement)
-
getInputRequirements
public Map<Integer,StreamConfig.InputRequirement> getInputRequirements()
-
getCoordinatorProvider
public Optional<OperatorCoordinator.Provider> getCoordinatorProvider(String operatorName, OperatorID operatorID)
-
getConsumeClusterDatasetId
@Nullable public IntermediateDataSetID getConsumeClusterDatasetId()
-
setConsumeClusterDatasetId
public void setConsumeClusterDatasetId(@Nullable IntermediateDataSetID consumeClusterDatasetId)
-
isSupportsConcurrentExecutionAttempts
public boolean isSupportsConcurrentExecutionAttempts()
-
setSupportsConcurrentExecutionAttempts
public void setSupportsConcurrentExecutionAttempts(boolean supportsConcurrentExecutionAttempts)
-
isOutputOnlyAfterEndOfStream
public boolean isOutputOnlyAfterEndOfStream()
-
setOperatorFactory
public void setOperatorFactory(StreamOperatorFactory<?> streamOperatorFactory)
-
-