Merge -c 1241685 from trunk to branch-0.23 to fix MAPREDUCE-3823. Fixed a bug in RM web-ui which broke sorting.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1241686 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2012-02-07 23:00:49 +00:00
parent e4d7448b7f
commit 61393abe47
3 changed files with 11 additions and 5 deletions

View File

@ -708,6 +708,9 @@ Release 0.23.1 - Unreleased
MAPREDUCE-3833. Fixed a bug in reinitiaziling of queues. (Jason Lowe via MAPREDUCE-3833. Fixed a bug in reinitiaziling of queues. (Jason Lowe via
acmurthy) acmurthy)
MAPREDUCE-3823. Fixed a bug in RM web-ui which broke sorting. (Jonathan
Eagles via acmurthy)
Release 0.23.0 - 2011-11-01 Release 0.23.0 - 2011-11-01
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -81,7 +81,7 @@ class AppsBlock extends HtmlBlock {
td(). td().
br().$title(startTime)._()._(startTime)._(). br().$title(startTime)._()._(startTime)._().
td(). td().
br().$title(startTime)._()._(finishTime)._(). br().$title(finishTime)._()._(finishTime)._().
td(appInfo.getState()). td(appInfo.getState()).
td(appInfo.getFinalStatus()). td(appInfo.getFinalStatus()).
td(). td().

View File

@ -33,6 +33,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppState; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppState;
import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo;
import org.apache.hadoop.yarn.util.Times;
import org.apache.hadoop.yarn.webapp.Controller.RequestContext; import org.apache.hadoop.yarn.webapp.Controller.RequestContext;
import org.apache.hadoop.yarn.webapp.ToJSON; import org.apache.hadoop.yarn.webapp.ToJSON;
import org.apache.hadoop.yarn.webapp.view.JQueryUI.Render; import org.apache.hadoop.yarn.webapp.view.JQueryUI.Render;
@ -60,7 +61,9 @@ class AppsList implements ToJSON {
&& app.getState() != RMAppState.valueOf(requiredAppState)) { && app.getState() != RMAppState.valueOf(requiredAppState)) {
continue; continue;
} }
AppInfo appInfo = new AppInfo(app, false); AppInfo appInfo = new AppInfo(app, true);
String startTime = Times.format(appInfo.getStartTime());
String finishTime = Times.format(appInfo.getFinishTime());
if (first) { if (first) {
first = false; first = false;
} else { } else {
@ -72,15 +75,15 @@ class AppsList implements ToJSON {
appInfo.getAppId()).append(_SEP). appInfo.getAppId()).append(_SEP).
append(escapeHtml(appInfo.getUser())).append(_SEP). append(escapeHtml(appInfo.getUser())).append(_SEP).
append(escapeJavaScript(escapeHtml(appInfo.getName()))).append(_SEP). append(escapeJavaScript(escapeHtml(appInfo.getName()))).append(_SEP).
append(escapeHtml(appInfo.getQueue())).append(_SEP). append(escapeHtml(appInfo.getQueue())).append(_SEP);
appendSortable(out, startTime).append(startTime).append(_SEP);
appendSortable(out, finishTime).append(finishTime).append(_SEP).
append(appInfo.getState()).append(_SEP). append(appInfo.getState()).append(_SEP).
append(appInfo.getFinalStatus()).append(_SEP); append(appInfo.getFinalStatus()).append(_SEP);
appendProgressBar(out, appInfo.getProgress()).append(_SEP); appendProgressBar(out, appInfo.getProgress()).append(_SEP);
appendLink(out, appInfo.getTrackingUI(), rc.prefix(), appendLink(out, appInfo.getTrackingUI(), rc.prefix(),
!appInfo.isTrackingUrlReady() ? !appInfo.isTrackingUrlReady() ?
"#" : appInfo.getTrackingUrlPretty()). "#" : appInfo.getTrackingUrlPretty()).
append(_SEP).append(escapeJavaScript(escapeHtml(
appInfo.getNote()))).
append("\"]"); append("\"]");
} }
out.append(']'); out.append(']');