summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-10-24 22:32:08 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2019-10-24 22:32:08 +0200
commit093c4c57f0ba5a1380b13b109bd131c7b05f55dc (patch)
tree6e4b8b4b5d2f5c477099d6bf3a3d95412b1a34cb /config-model
parentde4ebbee046517bc5f076e4977d6f56d9fcdb383 (diff)
GC no longer used ports.
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java1
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/SearchInterface.java1
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java31
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/SearchNodeWrapper.java5
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java4
5 files changed, 8 insertions, 34 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java
index 40cc09938e2..7d03a7acee7 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java
@@ -346,7 +346,6 @@ public class IndexedSearchCluster extends SearchCluster
nodeBuilder.group(node.getNodeSpec().groupIndex());
nodeBuilder.host(node.getHostName());
nodeBuilder.port(node.getRpcPort());
- nodeBuilder.fs4port(node.getDispatchPort());
builder.node(nodeBuilder);
}
if (useAdaptiveDispatch)
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchInterface.java b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchInterface.java
index c7d69b6818a..7a3fc7dd715 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchInterface.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchInterface.java
@@ -10,7 +10,6 @@ package com.yahoo.vespa.model.search;
public interface SearchInterface {
NodeSpec getNodeSpec();
- String getDispatcherConnectSpec();
String getHostName();
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java
index fe1a61086f2..a174e7c38e8 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java
@@ -64,8 +64,8 @@ public class SearchNode extends AbstractService implements
private final Optional<Tuning> tuning;
private final Optional<ResourceLimits> resourceLimits;
private static final int RPC_PORT = 0;
- private static final int FS4_PORT = 1;
- private static final int FUTURE_HEALTH_PORT = 2;
+ private static final int UNUSED_1 = 1;
+ private static final int UNUSED_2 = 2;
private static final int UNUSED_3 = 3;
private static final int HEALTH_PORT = 4;
@@ -123,8 +123,8 @@ public class SearchNode extends AbstractService implements
this.clusterName = clusterName;
this.flushOnShutdown = flushOnShutdown;
portsMeta.on(RPC_PORT).tag("rpc").tag("rtc").tag("admin").tag("status");
- portsMeta.on(FS4_PORT).tag("fs4");
- portsMeta.on(FUTURE_HEALTH_PORT).tag("unused");
+ portsMeta.on(UNUSED_1).tag("unused");
+ portsMeta.on(UNUSED_2).tag("unused");
portsMeta.on(UNUSED_3).tag("unused");
portsMeta.on(HEALTH_PORT).tag("http").tag("json").tag("health").tag("state");
// Properties are set in DomSearchBuilder
@@ -156,7 +156,7 @@ public class SearchNode extends AbstractService implements
this.redundancy = redundancy;
}
- public void updatePartition(int partitionId) {
+ void updatePartition(int partitionId) {
nodeSpec = new NodeSpec(nodeSpec.groupIndex(), partitionId);
}
@@ -169,8 +169,8 @@ public class SearchNode extends AbstractService implements
public void allocatePorts(int start, PortAllocBridge from) {
// NB: ignore "start"
from.allocatePort("rpc");
- from.allocatePort("fs4");
- from.allocatePort("future/4");
+ from.allocatePort("unused/1");
+ from.allocatePort("unused/2");
from.allocatePort("unused/3");
from.allocatePort("health");
}
@@ -208,20 +208,6 @@ public class SearchNode extends AbstractService implements
return distributionKey;
}
- /**
- * Returns the connection spec string that resolves to the dispatcher service
- * on this node.
- *
- * @return The connection string.
- */
- public String getDispatcherConnectSpec() {
- return "tcp/" + getHost().getHostname() + ":" + getDispatchPort();
- }
-
- public int getDispatchPort() {
- return getRelativePort(FS4_PORT);
- }
-
private int getHttpPort() {
return getRelativePort(HEALTH_PORT);
}
@@ -236,7 +222,7 @@ public class SearchNode extends AbstractService implements
return getHostName();
}
- public TransactionLogServer getTransactionLogServer() {
+ private TransactionLogServer getTransactionLogServer() {
return tls;
}
@@ -269,7 +255,6 @@ public class SearchNode extends AbstractService implements
@Override
public void getConfig(ProtonConfig.Builder builder) {
builder.
- ptport(getDispatchPort()).
rpcport(getRpcPort()).
httpport(getHttpPort()).
partition(getNodeSpec().partitionId()).
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNodeWrapper.java b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNodeWrapper.java
index fea3285e9a0..73feb0d3a16 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNodeWrapper.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNodeWrapper.java
@@ -17,11 +17,6 @@ public class SearchNodeWrapper implements SearchInterface {
}
@Override
- public String getDispatcherConnectSpec() {
- return node.getDispatcherConnectSpec();
- }
-
- @Override
public String getHostName() {
return node.getHostName();
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java
index 4291c68eff8..8e4bfbe0dac 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java
@@ -116,10 +116,6 @@ public class ClusterTest {
assertEquals(19118, config.node(1).port());
assertEquals(19130, config.node(2).port());
- assertEquals(19107, config.node(0).fs4port());
- assertEquals(19119, config.node(1).fs4port());
- assertEquals(19131, config.node(2).fs4port());
-
assertEquals(0, config.node(0).group());
assertEquals(0, config.node(1).group());
assertEquals(0, config.node(2).group());