protected override void Render(HtmlBlock.Block html) { html.(typeof(MetricsOverviewTable)); Hamlet.UL <Hamlet.DIV <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > > ul = html.Div("#cs-wrapper.ui-widget").Div(".ui-widget-header.ui-corner-top").("Application Queues" ).().Div("#cs.ui-widget-content.ui-corner-bottom").Ul(); if (cs == null) { ul.Li().A(Q).$style(Width(QMaxWidth)).Span().$style(QEnd).("100% ").().Span(".q", "default").().(); } else { CSQueue root = cs.GetRootQueue(); CapacitySchedulerInfo sinfo = new CapacitySchedulerInfo(root); csqinfo.csinfo = sinfo; csqinfo.qinfo = null; float used = sinfo.GetUsedCapacity() / 100; ul.Li().$style("margin-bottom: 1em").Span().$style("font-weight: bold").("Legend:" ).().Span().$class("qlegend ui-corner-all").$style(QGiven).("Capacity").().Span( ).$class("qlegend ui-corner-all").$style(QUnder).("Used").().Span().$class("qlegend ui-corner-all" ).$style(QOver).("Used (over capacity)").().Span().$class("qlegend ui-corner-all ui-state-default" ).("Max Capacity").().().Li().A(Q).$style(Width(QMaxWidth)).Span().$style(StringHelper.Join (Width(used), ";left:0%;", used > 1 ? QOver : QUnder)).(".").().Span(".q", "root" ).().Span().$class("qstats").$style(Left(QStatsPos)).(StringHelper.Join(Percent( used), " used")).().(typeof(CapacitySchedulerPage.QueueBlock)).(); } ul.().().Script().$type("text/javascript").("$('#cs').hide();").().().(typeof(RMAppsBlock )); }
protected override void Render(HtmlBlock.Block html) { html.(typeof(MetricsOverviewTable)); Hamlet.UL <Hamlet.DIV <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > > ul = html.Div("#cs-wrapper.ui-widget").Div(".ui-widget-header.ui-corner-top").("Application Queues" ).().Div("#cs.ui-widget-content.ui-corner-bottom").Ul(); if (fs == null) { ul.Li().A(Q).$style(Width(QMaxWidth)).Span().$style(QEnd).("100% ").().Span(".q", "default").().(); } else { FairSchedulerInfo sinfo = new FairSchedulerInfo(fs); fsqinfo.qinfo = sinfo.GetRootQueueInfo(); float used = fsqinfo.qinfo.GetUsedMemoryFraction(); ul.Li().$style("margin-bottom: 1em").Span().$style("font-weight: bold").("Legend:" ).().Span().$class("qlegend ui-corner-all").$style(QGiven).$title("The steady fair shares consider all queues, " + "both active (with running applications) and inactive.").(SteadyFairShare).() .Span().$class("qlegend ui-corner-all").$style(QInstantaneousFs).$title("The instantaneous fair shares consider only active " + "queues (with running applications).").(InstantaneousFairShare).().Span().$class ("qlegend ui-corner-all").$style(QUnder).("Used").().Span().$class("qlegend ui-corner-all" ).$style(QOver).("Used (over fair share)").().Span().$class("qlegend ui-corner-all ui-state-default" ).("Max Capacity").().().Li().A(Q).$style(Width(QMaxWidth)).Span().$style(StringHelper.Join (Width(used), ";left:0%;", used > 1 ? QOver : QUnder)).(".").().Span(".q", "root" ).().Span().$class("qstats").$style(Left(QStatsPos)).(StringHelper.Join(Percent( used), " used")).().(typeof(FairSchedulerPage.QueueBlock)).(); } ul.().().Script().$type("text/javascript").("$('#cs').hide();").().().(typeof(FairSchedulerAppsBlock )); }
protected override void Render(HtmlBlock.Block html) { html.(typeof(MetricsOverviewTable)); Hamlet.UL <Hamlet.DIV <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > > ul = html.Div("#cs-wrapper.ui-widget").Div(".ui-widget-header.ui-corner-top").("FifoScheduler Queue" ).().Div("#cs.ui-widget-content.ui-corner-bottom").Ul(); if (fs == null) { ul.Li().A(Q).$style(Width(WidthF)).Span().$style(QEnd).("100% ").().Span(".q", "default" ).().(); } else { float used = sinfo.GetUsedCapacity(); float set = sinfo.GetCapacity(); float delta = Math.Abs(set - used) + 0.001f; ul.Li().A(Q).$style(Width(WidthF)).$title(StringHelper.Join("used:", Percent(used ))).Span().$style(QEnd).("100%").().Span().$style(StringHelper.Join(Width(delta) , ';', used > set ? Over : Under, ';', used > set ? Left(set) : Left(used))).("." ).().Span(".q", sinfo.GetQueueName()).().(typeof(DefaultSchedulerPage.QueueInfoBlock )).(); } ul.().().Script().$type("text/javascript").("$('#cs').hide();").().().(typeof(AppsBlock )); }
protected override void Render(HtmlBlock.Block html) { Hamlet.UL <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > mainList = html .Div("#nav").H3("Cluster").Ul().Li().A(Url("cluster"), "About").().Li().A(Url("nodes" ), "Nodes").().Li().A(Url("nodelabels"), "Node Labels").(); Hamlet.UL <Hamlet.LI <Hamlet.UL <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet > > > > subAppsList = mainList.Li().A(Url("apps"), "Applications").Ul(); subAppsList.Li().(); foreach (YarnApplicationState state in YarnApplicationState.Values()) { subAppsList.Li().A(Url("apps", state.ToString()), state.ToString()).(); } subAppsList.().(); mainList.Li().A(Url("scheduler"), "Scheduler").().().H3("Tools").Ul().Li().A("/conf" , "Configuration").().Li().A("/logs", "Local logs").().Li().A("/stacks", "Server stacks" ).().Li().A("/jmx?qry=Hadoop:*", "Server metrics").().().(); }
protected override void Render(HtmlBlock.Block html) { AList <CapacitySchedulerQueueInfo> subQueues = (csqinfo.qinfo == null) ? csqinfo.csinfo .GetQueues().GetQueueInfoList() : csqinfo.qinfo.GetQueues().GetQueueInfoList(); Hamlet.UL <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> ul = html.Ul("#pq"); foreach (CapacitySchedulerQueueInfo info in subQueues) { float used = info.GetUsedCapacity() / 100; float absCap = info.GetAbsoluteCapacity() / 100; float absMaxCap = info.GetAbsoluteMaxCapacity() / 100; float absUsedCap = info.GetAbsoluteUsedCapacity() / 100; Hamlet.LI <Hamlet.UL <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > li = ul.Li().A( Q).$style(Width(absMaxCap * QMaxWidth)).$title(StringHelper.Join("Absolute Capacity:" , Percent(absCap))).Span().$style(StringHelper.Join(QGiven, ";font-size:1px;", Width (absCap / absMaxCap))).('.').().Span().$style(StringHelper.Join(Width(absUsedCap / absMaxCap), ";font-size:1px;left:0%;", absUsedCap > absCap ? QOver : QUnder)) .('.').().Span(".q", Sharpen.Runtime.Substring(info.GetQueuePath(), 5)).().Span( ).$class("qstats").$style(Left(QStatsPos)).(StringHelper.Join(Percent(used), " used" )).(); csqinfo.qinfo = info; if (info.GetQueues() == null) { li.Ul("#lq").Li().(typeof(CapacitySchedulerPage.LeafQueueInfoBlock)).().(); li.Ul("#lq").Li().(typeof(CapacitySchedulerPage.QueueUsersInfoBlock)).().(); } else { li.(typeof(CapacitySchedulerPage.QueueBlock)); } li.(); } ul.(); }
protected override void Render(HtmlBlock.Block html) { ICollection <FairSchedulerQueueInfo> subQueues = fsqinfo.qinfo.GetChildQueues(); Hamlet.UL <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> ul = html.Ul("#pq"); foreach (FairSchedulerQueueInfo info in subQueues) { float capacity = info.GetMaxResourcesFraction(); float steadyFairShare = info.GetSteadyFairShareMemoryFraction(); float instantaneousFairShare = info.GetFairShareMemoryFraction(); float used = info.GetUsedMemoryFraction(); Hamlet.LI <Hamlet.UL <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > li = ul.Li().A( Q).$style(Width(capacity * QMaxWidth)).$title(StringHelper.Join(StringHelper.Join (SteadyFairShare + ":", Percent(steadyFairShare)), StringHelper.Join(" " + InstantaneousFairShare + ":", Percent(instantaneousFairShare)))).Span().$style(StringHelper.Join(QGiven , ";font-size:1px;", Width(steadyFairShare / capacity))).('.').().Span().$style( StringHelper.Join(QInstantaneousFs, ";font-size:1px;", Width(instantaneousFairShare / capacity))).('.').().Span().$style(StringHelper.Join(Width(used / capacity), ";font-size:1px;left:0%;", used > instantaneousFairShare ? QOver : QUnder)).('.' ).().Span(".q", info.GetQueueName()).().Span().$class("qstats").$style(Left(QStatsPos )).(StringHelper.Join(Percent(used), " used")).(); fsqinfo.qinfo = info; if (info is FairSchedulerLeafQueueInfo) { li.Ul("#lq").Li().(typeof(FairSchedulerPage.LeafQueueBlock)).().(); } else { li.(typeof(FairSchedulerPage.QueueBlock)); } li.(); } ul.(); }