private String[] getGroupStrings(String ugi) {
          try {
            Set<String> result = new LinkedHashSet<>(groups.getGroups(ugi));
            return result.toArray(new String[result.size()]);
          } catch (Exception e) {
            return new String[0];
          }
        }
Provide an instance of a user. Allows custom {@link User} creation.
hbase-common/src/main/java/org/apache/hadoop/hbase/security/UserProvider.java