use of com.yahoo.vespa.config.search.DispatchConfig in project vespa by vespa-engine.
the class ClusterSearcherTestCase method createSearcher.
private static ClusterSearcher createSearcher(Double maxQueryTimeout, Double maxQueryCacheTimeout) {
ComponentId id = new ComponentId("test-id");
QrSearchersConfig qrsCfg = new QrSearchersConfig(new QrSearchersConfig.Builder().searchcluster(new QrSearchersConfig.Searchcluster.Builder().name("test-cluster")));
ClusterConfig.Builder clusterCfgBld = new ClusterConfig.Builder().clusterName("test-cluster");
if (maxQueryTimeout != null) {
clusterCfgBld.maxQueryTimeout(maxQueryTimeout);
}
if (maxQueryCacheTimeout != null) {
clusterCfgBld.maxQueryCacheTimeout(maxQueryCacheTimeout);
}
ClusterConfig clusterCfg = new ClusterConfig(clusterCfgBld);
DocumentdbInfoConfig documentDbCfg = new DocumentdbInfoConfig(new DocumentdbInfoConfig.Builder().documentdb(new DocumentdbInfoConfig.Documentdb.Builder().name("type1")));
LegacyEmulationConfig emulationCfg = new LegacyEmulationConfig(new LegacyEmulationConfig.Builder());
QrMonitorConfig monitorCfg = new QrMonitorConfig(new QrMonitorConfig.Builder());
Statistics statistics = Statistics.nullImplementation;
Fs4Config fs4Cfg = new Fs4Config(new Fs4Config.Builder());
FS4ResourcePool fs4ResourcePool = new FS4ResourcePool(fs4Cfg);
ClusterSearcher searcher = new ClusterSearcher(id, qrsCfg, clusterCfg, documentDbCfg, emulationCfg, monitorCfg, new DispatchConfig(new DispatchConfig.Builder()), createClusterInfoConfig(), statistics, fs4ResourcePool, new VipStatus());
return searcher;
}
Aggregations