MAPREDUCE-3114. svn merge -c r1177187 --ignore-ancestry ../../trunk/

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1177190 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2011-09-29 07:33:36 +00:00
parent 08a348d1e5
commit 034d0d8fee
3 changed files with 10 additions and 5 deletions

View File

@ -1440,6 +1440,9 @@ Release 0.23.0 - Unreleased
MAPREDUCE-3078. Ensure MapReduce AM reports progress correctly for MAPREDUCE-3078. Ensure MapReduce AM reports progress correctly for
displaying on the RM Web-UI. (vinodkv via acmurthy) displaying on the RM Web-UI. (vinodkv via acmurthy)
MAPREDUCE-3114. Fixed invalid ApplicationURL on RM WebUI. (Subroto Sanyal
via vinodkv)
Release 0.22.0 - Unreleased Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -60,7 +60,7 @@ class AppsBlock extends HtmlBlock {
String trackingUrl = app.getTrackingUrl(); String trackingUrl = app.getTrackingUrl();
String ui = trackingUrl == null || trackingUrl.isEmpty() ? "UNASSIGNED" : String ui = trackingUrl == null || trackingUrl.isEmpty() ? "UNASSIGNED" :
(app.getFinishTime() == 0 ? (app.getFinishTime() == 0 ?
"ApplicationMaster URL" : "JobHistory URL"); "ApplicationMaster" : "History");
String percent = String.format("%.1f", app.getProgress() * 100); String percent = String.format("%.1f", app.getProgress() * 100);
tbody. tbody.
tr(). tr().
@ -79,7 +79,8 @@ class AppsBlock extends HtmlBlock {
div(_PROGRESSBAR_VALUE). div(_PROGRESSBAR_VALUE).
$style(join("width:", percent, '%'))._()._()._(). $style(join("width:", percent, '%'))._()._()._().
td(). td().
a(trackingUrl == null ? "#" : join("http://", trackingUrl), ui)._(). a(trackingUrl == null || trackingUrl.isEmpty() || "N/A".equalsIgnoreCase(trackingUrl) ?
"#" : join("http://", trackingUrl), ui)._().
td(app.getDiagnostics().toString())._(); td(app.getDiagnostics().toString())._();
if (list.rendering != Render.HTML && ++i >= 20) break; if (list.rendering != Render.HTML && ++i >= 20) break;
} }

View File

@ -62,8 +62,8 @@ class AppsList implements ToJSON {
} }
String appID = app.getApplicationId().toString(); String appID = app.getApplicationId().toString();
String trackingUrl = app.getTrackingUrl(); String trackingUrl = app.getTrackingUrl();
String ui = trackingUrl == null ? "UNASSIGNED" : String ui = trackingUrl == null || trackingUrl.isEmpty() || "N/A".equalsIgnoreCase(trackingUrl) ?
(app.getFinishTime() == 0 ? "ApplicationMaster" : "JobHistory"); "UNASSIGNED" : (app.getFinishTime() == 0 ? "ApplicationMaster" : "JobHistory");
out.append("[\""); out.append("[\"");
appendSortable(out, app.getApplicationId().getId()); appendSortable(out, app.getApplicationId().getId());
appendLink(out, appID, rc.prefix(), "app", appID).append(_SEP). appendLink(out, appID, rc.prefix(), "app", appID).append(_SEP).
@ -73,7 +73,8 @@ class AppsList implements ToJSON {
append(app.getState().toString()).append(_SEP); append(app.getState().toString()).append(_SEP);
appendProgressBar(out, app.getProgress()).append(_SEP); appendProgressBar(out, app.getProgress()).append(_SEP);
appendLink(out, ui, rc.prefix(), appendLink(out, ui, rc.prefix(),
trackingUrl == null ? "#" : "http://", trackingUrl). trackingUrl == null || trackingUrl.isEmpty() || "N/A".equalsIgnoreCase(trackingUrl) ?
"#" : "http://", trackingUrl).
append(_SEP).append(escapeJavaScript(escapeHtml( append(_SEP).append(escapeJavaScript(escapeHtml(
app.getDiagnostics().toString()))). app.getDiagnostics().toString()))).
append("\"]"); append("\"]");