diff options
author | Geir Storli <geirst@oath.com> | 2018-02-16 13:36:49 +0100 |
---|---|---|
committer | Geir Storli <geirst@oath.com> | 2018-02-19 16:43:17 +0100 |
commit | 077656a019587ea4951a0f4ec156b8bee04e7385 (patch) | |
tree | 5bfb49ec22e8fc3db7c3c9f59bc555cc69b7dc1e /clustercontroller-core/src/test/java/com/yahoo/vespa | |
parent | 6744f7bcf76882700c6aebb25dccf17859399eb4 (diff) |
Rename NodeMergeStats -> ContentNodeStats.
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa')
2 files changed, 31 insertions, 31 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsAggregatorTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsAggregatorTest.java index 9b8ac3c389d..e5bda010faf 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsAggregatorTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsAggregatorTest.java @@ -53,13 +53,13 @@ public class ClusterStatsAggregatorTest { clusterStats.getStorageNode(index).set(createStats(index, syncing, copyingIn, movingOut, copyingOut)); } - private static NodeMergeStats createStats(int index, int syncing, int copyingIn, int movingOut, int copyingOut) { - return new NodeMergeStats( + private static ContentNodeStats createStats(int index, int syncing, int copyingIn, int movingOut, int copyingOut) { + return new ContentNodeStats( index, - new NodeMergeStats.Amount(syncing), - new NodeMergeStats.Amount(copyingIn), - new NodeMergeStats.Amount(movingOut), - new NodeMergeStats.Amount(copyingOut)); + new ContentNodeStats.Amount(syncing), + new ContentNodeStats.Amount(copyingIn), + new ContentNodeStats.Amount(movingOut), + new ContentNodeStats.Amount(copyingOut)); } @Test @@ -75,10 +75,10 @@ public class ClusterStatsAggregatorTest { ClusterStatsAggregator aggregator = new ClusterStatsAggregator(distributors, storageNodes, updater); aggregator.updateForDistributor(hostnames, distributorIndex, clusterStats); - Map<String, NodeMergeStats> expectedStorageNodeStats = new HashMap<>(); - expectedStorageNodeStats.put("storage-node", createStats(storageNodeIndex, 5, 6, 7, 8)); + Map<String, ContentNodeStats> expectedContentNodeStats = new HashMap<>(); + expectedContentNodeStats.put("storage-node", createStats(storageNodeIndex, 5, 6, 7, 8)); - verify(updater).updateMergeOpMetrics(expectedStorageNodeStats); + verify(updater).updateMergeOpMetrics(expectedContentNodeStats); } @Test @@ -105,11 +105,11 @@ public class ClusterStatsAggregatorTest { putStorageStats(storageNode2, 30, 31, 32, 33); aggregator.updateForDistributor(hostnames, distributor2, clusterStats); - Map<String, NodeMergeStats> expectedStorageNodeStats = new HashMap<>(); - expectedStorageNodeStats.put("storage-node-1", createStats(storageNode1, 0 + 10, 1 + 11, 2 + 12, 3 + 13)); - expectedStorageNodeStats.put("storage-node-2", createStats(storageNode2, 20 + 30, 21 + 31, 22 + 32, 23 + 33)); + Map<String, ContentNodeStats> expectedContentNodeStats = new HashMap<>(); + expectedContentNodeStats.put("storage-node-1", createStats(storageNode1, 0 + 10, 1 + 11, 2 + 12, 3 + 13)); + expectedContentNodeStats.put("storage-node-2", createStats(storageNode2, 20 + 30, 21 + 31, 22 + 32, 23 + 33)); - verify(updater, times(1)).updateMergeOpMetrics(expectedStorageNodeStats); + verify(updater, times(1)).updateMergeOpMetrics(expectedContentNodeStats); } @Test @@ -140,12 +140,12 @@ public class ClusterStatsAggregatorTest { // See times(1) below. aggregator.updateForDistributor(hostnames, distributor2, clusterStats); - Map<String, NodeMergeStats> expectedStorageNodeStats = new HashMap<>(); - expectedStorageNodeStats.put("storage-node-1", createStats(storageNode1, 0 + 10, 1 + 11, 2 + 12, 3 + 13)); - expectedStorageNodeStats.put("storage-node-2", createStats(storageNode2, 20 + 30, 21 + 31, 22 + 32, 23 + 33)); + Map<String, ContentNodeStats> expectedContentNodeStats = new HashMap<>(); + expectedContentNodeStats.put("storage-node-1", createStats(storageNode1, 0 + 10, 1 + 11, 2 + 12, 3 + 13)); + expectedContentNodeStats.put("storage-node-2", createStats(storageNode2, 20 + 30, 21 + 31, 22 + 32, 23 + 33)); - verify(updater, times(1)).updateMergeOpMetrics(expectedStorageNodeStats); + verify(updater, times(1)).updateMergeOpMetrics(expectedContentNodeStats); } @Test @@ -183,11 +183,11 @@ public class ClusterStatsAggregatorTest { putStorageStats(storageNode2, 20, 21, 22, 23); aggregator.updateForDistributor(hostnames, distributor1, clusterStats); - Map<String, NodeMergeStats> expectedStorageNodeStats = new HashMap<>(); - expectedStorageNodeStats.put("storage-node-1", createStats(storageNode1, 0, 1, 2, 3)); - expectedStorageNodeStats.put("storage-node-2", createStats(storageNode2, 20, 21, 22, 23)); + Map<String, ContentNodeStats> expectedContentNodeStats = new HashMap<>(); + expectedContentNodeStats.put("storage-node-1", createStats(storageNode1, 0, 1, 2, 3)); + expectedContentNodeStats.put("storage-node-2", createStats(storageNode2, 20, 21, 22, 23)); - verify(updater, times(1)).updateMergeOpMetrics(expectedStorageNodeStats); + verify(updater, times(1)).updateMergeOpMetrics(expectedContentNodeStats); } @Test @@ -209,9 +209,9 @@ public class ClusterStatsAggregatorTest { putStorageStats(storageNode1, 10, 11, 12, 13); aggregator.updateForDistributor(hostnames, distributor2, clusterStats); - Map<String, NodeMergeStats> expectedStorageNodeStats = new HashMap<>(); - expectedStorageNodeStats.put("storage-node-1", createStats(storageNode1, 0 + 10, 1 + 11, 2 + 12, 3 + 13)); + Map<String, ContentNodeStats> expectedContentNodeStats = new HashMap<>(); + expectedContentNodeStats.put("storage-node-1", createStats(storageNode1, 0 + 10, 1 + 11, 2 + 12, 3 + 13)); - verify(updater, times(1)).updateMergeOpMetrics(expectedStorageNodeStats); + verify(updater, times(1)).updateMergeOpMetrics(expectedContentNodeStats); } } diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/StorageNodeStatsBridgeTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/StorageNodeStatsBridgeTest.java index e335026a764..c9ce54ae3be 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/StorageNodeStatsBridgeTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/StorageNodeStatsBridgeTest.java @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.clustercontroller.core.hostinfo; -import com.yahoo.vespa.clustercontroller.core.NodeMergeStats; +import com.yahoo.vespa.clustercontroller.core.ContentNodeStats; import com.yahoo.vespa.clustercontroller.core.ContentClusterStats; import com.yahoo.vespa.clustercontroller.core.StorageNodeStats; import com.yahoo.vespa.clustercontroller.core.StorageNodeStatsContainer; @@ -53,13 +53,13 @@ public class StorageNodeStatsBridgeTest { String data = getJsonString(); HostInfo hostInfo = HostInfo.createHostInfo(data); - ContentClusterStats storageMergeStats = StorageNodeStatsBridge.generate(hostInfo.getDistributor()); + ContentClusterStats clusterStats = StorageNodeStatsBridge.generate(hostInfo.getDistributor()); int size = 0; - for (NodeMergeStats mergeStats : storageMergeStats) { - assertThat(mergeStats.getCopyingIn().getBuckets(), is(2L)); - assertThat(mergeStats.getCopyingOut().getBuckets(), is(4L)); - assertThat(mergeStats.getSyncing().getBuckets(), is(1L)); - assertThat(mergeStats.getMovingOut().getBuckets(), is(3L)); + for (ContentNodeStats nodeStats : clusterStats) { + assertThat(nodeStats.getCopyingIn().getBuckets(), is(2L)); + assertThat(nodeStats.getCopyingOut().getBuckets(), is(4L)); + assertThat(nodeStats.getSyncing().getBuckets(), is(1L)); + assertThat(nodeStats.getMovingOut().getBuckets(), is(3L)); size++; } assertThat(size, is(2)); |