/** Read a {@link UserGroupInformation} from conf */
 public static UserGroupInformation readFrom(Configuration conf) throws IOException {
   try {
     return UnixUserGroupInformation.readFromConf(
         conf, UnixUserGroupInformation.UGI_PROPERTY_NAME);
   } catch (LoginException e) {
     throw (IOException) new IOException().initCause(e);
   }
 }
 /** Login and return a UserGroupInformation object. */
 public static UserGroupInformation login(Configuration conf) throws LoginException {
   if (LOGIN_UGI == null) {
     LOGIN_UGI = UnixUserGroupInformation.login(conf);
   }
   return LOGIN_UGI;
 }