private void setCommAttrForAMLE(AuditMetadataLogEntity amle, Configuration conf, TSentryResponseStatus responseStatus, String userName, String requestClassName) { amle.setUserName(userName); amle.setServiceName(conf.get(ServerConfig.SENTRY_SERVICE_NAME, ServerConfig.SENTRY_SERVICE_NAME_DEFAULT).trim()); amle.setImpersonator(ThriftUtil.getImpersonator()); amle.setIpAddress(ThriftUtil.getIpAddress()); amle.setOperation(Constants.requestTypeToOperationMap.get(requestClassName)); amle.setEventTime(Long.toString(System.currentTimeMillis())); amle.setAllowed(isAllowed(responseStatus)); amle.setObjectType(Constants.requestTypeToObjectTypeMap .get(requestClassName)); } }
private void setCommAttrForAMLE(AuditMetadataLogEntity amle, Configuration conf, TSentryResponseStatus responseStatus, String userName, String operationType, String objectType) { amle.setUserName(userName); amle.setServiceName(conf.get(ServerConfig.SENTRY_SERVICE_NAME, ServerConfig.SENTRY_SERVICE_NAME_DEFAULT).trim()); amle.setImpersonator(ThriftUtil.getImpersonator()); amle.setIpAddress(ThriftUtil.getIpAddress()); amle.setOperation(operationType); amle.setEventTime(Long.toString(System.currentTimeMillis())); amle.setAllowed(isAllowed(responseStatus)); amle.setObjectType(objectType); }