public JsonLogEntity createJsonLogEntity(String operationType, String objectType, String requestorUserName, TSentryResponseStatus status, TSentryAuthorizable authorizable, TSentryPrincipalType ownerType, String ownerName, Configuration conf) { DBAuditMetadataLogEntity hamle = createCommonHAMLE(conf, status, requestorUserName, operationType, objectType); if (Constants.OPERATION_GRANT_OWNER_PRIVILEGE.equals(operationType)) { hamle.setOperationText(CommandUtil.createCmdForImplicitGrantOwnerPrivilege(ownerType, ownerName, authorizable)); } else if (Constants.OPERATION_TRANSFER_OWNER_PRIVILEGE.equals(operationType)) { hamle.setOperationText(CommandUtil.createCmdForImplicitTransferOwnerPrivilege(ownerType, ownerName, authorizable)); } else { hamle.setOperationText("Unknown operation"); } hamle.setDatabaseName(authorizable.getDb()); hamle.setTableName(authorizable.getTable()); return hamle; }