Package org.apache.hadoop.hive.metastore.api

Examples of org.apache.hadoop.hive.metastore.api.GetPrincipalsInRoleRequest$GetPrincipalsInRoleRequestStandardScheme


      throw new HiveAccessControlException("Current user : " + currentUserName+ " is not"
        + " allowed get principals in a role. " + ADMIN_ONLY_MSG);
    }
    try {
      GetPrincipalsInRoleResponse princGrantInfo =
          metastoreClientFactory.getHiveMetastoreClient().get_principals_in_role(new GetPrincipalsInRoleRequest(roleName));

      List<HiveRoleGrant> hiveRoleGrants = new ArrayList<HiveRoleGrant>();
      for(RolePrincipalGrant thriftRoleGrant :  princGrantInfo.getPrincipalGrants()){
        hiveRoleGrants.add(new HiveRoleGrant(thriftRoleGrant));
      }
View Full Code Here




  public static List<HiveRoleGrant> getHiveRoleGrants(IMetaStoreClient client, String roleName)
      throws Exception {
    GetPrincipalsInRoleRequest request = new GetPrincipalsInRoleRequest(roleName);
    GetPrincipalsInRoleResponse princGrantInfo = client.get_principals_in_role(request);

    List<HiveRoleGrant> hiveRoleGrants = new ArrayList<HiveRoleGrant>();
    for(RolePrincipalGrant thriftRoleGrant :  princGrantInfo.getPrincipalGrants()){
      hiveRoleGrants.add(new HiveRoleGrant(thriftRoleGrant));
View Full Code Here

      throw new HiveAccessControlException("Current user : " + currentUserName+ " is not"
        + " allowed get principals in a role. " + ADMIN_ONLY_MSG);
    }
    try {
      GetPrincipalsInRoleResponse princGrantInfo =
          metastoreClientFactory.getHiveMetastoreClient().get_principals_in_role(new GetPrincipalsInRoleRequest(roleName));

      List<HiveRoleGrant> hiveRoleGrants = new ArrayList<HiveRoleGrant>();
      for(RolePrincipalGrant thriftRoleGrant :  princGrantInfo.getPrincipalGrants()){
        hiveRoleGrants.add(new HiveRoleGrant(thriftRoleGrant));
      }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.metastore.api.GetPrincipalsInRoleRequest$GetPrincipalsInRoleRequestStandardScheme

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.