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,
      ApplicationId appId, ContainerId containerId, Resource resource,
      String queueName, String partition); 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, CallerContext callerContext, String queueName,
      String partition); 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, CallerContext callerContext, String queueName); 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,
      CallerContext callerContext, String queueName); 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, ApplicationId appId,
      String queueName); 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); static void logFailure(String user, String operation, String perm,
      String target, String description, ApplicationId appId,
      CallerContext callerContext, String queueName, String partition);  }
@Test public void testRMAuditLoggerWithIP() throws Exception { Configuration conf = new Configuration(); RPC.setProtocolEngine(conf, TestRpcService.class, ProtobufRpcEngine2.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); }