diff options
author | Harald Musum <musum@yahoo-inc.com> | 2016-09-09 12:20:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-09 12:20:50 +0200 |
commit | 380b74dbd1a7a2680debefb9dac08397686333f3 (patch) | |
tree | 74f333d7ce4ff5fc8ecf98806d75c9240212170c /configserver | |
parent | ac5908a6fa8899c5d6343a769f85ec71c12a5429 (diff) | |
parent | 9141bf49d090e7dc89aac7aa7062a549a4e16b51 (diff) |
Merge pull request #602 from yahoo/bratseth/dont-feed-files-to-zk
Bratseth/dont feed files to zk
Diffstat (limited to 'configserver')
3 files changed, 5 insertions, 14 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClient.java b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClient.java index f055887c77a..0653254fdb5 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClient.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClient.java @@ -78,9 +78,9 @@ public class ZooKeeperClient { } } catch (Exception e) { throw new IllegalStateException("Unable to initialize vespa model writing to config server(s) " + - System.getProperty("configsources") + "\n" + - "Please ensure that cloudconfig_server is started on the config server node(s), " + - "and check the vespa log for configserver errors. ", e); + System.getProperty("configsources") + "\n" + + "Please ensure that cloudconfig_server is started on the config server node(s), " + + "and check the vespa log for configserver errors. ", e); } } @@ -103,7 +103,7 @@ public class ZooKeeperClient { /** * Feeds def files and user config into ZK. * - * @param app the application package to feed to zookeeper + * @param app the application package to feed to zookeeper */ void feedZooKeeper(ApplicationPackage app) { trace("Feeding application config into ZooKeeper"); @@ -197,9 +197,6 @@ public class ZooKeeperClient { feedDirZooKeeper(app.getFile(Path.fromString(ApplicationPackage.ROUTINGTABLES_DIR)), getZooKeeperAppPath(ConfigCurator.USERAPP_ZK_SUBPATH).append(ApplicationPackage.ROUTINGTABLES_DIR), xmlFilter, true); - feedDirZooKeeper(app.getFile(Path.fromString(ApplicationPackage.FILES_DIR)), - getZooKeeperAppPath(ConfigCurator.USERAPP_ZK_SUBPATH).append(ApplicationPackage.FILES_DIR), - true); } private void feedDirZooKeeper(ApplicationFile file, Path zooKeeperAppPath, boolean recurse) throws IOException { diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationPackage.java b/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationPackage.java index ad7bf55c086..40f50be2b7f 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationPackage.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationPackage.java @@ -273,7 +273,7 @@ public class ZKApplicationPackage implements ApplicationPackage { String fullPath = ConfigCurator.USERAPP_ZK_SUBPATH + "/" + dirName; if (!liveApp.exists(fullPath)) { throw new IllegalArgumentException("Cannot include directory '" + dirName + - "', as it does not exist in ZooKeeper!"); + "', as it does not exist in ZooKeeper!"); } } diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java index 1bd9249644b..e9894ca26cf 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java @@ -114,12 +114,6 @@ public class ZooKeeperClientTest extends TestWithCurator { } @Test - public void testFeedUserDefinedFiles() { - assertEquals(zk.getData(appPath+ ConfigCurator.USERAPP_ZK_SUBPATH + "/files", "foo.json"), "foo : foo\n"); - assertEquals(zk.getData(appPath+ ConfigCurator.USERAPP_ZK_SUBPATH + "/files/sub", "bar.json"), "bar : bar\n"); - } - - @Test public void testFeedAppMetaDataToZooKeeper() { assertTrue(zk.exists(appPath, ConfigCurator.META_ZK_PATH)); ApplicationMetaData metaData = ApplicationMetaData.fromJsonString(zk.getData(appPath, ConfigCurator.META_ZK_PATH)); |