public CassandraHost(String url2, int port) { url2 = parseHostFromUrl(url2); this.port = port; StringBuilder b = new StringBuilder(); InetAddress address; String turl, tip; try { address = InetAddress.getByName(url2); turl = isPerformNameResolution() ? address.getHostName() : url2; tip = address.getHostAddress(); } catch (UnknownHostException e) { log.error("Unable to resolve host {}", url2); turl = url2; tip = url2; } this.host = turl; ip = tip; b.append(url2); b.append("("); b.append(ip); b.append("):"); b.append(port); name = b.toString(); url = String.format("%s:%d",host,port); }
public CassandraHost(String url2, int port) { url2 = parseHostFromUrl(url2); this.port = port; StringBuilder b = new StringBuilder(); InetAddress address; String turl, tip; try { address = InetAddress.getByName(url2); turl = isPerformNameResolution() ? address.getHostName() : url2; tip = address.getHostAddress(); } catch (UnknownHostException e) { log.error("Unable to resolve host {}", url2); turl = url2; tip = url2; } this.host = turl; ip = tip; b.append(url2); b.append("("); b.append(ip); b.append("):"); b.append(port); name = b.toString(); url = String.format("%s:%d",host,port); }
public CassandraHost(String url2, int port) { url2 = parseHostFromUrl(url2); this.port = port; StringBuilder b = new StringBuilder(); InetAddress address; String turl, tip; try { address = InetAddress.getByName(url2); turl = isPerformNameResolution() ? address.getHostName() : url2; tip = address.getHostAddress(); } catch (UnknownHostException e) { log.error("Unable to resolve host {}", url2); turl = url2; tip = url2; } this.host = turl; ip = tip; b.append(url2); b.append("("); b.append(ip); b.append("):"); b.append(port); name = b.toString(); url = String.format("%s:%d",host,port); }