Class DefaultVertexParallelismStore
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.DefaultVertexParallelismStore
-
- All Implemented Interfaces:
MutableVertexParallelismStore
,VertexParallelismStore
public class DefaultVertexParallelismStore extends Object implements MutableVertexParallelismStore
Maintains the configured parallelisms for vertices, which should be defined by a scheduler.
-
-
Constructor Summary
Constructors Constructor Description DefaultVertexParallelismStore()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<VertexParallelismStore>
applyJobResourceRequirements(VertexParallelismStore oldVertexParallelismStore, JobResourceRequirements jobResourceRequirements)
Create a newVertexParallelismStore
that reflects givenJobResourceRequirements
.VertexParallelismInformation
getParallelismInfo(JobVertexID vertexId)
Returns a given vertex's parallelism information.void
setParallelismInfo(JobVertexID vertexId, VertexParallelismInformation info)
Sets the parallelism properties for the given vertex.
-
-
-
Method Detail
-
applyJobResourceRequirements
public static Optional<VertexParallelismStore> applyJobResourceRequirements(VertexParallelismStore oldVertexParallelismStore, JobResourceRequirements jobResourceRequirements)
Create a newVertexParallelismStore
that reflects givenJobResourceRequirements
.- Parameters:
oldVertexParallelismStore
- old vertex parallelism store that serves as a base for the new onejobResourceRequirements
- to apply over the old vertex parallelism store- Returns:
- new vertex parallelism store iff it was updated
-
setParallelismInfo
public void setParallelismInfo(JobVertexID vertexId, VertexParallelismInformation info)
Description copied from interface:MutableVertexParallelismStore
Sets the parallelism properties for the given vertex.- Specified by:
setParallelismInfo
in interfaceMutableVertexParallelismStore
- Parameters:
vertexId
- vertex to set parallelism forinfo
- parallelism information for the given vertex
-
getParallelismInfo
public VertexParallelismInformation getParallelismInfo(JobVertexID vertexId)
Description copied from interface:VertexParallelismStore
Returns a given vertex's parallelism information.- Specified by:
getParallelismInfo
in interfaceVertexParallelismStore
- Parameters:
vertexId
- vertex for which the parallelism information should be returned- Returns:
- a parallelism information for the given vertex
-
-