aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgjoranv <gjoranv@gmail.com>2023-11-06 00:30:46 +0100
committergjoranv <gjoranv@gmail.com>2023-11-06 00:30:46 +0100
commitc5d8e300da1bee0cff8e83a3c0a4b9a9a4fa8375 (patch)
tree51b25fb9d85b88651c57ec2d3c7317dc52cfc10a
parent26eb8b569a889ef2be3678db1220ac5d6aba66d8 (diff)
Revert "Define a few toString"
This reverts commit 879640f15099679dbd48cc6befaa7a150a7d34bc.
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeHistory.java26
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeMembership.java30
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeOwner.java7
3 files changed, 3 insertions, 60 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeHistory.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeHistory.java
index 31b0b3e5f37..0ca4acdcf49 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeHistory.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeHistory.java
@@ -5,9 +5,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.Instant;
-import java.util.Objects;
-
/**
* Wire class for node-repository representation of the history of a node
*
@@ -36,27 +33,4 @@ public class NodeHistory {
return event;
}
- @Override
- public String toString() {
- return "NodeHistory{" +
- "at=" + (at == null ? "null" : Instant.ofEpochSecond(at)) +
- ", agent='" + agent + '\'' +
- ", event='" + event + '\'' +
- '}';
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- NodeHistory that = (NodeHistory) o;
- return Objects.equals(at, that.at) &&
- Objects.equals(agent, that.agent) &&
- Objects.equals(event, that.event);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(at, agent, event);
- }
}
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeMembership.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeMembership.java
index 4a17532d069..3d3bbddd349 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeMembership.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeMembership.java
@@ -4,8 +4,6 @@ package com.yahoo.vespa.hosted.controller.api.integration.noderepository;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.Objects;
-
/**
* @author mpolden
*/
@@ -42,32 +40,4 @@ public class NodeMembership {
public Boolean getRetired() {
return retired;
}
-
- @Override
- public String toString() {
- return "NodeMembership{" +
- "clustertype='" + clustertype + '\'' +
- ", clusterid='" + clusterid + '\'' +
- ", group='" + group + '\'' +
- ", index=" + index +
- ", retired=" + retired +
- '}';
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- NodeMembership that = (NodeMembership) o;
- return Objects.equals(clustertype, that.clustertype) &&
- Objects.equals(clusterid, that.clusterid) &&
- Objects.equals(group, that.group) &&
- Objects.equals(index, that.index) &&
- Objects.equals(retired, that.retired);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(clustertype, clusterid, group, index, retired);
- }
}
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeOwner.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeOwner.java
index ac5e2c9d52a..076d81aa5aa 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeOwner.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeOwner.java
@@ -34,9 +34,6 @@ public class NodeOwner {
}
@Override
- public String toString() { return tenant + '.' + application + '.' + instance; }
-
- @Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -47,5 +44,7 @@ public class NodeOwner {
}
@Override
- public int hashCode() { return Objects.hash(tenant, application, instance); }
+ public int hashCode() {
+ return Objects.hash(tenant, application, instance);
+ }
}