/** * Create a URI form a no scheme Url, such as is returned by the AM. * @param noSchemeUrl the URL formate returned by an AM * @return a URI with an http scheme * @throws URISyntaxException if the url is not formatted correctly. */ public static URI getUriFromAMUrl(String scheme, String noSchemeUrl) throws URISyntaxException { if (getSchemeFromUrl(noSchemeUrl).isEmpty()) { /* * check is made to make sure if AM reports with scheme then it will be * used by default otherwise it will default to the one configured using * "yarn.http.policy". */ return new URI(scheme + noSchemeUrl); } else { return new URI(noSchemeUrl); } }
/** * Create a URI form a no scheme Url, such as is returned by the AM. * @param noSchemeUrl the URL formate returned by an AM * @return a URI with an http scheme * @throws URISyntaxException if the url is not formatted correctly. */ public static URI getUriFromAMUrl(String scheme, String noSchemeUrl) throws URISyntaxException { if (getSchemeFromUrl(noSchemeUrl).isEmpty()) { /* * check is made to make sure if AM reports with scheme then it will be * used by default otherwise it will default to the one configured using * "yarn.http.policy". */ return new URI(scheme + noSchemeUrl); } else { return new URI(noSchemeUrl); } }
/** * Create a URI form a no scheme Url, such as is returned by the AM. * @param noSchemeUrl the URL formate returned by an AM * @return a URI with an http scheme * @throws URISyntaxException if the url is not formatted correctly. */ public static URI getUriFromAMUrl(String scheme, String noSchemeUrl) throws URISyntaxException { if (getSchemeFromUrl(noSchemeUrl).isEmpty()) { /* * check is made to make sure if AM reports with scheme then it will be * used by default otherwise it will default to the one configured using * "yarn.http.policy". */ return new URI(scheme + noSchemeUrl); } else { return new URI(noSchemeUrl); } }
/** * Create a URI form a no scheme Url, such as is returned by the AM. * @param noSchemeUrl the URL formate returned by an AM * @return a URI with an http scheme * @throws URISyntaxException if the url is not formatted correctly. */ public static URI getUriFromAMUrl(String scheme, String noSchemeUrl) throws URISyntaxException { if (getSchemeFromUrl(noSchemeUrl).isEmpty()) { /* * check is made to make sure if AM reports with scheme then it will be * used by default otherwise it will default to the one configured using * "yarn.http.policy". */ return new URI(scheme + noSchemeUrl); } else { return new URI(noSchemeUrl); } }
StringHelper.pjoin(ahsAppPageUrlBase, id.toString())); } else if (ProxyUriUtils.getSchemeFromUrl(originalUri).isEmpty()) { trackingUri = ProxyUriUtils.getUriFromAMUrl(WebAppUtils.getHttpSchemePrefix(conf),
if (ProxyUriUtils.getSchemeFromUrl(original).isEmpty()) { trackingUri = ProxyUriUtils.getUriFromAMUrl( WebAppUtils.getHttpSchemePrefix(conf), original);
if (ProxyUriUtils.getSchemeFromUrl(original).isEmpty()) { trackingUri = ProxyUriUtils.getUriFromAMUrl( WebAppUtils.getHttpSchemePrefix(conf), original);
if (ProxyUriUtils.getSchemeFromUrl(original).isEmpty()) { trackingUri = ProxyUriUtils.getUriFromAMUrl( WebAppUtils.getHttpSchemePrefix(conf), original);