@Override
  public List<HiveRoleGrant> getPrincipalGrantInfoForRole(String roleName) throws HiveAuthzPluginException, HiveAccessControlException {
    // only user belonging to admin role can list role
    if (!isUserAdmin() &&  !doesUserHasAdminOption(Arrays.asList(roleName))) {
      throw new HiveAccessControlException("Current user : " + currentUserName+ " is not"
        + " allowed get principals in a role. " + ADMIN_ONLY_MSG + " Otherwise, " + HAS_ADMIN_PRIV_MSG);
    }
    try {
      return getHiveRoleGrants(metastoreClientFactory.getHiveMetastoreClient(), roleName);
    } catch (Exception e) {
      throw SQLAuthorizationUtils.getPluginException("Error getting principals for all roles", e);
    }
  }
Add role names of parentRoles and its parents to processedRolesMap

@param processedRolesMap
@param roleGrants
@throws TException
@throws HiveAuthzPluginException
@throws MetaException
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAccessController.java