diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2022-03-31 10:35:33 +0200 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2022-03-31 10:35:33 +0200 |
commit | 2353b584a69e14f97682ad90b3a492b1530abff2 (patch) | |
tree | be8cb398699c79a20d9015b6451f8bb5bf360613 /zkfacade | |
parent | 51368648e157524420ece2e1754acbe93e0c1eaf (diff) |
Move HostName -> Hostnames, and DomainName and Hostname to com.yahoo.net
Diffstat (limited to 'zkfacade')
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 022932bef89..73a46981c9b 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.HostName; +import com.yahoo.net.Hostnames; 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 = HostName.getLocalhost(); + String thisServer = Hostnames.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 6e833088f0d..b4bf8bc1e73 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.HostName; +import com.yahoo.net.Hostnames; import org.junit.Test; import java.util.List; @@ -15,7 +15,7 @@ public class ConnectionSpecTest { @Test public void create() { - HostName.setHostNameForTestingOnly("host2"); + Hostnames.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 71eae121313..dbefda6282e 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.HostName; +import com.yahoo.net.Hostnames; 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 = HostName.getLocalhost(); + private static final String localhost = Hostnames.getLocalhost(); private static final int port1 = 1; private static final int port2 = 2; |