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.Map<JobVertexID,VertexParallelismInformation>getAllParallelismInfo()Gets a map of all vertex parallelism information.VertexParallelismInformationgetParallelismInfo(JobVertexID vertexId)Returns a given vertex's parallelism information.voidmergeParallelismStore(VertexParallelismStore parallelismStore)Merges the given parallelism store into the current store.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
-
getAllParallelismInfo
public Map<JobVertexID,VertexParallelismInformation> getAllParallelismInfo()
Description copied from interface:VertexParallelismStoreGets a map of all vertex parallelism information.- Specified by:
getAllParallelismInfoin interfaceVertexParallelismStore- Returns:
- A map containing JobVertexID and corresponding VertexParallelismInformation.
-
mergeParallelismStore
public void mergeParallelismStore(VertexParallelismStore parallelismStore)
Description copied from interface:MutableVertexParallelismStoreMerges the given parallelism store into the current store.- Specified by:
mergeParallelismStorein interfaceMutableVertexParallelismStore- Parameters:
parallelismStore- The parallelism store to be merged.
-
-