use of org.apache.hadoop.hive.metastore.api.GrantRevokeRoleRequest in project urban-eureka by errir503.
the class ThriftHiveMetastoreClient method removeGrant.
private void removeGrant(String role, String granteeName, PrincipalType granteeType, boolean grantOption) throws TException {
GrantRevokeRoleRequest request = new GrantRevokeRoleRequest();
request.setRequestType(GrantRevokeType.REVOKE);
request.setRoleName(role);
request.setPrincipalName(granteeName);
request.setPrincipalType(granteeType);
request.setGrantOption(grantOption);
GrantRevokeRoleResponse response = client.grant_revoke_role(request);
if (!response.isSetSuccess()) {
throw new MetaException("GrantRevokeResponse missing success field");
}
}
use of org.apache.hadoop.hive.metastore.api.GrantRevokeRoleRequest in project hetu-core by openlookeng.
the class ThriftHiveMetastoreClient method removeGrant.
private void removeGrant(String role, String granteeName, PrincipalType granteeType, boolean grantOption) throws TException {
GrantRevokeRoleRequest request = new GrantRevokeRoleRequest();
request.setRequestType(GrantRevokeType.REVOKE);
request.setRoleName(role);
request.setPrincipalName(granteeName);
request.setPrincipalType(granteeType);
request.setGrantOption(grantOption);
GrantRevokeRoleResponse response = client.grant_revoke_role(request);
if (!response.isSetSuccess()) {
throw new MetaException("GrantRevokeResponse missing success field");
}
}
use of org.apache.hadoop.hive.metastore.api.GrantRevokeRoleRequest in project trino by trinodb.
the class ThriftHiveMetastoreClient method createGrant.
private void createGrant(String role, String granteeName, PrincipalType granteeType, String grantorName, PrincipalType grantorType, boolean grantOption) throws TException {
GrantRevokeRoleRequest request = new GrantRevokeRoleRequest();
request.setRequestType(GrantRevokeType.GRANT);
request.setRoleName(role);
request.setPrincipalName(granteeName);
request.setPrincipalType(granteeType);
request.setGrantor(grantorName);
request.setGrantorType(grantorType);
request.setGrantOption(grantOption);
GrantRevokeRoleResponse response = client.grant_revoke_role(request);
if (!response.isSetSuccess()) {
throw new MetaException("GrantRevokeResponse missing success field");
}
}
Aggregations