private String constructCsv(Set<String> inSet) {
    StringBuilder sb = new StringBuilder();
    if (inSet != null) {
      boolean isFirst = true;
      for (String s : inSet) {
        if (!isFirst) {
          sb.append(",");
        } else {
          isFirst = false;
        }
        sb.append(s);
      }
    }
    return sb.toString();
  }
Parser for extracting ACL information from Configs
common/src/java/org/apache/hive/common/util/ACLConfigurationParser.java