org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalRequest Java Examples

The following examples show how to use org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalRequest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ThriftHiveMetastoreClient.java    From presto with Apache License 2.0 5 votes vote down vote up
@Override
public List<RolePrincipalGrant> listRoleGrants(String principalName, PrincipalType principalType)
        throws TException
{
    GetRoleGrantsForPrincipalRequest request = new GetRoleGrantsForPrincipalRequest(principalName, principalType);
    GetRoleGrantsForPrincipalResponse resp = client.get_role_grants_for_principal(request);
    return ImmutableList.copyOf(resp.getPrincipalGrants());
}
 
Example #2
Source File: CatalogThriftHiveMetastore.java    From metacat with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(
    final GetRoleGrantsForPrincipalRequest request)
    throws TException {
    throw unimplemented("get_role_grants_for_principal", new Object[]{request});
}
 
Example #3
Source File: GlueMetastoreClientDelegate.java    From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 4 votes vote down vote up
public GetRoleGrantsForPrincipalResponse getRoleGrantsForPrincipal(
    GetRoleGrantsForPrincipalRequest request
) throws TException {
  throw new UnsupportedOperationException("getRoleGrantsForPrincipal is not supported");
}
 
Example #4
Source File: AWSCatalogMetastoreClient.java    From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 4 votes vote down vote up
@Override
public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(
    GetRoleGrantsForPrincipalRequest request) throws MetaException, TException {
  return glueMetastoreClientDelegate.getRoleGrantsForPrincipal(request);
}
 
Example #5
Source File: AWSCatalogMetastoreClient.java    From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 4 votes vote down vote up
@Override
public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(
    GetRoleGrantsForPrincipalRequest request) throws MetaException, TException {
  return glueMetastoreClientDelegate.getRoleGrantsForPrincipal(request);
}
 
Example #6
Source File: FederatedHMSHandler.java    From waggle-dance with Apache License 2.0 4 votes vote down vote up
@Override
@Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME)
public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request)
    throws MetaException, TException {
  return getPrimaryClient().get_role_grants_for_principal(request);
}
 
Example #7
Source File: FederatedHMSHandlerTest.java    From waggle-dance with Apache License 2.0 4 votes vote down vote up
@Test
public void get_role_grants_for_principal() throws TException {
  GetRoleGrantsForPrincipalRequest request = new GetRoleGrantsForPrincipalRequest();
  handler.get_role_grants_for_principal(request);
  verify(primaryClient).get_role_grants_for_principal(request);
}