This is an automated email from the ASF dual-hosted git repository.
weizhong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new a34faaed072 [FLINK-38339][runtime] Adjust the statistics-related
classes for reusing in the statistical calculations of the rescale history.
(#26982)
a34faaed072 is described below
commit a34faaed0727cd5df1627de07a065d40783ed4b4
Author: Yuepeng Pan <[email protected]>
AuthorDate: Mon Oct 13 19:10:40 2025 +0800
[FLINK-38339][runtime] Adjust the statistics-related classes for reusing in
the statistical calculations of the rescale history. (#26982)
---
.../shortcodes/generated/rest_v1_dispatcher.html | 32 +++++++++++-----------
.../src/test/resources/rest_api_v1.snapshot | 32 +++++++++++-----------
.../CompletedCheckpointStatsSummary.java | 2 ++
.../CompletedCheckpointStatsSummarySnapshot.java | 1 +
.../checkpoint/DefaultCheckpointStatsTracker.java | 1 +
.../flink/runtime/checkpoint/TaskStateStats.java | 1 +
.../CheckpointingStatisticsHandler.java | 2 +-
.../TaskCheckpointStatisticDetailsHandler.java | 4 +--
.../checkpoints/CheckpointingStatistics.java | 1 +
...TaskCheckpointStatisticsWithSubtaskDetails.java | 1 +
.../stats}/StatsSummaryDto.java | 6 ++--
.../{checkpoint => util/stats}/StatsSummary.java | 9 +++---
.../stats}/StatsSummarySnapshot.java | 2 +-
.../CompletedCheckpointStatsSummaryTest.java | 1 +
.../executiongraph/ArchivedExecutionGraphTest.java | 2 +-
.../AbstractCheckpointStatsHandlerTest.java | 2 +-
.../checkpoints/CheckpointingStatisticsTest.java | 1 +
...CheckpointStatisticsWithSubtaskDetailsTest.java | 1 +
.../stats}/StatsSummaryTest.java | 2 +-
19 files changed, 57 insertions(+), 46 deletions(-)
diff --git a/docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
b/docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
index 6e849e7a0f8..a36b1aeaf55 100644
--- a/docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
+++ b/docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
@@ -1838,11 +1838,11 @@ Using 'curl' you can upload a jar via 'curl -X POST -H
"Expect:" -F "jarfile=@pa
"properties" : {
"alignment_buffered" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"checkpointed_size" : {
"type" : "object",
- "id" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto",
+ "id" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto",
"properties" : {
"avg" : {
"type" : "integer"
@@ -1872,19 +1872,19 @@ Using 'curl' you can upload a jar via 'curl -X POST -H
"Expect:" -F "jarfile=@pa
},
"end_to_end_duration" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"persisted_data" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"processed_data" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"state_size" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
}
}
}
@@ -2297,19 +2297,19 @@ Using 'curl' you can upload a jar via 'curl -X POST -H
"Expect:" -F "jarfile=@pa
"properties" : {
"buffered" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"duration" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"persisted" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"processed" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
}
}
},
@@ -2319,17 +2319,17 @@ Using 'curl' you can upload a jar via 'curl -X POST -H
"Expect:" -F "jarfile=@pa
"properties" : {
"async" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"sync" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
}
}
},
"checkpointed_size" : {
"type" : "object",
- "id" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto",
+ "id" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto",
"properties" : {
"avg" : {
"type" : "integer"
@@ -2359,15 +2359,15 @@ Using 'curl' you can upload a jar via 'curl -X POST -H
"Expect:" -F "jarfile=@pa
},
"end_to_end_duration" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"start_delay" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"state_size" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
}
}
}
diff --git a/flink-runtime-web/src/test/resources/rest_api_v1.snapshot
b/flink-runtime-web/src/test/resources/rest_api_v1.snapshot
index cb210d1cdcf..b1b5497354e 100644
--- a/flink-runtime-web/src/test/resources/rest_api_v1.snapshot
+++ b/flink-runtime-web/src/test/resources/rest_api_v1.snapshot
@@ -1307,7 +1307,7 @@
"properties" : {
"checkpointed_size" : {
"type" : "object",
- "id" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto",
+ "id" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto",
"properties" : {
"min" : {
"type" : "integer"
@@ -1337,23 +1337,23 @@
},
"state_size" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"end_to_end_duration" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"alignment_buffered" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"processed_data" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"persisted_data" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
}
}
},
@@ -1910,7 +1910,7 @@
"properties" : {
"checkpointed_size" : {
"type" : "object",
- "id" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto",
+ "id" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto",
"properties" : {
"min" : {
"type" : "integer"
@@ -1940,11 +1940,11 @@
},
"state_size" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"end_to_end_duration" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"checkpoint_duration" : {
"type" : "object",
@@ -1952,11 +1952,11 @@
"properties" : {
"sync" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"async" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
}
}
},
@@ -1966,25 +1966,25 @@
"properties" : {
"buffered" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"processed" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"persisted" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
},
"duration" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
}
}
},
"start_delay" : {
"type" : "object",
- "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:StatsSummaryDto"
+ "$ref" :
"urn:jsonschema:org:apache:flink:runtime:rest:messages:util.stats:StatsSummaryDto"
}
}
},
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummary.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummary.java
index 7488aa1d489..6e8e8b1a41c 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummary.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummary.java
@@ -18,6 +18,8 @@
package org.apache.flink.runtime.checkpoint;
+import org.apache.flink.runtime.util.stats.StatsSummary;
+
import java.io.Serializable;
import static org.apache.flink.util.Preconditions.checkNotNull;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummarySnapshot.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummarySnapshot.java
index a9533df9852..ec153ff457e 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummarySnapshot.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummarySnapshot.java
@@ -18,6 +18,7 @@
package org.apache.flink.runtime.checkpoint;
import org.apache.flink.annotation.Internal;
+import org.apache.flink.runtime.util.stats.StatsSummarySnapshot;
import java.io.Serializable;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultCheckpointStatsTracker.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultCheckpointStatsTracker.java
index 9f891c0181c..d9c63d9d52f 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultCheckpointStatsTracker.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultCheckpointStatsTracker.java
@@ -31,6 +31,7 @@ import
org.apache.flink.runtime.metrics.groups.JobManagerJobMetricGroup;
import org.apache.flink.runtime.rest.messages.checkpoints.CheckpointStatistics;
import org.apache.flink.runtime.rest.util.RestMapperUtils;
import org.apache.flink.runtime.util.LongArrayList;
+import org.apache.flink.runtime.util.stats.StatsSummary;
import org.apache.flink.traces.Span;
import org.apache.flink.traces.SpanBuilder;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/TaskStateStats.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/TaskStateStats.java
index cede8ec6e17..255c45ec531 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/TaskStateStats.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/TaskStateStats.java
@@ -19,6 +19,7 @@
package org.apache.flink.runtime.checkpoint;
import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.util.stats.StatsSummary;
import javax.annotation.Nullable;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/CheckpointingStatisticsHandler.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/CheckpointingStatisticsHandler.java
index cf9dd3306f5..ad3ee133d94 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/CheckpointingStatisticsHandler.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/CheckpointingStatisticsHandler.java
@@ -36,7 +36,7 @@ import org.apache.flink.runtime.rest.messages.MessageHeaders;
import org.apache.flink.runtime.rest.messages.ResponseBody;
import org.apache.flink.runtime.rest.messages.checkpoints.CheckpointStatistics;
import
org.apache.flink.runtime.rest.messages.checkpoints.CheckpointingStatistics;
-import org.apache.flink.runtime.rest.messages.checkpoints.StatsSummaryDto;
+import org.apache.flink.runtime.rest.messages.util.stats.StatsSummaryDto;
import org.apache.flink.runtime.webmonitor.RestfulGateway;
import org.apache.flink.runtime.webmonitor.history.ArchivedJson;
import
org.apache.flink.runtime.webmonitor.history.OnlyExecutionGraphJsonArchivist;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/TaskCheckpointStatisticDetailsHandler.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/TaskCheckpointStatisticDetailsHandler.java
index 0344a559a5c..473c3f52c92 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/TaskCheckpointStatisticDetailsHandler.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/TaskCheckpointStatisticDetailsHandler.java
@@ -22,7 +22,6 @@ import org.apache.flink.api.common.JobID;
import org.apache.flink.runtime.checkpoint.AbstractCheckpointStats;
import org.apache.flink.runtime.checkpoint.CheckpointStatsHistory;
import org.apache.flink.runtime.checkpoint.CheckpointStatsSnapshot;
-import org.apache.flink.runtime.checkpoint.StatsSummary;
import org.apache.flink.runtime.checkpoint.SubtaskStateStats;
import org.apache.flink.runtime.checkpoint.TaskStateStats;
import org.apache.flink.runtime.executiongraph.AccessExecutionGraph;
@@ -36,10 +35,11 @@ import
org.apache.flink.runtime.rest.messages.JobVertexIdPathParameter;
import org.apache.flink.runtime.rest.messages.MessageHeaders;
import org.apache.flink.runtime.rest.messages.ResponseBody;
import
org.apache.flink.runtime.rest.messages.checkpoints.CheckpointIdPathParameter;
-import org.apache.flink.runtime.rest.messages.checkpoints.StatsSummaryDto;
import
org.apache.flink.runtime.rest.messages.checkpoints.SubtaskCheckpointStatistics;
import
org.apache.flink.runtime.rest.messages.checkpoints.TaskCheckpointMessageParameters;
import
org.apache.flink.runtime.rest.messages.checkpoints.TaskCheckpointStatisticsWithSubtaskDetails;
+import org.apache.flink.runtime.rest.messages.util.stats.StatsSummaryDto;
+import org.apache.flink.runtime.util.stats.StatsSummary;
import org.apache.flink.runtime.webmonitor.RestfulGateway;
import org.apache.flink.runtime.webmonitor.history.ArchivedJson;
import
org.apache.flink.runtime.webmonitor.history.OnlyExecutionGraphJsonArchivist;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/CheckpointingStatistics.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/CheckpointingStatistics.java
index 83d9d12290d..b8090b62f1b 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/CheckpointingStatistics.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/CheckpointingStatistics.java
@@ -20,6 +20,7 @@ package org.apache.flink.runtime.rest.messages.checkpoints;
import
org.apache.flink.runtime.rest.handler.job.checkpoints.CheckpointingStatisticsHandler;
import org.apache.flink.runtime.rest.messages.ResponseBody;
+import org.apache.flink.runtime.rest.messages.util.stats.StatsSummaryDto;
import org.apache.flink.util.Preconditions;
import
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/TaskCheckpointStatisticsWithSubtaskDetails.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/TaskCheckpointStatisticsWithSubtaskDetails.java
index c5183f4039e..6836f51c330 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/TaskCheckpointStatisticsWithSubtaskDetails.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/TaskCheckpointStatisticsWithSubtaskDetails.java
@@ -19,6 +19,7 @@
package org.apache.flink.runtime.rest.messages.checkpoints;
import org.apache.flink.runtime.checkpoint.CheckpointStatsStatus;
+import org.apache.flink.runtime.rest.messages.util.stats.StatsSummaryDto;
import org.apache.flink.util.Preconditions;
import
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/StatsSummaryDto.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/util/stats/StatsSummaryDto.java
similarity index 96%
rename from
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/StatsSummaryDto.java
rename to
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/util/stats/StatsSummaryDto.java
index 5a72e30ca2a..792da4aa97a 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/StatsSummaryDto.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/util/stats/StatsSummaryDto.java
@@ -16,10 +16,10 @@
* limitations under the License.
*/
-package org.apache.flink.runtime.rest.messages.checkpoints;
+package org.apache.flink.runtime.rest.messages.util.stats;
-import org.apache.flink.runtime.checkpoint.StatsSummary;
-import org.apache.flink.runtime.checkpoint.StatsSummarySnapshot;
+import org.apache.flink.runtime.util.stats.StatsSummary;
+import org.apache.flink.runtime.util.stats.StatsSummarySnapshot;
import
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
import
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StatsSummary.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/stats/StatsSummary.java
similarity index 94%
rename from
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StatsSummary.java
rename to
flink-runtime/src/main/java/org/apache/flink/runtime/util/stats/StatsSummary.java
index 13d52d134a2..96e0771907a 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StatsSummary.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/stats/StatsSummary.java
@@ -16,9 +16,10 @@
* limitations under the License.
*/
-package org.apache.flink.runtime.checkpoint;
+package org.apache.flink.runtime.util.stats;
import org.apache.flink.metrics.Histogram;
+import org.apache.flink.runtime.checkpoint.CompletedCheckpointStatsSummary;
import org.apache.flink.runtime.metrics.DescriptiveStatisticsHistogram;
import javax.annotation.Nullable;
@@ -51,11 +52,11 @@ public class StatsSummary implements Serializable {
*/
@Nullable private final Histogram histogram;
- StatsSummary() {
+ public StatsSummary() {
this(0);
}
- StatsSummary(int histogramWindowSize) {
+ public StatsSummary(int histogramWindowSize) {
this.histogram =
histogramWindowSize > 0
? new
DescriptiveStatisticsHistogram(histogramWindowSize)
@@ -67,7 +68,7 @@ public class StatsSummary implements Serializable {
*
* @param value Value to add for min/max/avg stats..
*/
- void add(long value) {
+ public void add(long value) {
if (value >= 0) {
if (count > 0) {
min = Math.min(min, value);
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StatsSummarySnapshot.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/stats/StatsSummarySnapshot.java
similarity index 98%
rename from
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StatsSummarySnapshot.java
rename to
flink-runtime/src/main/java/org/apache/flink/runtime/util/stats/StatsSummarySnapshot.java
index 3736120fab5..d2d43496458 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StatsSummarySnapshot.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/stats/StatsSummarySnapshot.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.flink.runtime.checkpoint;
+package org.apache.flink.runtime.util.stats;
import org.apache.flink.annotation.Internal;
import org.apache.flink.metrics.HistogramStatistics;
diff --git
a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummaryTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummaryTest.java
index e1f7582936f..e1652dcc7b6 100644
---
a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummaryTest.java
+++
b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummaryTest.java
@@ -20,6 +20,7 @@ package org.apache.flink.runtime.checkpoint;
import org.apache.flink.core.execution.SavepointFormatType;
import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.util.stats.StatsSummary;
import org.junit.jupiter.api.Test;
diff --git
a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionGraphTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionGraphTest.java
index 65bcf236cec..f69c2e0df0f 100644
---
a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionGraphTest.java
+++
b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionGraphTest.java
@@ -26,7 +26,6 @@ import org.apache.flink.core.testutils.CommonTestUtils;
import org.apache.flink.runtime.checkpoint.CheckpointRetentionPolicy;
import org.apache.flink.runtime.checkpoint.CheckpointStatsSnapshot;
import
org.apache.flink.runtime.checkpoint.CompletedCheckpointStatsSummarySnapshot;
-import org.apache.flink.runtime.checkpoint.StatsSummarySnapshot;
import
org.apache.flink.runtime.concurrent.ComponentMainThreadExecutorServiceAdapter;
import org.apache.flink.runtime.execution.ExecutionState;
import org.apache.flink.runtime.jobgraph.JobGraph;
@@ -42,6 +41,7 @@ import
org.apache.flink.runtime.scheduler.DefaultVertexParallelismStore;
import org.apache.flink.runtime.scheduler.SchedulerBase;
import org.apache.flink.runtime.scheduler.SchedulerTestingUtils;
import org.apache.flink.runtime.taskmanager.TaskExecutionState;
+import org.apache.flink.runtime.util.stats.StatsSummarySnapshot;
import org.apache.flink.streaming.util.RestartStrategyUtils;
import org.apache.flink.testutils.TestingUtils;
import org.apache.flink.testutils.executor.TestExecutorExtension;
diff --git
a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/checkpoints/AbstractCheckpointStatsHandlerTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/checkpoints/AbstractCheckpointStatsHandlerTest.java
index ca8a7aca148..6e0b85353e9 100644
---
a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/checkpoints/AbstractCheckpointStatsHandlerTest.java
+++
b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/checkpoints/AbstractCheckpointStatsHandlerTest.java
@@ -32,7 +32,7 @@ import
org.apache.flink.runtime.rest.messages.JobMessageParameters;
import org.apache.flink.runtime.rest.messages.MessageHeaders;
import
org.apache.flink.runtime.rest.messages.checkpoints.CheckpointingStatistics;
import
org.apache.flink.runtime.rest.messages.checkpoints.CheckpointingStatisticsHeaders;
-import org.apache.flink.runtime.rest.messages.checkpoints.StatsSummaryDto;
+import org.apache.flink.runtime.rest.messages.util.stats.StatsSummaryDto;
import org.apache.flink.runtime.webmonitor.RestfulGateway;
import org.apache.flink.runtime.webmonitor.TestingRestfulGateway;
import org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever;
diff --git
a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/checkpoints/CheckpointingStatisticsTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/checkpoints/CheckpointingStatisticsTest.java
index 807e2299e7c..d67eefcaec5 100644
---
a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/checkpoints/CheckpointingStatisticsTest.java
+++
b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/checkpoints/CheckpointingStatisticsTest.java
@@ -25,6 +25,7 @@ import org.apache.flink.runtime.checkpoint.SavepointType;
import org.apache.flink.runtime.jobgraph.JobVertexID;
import org.apache.flink.runtime.rest.messages.RestResponseMarshallingTestBase;
import
org.apache.flink.runtime.rest.messages.checkpoints.CheckpointStatistics.RestAPICheckpointType;
+import org.apache.flink.runtime.rest.messages.util.stats.StatsSummaryDto;
import
org.apache.flink.testutils.junit.extensions.parameterized.NoOpTestExtension;
import org.junit.jupiter.api.Test;
diff --git
a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/checkpoints/TaskCheckpointStatisticsWithSubtaskDetailsTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/checkpoints/TaskCheckpointStatisticsWithSubtaskDetailsTest.java
index d30348a84cb..89b8acfa52c 100644
---
a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/checkpoints/TaskCheckpointStatisticsWithSubtaskDetailsTest.java
+++
b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/checkpoints/TaskCheckpointStatisticsWithSubtaskDetailsTest.java
@@ -20,6 +20,7 @@ package org.apache.flink.runtime.rest.messages.checkpoints;
import org.apache.flink.runtime.checkpoint.CheckpointStatsStatus;
import org.apache.flink.runtime.rest.messages.RestResponseMarshallingTestBase;
+import org.apache.flink.runtime.rest.messages.util.stats.StatsSummaryDto;
import
org.apache.flink.testutils.junit.extensions.parameterized.NoOpTestExtension;
import org.junit.jupiter.api.extension.ExtendWith;
diff --git
a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/StatsSummaryTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/util/stats/StatsSummaryTest.java
similarity index 98%
rename from
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/StatsSummaryTest.java
rename to
flink-runtime/src/test/java/org/apache/flink/runtime/util/stats/StatsSummaryTest.java
index 09d324a5327..75d78a9b30f 100644
---
a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/StatsSummaryTest.java
+++
b/flink-runtime/src/test/java/org/apache/flink/runtime/util/stats/StatsSummaryTest.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package org.apache.flink.runtime.checkpoint;
+package org.apache.flink.runtime.util.stats;
import org.junit.jupiter.api.Test;