List of usage examples for org.apache.hadoop.yarn.api.records URL getUserInfo
@Public @Stable public abstract String getUserInfo();
From source file:org.apache.tez.common.TezConverterUtils.java
License:Apache License
/** * return a {@link URI} from a given url * //from ww w .ja va 2 s. co m * @param url * url to convert * @return path from {@link URL} * @throws URISyntaxException */ @Private public static URI getURIFromYarnURL(URL url) throws URISyntaxException { String scheme = url.getScheme() == null ? "" : url.getScheme(); String authority = ""; if (url.getHost() != null) { authority = url.getHost(); if (url.getUserInfo() != null) { authority = url.getUserInfo() + "@" + authority; } if (url.getPort() > 0) { authority += ":" + url.getPort(); } } return new URI(scheme, authority, url.getFile(), null, null).normalize(); }