summaryrefslogtreecommitdiffstats
path: root/zkfacade
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2022-03-31 11:52:40 +0200
committerJon Marius Venstad <venstad@gmail.com>2022-03-31 11:53:33 +0200
commit2430b74a942659d549771cb4dd8b81d77692d905 (patch)
treec79b8b48bf150bea00ab9e0c6ad594740709d4fa /zkfacade
parent168f767ec12253f43ace27946dc530fde9e37d5e (diff)
Rename back to HostName, and merge the value class and utilities
Diffstat (limited to 'zkfacade')
-rw-r--r--zkfacade/src/main/java/com/yahoo/vespa/curator/ConnectionSpec.java4
-rw-r--r--zkfacade/src/test/java/com/yahoo/vespa/curator/ConnectionSpecTest.java4
-rw-r--r--zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java4
3 files changed, 6 insertions, 6 deletions
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/ConnectionSpec.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/ConnectionSpec.java
index 73a46981c9b..022932bef89 100644
--- a/zkfacade/src/main/java/com/yahoo/vespa/curator/ConnectionSpec.java
+++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/ConnectionSpec.java
@@ -1,7 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.curator;
-import com.yahoo.net.Hostnames;
+import com.yahoo.net.HostName;
import java.util.List;
import java.util.Objects;
@@ -75,7 +75,7 @@ class ConnectionSpec {
Function<T, String> hostnameGetter,
Function<T, Integer> portGetter,
boolean localhostAffinity) {
- String thisServer = Hostnames.getLocalhost();
+ String thisServer = HostName.getLocalhost();
StringBuilder connectionSpec = new StringBuilder();
for (var server : servers) {
if (localhostAffinity && !thisServer.equals(hostnameGetter.apply(server))) continue;
diff --git a/zkfacade/src/test/java/com/yahoo/vespa/curator/ConnectionSpecTest.java b/zkfacade/src/test/java/com/yahoo/vespa/curator/ConnectionSpecTest.java
index b4bf8bc1e73..6e833088f0d 100644
--- a/zkfacade/src/test/java/com/yahoo/vespa/curator/ConnectionSpecTest.java
+++ b/zkfacade/src/test/java/com/yahoo/vespa/curator/ConnectionSpecTest.java
@@ -1,7 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.curator;
-import com.yahoo.net.Hostnames;
+import com.yahoo.net.HostName;
import org.junit.Test;
import java.util.List;
@@ -15,7 +15,7 @@ public class ConnectionSpecTest {
@Test
public void create() {
- Hostnames.setHostNameForTestingOnly("host2");
+ HostName.setHostNameForTestingOnly("host2");
Config config = new Config(List.of(new Config.Server("host1", 10001),
new Config.Server("host2", 10002),
new Config.Server("host3", 10003)));
diff --git a/zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java b/zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java
index dbefda6282e..71eae121313 100644
--- a/zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java
+++ b/zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java
@@ -2,7 +2,7 @@
package com.yahoo.vespa.curator;
import com.yahoo.cloud.config.CuratorConfig;
-import com.yahoo.net.Hostnames;
+import com.yahoo.net.HostName;
import com.yahoo.path.Path;
import com.yahoo.text.Utf8;
import org.junit.Test;
@@ -19,7 +19,7 @@ import static org.junit.Assert.fail;
*/
public class CuratorTest {
- private static final String localhost = Hostnames.getLocalhost();
+ private static final String localhost = HostName.getLocalhost();
private static final int port1 = 1;
private static final int port2 = 2;