diff options
5 files changed, 12 insertions, 14 deletions
diff --git a/config-application-package/src/main/java/com/yahoo/config/model/application/provider/AppSubDirs.java b/config-application-package/src/main/java/com/yahoo/config/model/application/provider/AppSubDirs.java index 4f59a9467fb..f64c36cdf3f 100644 --- a/config-application-package/src/main/java/com/yahoo/config/model/application/provider/AppSubDirs.java +++ b/config-application-package/src/main/java/com/yahoo/config/model/application/provider/AppSubDirs.java @@ -45,10 +45,6 @@ public class AppSubDirs { return root.first; } - public File templates() { - return templates.first; - } - public File rules() { return rules.first; } diff --git a/config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java b/config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java index 13d9283d151..3388261c798 100644 --- a/config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java +++ b/config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java @@ -666,9 +666,9 @@ public class FilesApplicationPackage implements ApplicationPackage { public ApplicationPackage preprocess(Zone zone, DeployLogger logger) throws IOException, TransformerException, ParserConfigurationException, SAXException { IOUtils.recursiveDeleteDir(preprocessedDir); IOUtils.copyDirectory(appDir, preprocessedDir, -1, (dir, name) -> ! name.equals(".preprocessed") && - ! name.equals(SERVICES) && - ! name.equals(HOSTS) && - ! name.equals(CONFIG_DEFINITIONS_DIR)); + ! name.equals(SERVICES) && + ! name.equals(HOSTS) && + ! name.equals(CONFIG_DEFINITIONS_DIR)); preprocessXML(new File(preprocessedDir, SERVICES), getServicesFile(), zone); if (getHostsFile().exists()) { preprocessXML(new File(preprocessedDir, HOSTS), getHostsFile(), zone); diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java index 4a09b289743..f2062cd1473 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java @@ -251,18 +251,20 @@ public class TensorFlowFeatureConverter extends ExpressionTransformer<RankProfil Path constantsPath = ApplicationPackage.MODELS_GENERATED_DIR.append(arguments.modelPath).append("constants"); // "tbf" ending for "typed binary format" - recognized by the nodes receiving the file: - Path constantPath = constantsPath.append(name + ".tbf"); + // Use an absolute path to the constant file to avoid writing it to the .preprocessed sub-directory + // then attempting to read it from a context where the root is outside the .preprocessed directory. + File constantFile = application.getFileReference(constantsPath.append(name + ".tbf")).getAbsoluteFile(); // Remember the constant in a file we replicate in ZooKeeper log.info("Writing converted TensorFlow constant information to " + arguments.rankingConstantsPath().append(name + ".constant")); application.getFile(arguments.rankingConstantsPath().append(name + ".constant")) - .writeFile(new StringReader(name + ":" + constant.type() + ":" + constantPath)); + .writeFile(new StringReader(name + ":" + constant.type() + ":" + constantFile)); // Write content explicitly as a file on the file system as this is distributed using file distribution - log.info("Writing converted TensorFlow constant to " + application.getFileReference(constantPath).getAbsolutePath()); + log.info("Writing converted TensorFlow constant to " + constantFile); createIfNeeded(constantsPath); - IOUtils.writeFile(application.getFileReference(constantPath), TypedBinaryFormat.encode(constant)); - return constantPath; + IOUtils.writeFile(constantFile, TypedBinaryFormat.encode(constant)); + return Path.fromString(constantFile.toString()); } private void createIfNeeded(Path path) { diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/http/ContentHandler.java b/configserver/src/main/java/com/yahoo/vespa/config/server/http/ContentHandler.java index 5e7dfd394e6..7112c7d3e23 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/http/ContentHandler.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/http/ContentHandler.java @@ -16,7 +16,6 @@ import java.util.List; * are handled by this class. * * @author hmusum - * @since 5.1.15 */ public class ContentHandler { @@ -72,7 +71,7 @@ public class ContentHandler { } private void createFile(ContentRequest request, ApplicationFile file) { - if (!request.hasRequestBody()) { + if ( ! request.hasRequestBody()) { throw new BadRequestException("Request must contain body when creating a file"); } try { diff --git a/vagrant/.gitignore b/vagrant/.gitignore index a977916f658..d16c9dbeeb5 100644 --- a/vagrant/.gitignore +++ b/vagrant/.gitignore @@ -1 +1,2 @@ .vagrant/ +*.box
\ No newline at end of file |