Skip to content

Commit

Permalink
Address Max's comments(third commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
1996fanrui committed Oct 12, 2023
1 parent 4108026 commit 3d0348b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,15 @@ Map<JobVertexID, SortedMap<Instant, ScalingSummary>> getTrimmedScalingHistory(
.getScalingHistory(context)
.map(
scalingHistory -> {
Instant expectedStartTime =
now.minus(
conf.get(AutoScalerOptions.VERTEX_SCALING_HISTORY_AGE));
var entryIt = scalingHistory.entrySet().iterator();
while (entryIt.hasNext()) {
var entry = entryIt.next();
// Limit how long past scaling decisions are remembered
entry.setValue(
entry.getValue()
.tailMap(
now.minus(
conf.get(
AutoScalerOptions
.VERTEX_SCALING_HISTORY_AGE))));
new TreeMap<>(entry.getValue().tailMap(expectedStartTime)));
var vertexHistory = entry.getValue();
while (vertexHistory.size()
> conf.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ CompletableFuture<P> sendRequest(
Map<JobVertexID, Map<FlinkMetric, AggregatedMetric>> jobVertexIDMapMap =
collector.queryAllAggregatedMetrics(context, metrics);

System.out.println(jobVertexIDMapMap);

Assertions.assertEquals(1, jobVertexIDMapMap.size());
Map<FlinkMetric, AggregatedMetric> vertexMetrics = jobVertexIDMapMap.get(jobVertexID);
Assertions.assertNotNull(vertexMetrics);
Expand Down

0 comments on commit 3d0348b

Please sign in to comment.