public static List<String> getUserGroups(String user) {
    try {
      return groupService.getGroups(user);
    } catch (IOException e) {
      LOG.error("Error occurred while retrieving group for " + user, e);
      return new ArrayList<>();
    }
  }
Retrieve the groups of the given user.
@param user User name
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessChecker.java