Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Connection :
public String getHostAddress() { return hostAddress; }
Inet4Address :
public String getHostAddress() { return numericToTextFormat(getAddress()); } public byte[] getAddress() { byte[] addr = new byte[INADDRSZ]; addr[0] = (byte) ((address >>> 24) & 0xFF); addr[1] = (byte) ((address >>> 16) & 0xFF); addr[2] = (byte) ((address >>> 8) & 0xFF); addr[3] = (byte) (address & 0xFF); return addr; } static String numericToTextFormat(byte[] src) { return (src[0] & 0xff) + "." + (src[1] & 0xff) + "." + (src[2] & 0xff) + "." + (src[3] & 0xff); }
Attachments
Attachments
Issue Links
- relates to
-
HBASE-6433 Improve HBaseServer#getRemoteAddress by utilizing HBaseServer.Connection.hostAddress
- Closed