YARN-198. Added a link to RM pages from the NodeManager web app. Contributed by Jian He.
svn merge --ignore-ancestry -c 1455800 ../../trunk/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1455802 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
35a933707f
commit
0cfa3f7fdc
|
@ -18,6 +18,9 @@ Release 2.0.5-beta - UNRELEASED
|
||||||
the per-application page are translated to html line breaks. (Omkar Vinit
|
the per-application page are translated to html line breaks. (Omkar Vinit
|
||||||
Joshi via vinodkv)
|
Joshi via vinodkv)
|
||||||
|
|
||||||
|
YARN-198. Added a link to RM pages from the NodeManager web app. (Jian He
|
||||||
|
via vinodkv)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -350,7 +350,7 @@ public class NodeManager extends CompositeService
|
||||||
ContainerManagerImpl getContainerManager() {
|
ContainerManagerImpl getContainerManager() {
|
||||||
return containerManager;
|
return containerManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
|
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
|
||||||
StringUtils.startupShutdownMessage(NodeManager.class, args, LOG);
|
StringUtils.startupShutdownMessage(NodeManager.class, args, LOG);
|
||||||
|
|
|
@ -18,16 +18,32 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.nodemanager.webapp;
|
package org.apache.hadoop.yarn.server.nodemanager.webapp;
|
||||||
|
|
||||||
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
import org.apache.hadoop.yarn.webapp.YarnWebParams;
|
import org.apache.hadoop.yarn.webapp.YarnWebParams;
|
||||||
import org.apache.hadoop.yarn.webapp.view.HtmlBlock;
|
import org.apache.hadoop.yarn.webapp.view.HtmlBlock;
|
||||||
|
|
||||||
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
public class NavBlock extends HtmlBlock implements YarnWebParams {
|
public class NavBlock extends HtmlBlock implements YarnWebParams {
|
||||||
|
|
||||||
|
private Configuration conf;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public NavBlock(Configuration conf) {
|
||||||
|
this.conf = conf;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void render(Block html) {
|
protected void render(Block html) {
|
||||||
html
|
|
||||||
|
String RMWebAppURL = YarnConfiguration.getRMWebAppURL(this.conf);
|
||||||
|
html
|
||||||
.div("#nav")
|
.div("#nav")
|
||||||
.h3()._("NodeManager")._() // TODO: Problem if no header like this
|
.h3()._("ResourceManager")._()
|
||||||
|
.ul()
|
||||||
|
.li().a(RMWebAppURL, "RM Home")._()._()
|
||||||
|
.h3()._("NodeManager")._() // TODO: Problem if no header like this
|
||||||
.ul()
|
.ul()
|
||||||
.li()
|
.li()
|
||||||
.a(url("node"), "Node Information")._()
|
.a(url("node"), "Node Information")._()
|
||||||
|
@ -37,7 +53,7 @@ public class NavBlock extends HtmlBlock implements YarnWebParams {
|
||||||
.li()
|
.li()
|
||||||
.a(url("allContainers"), "List of Containers")._()
|
.a(url("allContainers"), "List of Containers")._()
|
||||||
._()
|
._()
|
||||||
.h3("Tools")
|
.h3("Tools")
|
||||||
.ul()
|
.ul()
|
||||||
.li().a("/conf", "Configuration")._()
|
.li().a("/conf", "Configuration")._()
|
||||||
.li().a("/logs", "Local logs")._()
|
.li().a("/logs", "Local logs")._()
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class NodePage extends NMView {
|
||||||
protected void commonPreHead(HTML<_> html) {
|
protected void commonPreHead(HTML<_> html) {
|
||||||
super.commonPreHead(html);
|
super.commonPreHead(html);
|
||||||
|
|
||||||
set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}");
|
set(initID(ACCORDION, "nav"), "{autoHeight:false, active:1}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue