diff options
author | Geir Storli <geirst@oath.com> | 2018-02-27 11:06:29 +0100 |
---|---|---|
committer | Geir Storli <geirst@oath.com> | 2018-02-27 11:06:29 +0100 |
commit | 112279999e9d453698ed9f7edff6eb047dc23761 (patch) | |
tree | 1576b2fb0b0a58c33c2183a70ed6aa9a8c95e3ba | |
parent | 42ff4fda44ec98b66af45e798912e735841bc7d6 (diff) |
Remove unused function parameter.
4 files changed, 8 insertions, 11 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStateView.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStateView.java index ea638010ab7..6ce719a97de 100644 --- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStateView.java +++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStateView.java @@ -84,7 +84,7 @@ public class ClusterStateView { public ClusterState getClusterState() { return clusterState; } - public void handleUpdatedHostInfo(Map<Integer, String> hostnames, NodeInfo node, HostInfo hostInfo) { + public void handleUpdatedHostInfo(NodeInfo node, HostInfo hostInfo) { if ( ! node.isDistributor()) return; final int hostVersion; diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/FleetController.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/FleetController.java index 1059434aac3..e100fea780a 100644 --- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/FleetController.java +++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/FleetController.java @@ -325,7 +325,7 @@ public class FleetController implements NodeStateOrHostInfoChangeHandler, NodeAd @Override public void handleUpdatedHostInfo(NodeInfo nodeInfo, HostInfo newHostInfo) { verifyInControllerThread(); - stateVersionTracker.handleUpdatedHostInfo(stateChangeHandler.getHostnames(), nodeInfo, newHostInfo); + stateVersionTracker.handleUpdatedHostInfo(nodeInfo, newHostInfo); } @Override diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/StateVersionTracker.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/StateVersionTracker.java index fffe1c95124..78e587a7446 100644 --- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/StateVersionTracker.java +++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/StateVersionTracker.java @@ -132,9 +132,9 @@ public class StateVersionTracker { } } - void handleUpdatedHostInfo(final Map<Integer, String> hostnames, final NodeInfo node, final HostInfo hostInfo) { + void handleUpdatedHostInfo(final NodeInfo node, final HostInfo hostInfo) { // TODO the wiring here isn't unit tested. Need mockable integration points. - clusterStateView.handleUpdatedHostInfo(hostnames, node, hostInfo); + clusterStateView.handleUpdatedHostInfo(node, hostInfo); } boolean bucketSpaceMergeCompletionStateHasChanged() { diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ClusterStateViewTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ClusterStateViewTest.java index dc8a4a0d441..b456965d549 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ClusterStateViewTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ClusterStateViewTest.java @@ -6,8 +6,6 @@ import com.yahoo.vespa.clustercontroller.core.hostinfo.HostInfo; import com.yahoo.vespa.clustercontroller.core.hostinfo.StorageNodeStatsBridge; import org.junit.Test; -import java.util.HashMap; -import java.util.Map; import java.util.Set; import static org.junit.Assert.assertEquals; @@ -18,7 +16,6 @@ import static org.mockito.Mockito.*; * @since 5.34 */ public class ClusterStateViewTest { - final Map<Integer, String> hostnames = new HashMap<>(); final NodeInfo nodeInfo = mock(NodeInfo.class); final Node node = mock(Node.class); final ClusterStatsAggregator statsAggregator = mock(ClusterStatsAggregator.class); @@ -33,7 +30,7 @@ public class ClusterStateViewTest { public void testWrongNodeType() { when(nodeInfo.isDistributor()).thenReturn(false); - clusterStateView.handleUpdatedHostInfo(hostnames, nodeInfo, createHostInfo("101")); + clusterStateView.handleUpdatedHostInfo(nodeInfo, createHostInfo("101")); verify(statsAggregator, never()).updateForDistributor(anyInt(), any()); } @@ -45,7 +42,7 @@ public class ClusterStateViewTest { when(nodeInfo.isDistributor()).thenReturn(true); when(clusterState.getVersion()).thenReturn(101); - clusterStateView.handleUpdatedHostInfo(hostnames, nodeInfo, createHostInfo("22")); + clusterStateView.handleUpdatedHostInfo(nodeInfo, createHostInfo("22")); verify(statsAggregator, never()).updateForDistributor(anyInt(), any()); } @@ -55,7 +52,7 @@ public class ClusterStateViewTest { when(nodeInfo.isDistributor()).thenReturn(true); when(clusterState.getVersion()).thenReturn(101); - clusterStateView.handleUpdatedHostInfo(hostnames, nodeInfo, createHostInfo("22")); + clusterStateView.handleUpdatedHostInfo(nodeInfo, createHostInfo("22")); verify(statsAggregator, never()).updateForDistributor(anyInt(), any()); } @@ -77,7 +74,7 @@ public class ClusterStateViewTest { when(nodeInfo.getNodeIndex()).thenReturn(3); when(clusterState.getVersion()).thenReturn(101); - clusterStateView.handleUpdatedHostInfo(hostnames, nodeInfo, hostInfo); + clusterStateView.handleUpdatedHostInfo(nodeInfo, hostInfo); verify(statsAggregator).updateForDistributor(3, StorageNodeStatsBridge.generate(hostInfo.getDistributor())); } |