From a74d58dc17e11e918f4d60454a729a70ecb0eea1 Mon Sep 17 00:00:00 2001 From: Mingshi Liu Date: Thu, 29 Jun 2023 22:05:26 -0700 Subject: [PATCH] resolve conflict Signed-off-by: Mingshi Liu --- .../opensearch/action/admin/cluster/node/stats/NodeStats.java | 4 ++-- server/src/main/java/org/opensearch/ingest/IngestStats.java | 2 +- .../src/test/java/org/opensearch/ingest/IngestStatsTests.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java index 8b8042079bad1..affa8dbb8fa69 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java @@ -206,7 +206,7 @@ public NodeStats(StreamInput in) throws IOException { } else { taskCancellationStats = null; } - if (in.getVersion().onOrAfter(Version.V_3_0_0)) { // TODO Update to 2_9_0 when we backport to 2.x + if (in.getVersion().onOrAfter(Version.V_2_9_0)) { // TODO Update to 2_9_0 when we backport to 2.x searchPipelineStats = in.readOptionalWriteable(SearchPipelineStats::new); } else { searchPipelineStats = null; @@ -446,7 +446,7 @@ public void writeTo(StreamOutput out) throws IOException { if (out.getVersion().onOrAfter(Version.V_2_9_0)) { out.writeOptionalWriteable(taskCancellationStats); } - if (out.getVersion().onOrAfter(Version.V_3_0_0)) { // TODO: Update to 2_9_0 once we backport to 2.x + if (out.getVersion().onOrAfter(Version.V_2_9_0)) { // TODO: Update to 2_9_0 once we backport to 2.x out.writeOptionalWriteable(searchPipelineStats); } } diff --git a/server/src/main/java/org/opensearch/ingest/IngestStats.java b/server/src/main/java/org/opensearch/ingest/IngestStats.java index d32e97cbc409d..4fa04b4af2c67 100644 --- a/server/src/main/java/org/opensearch/ingest/IngestStats.java +++ b/server/src/main/java/org/opensearch/ingest/IngestStats.java @@ -92,7 +92,7 @@ public IngestStats(StreamInput in) throws IOException { processorType = in.readString(); OperationStats processorStat = new OperationStats(in); } - Stats processorStat = new Stats(in); + OperationStats processorStat = new OperationStats(in); processorStatsPerPipeline.add(new ProcessorStat(processorName, processorType, processorStat)); } this.processorStats.put(pipelineId, processorStatsPerPipeline); diff --git a/server/src/test/java/org/opensearch/ingest/IngestStatsTests.java b/server/src/test/java/org/opensearch/ingest/IngestStatsTests.java index 2a5b4a6f9e625..2dae90e858d29 100644 --- a/server/src/test/java/org/opensearch/ingest/IngestStatsTests.java +++ b/server/src/test/java/org/opensearch/ingest/IngestStatsTests.java @@ -60,7 +60,7 @@ public void testSerialization() throws IOException { } public void testBWCIngestProcessorTypeStats() throws IOException { - IngestStats.Stats totalStats = new IngestStats.Stats(50, 100, 200, 300); + OperationStats totalStats = new OperationStats(50, 100, 200, 300); List pipelineStats = createPipelineStats(); Map> processorStats = createProcessorStats(pipelineStats); IngestStats expectedIngestStats = new IngestStats(totalStats, pipelineStats, processorStats);