Make ServerDiscoverySelector more IPv6 friendly

This commit is contained in:
Charles Allen 2015-10-08 10:03:50 -07:00
parent 693e14a14d
commit e450877a78
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@
package io.druid.curator.discovery;
import com.google.common.net.HostAndPort;
import com.metamx.common.lifecycle.LifecycleStart;
import com.metamx.common.lifecycle.LifecycleStop;
import com.metamx.common.logger.Logger;
@ -62,7 +63,7 @@ public class ServerDiscoverySelector implements DiscoverySelector<Server>
@Override
public String getHost()
{
return String.format("%s:%d", getAddress(), getPort());
return HostAndPort.fromParts(getAddress(), getPort()).toString();
}
@Override