docs: public static Credentials getCredentialsFromUGI(UserGroupInformation ugi) {
  		Method getCredentialsMethod = null;
  		for (Method m : ugi.getClass().getMethods()) {
  			if (m.getName().equals("getCredentials")) {
  				getCredentialsMethod = m;
  				break;
  			}
  		}
  		if (getCredentialsMethod == null) {
  			return null;
  		} else {
  			try {
  				return (Credentials) getCredentialsMethod.invoke(ugi);
  			} catch (InvocationTargetException | IllegalAccessException e) {
  				throw new RuntimeException("Unable to get credentials from UserGroupInformation. This is only supported by Hadoop 2.2.0+");
  			}
  		}
  	}