diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-07-09 13:40:20 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2021-07-09 13:40:20 +0200 |
commit | 95a7a658c876c62de0f04226f80f5ce5003e77a4 (patch) | |
tree | 9fd7fff405c05df5b9d316601f7b46aa9f28fec9 | |
parent | cc7f426c5fb6d95affe5da8524e6bb3ab55fb842 (diff) |
Use Curator instead of ConfigCurator, part 4
Remove ConfigCurator
14 files changed, 34 insertions, 306 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 c7b64c05405..99632ec323e 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 @@ -30,10 +30,10 @@ import java.util.Map; import java.util.logging.Level; import static com.yahoo.config.application.api.ApplicationPackage.*; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.DEFCONFIGS_ZK_SUBPATH; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.META_ZK_PATH; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USERAPP_ZK_SUBPATH; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USER_DEFCONFIGS_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.DEFCONFIGS_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.META_ZK_PATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.USERAPP_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.USER_DEFCONFIGS_ZK_SUBPATH; /** * Reads and writes application package to and from ZooKeeper. diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java index 351099470db..f827e23b7e0 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java @@ -37,8 +37,8 @@ import com.yahoo.vespa.config.server.monitoring.MetricUpdater; import com.yahoo.vespa.config.server.monitoring.Metrics; import com.yahoo.vespa.config.server.provision.HostProvisionerProvider; import com.yahoo.vespa.config.server.tenant.TenantRepository; -import com.yahoo.vespa.config.server.zookeeper.ConfigCurator; import com.yahoo.vespa.config.server.zookeeper.SessionCounter; +import com.yahoo.vespa.config.server.zookeeper.ZKApplication; import com.yahoo.vespa.curator.Curator; import com.yahoo.vespa.defaults.Defaults; import com.yahoo.vespa.flags.BooleanFlag; @@ -773,7 +773,7 @@ public class SessionRepository { } Path getSessionStatePath(long sessionId) { - return getSessionPath(sessionId).append(ConfigCurator.SESSIONSTATE_ZK_SUBPATH); + return getSessionPath(sessionId).append(ZKApplication.SESSIONSTATE_ZK_SUBPATH); } private SessionZooKeeperClient createSessionZooKeeperClient(long sessionId) { diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClient.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClient.java index 2d380c8eabd..52fbb8e6781 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClient.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClient.java @@ -24,7 +24,7 @@ import com.yahoo.vespa.config.server.deploy.ZooKeeperDeployer; import com.yahoo.vespa.config.server.tenant.OperatorCertificateSerializer; import com.yahoo.vespa.config.server.tenant.TenantRepository; import com.yahoo.vespa.config.server.tenant.TenantSecretStoreSerializer; -import com.yahoo.vespa.config.server.zookeeper.ConfigCurator; +import com.yahoo.vespa.config.server.zookeeper.ZKApplication; import com.yahoo.vespa.config.server.zookeeper.ZKApplicationPackage; import com.yahoo.vespa.curator.Curator; import com.yahoo.vespa.curator.transaction.CuratorOperations; @@ -36,7 +36,7 @@ import java.util.List; import java.util.Optional; import java.util.logging.Level; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USER_DEFCONFIGS_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.USER_DEFCONFIGS_ZK_SUBPATH; import static com.yahoo.vespa.curator.Curator.CompletionWaiter; import static com.yahoo.yolean.Exceptions.uncheck; @@ -73,7 +73,7 @@ public class SessionZooKeeperClient { this.tenantName = tenantName; this.sessionPath = getSessionPath(tenantName, sessionId); this.serverId = serverId; - this.sessionStatusPath = sessionPath.append(ConfigCurator.SESSIONSTATE_ZK_SUBPATH); + this.sessionStatusPath = sessionPath.append(ZKApplication.SESSIONSTATE_ZK_SUBPATH); } public void writeStatus(Session.Status sessionStatus) { diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ConfigCurator.java b/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ConfigCurator.java deleted file mode 100644 index 338d6c197ef..00000000000 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ConfigCurator.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.config.server.zookeeper; - -import com.google.inject.Inject; -import com.yahoo.cloud.config.ZookeeperServerConfig; -import com.yahoo.text.Utf8; -import com.yahoo.vespa.curator.Curator; - -import java.util.List; -import java.util.logging.Level; - -/** - * A (stateful) curator wrapper for the config server. This simplifies Curator method calls used by the config server - * and knows about how config content is mapped to node names and stored. - * <p> - * Usage details: - * Keep the amount of domain-specific logic here to a minimum. - * Data for one application x is stored on this form: - * /config/v2/tenants/x/sessions/y/defconfigs - * /config/v2/tenants/x/sessions/y/userapp - * <p> - * The user application structure is exactly the same as in the user's app dir during deploy. - * The current active session for an application is stored in the node /config/v2/tenants/x/applications/<application-id> - * It is updated outside this class, typically in config server when activating config - * - * @author Vegard Havdal - * @author bratseth - */ -public class ConfigCurator { - - /** Path for def files, under one app */ - public static final String DEFCONFIGS_ZK_SUBPATH = "/defconfigs"; - - /** Path for def files, under one app */ - public static final String USER_DEFCONFIGS_ZK_SUBPATH = "/userdefconfigs"; - - /** Path for metadata about an application */ - public static final String META_ZK_PATH = "/meta"; - - /** Path for the app package's dir structure, under one app */ - public static final String USERAPP_ZK_SUBPATH = "/userapp"; - - /** Path for session state */ - public static final String SESSIONSTATE_ZK_SUBPATH = "/sessionState"; - - private final Curator curator; - - public static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(ConfigCurator.class.getName()); - - /** The maximum size of a ZooKeeper node */ - private final int maxNodeSize; - - public static ConfigCurator create(Curator curator) { - return new ConfigCurator(curator, 1024*1024*10); - } - - @Inject - public ConfigCurator(Curator curator, ZookeeperServerConfig config) { - this(curator, config.juteMaxBuffer()); - } - - private ConfigCurator(Curator curator, int maxNodeSize) { - this.curator = curator; - this.maxNodeSize = maxNodeSize; - log.log(Level.CONFIG, "Using jute max buffer size " + this.maxNodeSize); - testZkConnection(); - } - - /** Returns the curator instance this wraps */ - public Curator curator() { return curator; } - - /** Cleans and creates a zookeeper completely */ - void initAndClear(String path) { - try { - if (exists(path)) - deleteRecurse(path); - createRecurse(path); - } - catch (Exception e) { - throw new RuntimeException("Exception clearing path " + path + " in ZooKeeper", e); - } - } - - /** Creates a path. If the path already exists this does nothing. */ - private void createRecurse(String path) { - try { - if (exists(path)) return; - curator.framework().create().creatingParentsIfNeeded().forPath(path); - } - catch (Exception e) { - throw new RuntimeException("Exception creating path " + path + " in ZooKeeper", e); - } - } - - /** Returns the data at a path and node. */ - public String getData(String path, String node) { - return getData(createFullPath(path, node)); - } - - /** Returns the data at a path */ - public String getData(String path) { - byte[] data = getBytes(path); - return (data == null) ? null : Utf8.toString(data); - } - - /** - * Returns the data at a path, or null if the path does not exist. - * - * @param path a String with a pathname. - * @return a byte array with data. - */ - public byte[] getBytes(String path) { - if ( ! exists(path)) throw new IllegalArgumentException("Cannot read data from path " + path + ", it does not exist"); - - try { - return curator.framework().getData().forPath(path); - } - catch (Exception e) { - throw new RuntimeException("Exception reading from path " + path + " in ZooKeeper", e); - } - } - - /** Returns whether a path exists in zookeeper */ - public boolean exists(String path, String node) { - return exists(createFullPath(path, node)); - } - - /** Returns whether a path exists in zookeeper */ - public boolean exists(String path) { - try { - return curator.framework().checkExists().forPath(path) != null; - } - catch (Exception e) { - throw new RuntimeException("Exception checking existence of path " + path + " in ZooKeeper", e); - } - } - - /** Creates a Zookeeper node. If the node already exists this does nothing. */ - public void createNode(String path) { - if ( ! exists(path)) - createRecurse(path); - } - - /** Creates a Zookeeper node. */ - public void createNode(String path, String node) { - createNode(createFullPath(path, node)); - } - - private String createFullPath(String path, String node) { - return path + (node.startsWith("/") ? node : "/" + node); - } - - /** Sets data at a given path and name. Creates the node if it doesn't exist */ - public void putData(String path, String node, String data) { - putData(path, node, Utf8.toBytes(data)); - } - - /** Sets data at a given path. Creates the node if it doesn't exist */ - public void putData(String path, String data) { - putData(path, Utf8.toBytes(data)); - } - - private void ensureDataIsNotTooLarge(byte[] toPut, String path) { - if (toPut.length >= maxNodeSize) { - throw new IllegalArgumentException("Error: too much zookeeper data in node: " - + "[" + toPut.length + " bytes] (path " + path + ")"); - } - } - - /** Sets data at a given path and name. Creates the node if it doesn't exist */ - private void putData(String path, String node, byte[] data) { - putData(createFullPath(path, node), data); - } - - /** Sets data at a given path. Creates the path if it doesn't exist */ - public void putData(String path, byte[] data) { - try { - ensureDataIsNotTooLarge(data, path); - if (exists(path)) - curator.framework().setData().forPath(path, data); - else - curator.framework().create().creatingParentsIfNeeded().forPath(path, data); - } - catch (Exception e) { - throw new RuntimeException("Exception writing to path " + path + " in ZooKeeper", e); - } - } - - /** - * Lists thh children at the given path. - * - * @return the local names of the children at this path, or an empty list (never null) if none. - */ - public List<String> getChildren(String path) { - try { - return curator.framework().getChildren().forPath(path); - } - catch (Exception e) { - throw new RuntimeException("Exception getting children of path " + path + " in ZooKeeper", e); - } - } - - /** Deletes the node at the given path, and any children it may have. If the node does not exist this does nothing */ - public void deleteRecurse(String path) { - try { - if ( ! exists(path)) return; - curator.framework().delete().deletingChildrenIfNeeded().forPath(path); - } - catch (Exception e) { - throw new RuntimeException("Exception deleting path " + path, e); - } - } - - private void testZkConnection() { // This is not necessary, but allows us to give a useful error message - if (curator.connectionSpec().isEmpty()) return; - try { - curator.framework().checkExists().forPath("/dummy"); - } - catch (Exception e) { - log.log(Level.SEVERE, "Unable to connect to ZooKeeper on " + curator.connectionSpec() + "." + - " Please verify that VESPA_CONFIGSERVERS points to the correct config servers" + - " on all config server nodes and are the same config servers as in services.xml" + - " and that they are running. Check vespa log for config server errors. Aborting.", e); - } - } - -} diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplication.java b/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplication.java index afdc7c8bad4..4079a355131 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplication.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplication.java @@ -19,6 +19,16 @@ import java.util.List; */ public class ZKApplication { + /** Path for def files, under one app */ + public static final String DEFCONFIGS_ZK_SUBPATH = "/defconfigs"; + /** Path for def files, under one app */ + public static final String USER_DEFCONFIGS_ZK_SUBPATH = "/userdefconfigs"; + /** Path for metadata about an application */ + public static final String META_ZK_PATH = "/meta"; + /** Path for the app package's dir structure, under one app */ + public static final String USERAPP_ZK_SUBPATH = "/userapp"; + /** Path for session state */ + public static final String SESSIONSTATE_ZK_SUBPATH = "/sessionState"; private final Curator curator; private final Path appPath; diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFile.java b/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFile.java index 9ddc384cf93..3b828e32ed7 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFile.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFile.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USERAPP_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.USERAPP_ZK_SUBPATH; /** * @author Ulf Lilleengen 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 e0ccc1fcea1..cfb2838da51 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 @@ -33,8 +33,8 @@ import java.util.List; import java.util.Map; import java.util.Optional; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.DEFCONFIGS_ZK_SUBPATH; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USERAPP_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.DEFCONFIGS_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.USERAPP_ZK_SUBPATH; /** * Represents an application residing in zookeeper. @@ -95,7 +95,7 @@ public class ZKApplicationPackage implements ApplicationPackage { } private ApplicationMetaData readMetaDataFromLiveApp(ZKApplication liveApp) { - Path metaPath = Path.fromString(ConfigCurator.META_ZK_PATH); + Path metaPath = Path.fromString(ZKApplication.META_ZK_PATH); String metaDataString = liveApp.getData(metaPath); if (metaDataString == null || metaDataString.isEmpty()) { return null; diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java index 781b0b42b3b..1b31d02d222 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java @@ -44,7 +44,6 @@ import com.yahoo.vespa.config.server.tenant.ApplicationRolesStore; import com.yahoo.vespa.config.server.tenant.Tenant; import com.yahoo.vespa.config.server.tenant.TenantRepository; import com.yahoo.vespa.config.server.tenant.TestTenantRepository; -import com.yahoo.vespa.config.server.zookeeper.ConfigCurator; import com.yahoo.vespa.config.util.ConfigUtils; import com.yahoo.vespa.curator.Curator; import com.yahoo.vespa.curator.mock.MockCurator; @@ -59,7 +58,6 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.time.Duration; import java.time.Instant; 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 4acf0ea6603..2b1fa9acd93 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 @@ -32,10 +32,10 @@ import java.util.Map; import java.util.Optional; import static com.yahoo.config.provision.serialization.AllocatedHostsSerializer.fromJson; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.DEFCONFIGS_ZK_SUBPATH; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.META_ZK_PATH; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USERAPP_ZK_SUBPATH; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USER_DEFCONFIGS_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.DEFCONFIGS_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.META_ZK_PATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.USERAPP_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.USER_DEFCONFIGS_ZK_SUBPATH; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/MockSessionZKClient.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/MockSessionZKClient.java deleted file mode 100644 index bdd758ee1ec..00000000000 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/MockSessionZKClient.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.config.server.session; - -import com.yahoo.config.application.api.ApplicationPackage; -import com.yahoo.config.model.test.MockApplicationPackage; -import com.yahoo.config.provision.AllocatedHosts; -import com.yahoo.config.provision.TenantName; -import com.yahoo.vespa.config.server.tenant.TenantRepository; -import com.yahoo.vespa.config.server.zookeeper.ConfigCurator; -import com.yahoo.vespa.config.util.ConfigUtils; - -import java.util.Optional; - -/** - * Overrides application package fetching, because this part is hard to do without feeding a full app. - * - * @author Ulf Lilleengen - */ -public class MockSessionZKClient extends SessionZooKeeperClient { - - private final ApplicationPackage app; - private Optional<AllocatedHosts> info = Optional.empty(); - - public MockSessionZKClient(com.yahoo.vespa.curator.Curator curator, TenantName tenantName, long sessionId) { - this(curator, tenantName, sessionId, (ApplicationPackage) null); - } - - public MockSessionZKClient(com.yahoo.vespa.curator.Curator curator, TenantName tenantName, long sessionId, Optional<AllocatedHosts> allocatedHosts) { - this(curator, tenantName, sessionId); - this.info = allocatedHosts; - } - - MockSessionZKClient(com.yahoo.vespa.curator.Curator curator, TenantName tenantName, long sessionId, ApplicationPackage application) { - super(curator, - tenantName, - sessionId, - ConfigUtils.getCanonicalHostName()); - this.app = application; - curator.create(TenantRepository.getSessionsPath(tenantName).append(String.valueOf(sessionId))); - } - - @Override - public ApplicationPackage loadApplicationPackage() { - if (app != null) return app; - return new MockApplicationPackage.Builder().withEmptyServices().build(); - } - - @Override - AllocatedHosts getAllocatedHosts() { - return info.orElseThrow(() -> new IllegalStateException("Could not find allocated hosts")); - } - -} diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java index b5c1b4bd24b..a9e7ffd5b5a 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java @@ -39,7 +39,7 @@ import com.yahoo.vespa.config.server.tenant.ContainerEndpointsCache; import com.yahoo.vespa.config.server.tenant.EndpointCertificateMetadataStore; import com.yahoo.vespa.config.server.tenant.EndpointCertificateRetriever; import com.yahoo.vespa.config.server.tenant.TenantRepository; -import com.yahoo.vespa.config.server.zookeeper.ConfigCurator; +import com.yahoo.vespa.config.server.zookeeper.ZKApplication; import com.yahoo.vespa.config.util.ConfigUtils; import com.yahoo.vespa.curator.mock.MockCurator; import com.yahoo.vespa.flags.InMemoryFlagSource; @@ -160,7 +160,7 @@ public class SessionPreparerTest { .build(), sessionId); Path sessionPath = sessionPath(sessionId); - assertFalse(curator.exists(sessionPath.append(ConfigCurator.USERAPP_ZK_SUBPATH).append("services.xml"))); + assertFalse(curator.exists(sessionPath.append(ZKApplication.USERAPP_ZK_SUBPATH).append("services.xml"))); } @Test @@ -179,7 +179,7 @@ public class SessionPreparerTest { @Test public void require_that_application_is_prepared() throws Exception { prepare(testApp); - assertTrue(curator.exists(sessionPath(1).append(ConfigCurator.USERAPP_ZK_SUBPATH).append("services.xml"))); + assertTrue(curator.exists(sessionPath(1).append(ZKApplication.USERAPP_ZK_SUBPATH).append("services.xml"))); } @Test(expected = InvalidApplicationException.class) diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClientTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClientTest.java index b653ca706aa..57ef55cc890 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClientTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClientTest.java @@ -21,7 +21,7 @@ import java.time.Instant; import java.util.List; import java.util.Optional; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.SESSIONSTATE_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.SESSIONSTATE_ZK_SUBPATH; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java index 1c43591de9a..b149aa94441 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java @@ -13,7 +13,7 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.io.IOException; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USERAPP_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.USERAPP_ZK_SUBPATH; import static org.junit.Assert.assertTrue; /** diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationPackageTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationPackageTest.java index 20aee737a7d..4b4b4b92627 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationPackageTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationPackageTest.java @@ -32,8 +32,8 @@ import java.util.Set; import java.util.regex.Pattern; import static com.yahoo.config.provision.serialization.AllocatedHostsSerializer.toJson; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.META_ZK_PATH; -import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USERAPP_ZK_SUBPATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.META_ZK_PATH; +import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.USERAPP_ZK_SUBPATH; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; |