Skip to content

Commit

Permalink
[review] Moves DefaultRescaleManagerFactory creation into AdaptiveSch…
Browse files Browse the repository at this point in the history
…eduler constructor.
  • Loading branch information
XComp committed Jun 24, 2024
1 parent d536571 commit 1fca0a1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ public int getMinParallelismChangeForDesiredRescale() {
}

private final Settings settings;
private final RescaleManager.Factory rescaleManagerFactory;

private final JobGraph jobGraph;

private final JobInfo jobInfo;
Expand Down Expand Up @@ -360,6 +362,8 @@ public AdaptiveScheduler(
assertPreconditions(jobGraph);

this.settings = settings;
this.rescaleManagerFactory = DefaultRescaleManager.Factory.fromSettings(settings);

this.jobGraph = jobGraph;
this.jobInfo = new JobInfoImpl(jobGraph.getJobID(), jobGraph.getName());

Expand Down Expand Up @@ -1044,7 +1048,7 @@ public void goToExecuting(
this,
userCodeClassLoader,
failureCollection,
DefaultRescaleManager.Factory.fromSettings(settings),
rescaleManagerFactory,
settings.getMinParallelismChangeForDesiredRescale()));
}

Expand Down

0 comments on commit 1fca0a1

Please sign in to comment.