ul. li(). a(_Q).$style(width(Q_MAX_WIDTH)). span().$style(Q_END).__("100% ").__(). span(".q", "default").__().__(); } else { ul. li().$style("margin-bottom: 1em"). span().$style("font-weight: bold").__("Legend:").__(). span().$class("qlegend ui-corner-all").$style(Q_GIVEN). __("Capacity").__(). span().$class("qlegend ui-corner-all").$style(Q_UNDER). __("Used").__(). span().$class("qlegend ui-corner-all").$style(Q_OVER). __("Used (over capacity)").__(). span().$class("qlegend ui-corner-all ui-state-default"). __("Max Capacity").__(). span().$class("qlegend ui-corner-all").$style(ACTIVE_USER). __("Users Requesting Resources").__(). span().$class("qlegend ui-corner-all").$style(Q_AUTO_CREATED). __("Auto Created Queues").__(). __(); a(_Q).$style(width(Q_MAX_WIDTH)). span().$style(join(width(used), ";left:0%;", used > 1 ? Q_OVER : Q_UNDER)).__(".").__(). span(".q", "Queue: root").__(). span().$class("qstats").$style(left(Q_STATS_POS)). __(join(percent(used), " used")).__().
LI<UL<Hamlet>> li = ul. li(). a(_Q).$style(isAutoCreatedLeafQueue? join( Q_AUTO_CREATED, ";", Q_WIDTH) : Q_WIDTH). __('.').__(). span(".q", "Queue: "+info.getQueuePath().substring(5)).__(). span().$class("qstats").$style(left(Q_STATS_POS)). __(join(percent(used), " used")).__(); li.ul("#lq").li().__(LeafQueueInfoBlock.class).__().__(); li.ul("#lq").li().__(QueueUsersInfoBlock.class).__().__(); } else { li.__(QueueBlock.class); li.__();
h3("Cluster"). ul(). li().a(url(rmweb, "cluster", "cluster"), "About").__(). li().a(url(rmweb, "cluster", "apps"), "Applications").__(). li().a(url(rmweb, "cluster", "scheduler"), "Scheduler").__().__(). h3("Application"). ul(). li().a(url("app/info"), "About").__(). li().a(url("app"), "Jobs").__().__(); if (app.getJob() != null) { String jobid = MRApps.toString(app.getJob().getID()); h3("Job"). ul(). li().a(url("job", jobid), "Overview").__(). li().a(url("jobcounters", jobid), "Counters").__(). li().a(url("conf", jobid), "Configuration").__(). li().a(url("tasks", jobid, "m"), "Map tasks").__(). li().a(url("tasks", jobid, "r"), "Reduce tasks").__(). li().a(".logslink", url(MRWebAppUtil.getYARNWebappScheme(), nodeHttpAddress, "node", "containerlogs", thisAmInfo.getContainerId().toString(), app.getJob().getUserName()), "AM Logs").__().__(); if (app.getTask() != null) { String taskid = MRApps.toString(app.getTask().getID()); h3("Task"). ul().
ul. li(). a(_Q).$style(width(Q_MAX_WIDTH)). span().$style(Q_END).__("100% ").__(). span(".q", "default").__().__(); } else { FairSchedulerInfo sinfo = new FairSchedulerInfo(fs); li().$style("margin-bottom: 1em"). span().$style("font-weight: bold").__("Legend:").__(). span().$class("qlegend ui-corner-all").$style(Q_GIVEN). $title("The steady fair shares consider all queues, " + "both active (with running applications) and inactive."). __(STEADY_FAIR_SHARE).__(). span().$class("qlegend ui-corner-all").$style(Q_INSTANTANEOUS_FS). $title("The instantaneous fair shares consider only active " + "queues (with running applications)."). __(INSTANTANEOUS_FAIR_SHARE).__(). span().$class("qlegend ui-corner-all").$style(Q_UNDER). __("Used").__(). span().$class("qlegend ui-corner-all").$style(Q_OVER). __("Used (over fair share)").__(). span().$class("qlegend ui-corner-all ui-state-default"). __("Max Capacity").__(). __(). li(). a(_Q).$style(width(Q_MAX_WIDTH)). span().$style(join(width(used), ";left:0%;", used > 1 ? Q_OVER : Q_UNDER)).__(".").__().
h3("Cluster"). ul(). li().a(url("cluster"), "About").__(). li().a(url("nodes"), "Nodes").__(). li().a(url("nodelabels"), "Node Labels").__(); UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList. li().a(url("apps"), "Applications"). ul(); subAppsList.li().__(); for (YarnApplicationState state : YarnApplicationState.values()) { subAppsList. li().a(url("apps", state.toString()), state.toString()).__(); subAppsList.__().__(); UL<DIV<Hamlet>> tools = mainList. li().a(url("scheduler"), "Scheduler").__().__(). h3("Tools").ul(); tools.li().a("/conf", "Configuration").__(). li().a("/logs", "Local logs").__(). li().a("/stacks", "Server stacks").__(). li().a("/jmx?qry=Hadoop:*", "Server metrics").__(); tools.li().a(url("errors-and-warnings"), "Errors/Warnings").__();
ul. li(). a(_Q).$style(width(WIDTH_F)). span().$style(Q_END).__("100% ").__(). span(".q", "default").__().__(); } else { float used = sinfo.getUsedCapacity(); ul. li(). a(_Q).$style(width(WIDTH_F)). $title(join("used:", percent(used))). span().$style(Q_END).__("100%").__(). ';', used > set ? left(set) : left(used))).__(".").__(). span(".q", sinfo.getQueueName()).__(). __(QueueInfoBlock.class).__();
h3("Application History"). ul(). li().a(url("about"), "About"). __(). li().a(url("apps"), "Applications"). ul(). li().a(url("apps", YarnApplicationState.FINISHED.toString()), YarnApplicationState.FINISHED.toString()). __(). li().a(url("apps", YarnApplicationState.FAILED.toString()), YarnApplicationState.FAILED.toString()). __(). li().a(url("apps", YarnApplicationState.KILLED.toString()), YarnApplicationState.KILLED.toString()). __(). __(). __(). __(); tools.li().a("/conf", "Configuration").__() .li().a("/logs", "Local logs").__() .li().a("/stacks", "Server stacks").__() .li().a("/jmx?qry=Hadoop:*", "Server metrics").__(); tools.li().a(url("errors-and-warnings"), "Errors/Warnings").__();
.h3().__("ResourceManager").__() .ul() .li().a(RMWebAppURL, "RM Home").__().__() .h3().__("NodeManager").__() // TODO: Problem if no header like this .ul() .li() .a(url("node"), "Node Information").__() .li() .a(url("allApplications"), "List of Applications") .__() .li() .a(url("allContainers"), "List of Containers").__() .__() .h3("Tools") .ul() .li().a("/conf", "Configuration").__() .li().a("/logs", "Local logs").__() .li().a("/stacks", "Server stacks").__() .li().a("/jmx?qry=Hadoop:*", "Server metrics").__(); if (addErrorsAndWarningsLink) { ul.li().a(url("errors-and-warnings"), "Errors/Warnings").__();
LI<UL<Hamlet>> li = ul. li(). a(_Q).$style(width(capacity * Q_MAX_WIDTH)). $title(join(join(STEADY_FAIR_SHARE + ":", percent(steadyFairShare)), join(" " + INSTANTANEOUS_FAIR_SHARE + ":", percent(instantaneousFairShare)))). __('.').__(). span(".q", info.getQueueName()).__(). span().$class("qstats").$style(left(Q_STATS_POS)). __(join(percent(used), " used")).__(); li.ul("#lq").li().__(LeafQueueBlock.class).__().__(); } else { li.ul("#lq").li().__(ParentQueueBlock.class).__().__(); li.__(QueueBlock.class); li.__();
@Override public void render(Block html) { html. div("#nav"). h3("Cluster"). ul(). li().a(url(""), "About").__(). li().a(url("federation"), "Federation").__(). li().a(url("nodes"), "Nodes").__(). li().a(url("apps"), "Applications").__(). __(). h3("Tools"). ul(). li().a("/conf", "Configuration").__(). li().a("/logs", "Local logs").__(). li().a("/stacks", "Server stacks").__(). li().a("/jmx?qry=Hadoop:*", "Server metrics").__().__().__(); } }
@Override protected void render(Block html) { html. div("#nav"). h3("Heading1"). ul(). li("Item 1"). li("Item 2"). li("...").__(). h3("Tools"). ul(). li().a("/conf", "Configuration").__(). li().a("/stacks", "Thread dump").__(). li().a("/logs", "Logs").__(). li().a("/jmx?qry=Hadoop:*", "Metrics").__().__().__(); } }
private <T extends __> LI<T> li_(T e, boolean inline) { return new LI<T>("li", e, opt(false, inline, false)); }
@Override public LI<T> a(String href, String anchorText) { return a().$href(href).__(anchorText).__(); }
@Override public UL<LI<T>> ul(String selector) { return setSelector(ul(), selector); }
@Override public LI<T> span(String cdata) { return span().__(cdata).__(); }
@Override public A<LI<T>> a(String selector) { return setSelector(a(), selector); }
@Override public LI<T> a(String selector, String href, String anchorText) { return setSelector(a(), selector).$href(href).__(anchorText).__(); }
@Override public LI<T> span(String selector, String cdata) { return setSelector(span(), selector).__(cdata).__(); }