Interface VertexParallelismInformation
- All Known Implementing Classes:
DefaultVertexParallelismInfo
public interface VertexParallelismInformation
Manages the parallelism properties for a vertex in the execution graph, as well as how they can
change during runtime.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanRescaleMaxParallelism(int desiredMaxParallelism) Returns whether the vertex's max parallelism can be changed to a given value.intReturns the vertex's max parallelism.intReturns a vertex's min parallelism.intReturns a vertex's parallelism.voidsetMaxParallelism(int maxParallelism) Changes a given vertex's max parallelism property.voidsetParallelism(int parallelism) Set a given vertex's parallelism property.
-
Method Details
-
getMinParallelism
int getMinParallelism()Returns a vertex's min parallelism.- Returns:
- the min parallelism for the vertex
-
getParallelism
int getParallelism()Returns a vertex's parallelism.- Returns:
- the parallelism for the vertex
-
getMaxParallelism
int getMaxParallelism()Returns the vertex's max parallelism.- Returns:
- the max parallelism for the vertex
-
setParallelism
void setParallelism(int parallelism) Set a given vertex's parallelism property. The parallelism can be changed only if the vertex parallelism was not decided yet (i.e. was -1).- Parameters:
parallelism- the parallelism for the vertex
-
setMaxParallelism
void setMaxParallelism(int maxParallelism) Changes a given vertex's max parallelism property. The caller should first check the validity of the new setting viacanRescaleMaxParallelism(int), otherwise this operation may fail.- Parameters:
maxParallelism- the new max parallelism for the vertex
-
canRescaleMaxParallelism
boolean canRescaleMaxParallelism(int desiredMaxParallelism) Returns whether the vertex's max parallelism can be changed to a given value.- Parameters:
desiredMaxParallelism- the desired max parallelism for the vertex- Returns:
- whether the max parallelism can be changed to the given value
-