public TSentryHmsEventNotification deepCopy() { return new TSentryHmsEventNotification(this); }
/** * Performs a deep copy on <i>other</i>. */ public sentry_notify_hms_event_args(sentry_notify_hms_event_args other) { if (other.isSetRequest()) { this.request = new TSentryHmsEventNotification(other.request); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, sentry_notify_hms_event_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new TSentryHmsEventNotification(); struct.request.read(iprot); struct.setRequestIsSet(true); } } }
public void read(org.apache.thrift.protocol.TProtocol iprot, sentry_notify_hms_event_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new TSentryHmsEventNotification(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); }
authorizable.setDb(DBNAME); TSentryHmsEventNotification notification = new TSentryHmsEventNotification(); notification.setId(1L); notification.setOwnerType(TSentryPrincipalType.ROLE);
authorizable.setTable(TABLENAME); TSentryHmsEventNotification notification = new TSentryHmsEventNotification(); notification.setId(1L); notification.setAuthorizable(authorizable);
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); } }
authorizable.setDb(DBNAME); TSentryHmsEventNotification notification = new TSentryHmsEventNotification(); notification.setId(1L); notification.setOwnerType(TSentryPrincipalType.ROLE);
authorizable.setTable(TABLENAME); TSentryHmsEventNotification notification = new TSentryHmsEventNotification(); notification.setId(1L); notification.setOwnerType(TSentryPrincipalType.ROLE);