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:
Arun Murthy 2011-09-12 23:17:27 +00:00
parent c8383a5f49
commit 7fa0bf3558
7 changed files with 8 additions and 9 deletions

View File

@ -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

View File

@ -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));
}

View File

@ -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() {

View File

@ -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() {

View File

@ -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);

View File

@ -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");

View File

@ -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");