summaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-09-23 14:32:13 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2019-09-23 14:32:13 +0200
commitaa75ec9ee622717bfe59595021171ad13ccdc128 (patch)
tree776a75cda163f190caa3062d59e505c31e030cf8 /container-search
parentfc12eb58a2f0cf9a6bb9f9301faf171d924a4289 (diff)
GC unused code
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java9
-rw-r--r--container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java27
2 files changed, 0 insertions, 36 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java b/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java
index 71f6b5bb87b..1f621eb926c 100644
--- a/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java
+++ b/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java
@@ -124,15 +124,6 @@ public class ClusterSearcher extends Searcher {
return null;
}
- /**
- * Returns false if this host is local.
- */
- boolean isRemote(String host) throws UnknownHostException {
- return (InetAddress.getByName(host).isLoopbackAddress())
- ? false
- : !host.equals(HostName.getLocalhost());
- }
-
private static ClusterParams makeClusterParams(int searchclusterIndex) {
return new ClusterParams("sc" + searchclusterIndex + ".num" + 0);
}
diff --git a/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java b/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
index c772300876b..f35d77de01a 100644
--- a/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
+++ b/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
@@ -21,12 +21,9 @@ import com.yahoo.search.Result;
import com.yahoo.search.config.ClusterConfig;
import com.yahoo.search.result.Hit;
import com.yahoo.search.searchchain.Execution;
-import com.yahoo.statistics.Statistics;
import com.yahoo.vespa.config.search.DispatchConfig;
import org.junit.Test;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -420,26 +417,6 @@ public class ClusterSearcherTestCase {
}
@Test
- public void testLocalConnect() throws UnknownHostException {
- ClusterSearcher cluster = new ClusterSearcher(new LinkedHashSet<>(Arrays.asList("dummy")));
- boolean canFindYahoo;
- final String yahoo = "www.yahoo.com";
-
- try {
- canFindYahoo = (null != InetAddress.getByName(yahoo));
- } catch (Exception e) {
- canFindYahoo = false;
- }
-
- assertFalse(cluster.isRemote("127.0.0.1"));
- assertFalse(cluster.isRemote("localhost"));
-
- if (canFindYahoo) {
- assertTrue(cluster.isRemote(yahoo));
- }
- }
-
- @Test
public void testRequireThatSearchFailsForUndefinedRankProfileWithOneDocType() {
Execution execution = createExecution(Arrays.asList("type1"), false);
@@ -525,10 +502,6 @@ public class ClusterSearcherTestCase {
searchClusterConfig.searchdef("streaming_sd");
}
qrSearchersConfig.searchcluster(searchClusterConfig);
- QrSearchersConfig.Searchcluster.Dispatcher.Builder dispatcherConfig = new QrSearchersConfig.Searchcluster.Dispatcher.Builder();
- dispatcherConfig.host("localhost");
- dispatcherConfig.port(0);
- searchClusterConfig.dispatcher(dispatcherConfig);
ClusterConfig.Builder clusterConfig = new ClusterConfig.Builder().clusterName(clusterName);
if (maxQueryTimeout != null)