RMAuditLogger { static void start(Keys key, String value, StringBuilder b) { b.append(key.name()).append(AuditConstants.KEY_VAL_SEPARATOR).append(value); }  static void logSuccess(String user, String operation, String target, 
      ApplicationId appId, ContainerId containerId, Resource resource); static void logSuccess(String user, String operation, String target,
      ArgsBuilder args); static void logSuccess(String user, String operation, String target,
      InetAddress ip, ArgsBuilder args); static void logSuccess(String user, String operation, String target, 
      ApplicationId appId, ApplicationAttemptId attemptId); static void logSuccess(String user, String operation, String target,
      ApplicationId appId, CallerContext callerContext); static void logSuccess(String user, String operation, String target,
      ApplicationId appId, InetAddress ip); static void logSuccess(String user, String operation, String target,
      ApplicationId appId); static void logSuccess(String user, String operation, String target); static void logFailure(String user, String operation, String perm,
      String target, String description, ApplicationId appId, 
      ContainerId containerId, Resource resource); static void logFailure(String user, String operation, String perm,
      String target, String description, ApplicationId appId, 
      ApplicationAttemptId attemptId); static void logFailure(String user, String operation, String perm,
      String target, String description, ApplicationId appId,
      CallerContext callerContext); static void logFailure(String user, String operation, String perm,
      String target, String description, ApplicationId appId); static void logFailure(String user, String operation, String perm,
      String target, String description); static void logFailure(String user, String operation, String perm,
      String target, String description, ArgsBuilder args);  }
@Test public void testRMAuditLoggerWithIP() throws Exception { Configuration conf = new Configuration(); RPC.setProtocolEngine(conf, TestRpcService.class, ProtobufRpcEngine.class); MyTestRPCServer serverImpl = new MyTestRPCServer(); BlockingService service = TestRpcServiceProtos.TestProtobufRpcProto .newReflectiveBlockingService(serverImpl); Server server = new RPC.Builder(conf) .setProtocol(TestRpcService.class) .setInstance(service).setBindAddress("0.0.0.0") .setPort(0).setNumHandlers(5).setVerbose(true).build(); server.start(); InetSocketAddress addr = NetUtils.getConnectAddress(server); TestRpcService proxy = RPC.getProxy(TestRpcService.class, TestProtocol.versionID, addr, conf); TestProtos.EmptyRequestProto pingRequest = TestProtos.EmptyRequestProto.newBuilder().build(); proxy.ping(null, pingRequest); server.stop(); RPC.stopProxy(proxy); }