private final void logAuditEvent(String cmd) { if (cmd == null) { return; } UserGroupInformation ugi; try { ugi = Utils.getUGI(); } catch (Exception ex) { throw new RuntimeException(ex); } final Formatter fmt = auditFormatter.get(); ((StringBuilder) fmt.out()).setLength(0); String address = null; if (useSasl) { if (saslServer != null && saslServer.getRemoteAddress() != null) { address = String.valueOf(saslServer.getRemoteAddress()); } } else { address = getIpAddress(); } if (address == null) { address = "unknown-ip-addr"; } auditLog.info(fmt.format(AUDIT_FORMAT, ugi.getUserName(), address, cmd).toString()); }
private final void logAuditEvent(String cmd) { if (cmd == null) { return; } UserGroupInformation ugi; try { ugi = ShimLoader.getHadoopShims().getUGIForConf(getConf()); } catch (Exception ex) { throw new RuntimeException(ex); } final Formatter fmt = auditFormatter.get(); ((StringBuilder) fmt.out()).setLength(0); String address; if (useSasl) { address = saslServer.getRemoteAddress().toString(); } else { address = getIpAddress(); } if (address == null) { address = "unknown-ip-addr"; } auditLog.info(fmt.format(AUDIT_FORMAT, ugi.getUserName(), address, cmd).toString()); }
InetAddress remoteAddr = getRemoteAddress(); ProxyUsers.authorize(ownerUgi,remoteAddr.getHostAddress(), null);
InetAddress remoteAddr = getRemoteAddress(); ProxyUsers.authorize(ownerUgi,remoteAddr.getHostAddress(), null);
private final void logAuditEvent(String cmd) { if (cmd == null) { return; } UserGroupInformation ugi; try { ugi = Utils.getUGI(); } catch (Exception ex) { throw new RuntimeException(ex); } final Formatter fmt = auditFormatter.get(); ((StringBuilder) fmt.out()).setLength(0); String address = null; if (useSasl) { if (saslServer != null && saslServer.getRemoteAddress() != null) { address = String.valueOf(saslServer.getRemoteAddress()); } } else { address = getIpAddress(); } if (address == null) { address = "unknown-ip-addr"; } auditLog.info(fmt.format(AUDIT_FORMAT, ugi.getUserName(), address, cmd).toString()); }
public String getIpAddress() { if (saslServer == null || saslServer.getRemoteAddress() == null) { return null; } else { return saslServer.getRemoteAddress().getHostAddress(); } }
public String getIpAddress() { if (saslServer == null || saslServer.getRemoteAddress() == null) { return null; } else { return saslServer.getRemoteAddress().getHostAddress(); } }
public String getIpAddress() { if (saslServer == null || saslServer.getRemoteAddress() == null) { return null; } else { return saslServer.getRemoteAddress().getHostAddress(); } }
public String getIpAddress() { if (saslServer == null || saslServer.getRemoteAddress() == null) { return null; } else { return saslServer.getRemoteAddress().getHostAddress(); } }