YARN-11495. Fix typos in hadoop-yarn-server-web-proxy. (#5652). Contributed by Shilun Fan.
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
parent
2f87f716fa
commit
e0938b4c2a
@ -148,7 +148,7 @@ public void stop() {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This class creates a bundle of the application report and the source from
|
* This class creates a bundle of the application report and the source from
|
||||||
* where the the report was fetched. This allows the WebAppProxyServlet
|
* where the report was fetched. This allows the WebAppProxyServlet
|
||||||
* to make decisions for the application report based on the source.
|
* to make decisions for the application report based on the source.
|
||||||
*/
|
*/
|
||||||
static class FetchedAppReport {
|
static class FetchedAppReport {
|
||||||
|
@ -164,13 +164,13 @@ public static URI getProxyUri(URI originalUri, URI proxyUri,
|
|||||||
originalUri == null ? null : originalUri.getQuery(),
|
originalUri == null ? null : originalUri.getQuery(),
|
||||||
originalUri == null ? null : originalUri.getFragment());
|
originalUri == null ? null : originalUri.getFragment());
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
throw new RuntimeException("Could not proxify "+originalUri,e);
|
throw new RuntimeException("Could not proxy "+originalUri, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a URI form a no scheme Url, such as is returned by the AM.
|
* Create a URI form a no scheme Url, such as is returned by the AM.
|
||||||
* @param noSchemeUrl the URL formate returned by an AM
|
* @param noSchemeUrl the URL format returned by an AM
|
||||||
* @return a URI with an http scheme
|
* @return a URI with an http scheme
|
||||||
* @throws URISyntaxException if the url is not formatted correctly.
|
* @throws URISyntaxException if the url is not formatted correctly.
|
||||||
*/
|
*/
|
||||||
|
@ -86,7 +86,7 @@ protected void serviceStop() throws Exception {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log in as the Kerberose principal designated for the proxy
|
* Log in as the Kerberos principal designated for the proxy
|
||||||
* @param conf the configuration holding this information in it.
|
* @param conf the configuration holding this information in it.
|
||||||
* @throws IOException on any error.
|
* @throws IOException on any error.
|
||||||
*/
|
*/
|
||||||
|
@ -103,7 +103,7 @@ public class WebAppProxyServlet extends HttpServlet {
|
|||||||
/**
|
/**
|
||||||
* HTTP methods.
|
* HTTP methods.
|
||||||
*/
|
*/
|
||||||
private enum HTTP { GET, POST, HEAD, PUT, DELETE };
|
private enum HTTP { GET, POST, HEAD, PUT, DELETE }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Empty Hamlet class.
|
* Empty Hamlet class.
|
||||||
|
@ -345,7 +345,7 @@ void testAppReportForEmptyTrackingUrl() throws Exception {
|
|||||||
AppReportFetcherForTest appReportFetcher = proxy.proxy.appReportFetcher;
|
AppReportFetcherForTest appReportFetcher = proxy.proxy.appReportFetcher;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//set AHS_ENBALED = false to simulate getting the app report from RM
|
//set AHS_ENABLED = false to simulate getting the app report from RM
|
||||||
configuration.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED,
|
configuration.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED,
|
||||||
false);
|
false);
|
||||||
ApplicationId app = ApplicationId.newInstance(0, 0);
|
ApplicationId app = ApplicationId.newInstance(0, 0);
|
||||||
@ -366,7 +366,7 @@ void testAppReportForEmptyTrackingUrl() throws Exception {
|
|||||||
"/cluster" + "/app/" + app.toString();
|
"/cluster" + "/app/" + app.toString();
|
||||||
assertEquals(proxyConn.getURL().toString(), appAddressInRm);
|
assertEquals(proxyConn.getURL().toString(), appAddressInRm);
|
||||||
|
|
||||||
//set AHS_ENBALED = true to simulate getting the app report from AHS
|
//set AHS_ENABLED = true to simulate getting the app report from AHS
|
||||||
configuration.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED,
|
configuration.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED,
|
||||||
true);
|
true);
|
||||||
proxyConn = (HttpURLConnection) url.openConnection();
|
proxyConn = (HttpURLConnection) url.openConnection();
|
||||||
@ -655,7 +655,7 @@ public FetchedAppReport getApplicationReport(ApplicationId appId)
|
|||||||
/*
|
/*
|
||||||
* If this method is called with isTrackingUrl=false, no tracking url
|
* If this method is called with isTrackingUrl=false, no tracking url
|
||||||
* will set in the app report. Hence, there will be a connection exception
|
* will set in the app report. Hence, there will be a connection exception
|
||||||
* when the prxyCon tries to connect.
|
* when the proxyCon tries to connect.
|
||||||
*/
|
*/
|
||||||
private FetchedAppReport getDefaultApplicationReport(ApplicationId appId,
|
private FetchedAppReport getDefaultApplicationReport(ApplicationId appId,
|
||||||
boolean isTrackingUrl) {
|
boolean isTrackingUrl) {
|
||||||
|
Loading…
Reference in New Issue
Block a user