mirror of https://github.com/apache/druid.git
Make ServerDiscoverySelector more IPv6 friendly
This commit is contained in:
parent
693e14a14d
commit
e450877a78
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue