Skip to content

Commit 0b281f7

Browse files
committed
Cleanup
1 parent ad4ee05 commit 0b281f7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

server/src/main/java/org/elasticsearch/action/admin/cluster/stats/CCSTelemetrySnapshot.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ public CCSTelemetrySnapshot() {
114114
tookMrtFalse = new LongMetricValue();
115115
}
116116

117+
public CCSTelemetrySnapshot(boolean useMRT) {
118+
this();
119+
this.useMRT = useMRT;
120+
}
121+
117122
public CCSTelemetrySnapshot(StreamInput in) throws IOException {
118123
this.totalCount = in.readVLong();
119124
this.successCount = in.readVLong();

server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsResponse.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.elasticsearch.common.io.stream.StreamInput;
2020
import org.elasticsearch.common.io.stream.StreamOutput;
2121
import org.elasticsearch.common.unit.ByteSizeValue;
22-
import org.elasticsearch.rest.RestRequest;
2322
import org.elasticsearch.xcontent.ToXContentFragment;
2423
import org.elasticsearch.xcontent.XContentBuilder;
2524

@@ -64,8 +63,8 @@ public ClusterStatsResponse(
6463
this.timestamp = timestamp;
6564
nodesStats = new ClusterStatsNodes(nodes);
6665
indicesStats = new ClusterStatsIndices(nodes, mappingStats, analysisStats, versionStats);
67-
ccsMetrics = new CCSTelemetrySnapshot().setUseMRT(skipMRT == false);
68-
esqlMetrics = new CCSTelemetrySnapshot().setUseMRT(false);
66+
ccsMetrics = new CCSTelemetrySnapshot(skipMRT == false);
67+
esqlMetrics = new CCSTelemetrySnapshot(false);
6968
ClusterHealthStatus status = null;
7069
for (ClusterStatsNodeResponse response : nodes) {
7170
// only the master node populates the status

0 commit comments

Comments
 (0)