aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/main
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2023-05-26 10:39:23 +0200
committerHarald Musum <musum@yahooinc.com>2023-05-26 10:39:23 +0200
commit97f818a7954269d8eb80351273c76d1ae684e900 (patch)
tree526db1c0b162e74c5b8b90423d9df60212539980 /clustercontroller-core/src/main
parent5f0b4c0461d74738e4969e97563d4a7c962f2174 (diff)
Remove RPC method only used in tests
Diffstat (limited to 'clustercontroller-core/src/main')
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/rpc/RpcServer.java25
1 files changed, 2 insertions, 23 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/rpc/RpcServer.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/rpc/RpcServer.java
index 9358ae0d298..f1ff52816a3 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/rpc/RpcServer.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/rpc/RpcServer.java
@@ -8,7 +8,6 @@ import com.yahoo.jrt.ListenFailedException;
import com.yahoo.jrt.Method;
import com.yahoo.jrt.Request;
import com.yahoo.jrt.Spec;
-import com.yahoo.jrt.StringArray;
import com.yahoo.jrt.StringValue;
import com.yahoo.jrt.Supervisor;
import com.yahoo.jrt.Transport;
@@ -24,9 +23,9 @@ import com.yahoo.vespa.clustercontroller.core.ContentCluster;
import com.yahoo.vespa.clustercontroller.core.MasterElectionHandler;
import com.yahoo.vespa.clustercontroller.core.NodeInfo;
import com.yahoo.vespa.clustercontroller.core.listeners.NodeListener;
+
import java.io.PrintWriter;
import java.io.StringWriter;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
@@ -128,12 +127,6 @@ public class RpcServer {
m.returnDesc(1, "description", "A textual field, used for additional information, such as why there is no master.");
supervisor.addMethod(m);
- m = new Method("getNodeList", "", "SS", this::queueRpcRequest);
- m.methodDesc("Get list of connection-specs to all nodes in the system");
- m.returnDesc(0, "distributors", "connection-spec of all distributor-nodes (empty string for unknown nodes)");
- m.returnDesc(1, "storagenodes", "connection-spec of all storage-nodes, (empty string for unknown nodes)");
- supervisor.addMethod(m);
-
m = new Method("getSystemState", "", "ss", this::queueRpcRequest);
m.methodDesc("Get nodeState of all nodes and the system itself");
m.returnDesc(0, "systemstate", "nodeState string of system");
@@ -194,21 +187,7 @@ public class RpcServer {
if (!masterHandler.isMaster()) {
throw new IllegalStateException("Refusing to answer RPC calls as we are not the master fleetcontroller.");
}
- if (req.methodName().equals("getNodeList")) {
- log.log(Level.FINE, "Resolving RPC getNodeList request");
- List<String> slobrok = new ArrayList<>();
- List<String> rpc = new ArrayList<>();
- for(NodeInfo node : cluster.getNodeInfos()) {
- String s1 = node.getSlobrokAddress();
- String s2 = node.getRpcAddress();
- assert(s1 != null);
- slobrok.add(s1);
- rpc.add(s2 == null ? "" : s2);
- }
- req.returnValues().add(new StringArray(slobrok.toArray(new String[0])));
- req.returnValues().add(new StringArray(rpc.toArray(new String[0])));
- req.returnRequest();
- } else if (req.methodName().equals("getSystemState")) {
+ if (req.methodName().equals("getSystemState")) {
log.log(Level.FINE, "Resolving RPC getSystemState request");
req.returnValues().add(new StringValue(""));
req.returnValues().add(new StringValue(systemState.toString(true)));