@Test(expected = IllegalArgumentException.class) public void resolveEmptyIpAddress() throws UnknownHostException { NetworkAddressUtils.resolveIpAddress(""); }
public static String resolveIpAddress(String hostname) throws UnknownHostException { Preconditions.checkNotNull(hostname, "hostname"); Preconditions.checkArgument(!hostname.isEmpty(), "Cannot resolve IP address for empty hostname"); return InetAddress.getByName(hostname).getHostAddress(); }
NetworkAddressUtils { public static String resolveIpAddress(String hostname) throws UnknownHostException { Preconditions.checkNotNull(hostname, "hostname"); Preconditions.checkArgument(!hostname.isEmpty(), "Cannot resolve IP address for empty hostname"); return InetAddress.getByName(hostname).getHostAddress(); } }
NetworkAddressUtils { public static String resolveIpAddress(String hostname) throws UnknownHostException { Preconditions.checkNotNull(hostname, "hostname"); Preconditions.checkArgument(!hostname.isEmpty(), "Cannot resolve IP address for empty hostname"); return InetAddress.getByName(hostname).getHostAddress(); } private  NetworkAddressUtils(); }
NetworkAddressUtils { public static String resolveIpAddress(String hostname) throws UnknownHostException { Preconditions.checkNotNull(hostname, "hostname"); Preconditions.checkArgument(!hostname.isEmpty(), "Cannot resolve IP address for empty hostname"); return InetAddress.getByName(hostname).getHostAddress(); } private  NetworkAddressUtils(); static void assertValidPort(final int port); static void assertValidPort(final InetSocketAddress address); static InetSocketAddress getConnectAddress(ServiceType service,
      AlluxioConfiguration conf); static String getConnectHost(ServiceType service, AlluxioConfiguration conf); static int getPort(ServiceType service, AlluxioConfiguration conf); static InetSocketAddress getBindAddress(ServiceType service, AlluxioConfiguration conf); static String getBindHost(ServiceType service, AlluxioConfiguration conf); static String getClientHostName(AlluxioConfiguration conf); static String getLocalNodeName(AlluxioConfiguration conf); static synchronized String getLocalHostName(int timeoutMs); static synchronized String getLocalHostMetricName(int timeoutMs); static synchronized String getLocalIpAddress(int timeoutMs); static boolean isServing(String host, int port); @Nullable static String resolveHostName(String hostname); static String resolveIpAddress(String hostname); static String getFqdnHost(InetSocketAddress addr); static String getFqdnHost(WorkerNetAddress addr); @Nullable static InetSocketAddress parseInetSocketAddress(String address); static InetSocketAddress getRpcPortSocketAddress(WorkerNetAddress netAddress); static SocketAddress getDataPortSocketAddress(WorkerNetAddress netAddress,
      AlluxioConfiguration conf); static void pingService(InetSocketAddress address, alluxio.grpc.ServiceType serviceType,
      AlluxioConfiguration conf, UserState userState); }
NetworkAddressUtils { public static String resolveIpAddress(String hostname) throws UnknownHostException { Preconditions.checkNotNull(hostname, "hostname"); Preconditions.checkArgument(!hostname.isEmpty(), "Cannot resolve IP address for empty hostname"); return InetAddress.getByName(hostname).getHostAddress(); } private  NetworkAddressUtils(); static void assertValidPort(final int port); static void assertValidPort(final InetSocketAddress address); static InetSocketAddress getConnectAddress(ServiceType service,
      AlluxioConfiguration conf); static String getConnectHost(ServiceType service, AlluxioConfiguration conf); static int getPort(ServiceType service, AlluxioConfiguration conf); static InetSocketAddress getBindAddress(ServiceType service, AlluxioConfiguration conf); static String getBindHost(ServiceType service, AlluxioConfiguration conf); static String getClientHostName(AlluxioConfiguration conf); static String getLocalNodeName(AlluxioConfiguration conf); static synchronized String getLocalHostName(int timeoutMs); static synchronized String getLocalHostMetricName(int timeoutMs); static synchronized String getLocalIpAddress(int timeoutMs); static boolean isServing(String host, int port); @Nullable static String resolveHostName(String hostname); static String resolveIpAddress(String hostname); static String getFqdnHost(InetSocketAddress addr); static String getFqdnHost(WorkerNetAddress addr); @Nullable static InetSocketAddress parseInetSocketAddress(String address); static InetSocketAddress getRpcPortSocketAddress(WorkerNetAddress netAddress); static SocketAddress getDataPortSocketAddress(WorkerNetAddress netAddress,
      AlluxioConfiguration conf); static void pingService(InetSocketAddress address, alluxio.grpc.ServiceType serviceType,
      AlluxioConfiguration conf, UserState userState); static final String WILDCARD_ADDRESS; static final String UNKNOWN_HOSTNAME; static final boolean WINDOWS; }