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 newVertexParallelismStorethat reflects givenJobResourceRequirements.VertexParallelismInformationgetParallelismInfo(JobVertexID vertexId)Returns a given vertex's parallelism information.voidsetParallelismInfo(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 newVertexParallelismStorethat 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:MutableVertexParallelismStoreSets the parallelism properties for the given vertex.- Specified by:
setParallelismInfoin interfaceMutableVertexParallelismStore- Parameters:
vertexId- vertex to set parallelism forinfo- parallelism information for the given vertex
-
getParallelismInfo
public VertexParallelismInformation getParallelismInfo(JobVertexID vertexId)
Description copied from interface:VertexParallelismStoreReturns a given vertex's parallelism information.- Specified by:
getParallelismInfoin interfaceVertexParallelismStore- Parameters:
vertexId- vertex for which the parallelism information should be returned- Returns:
- a parallelism information for the given vertex
-
-