notification.setOwnerType(TSentryPrincipalType.ROLE); notification.setOwnerName(OWNER); notification.setAuthorizable(authorizable); notification.setEventType(EventType.CREATE_DATABASE.toString());
notification.setAuthorizable(authorizable); notification.setEventType(EventType.ALTER_TABLE.toString());
public long notifyHmsEvent(String requestorUserName, long eventId, String eventType, TSentryPrincipalType ownerType, String ownerName, TSentryAuthorizable authorizable) throws SentryUserException { TSentryHmsEventNotification request = new TSentryHmsEventNotification(); try { request.setProtocol_version(ThriftConstants.TSENTRY_SERVICE_VERSION_CURRENT); request.setRequestorUserName(requestorUserName); request.setId(eventId); request.setEventType(eventType); request.setOwnerType(ownerType); request.setOwnerName(ownerName); request.setAuthorizable(authorizable); TSentryHmsEventNotificationResponse response = client.sentry_notify_hms_event(request); Status.throwIfNotOk(response.getStatus()); return response.getId(); } catch (TException e) { throw new SentryUserException(THRIFT_EXCEPTION_MESSAGE, e); } }
notification.setOwnerType(TSentryPrincipalType.ROLE); notification.setOwnerName(OWNER); notification.setAuthorizable(authorizable); notification.setEventType(EventType.CREATE_DATABASE.toString());
notification.setOwnerType(TSentryPrincipalType.ROLE); notification.setOwnerName(OWNER); notification.setAuthorizable(authorizable); notification.setEventType(EventMessage.EventType.CREATE_TABLE.toString());
unsetAuthorizable(); } else { setAuthorizable((TSentryAuthorizable)value);