public String[] getGroupNames() {
    return ugi.getGroupNames();
  }
Returns the list of groups of which this user is a member. On secure Hadoop this returns the
group information for the user as resolved on the server. For 0.20 based Hadoop, the group
names are passed from the client.
hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java