public class ProxyUriUtils
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
PROXY_APPROVAL_PARAM |
Query Parameter indicating that the URI was approved.
|
static java.lang.String |
PROXY_BASE |
Base path where the proxy servlet will handle requests.
|
static java.lang.String |
PROXY_PATH_SPEC |
Path Specification for the proxy servlet.
|
static java.lang.String |
PROXY_SERVLET_NAME |
Name of the servlet to use when registering the proxy servlet.
|
static java.lang.String |
REDIRECT |
Path component added when the proxy redirects the connection.
|
| Constructor | Description |
|---|---|
ProxyUriUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
getPath(org.apache.hadoop.yarn.api.records.ApplicationId id) |
Get the proxied path for an application.
|
static java.lang.String |
getPath(org.apache.hadoop.yarn.api.records.ApplicationId id,
boolean redirected) |
Get the proxied path for an application.
|
static java.lang.String |
getPath(org.apache.hadoop.yarn.api.records.ApplicationId id,
java.lang.String path) |
Get the proxied path for an application.
|
static java.lang.String |
getPath(org.apache.hadoop.yarn.api.records.ApplicationId id,
java.lang.String path,
boolean redirected) |
Get the proxied path for an application.
|
static java.lang.String |
getPathAndQuery(org.apache.hadoop.yarn.api.records.ApplicationId id,
java.lang.String path,
java.lang.String query,
boolean approved) |
Get the proxied path for an application
|
static java.net.URI |
getProxyUri(java.net.URI originalUri,
java.net.URI proxyUri,
org.apache.hadoop.yarn.api.records.ApplicationId id) |
Get a proxied URI for the original URI.
|
static java.lang.String |
getSchemeFromUrl(java.lang.String url) |
Returns the scheme if present in the url
eg.
|
static java.net.URI |
getUriFromAMUrl(java.lang.String scheme,
java.lang.String noSchemeUrl) |
Create a URI form a no scheme Url, such as is returned by the AM.
|
static java.net.URI |
getUriFromTrackingPlugins(org.apache.hadoop.yarn.api.records.ApplicationId id,
java.util.List<org.apache.hadoop.yarn.util.TrackingUriPlugin> trackingUriPlugins) |
Returns the first valid tracking link, if any, from the given id from the
given list of plug-ins, if any.
|
public static final java.lang.String PROXY_SERVLET_NAME
public static final java.lang.String PROXY_BASE
public static final java.lang.String REDIRECT
public static final java.lang.String PROXY_PATH_SPEC
public static final java.lang.String PROXY_APPROVAL_PARAM
public static java.lang.String getPath(org.apache.hadoop.yarn.api.records.ApplicationId id)
id - the application id to usepublic static java.lang.String getPath(org.apache.hadoop.yarn.api.records.ApplicationId id,
boolean redirected)
id - the application id to useredirected - whether the path should contain the redirect componentpublic static java.lang.String getPath(org.apache.hadoop.yarn.api.records.ApplicationId id,
java.lang.String path)
id - the application id to usepath - the rest of the path to the applicationpublic static java.lang.String getPath(org.apache.hadoop.yarn.api.records.ApplicationId id,
java.lang.String path,
boolean redirected)
id - the application id to usepath - the rest of the path to the applicationredirected - whether the path should contain the redirect componentpublic static java.lang.String getPathAndQuery(org.apache.hadoop.yarn.api.records.ApplicationId id,
java.lang.String path,
java.lang.String query,
boolean approved)
id - the id of the applicationpath - the path of the application.query - the query parametersapproved - true if the user has approved accessing this app.public static java.net.URI getProxyUri(java.net.URI originalUri,
java.net.URI proxyUri,
org.apache.hadoop.yarn.api.records.ApplicationId id)
originalUri - the original URI to go through the proxy, or null if
a default path "/" can be used.proxyUri - the URI of the proxy itself, scheme, host and port are used.id - the id of the applicationpublic static java.net.URI getUriFromAMUrl(java.lang.String scheme,
java.lang.String noSchemeUrl)
throws java.net.URISyntaxException
noSchemeUrl - the URL format returned by an AMjava.net.URISyntaxException - if the url is not formatted correctly.public static java.net.URI getUriFromTrackingPlugins(org.apache.hadoop.yarn.api.records.ApplicationId id,
java.util.List<org.apache.hadoop.yarn.util.TrackingUriPlugin> trackingUriPlugins)
throws java.net.URISyntaxException
id - the id of the application for which the tracking link is desiredtrackingUriPlugins - list of plugins from which to get the tracking linkjava.net.URISyntaxExceptionpublic static java.lang.String getSchemeFromUrl(java.lang.String url)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.