summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-10-03 18:05:59 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2018-10-03 18:05:59 +0200
commitd6c8a5265e75b161d5c146f2728789d97f9d8242 (patch)
tree900247233bd0bad515d1ce9cc513f3ef5119a735 /config-model
parent8b3a191ab75edf301ed71f21a752bfd9ec69be4c (diff)
Remove unused parameters
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java6
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java2
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java18
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java10
5 files changed, 17 insertions, 26 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java
index 7c2d9a3b0ad..0c5c7733dda 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java
@@ -16,7 +16,6 @@ import com.yahoo.searchlib.rankingexpression.integration.ml.ImportedModels;
import java.io.IOException;
import java.io.Writer;
-import java.util.List;
/**
* A set of all derived configuration of a search definition. Use this as a facade to individual configurations when
@@ -51,7 +50,7 @@ public class DerivedConfiguration {
RankProfileRegistry rankProfileRegistry,
QueryProfileRegistry queryProfiles,
ImportedModels importedModels) {
- this(search, null, new BaseDeployLogger(), rankProfileRegistry, queryProfiles, importedModels);
+ this(search, new BaseDeployLogger(), rankProfileRegistry, queryProfiles, importedModels);
}
/**
@@ -60,15 +59,12 @@ public class DerivedConfiguration {
* @param search The search to derive a configuration from. Derived objects will be snapshots, but this
* argument is live. Which means that this object will be inconsistent when the given
* search definition is later modified.
- * @param abstractSearchList Search definition this one inherits from, only superclass configuration should be
- * generated. Null or empty list if there is none.
* @param deployLogger a {@link DeployLogger} for logging when
* doing operations on this
* @param rankProfileRegistry a {@link com.yahoo.searchdefinition.RankProfileRegistry}
* @param queryProfiles the query profiles of this application
*/
public DerivedConfiguration(Search search,
- List<Search> abstractSearchList,
DeployLogger deployLogger,
RankProfileRegistry rankProfileRegistry,
QueryProfileRegistry queryProfiles,
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java
index c611cdc3dc1..cc392c24cf1 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java
@@ -171,7 +171,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
cluster.setQueryTimeout(queryTimeout);
}
cluster.defaultDocumentsConfig();
- cluster.deriveSearchDefinitions(new ArrayList<>());
+ cluster.deriveSearchDefinitions();
addCluster(cluster);
}
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 c46a662b682..699b5449f1a 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
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.search;
+import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.log.LogLevel;
import com.yahoo.vespa.config.search.AttributesConfig;
import com.yahoo.vespa.config.search.DispatchConfig;
@@ -282,19 +283,16 @@ public class IndexedSearchCluster extends SearchCluster
}
}
}
- protected void deriveAllSearchDefinitions(List<SearchDefinitionSpec> localSearches,
- List<com.yahoo.searchdefinition.Search> globalSearches) {
+ protected void deriveAllSearchDefinitions(List<SearchDefinitionSpec> localSearches) {
for (SearchDefinitionSpec spec : localSearches) {
com.yahoo.searchdefinition.Search search = spec.getSearchDefinition().getSearch();
if ( ! (search instanceof DocumentOnlySearch)) {
- DocumentDatabase db = new DocumentDatabase(this,
- search.getName(),
- new DerivedConfiguration(search,
- globalSearches,
- deployLogger(),
- getRoot().getDeployState().rankProfileRegistry(),
- getRoot().getDeployState().getQueryProfiles().getRegistry(),
- getRoot().getDeployState().getImportedModels()));
+ DeployState deployState = getRoot().getDeployState();
+ DocumentDatabase db = new DocumentDatabase(this, search.getName(),
+ new DerivedConfiguration(search, deployLogger(),
+ deployState.rankProfileRegistry(),
+ deployState.getQueryProfiles().getRegistry(),
+ deployState.getImportedModels()));
// TODO: remove explicit adding of user configs when the complete content model is built using builders.
db.mergeUserConfigs(spec.getUserConfigs());
documentDbs.add(db);
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java
index 379c4c84e16..096cc2e2ede 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java
@@ -48,8 +48,8 @@ public abstract class SearchCluster extends AbstractSearchCluster
* Also stores the document names contained in the search
* definitions.
*/
- public void deriveSearchDefinitions(List<com.yahoo.searchdefinition.Search> global) {
- deriveAllSearchDefinitions(getLocalSDS(), global);
+ public void deriveSearchDefinitions() {
+ deriveAllSearchDefinitions(getLocalSDS());
}
@Override
@@ -139,8 +139,7 @@ public abstract class SearchCluster extends AbstractSearchCluster
return false;
}
- protected abstract void deriveAllSearchDefinitions(List<SearchDefinitionSpec> localSearches,
- List<com.yahoo.searchdefinition.Search> globalSearches);
+ protected abstract void deriveAllSearchDefinitions(List<SearchDefinitionSpec> localSearches);
public abstract void defaultDocumentsConfig();
public abstract DerivedConfiguration getSdConfig();
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java
index 66553ebadf6..69113da42e2 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java
@@ -89,20 +89,18 @@ public class StreamingSearchCluster extends SearchCluster implements
}
}
- protected void deriveAllSearchDefinitions(List<SearchDefinitionSpec> local,
- List<com.yahoo.searchdefinition.Search> global) {
+ protected void deriveAllSearchDefinitions(List<SearchDefinitionSpec> local) {
if (local.size() == 1) {
- deriveSingleSearchDefinition(local.get(0).getSearchDefinition().getSearch(), global);
+ deriveSingleSearchDefinition(local.get(0).getSearchDefinition().getSearch());
} else if (local.size() > 1){
throw new IllegalStateException("Logical indexes are not supported: Got " + local.size() + " search definitions, expected 1");
}
}
- private void deriveSingleSearchDefinition(com.yahoo.searchdefinition.Search localSearch,
- List<com.yahoo.searchdefinition.Search> globalSearches) {
+ private void deriveSingleSearchDefinition(com.yahoo.searchdefinition.Search localSearch) {
if (!localSearch.getName().equals(docTypeName)) {
throw new IllegalStateException("Mismatch between document type name (" + docTypeName + ") and name of search definition (" + localSearch.getName() + ")");
}
- this.sdConfig = new DerivedConfiguration(localSearch, globalSearches, deployLogger(),
+ this.sdConfig = new DerivedConfiguration(localSearch, deployLogger(),
getRoot().getDeployState().rankProfileRegistry(),
getRoot().getDeployState().getQueryProfiles().getRegistry(),
getRoot().getDeployState().getImportedModels());