Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5487#discussion_r169912256
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
---
@@ -447,6 +453,165 @@ public void postStop() throws Exception {
return CompletableFuture.completedFuture(Acknowledge.get());
}
+ @Override
+ public CompletableFuture<Acknowledge> rescaleJob(
+ int newParallelism,
+ RescalingBehaviour rescalingBehaviour,
+ Time timeout) {
+ final ArrayList<JobVertexID> allOperators = new
ArrayList<>(jobGraph.getNumberOfVertices());
+
+ for (JobVertex jobVertex : jobGraph.getVertices()) {
+ allOperators.add(jobVertex.getID());
+ }
+
+ return rescaleOperators(allOperators, newParallelism,
rescalingBehaviour, timeout);
+ }
+
+ @Override
+ public CompletableFuture<Acknowledge> rescaleOperators(
+ Collection<JobVertexID> operators,
+ int newParallelism,
+ RescalingBehaviour rescalingBehaviour,
+ Time timeout) {
+ // 1. Check whether we can rescale the job & rescale the
respective vertices
+ for (JobVertexID jobVertexId : operators) {
+ final JobVertex jobVertex =
jobGraph.findVertexByID(jobVertexId);
+
+ // update max parallelism in case that it has not been
configure
--- End diff --
nit: *configured*
---