Merge -r 1176044:1176045 from trunk to branch-0.23 to fix MAPREDUCE-2984.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1176046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-09-26 20:46:28 +00:00
parent cf8e553ab3
commit 72e518889f
2 changed files with 11 additions and 0 deletions

View File

@ -1400,6 +1400,9 @@ Release 0.23.0 - Unreleased
MAPREDUCE-3031. Proper handling of killed containers to prevent stuck MAPREDUCE-3031. Proper handling of killed containers to prevent stuck
containers/AMs on an external kill signal. (Siddharth Seth via vinodkv) containers/AMs on an external kill signal. (Siddharth Seth via vinodkv)
MAPREDUCE-2984. Better error message for displaying completed containers.
(Devaraj K via acmurthy)
Release 0.22.0 - Unreleased Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -31,6 +31,8 @@ import org.apache.hadoop.yarn.server.nodemanager.Context;
import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container; import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container;
import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.util.ConverterUtils;
import org.apache.hadoop.yarn.webapp.SubView; import org.apache.hadoop.yarn.webapp.SubView;
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet;
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV;
import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.HtmlBlock;
import org.apache.hadoop.yarn.webapp.view.InfoBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock;
@ -69,7 +71,13 @@ public class ContainerPage extends NMView implements NMWebParams {
return; return;
} }
DIV<Hamlet> div = html.div("#content");
Container container = this.nmContext.getContainers().get(containerID); Container container = this.nmContext.getContainers().get(containerID);
if (container == null) {
div.h1("Unknown Container. Container might have completed, "
+ "please go back to the previous page and retry.")._();
return;
}
ContainerStatus containerData = container.cloneAndGetContainerStatus(); ContainerStatus containerData = container.cloneAndGetContainerStatus();
int exitCode = containerData.getExitStatus(); int exitCode = containerData.getExitStatus();
String exiStatus = String exiStatus =