Skip to content

Commit

Permalink
Downgrade version to 2.18.0 for seer/de of new ClusterStatsRequest me…
Browse files Browse the repository at this point in the history
…tric params.

Signed-off-by: Swetha Guptha <gupthasg@amazon.com>
  • Loading branch information
Swetha Guptha committed Oct 23, 2024
1 parent 760e676 commit 424835a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class ClusterStatsIT extends AbstractRollingTestCase {
public void testClusterStats() throws IOException {
Response response = client().performRequest(new Request("GET", "/_cluster/stats"));
validateClusterStatsWithFilterResponse(response, nodeStatsMetrics, indicesStatsMetrics);
if (AbstractRollingTestCase.UPGRADE_FROM_VERSION.onOrAfter(Version.V_3_0_0) || (
CLUSTER_TYPE == ClusterType.UPGRADED && Version.CURRENT.onOrAfter(Version.V_3_0_0))) {
if (AbstractRollingTestCase.UPGRADE_FROM_VERSION.onOrAfter(Version.V_2_18_0) || (
CLUSTER_TYPE == ClusterType.UPGRADED && Version.CURRENT.onOrAfter(Version.V_2_18_0))) {
response = client().performRequest(new Request("GET", "/_cluster/stats/os/nodes/_all"));
validateClusterStatsWithFilterResponse(response, List.of("os"), Collections.emptyList());
response = client().performRequest(new Request("GET", "/_cluster/stats/indices/mappings/nodes/_all"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public ClusterStatsRequest(StreamInput in) throws IOException {
if (in.getVersion().onOrAfter(Version.V_2_16_0)) {
useAggregatedNodeLevelResponses = in.readOptionalBoolean();
}
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_18_0)) {
computeAllMetrics = in.readOptionalBoolean();
final long longMetricsFlags = in.readLong();
for (Metric metric : Metric.values()) {
Expand Down Expand Up @@ -135,7 +135,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_2_16_0)) {
out.writeOptionalBoolean(useAggregatedNodeLevelResponses);
}
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_18_0)) {
out.writeOptionalBoolean(computeAllMetrics);
long longMetricFlags = 0;
for (Metric metric : requestedMetrics) {
Expand All @@ -154,7 +154,7 @@ public void writeTo(StreamOutput out) throws IOException {
* An enumeration of the "core" sections of metrics that may be requested
* from the cluster stats endpoint.
*/
@PublicApi(since = "3.0.0")
@PublicApi(since = "2.18.0")
public enum Metric {
OS("os", 0),
JVM("jvm", 1),
Expand Down Expand Up @@ -192,7 +192,7 @@ public int getIndex() {
*
* When no value is provided for param index_metric, default filter is set to _all.
*/
@PublicApi(since = "3.0.0")
@PublicApi(since = "2.18.0")
public enum IndexMetric {
// Metrics computed from ShardStats
SHARDS("shards", 0),
Expand Down

0 comments on commit 424835a

Please sign in to comment.