summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/prelude/cluster
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-09-17 15:37:05 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2019-09-17 19:47:52 +0200
commit48798974ae6f39d4aa5ecaa30e5749ce3396f7d9 (patch)
tree84536dc1fe01181707dfb947fd57ac35e4981c80 /container-search/src/main/java/com/yahoo/prelude/cluster
parentdf403b49ec9dd9441161aac90688169c166944a2 (diff)
No more fs4 dispatching from fastsearcher.
fs4 is gone
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/cluster')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java19
1 files changed, 6 insertions, 13 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 4ffcc0a4330..3a284fddee4 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
@@ -10,7 +10,6 @@ import com.yahoo.concurrent.Receiver;
import com.yahoo.concurrent.Receiver.MessageState;
import com.yahoo.container.QrSearchersConfig;
import com.yahoo.container.handler.VipStatus;
-import com.yahoo.fs4.mplex.Backend;
import com.yahoo.jdisc.Metric;
import com.yahoo.net.HostName;
import com.yahoo.prelude.IndexFacts;
@@ -106,7 +105,7 @@ public class ClusterSearcher extends Searcher {
super(id);
this.fs4ResourcePool = fs4ResourcePool;
- Dispatcher dispatcher = Dispatcher.create(id.stringValue(), dispatchConfig, fs4ResourcePool, clusterInfoConfig.nodeCount(), vipStatus, metric);
+ Dispatcher dispatcher = Dispatcher.create(id.stringValue(), dispatchConfig, clusterInfoConfig.nodeCount(), vipStatus, metric);
monitor = (dispatcher.searchCluster().directDispatchTarget().isPresent()) // dispatcher should decide vip status instead
? new ClusterMonitor(this, monitorConfig, Optional.empty())
@@ -148,9 +147,8 @@ public class ClusterSearcher extends Searcher {
for (int dispatcherIndex = 0; dispatcherIndex < searchClusterConfig.dispatcher().size(); dispatcherIndex++) {
try {
if ( ! isRemote(searchClusterConfig.dispatcher(dispatcherIndex).host())) {
- Backend dispatchBackend = createBackend(searchClusterConfig.dispatcher(dispatcherIndex));
- FastSearcher searcher = searchDispatch(searchClusterIndex, fs4ResourcePool, docSumParams,
- documentDbConfig, dispatchBackend, dispatcher, dispatcherIndex);
+ FastSearcher searcher = searchDispatch(searchClusterIndex, fs4ResourcePool.getServerId(), docSumParams,
+ documentDbConfig, dispatcher, dispatcherIndex);
addBackendSearcher(searcher);
}
} catch (UnknownHostException e) {
@@ -189,15 +187,14 @@ public class ClusterSearcher extends Searcher {
}
private static FastSearcher searchDispatch(int searchclusterIndex,
- FS4ResourcePool fs4ResourcePool,
+ String serverId,
SummaryParameters docSumParams,
DocumentdbInfoConfig documentdbInfoConfig,
- Backend backend,
Dispatcher dispatcher,
int dispatcherIndex)
{
ClusterParams clusterParams = makeClusterParams(searchclusterIndex, dispatcherIndex);
- return new FastSearcher(backend, fs4ResourcePool, dispatcher, docSumParams, clusterParams, documentdbInfoConfig);
+ return new FastSearcher(serverId, dispatcher, docSumParams, clusterParams, documentdbInfoConfig);
}
private static VdsStreamingSearcher vdsCluster(String serverId,
@@ -231,10 +228,6 @@ public class ClusterSearcher extends Searcher {
maxQueryCacheTimeout = DEFAULT_MAX_QUERY_CACHE_TIMEOUT;
}
- private Backend createBackend(QrSearchersConfig.Searchcluster.Dispatcher disp) {
- return fs4ResourcePool.getBackend(disp.host(), disp.port());
- }
-
ClusterMonitor getMonitor() {
return monitor;
}
@@ -517,7 +510,7 @@ public class ClusterSearcher extends Searcher {
monitor.shutdown();
}
- ExecutorService getExecutor() {
+ private ExecutorService getExecutor() {
return fs4ResourcePool.getExecutor();
}