diff options
author | Geir Storli <geirst@oath.com> | 2018-03-13 11:58:22 +0000 |
---|---|---|
committer | Geir Storli <geirst@oath.com> | 2018-03-13 12:49:05 +0000 |
commit | 89974a6ae0d6112a0a30f01731a23ad7794622f6 (patch) | |
tree | 9eee46a8ea4fc85eb3271e8c67e9d8f5a5aa37a9 /clustercontroller-core/src | |
parent | fd2b9eb63a0ac58cedf9addee2235d329b4a4477 (diff) |
Remove never used per storage node ops latencies in host info.
Diffstat (limited to 'clustercontroller-core/src')
3 files changed, 4 insertions, 69 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/hostinfo/StorageNode.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/hostinfo/StorageNode.java index bf7c1fad6ca..f53c3eed28a 100644 --- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/hostinfo/StorageNode.java +++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/hostinfo/StorageNode.java @@ -14,31 +14,6 @@ import java.util.List; */ public class StorageNode { - static public class Put { - private final Long latencyMsSum; - private final Long count; - - @JsonCreator - public Put(@JsonProperty("latency-ms-sum") Long latencyMsSum, @JsonProperty("count") Long count) { - this.latencyMsSum = latencyMsSum; - this.count = count; - } - - public Long getLatencyMsSum() { return latencyMsSum; } - public Long getCount() { return count; } - } - - static public class OpsLatency { - private final Put put; - - @JsonCreator - public OpsLatency(@JsonProperty("put") Put put) { - this.put = put; - } - - public Put getPut() { return put; } - } - static public class BucketStats { private final long total; private final long pending; @@ -80,9 +55,6 @@ public class StorageNode { private final Integer index; - @JsonProperty("ops-latency") - private OpsLatency opsLatencies; - // If a Distributor does not manage any bucket copies for a particular storage node, // then the distributor will not return any min-current-replication-factor for that // storage node. @@ -101,10 +73,6 @@ public class StorageNode { return index; } - public OpsLatency getOpsLatenciesOrNull() { - return opsLatencies; - } - // See documentation on minCurrentReplicationFactor. public Integer getMinCurrentReplicationFactorOrNull() { return minCurrentReplicationFactor; diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java index 9a69b998976..b96f5282971 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java @@ -48,9 +48,6 @@ public class HostInfoTest { List<StorageNode> storageNodeList = hostInfo.getDistributor().getStorageNodes(); assertThat(storageNodeList.size(), is(2)); assertThat(storageNodeList.get(0).getIndex(), is(0)); - assertThat(storageNodeList.get(0).getOpsLatenciesOrNull().getPut().getCount(), is(16L)); - assertThat(storageNodeList.get(1).getOpsLatenciesOrNull().getPut().getCount(), is(18L)); - assertThat(storageNodeList.get(0).getOpsLatenciesOrNull().getPut().getLatencyMsSum(), is(15L)); List<Metrics.Metric> metrics = hostInfo.getMetrics().getMetrics(); assertThat(metrics.size(), is(2)); Metrics.Value value = metrics.get(0).getValue(); @@ -93,15 +90,9 @@ public class HostInfoTest { assertTrue(storageNodeByIndex.containsKey(0)); assertThat(storageNodeByIndex.get(0).getIndex(), is(0)); assertThat(storageNodeByIndex.get(0).getMinCurrentReplicationFactorOrNull(), is(2)); - assertNotNull(storageNodeByIndex.get(0).getOpsLatenciesOrNull()); - assertThat(storageNodeByIndex.get(0).getOpsLatenciesOrNull().getPut().getLatencyMsSum(), is(10000L)); - assertThat(storageNodeByIndex.get(0).getOpsLatenciesOrNull().getPut().getCount(), is(3L)); assertTrue(storageNodeByIndex.containsKey(5)); assertThat(storageNodeByIndex.get(5).getIndex(), is(5)); assertThat(storageNodeByIndex.get(5).getMinCurrentReplicationFactorOrNull(), is(9)); - assertNotNull(storageNodeByIndex.get(5).getOpsLatenciesOrNull()); - assertThat(storageNodeByIndex.get(5).getOpsLatenciesOrNull().getPut().getLatencyMsSum(), is(25000L)); - assertThat(storageNodeByIndex.get(5).getOpsLatenciesOrNull().getPut().getCount(), is(7L)); } } diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/StateRestApiTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/StateRestApiTest.java index 5079f91a2b9..46a50800c53 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/StateRestApiTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/StateRestApiTest.java @@ -125,43 +125,19 @@ public abstract class StateRestApiTest { " \"storage-nodes\": [\n" + " {\n" + " \"node-index\": 1,\n" + - " \"min-current-replication-factor\": 2,\n" + - " \"ops-latency\": {\n" + - " \"put\": {\n" + - " \"latency-ms-sum\": 6,\n" + - " \"count\": 7\n" + - " }\n" + - " }\n" + + " \"min-current-replication-factor\": 2\n" + " },\n" + " {\n" + " \"node-index\": 3,\n" + - " \"min-current-replication-factor\": 2,\n" + - " \"ops-latency\": {\n" + - " \"put\": {\n" + - " \"latency-ms-sum\": 5,\n" + - " \"count\": 4\n" + - " }\n" + - " }\n" + + " \"min-current-replication-factor\": 2\n" + " },\n" + " {\n" + " \"node-index\": 5,\n" + - " \"min-current-replication-factor\": 2,\n" + - " \"ops-latency\": {\n" + - " \"put\": {\n" + - " \"latency-ms-sum\": 4,\n" + - " \"count\": 5\n" + - " }\n" + - " }\n" + + " \"min-current-replication-factor\": 2\n" + " },\n" + " {\n" + " \"node-index\": 7,\n" + - " \"min-current-replication-factor\": 2,\n" + - " \"ops-latency\": {\n" + - " \"put\": {\n" + - " \"latency-ms-sum\": 6,\n" + - " \"count\": 7\n" + - " }\n" + - " }\n" + + " \"min-current-replication-factor\": 2\n" + " }\n" + " ]\n" + " }\n" + |