aboutsummaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorOlli Virtanen <ovirtanen@gmail.com>2019-03-22 09:13:19 +0100
committerGitHub <noreply@github.com>2019-03-22 09:13:19 +0100
commit7989191b378263162e31f5226710a0cc9e9c5799 (patch)
tree51c57ea055ed97313126df96e706bc38abe365ef /config-model
parent87d95bebf84693da9ddc4859d616206110956e34 (diff)
parent828c6833bf7794060ab2d209b686db7116531b32 (diff)
Merge pull request #8849 from vespa-engine/ollivir/searchprotocol-protobuf
Search protocol over jrt + protobuf (take 2)
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java b/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java
index d7fc30f19af..12bf14c2242 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java
@@ -115,7 +115,7 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri
/** The validation overrides of this. This is never null. */
private final ValidationOverrides validationOverrides;
-
+
private final FileDistributor fileDistributor;
/** Creates a Vespa Model from internal model types only */
@@ -160,16 +160,17 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri
root = builder.getRoot(VespaModel.ROOT_CONFIGID, deployState, this);
HostSystem hostSystem = root.getHostSystem();
- createGlobalRankProfiles(deployState.getDeployLogger(), deployState.getImportedModels(),
- deployState.rankProfileRegistry(), deployState.getQueryProfiles());
- this.rankProfileList = new RankProfileList(null, // null search -> global
- rankingConstants,
- AttributeFields.empty,
- deployState.rankProfileRegistry(),
- deployState.getQueryProfiles().getRegistry(),
- deployState.getImportedModels());
if (complete) { // create a a completed, frozen model
+ createGlobalRankProfiles(deployState.getDeployLogger(), deployState.getImportedModels(),
+ deployState.rankProfileRegistry(), deployState.getQueryProfiles());
+ this.rankProfileList = new RankProfileList(null, // null search -> global
+ rankingConstants,
+ AttributeFields.empty,
+ deployState.rankProfileRegistry(),
+ deployState.getQueryProfiles().getRegistry(),
+ deployState.getImportedModels());
+
configModelRepo.readConfigModels(deployState, this, builder, root, configModelRegistry);
addServiceClusters(deployState, builder);
setupRouting(deployState);
@@ -186,6 +187,7 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri
else { // create a model with no services instantiated and the given file distributor
this.allocatedHosts = AllocatedHosts.withHosts(hostSystem.getHostSpecs());
this.fileDistributor = fileDistributor;
+ this.rankProfileList = RankProfileList.empty;
}
}
@@ -589,5 +591,5 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri
public ConfigModelRepo configModelRepo() {
return configModelRepo;
}
-
+
}