code: public static void saveToConf(Configuration conf, String attr, 
        UnixUserGroupInformation ugi ) {
      conf.set(attr, ugi.toString());
    }
docs: Store the given <code>ugi</code> as a comma separated string in
  <code>conf</code> as a property <code>attr</code>
  
  The String starts with the user name followed by the default group names,
  and other group names.
  
  @param conf configuration
  @param attr property name
  @param ugi a UnixUserGroupInformation