public static void setIpAddress(final TProtocol in) { try { TTransport transport = in.getTransport(); TSocket tSocket = getUnderlyingSocketFromTransport(transport); if (tSocket != null) { setIpAddress(tSocket.getSocket().getInetAddress().toString()); } else { LOGGER.warn("Unknown Transport, cannot determine ipAddress"); } } catch (Exception e) { // If there has exception when get impersonator info, log the error information. LOGGER.warn("There is an error when get the client's ip address:" + e.getMessage()); } }