Class DefaultVertexParallelismStore
java.lang.Object
org.apache.flink.runtime.scheduler.DefaultVertexParallelismStore
- All Implemented Interfaces:
MutableVertexParallelismStore,VertexParallelismStore
Maintains the configured parallelisms for vertices, which should be defined by a scheduler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<VertexParallelismStore>applyJobResourceRequirements(VertexParallelismStore oldVertexParallelismStore, JobResourceRequirements jobResourceRequirements) Create a newVertexParallelismStorethat reflects givenJobResourceRequirements.Gets a map of all vertex parallelism information.getParallelismInfo(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.
-
Constructor Details
-
DefaultVertexParallelismStore
public DefaultVertexParallelismStore()
-
-
Method Details
-
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
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
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
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
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.
-