Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable nodes usage tests and update serialization version #56051

Merged
merged 1 commit into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@

---
"Verify nodes usage works":
- skip:
version: "all"
reason: "for backport"
- do:
nodes.usage: {}
- is_true: nodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public NodeUsage(StreamInput in) throws IOException {
timestamp = in.readLong();
sinceTime = in.readLong();
restUsage = (Map<String, Long>) in.readGenericValue();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_8_0)) {
aggregationUsage = (Map<String, Object>) in.readGenericValue();
} else {
aggregationUsage = null;
Expand Down Expand Up @@ -121,7 +121,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeLong(timestamp);
out.writeLong(sinceTime);
out.writeGenericValue(restUsage);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeGenericValue(aggregationUsage);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class NodesUsageRequest extends BaseNodesRequest<NodesUsageRequest> {
public NodesUsageRequest(StreamInput in) throws IOException {
super(in);
this.restActions = in.readBoolean();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_8_0)) {
this.aggregations = in.readBoolean();
}
}
Expand Down Expand Up @@ -99,7 +99,7 @@ public NodesUsageRequest aggregations(boolean aggregations) {
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeBoolean(restActions);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeBoolean(aggregations);
}
}
Expand Down