diff options
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r-- | vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java index 13ee837e1d4..5f1c96d000f 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java @@ -14,6 +14,7 @@ import com.yahoo.messagebus.Message; import com.yahoo.messagebus.ReplyHandler; import com.yahoo.messagebus.Result; import com.yahoo.messagebus.shared.SharedSourceSession; +import com.yahoo.net.HostName; import com.yahoo.vespa.http.client.core.ErrorCode; import com.yahoo.vespa.http.client.core.Headers; import com.yahoo.vespa.http.client.core.OperationStatus; @@ -23,8 +24,6 @@ import com.yahoo.yolean.Exceptions; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.net.InetAddress; -import java.net.UnknownHostException; import java.time.Duration; import java.time.Instant; import java.util.Optional; @@ -75,12 +74,7 @@ class ClientFeederV3 { this.metric = metric; this.threadsAvailableForFeeding = threadsAvailableForFeeding; this.streamReaderV3 = new StreamReaderV3(feedReaderFactory, docTypeManager); - try { - this.hostName = InetAddress.getLocalHost().getHostName(); - } catch (UnknownHostException e) { - log.info("Could not find hostname, randomizing. " + e.getMessage()); - hostName = "UNKNOWNHOSTNAME" + System.nanoTime() % 10000; - } + this.hostName = HostName.getLocalhost(); } public boolean timedOut() { |