MAPREDUCE-2874. Fix formatting of ApplicationId in web-ui. Contributed by Eric Payne.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1169973 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c8383a5f49
commit
7fa0bf3558
|
@ -1299,6 +1299,9 @@ Release 0.23.0 - Unreleased
|
|||
MAPREDUCE-2985. Fixed findbugs warnings in ResourceLocalizationService.
|
||||
(Thomas Graves via acmurthy)
|
||||
|
||||
MAPREDUCE-2874. Fix formatting of ApplicationId in web-ui. (Eric Payne via
|
||||
acmurthy)
|
||||
|
||||
Release 0.22.0 - Unreleased
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -47,7 +47,7 @@ public class AppController extends Controller implements AMParams {
|
|||
String title) {
|
||||
super(ctx);
|
||||
this.app = app;
|
||||
set(APP_ID, Apps.toString(app.context.getApplicationID()));
|
||||
set(APP_ID, app.context.getApplicationID().toString());
|
||||
set(RM_WEB, YarnConfiguration.getRMWebAppURL(conf));
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public class TestAMWebApp {
|
|||
Injector injector = WebAppTests.createMockInjector(AppContext.class, ctx);
|
||||
AppController controller = injector.getInstance(AppController.class);
|
||||
controller.index();
|
||||
assertEquals(Apps.toString(ctx.appID), controller.get(APP_ID,""));
|
||||
assertEquals(ctx.appID.toString(), controller.get(APP_ID,""));
|
||||
}
|
||||
|
||||
@Test public void testAppView() {
|
||||
|
|
|
@ -107,7 +107,7 @@ public class TestHSWebApp {
|
|||
Injector injector = WebAppTests.createMockInjector(AppContext.class, ctx);
|
||||
HsController controller = injector.getInstance(HsController.class);
|
||||
controller.index();
|
||||
assertEquals(Apps.toString(ctx.appID), controller.get(APP_ID,""));
|
||||
assertEquals(ctx.appID.toString(), controller.get(APP_ID,""));
|
||||
}
|
||||
|
||||
@Test public void testJobView() {
|
||||
|
|
|
@ -33,10 +33,6 @@ public class Apps {
|
|||
public static final String APP = "app";
|
||||
public static final String ID = "ID";
|
||||
|
||||
public static String toString(ApplicationId id) {
|
||||
return _join("app", id.getClusterTimestamp(), id.getId());
|
||||
}
|
||||
|
||||
public static ApplicationId toAppID(String aid) {
|
||||
Iterator<String> it = _split(aid).iterator();
|
||||
return toAppID(APP, aid, it);
|
||||
|
|
|
@ -56,7 +56,7 @@ class AppsBlock extends HtmlBlock {
|
|||
tbody();
|
||||
int i = 0;
|
||||
for (RMApp app : list.apps.values()) {
|
||||
String appId = Apps.toString(app.getApplicationId());
|
||||
String appId = app.getApplicationId().toString();
|
||||
String trackingUrl = app.getTrackingUrl();
|
||||
String ui = trackingUrl == null || trackingUrl.isEmpty() ? "UNASSIGNED" :
|
||||
(app.getFinishTime() == 0 ? "ApplicationMaster" : "JobHistory");
|
||||
|
|
|
@ -60,7 +60,7 @@ class AppsList implements ToJSON {
|
|||
} else {
|
||||
out.append(",\n");
|
||||
}
|
||||
String appID = Apps.toString(app.getApplicationId());
|
||||
String appID = app.getApplicationId().toString();
|
||||
String trackingUrl = app.getTrackingUrl();
|
||||
String ui = trackingUrl == null ? "UNASSIGNED" :
|
||||
(app.getFinishTime() == 0 ? "ApplicationMaster" : "JobHistory");
|
||||
|
|
Loading…
Reference in New Issue