summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-08-21 09:50:52 +0200
committerJon Bratseth <bratseth@oath.com>2018-08-21 09:50:52 +0200
commitb7ede5ee29906e0a1ea61aa42b56913b9d666736 (patch)
treeb2248c93f81d289c0f8f145efa463dbcc5aea83b
parent6110db7eb9e5ca01e6cc9426e68e74232004ae63 (diff)
Don't replicate small constants
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/ConvertedModel.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/ConvertedModel.java b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/ConvertedModel.java
index d85d0983509..5065c72a368 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/ConvertedModel.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/ConvertedModel.java
@@ -697,16 +697,22 @@ public class ConvertedModel {
/** Returns relative path to this model below the "models/" dir in the application package */
public Path modelPath() { return modelPath; }
- public Path storedModelPath() {
+ /** Files stored below this path will be replicated in zookeeper */
+ public Path storedModelReplicatedPath() {
return ApplicationPackage.MODELS_GENERATED_REPLICATED_DIR.append(modelPath());
}
+ /** Files stored below this path will not be replicated */
+ public Path storedModelPath() {
+ return ApplicationPackage.MODELS_GENERATED_DIR.append(modelPath());
+ }
+
public Path expressionPath(String name) {
- return storedModelPath().append("expressions").append(name);
+ return expressionsPath().append(name);
}
public Path expressionsPath() {
- return storedModelPath().append("expressions");
+ return storedModelReplicatedPath().append("expressions");
}
public Path smallConstantsPath() {
@@ -715,12 +721,12 @@ public class ConvertedModel {
/** Path to the large (ranking) constants directory */
public Path largeConstantsPath() {
- return storedModelPath().append("constants");
+ return storedModelReplicatedPath().append("constants");
}
/** Path to the macros file */
public Path macrosPath() {
- return storedModelPath().append("macros.txt");
+ return storedModelReplicatedPath().append("macros.txt");
}
}