diff options
author | Harald Musum <musum@yahooinc.com> | 2022-09-01 11:31:14 +0200 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2022-09-01 11:31:14 +0200 |
commit | 2ec85a52d1f110bdf434045d36a51f2f0ea5195f (patch) | |
tree | c3c2f148702e6d81025666cc0ad05b8a44ceb932 /clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyVdsNode.java | |
parent | 9747632efc45d76f1c78e8b70b2f6bf8e2d812dd (diff) |
Remove support for getnodestate RPC method
Has not been used for a long, long time (Vespa 4.1)
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyVdsNode.java')
-rw-r--r-- | clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyVdsNode.java | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyVdsNode.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyVdsNode.java index e0c85036bf4..8ca2d6fdb6a 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyVdsNode.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyVdsNode.java @@ -33,6 +33,8 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; +import static ai.vespa.validation.Validation.requireAtLeast; + /** * * Used to fake a node in VDS, such that we can test the fleetcontroller without dummy interface for talking to @@ -125,7 +127,7 @@ public class DummyVdsNode { type = distributor ? NodeType.DISTRIBUTOR : NodeType.STORAGE; this.index = index; this.nodeState = new NodeState(type, State.UP); - this.stateCommunicationVersion = options.stateCommunicationVersion; + this.stateCommunicationVersion = requireAtLeast(options.stateCommunicationVersion, "state communication version cannot be less than 2", 2); messageResponder.start(); nodeState.setStartTimestamp(timer.getCurrentTimeInMillis() / 1000); } @@ -299,14 +301,6 @@ public class DummyVdsNode { m.returnDesc(0, "returnCode", "Returncode of request. Should be 0 = OK"); supervisor.addMethod(m); - m = new Method("getnodestate", "", "issi", this::rpc_getNodeState); - m.methodDesc("Get nodeState of a node"); - m.returnDesc(0, "returnCode", "Returncode of request. Should be 1 = OK"); - m.returnDesc(1, "returnMessage", "Textual error message if returncode is not ok."); - m.returnDesc(2, "nodeState", "The node state of the given node"); - m.returnDesc(3, "progress", "Progress in percent of node initialization"); - supervisor.addMethod(m); - m = new Method("setsystemstate", "s", "is", this::rpc_setSystemState); m.methodDesc("Set system state of entire system"); m.paramDesc(0, "systemState", "new systemstate"); @@ -362,21 +356,6 @@ public class DummyVdsNode { } } - private void rpc_getNodeState(Request req) { - synchronized(timer) { - if (!negotiatedHandle) { - req.setError(75000, "Connection not bound to a handle"); - return; - } - String stateString = nodeState.serialize(-1, true); - log.log(Level.FINE, () -> "Dummy node " + this + " got old type get node state request, answering: " + stateString); - req.returnValues().add(new Int32Value(1)); - req.returnValues().add(new StringValue("")); - req.returnValues().add(new StringValue(stateString)); - req.returnValues().add(new Int32Value(0)); - } - } - boolean sendGetNodeStateReply(int index) { for (Iterator<Req> it = waitingRequests.iterator(); it.hasNext(); ) { Req r = it.next(); |