TABLE<DIV<Hamlet>> table = div.table("#job"); table. tr(). div.__(); table("#job"). tr(). th(_TH, "Task Type"). td(). div(_PROGRESSBAR). $title(join(jinfo.getMapProgressPercent(), '%')). // tooltip div(_PROGRESSBAR_VALUE). $style(join("width:", jinfo.getMapProgressPercent(), '%')).__().__().__(). td().a(url("tasks", jid, "m", "ALL"), String.valueOf(jinfo.getMapsTotal())).__(). td().a(url("tasks", jid, "m", "PENDING"), String.valueOf(jinfo.getMapsPending())).__(). td(). div(_PROGRESSBAR). $title(join(jinfo.getReduceProgressPercent(), '%')). // tooltip div(_PROGRESSBAR_VALUE). $style(join("width:", jinfo.getReduceProgressPercent(), '%')).__().__().__(). td().a(url("tasks", jid, "r", "ALL"), String.valueOf(jinfo.getReducesTotal())).__(). td().a(url("tasks", jid, "r", "PENDING"), String.valueOf(jinfo.getReducesPending())).__(). table("#job"). tr(). th(_TH, "Attempt Type").
DIV<Hamlet> div = html.div().$class("metrics"); div.h3("Cluster Metrics"). table("#metricsoverview"). thead().$class("ui-widget-header"). tr(). __().__(); div.h3("Cluster Nodes Metrics"). table("#nodemetricsoverview"). thead().$class("ui-widget-header"). tr(). UserMetricsInfo userMetrics = new UserMetricsInfo(this.rm, user); if (userMetrics.metricsAvailable()) { div.h3("User Metrics for " + user). table("#usermetricsoverview"). thead().$class("ui-widget-header"). tr(). div.h3("Scheduler Metrics"). table("#schedulermetricsoverview"). thead().$class("ui-widget-header"). tr(). div.__();
.button() .$style( "border-style: solid; border-color: #000000; border-width: 1px;" + " cursor: hand; cursor: pointer; border-radius: 4px") .$onclick("confirmAction()").b("Dump scheduler logs").__().select() .$id("time").option().$value("60").__("1 min").__().option() .$value("300").__("5 min").__().option().$value("600").__("10 min").__() .__().__(); div(".ui-widget-header.ui-corner-top"). __("Application Queues").__(). div("#cs.ui-widget-content.ui-corner-bottom"). ul(); if (cs == null) { ul. ul.__().__(). script().$type("text/javascript"). __("$('#cs').hide();").__().__(). __(RMAppsBlock.class); html.__(HealthBlock.class);
div_description.table("#LogAggregationStatusDecription"); table_description. tr(). + "is finished or not.").__(); table_description.__(); div_description.__(); div.h3( "Log Aggregation: " + (rmApp == null ? "N/A" : rmApp .getLogAggregationStatusForAppReport() == null ? "N/A" : rmApp .getLogAggregationStatusForAppReport().name())).table( "#LogAggregationStatus"); div.__();
SchedulerHealth healthInfo = cs.getSchedulerHealth(); DIV<Hamlet> div = html.div("#health"); div.h4("Aggregate scheduler counts"); TBODY<TABLE<DIV<Hamlet>>> tbody = div.table("#lastrun").thead().$class("ui-widget-header").tr().th() .$class("ui-state-default").__("Total Container Allocations(count)") .__().th().$class("ui-state-default") .td(healthInfo.getAggregateFulFilledReservationsCount().toString()) .td(healthInfo.getAggregatePreemptionCount().toString()).__().__().__(); div.h4("Last scheduler run"); tbody = div.table("#lastrun").thead().$class("ui-widget-header").tr().th() .$class("ui-state-default").__("Time").__().th() .$class("ui-state-default").__("Allocations(count - resources)").__() String queue = "N/A"; String table = "#" + entry.getKey(); div.h4("Last " + entry.getKey()); tbody = div.table(table).thead().$class("ui-widget-header").tr().th() .$class("ui-state-default").__("Time").__().th() .$class("ui-state-default").__("Container Id").__().th() .td(queue).__().__().__(); div.__();
.h3("Total Outstanding Resource Requests: " + getTotalResource(resourceRequests)) .table("#resourceRequests").thead().tr().th(".priority", "Priority") .th(".allocationRequestId", "AllocationRequestId") .th(".resource", "ResourceName").th(".capacity", "Capability") .__("var resourceRequestsTableData=" + resourceRequestTableData).__(); tbody.__().__(); div.__();
DIV<Hamlet> nav = html. div("#nav"). 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").__().__(); + thisAmInfo.getNodeManagerHttpPort(); nav. h3("Job"). ul(). li().a(url("job", jobid), "Overview").__(). li().a(url("jobcounters", jobid), "Counters").__(). String taskid = MRApps.toString(app.getTask().getID()); nav. h3("Task"). ul(). li().a(url("task", taskid), "Task Overview").__(). li().a(url("taskcounters", taskid), "Counters").__().__(); h3("Tools"). ul(). li().a("/conf", "Configuration").__().
h3("Cluster"). ul(). li().a(url("cluster"), "About").__(). li().a(url("nodes"), "Nodes").__(). UL<DIV<Hamlet>> tools = mainList. li().a(url("scheduler"), "Scheduler").__().__(). h3("Tools").ul(); tools.li().a("/conf", "Configuration").__(). li().a("/logs", "Local logs").__(). tools.li().a(url("errors-and-warnings"), "Errors/Warnings").__(); tools.__().__();
UL<DIV<DIV<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. __(QueueBlock.class).__(); ul.__().__(). script().$type("text/javascript"). __("$('#cs').hide();").__().__(). __(FairSchedulerAppsBlock.class);
appMetrics.getPreemptedResourceSecondsMap())); pdiv.__();
".dataTables_wrapper { min-height: 1em }"). div(".wrapper"). h2("Default table init"). table("#t1"). thead(). tr().th("Column1").th("Column2").__().__(). tr().td("c1r1").td("c2r1").__(). tr().td("c1r2").td("c2r2").__().__().__(). h2("Nested tables"). div(_INFO_WRAP). table("#t2"). thead(). tr().th(_TH, "Column1").th(_TH, "Column2").__().__(). tr().td("subc1r1").td("subc2r1").__(). tr().td("subc1r2").td("subc2r2").__(). __().__().__().__().__().__().__().__().__();
$title(join(job.getMapProgressPercent(), '%')). // tooltip div(_PROGRESSBAR_VALUE). $style(join("width:", job.getMapProgressPercent(), '%')).__().__().__(). td(String.valueOf(job.getMapsTotal())). td(String.valueOf(job.getMapsCompleted())). $title(join(job.getReduceProgressPercent(), '%')). // tooltip div(_PROGRESSBAR_VALUE). $style(join("width:", job.getReduceProgressPercent(), '%')).__().__().__(). td(String.valueOf(job.getReducesTotal())). td(String.valueOf(job.getReducesCompleted())).__();
@Override protected void render(Block html) { ContainerId containerID; try { containerID = ContainerId.fromString($(CONTAINER_ID)); } catch (IllegalArgumentException e) { html.p().__("Invalid containerId " + $(CONTAINER_ID)).__(); return; } DIV<Hamlet> div = html.div("#content"); 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; } ContainerInfo info = new ContainerInfo(this.nmContext, container); info("Container information") .__("ContainerID", info.getId()) .__("ContainerState", info.getState()) .__("ExitStatus", info.getExitStatus()) .__("Diagnostics", info.getDiagnostics()) .__("User", info.getUser()) .__("TotalMemoryNeeded", info.getMemoryNeeded()) .__("TotalVCoresNeeded", info.getVCoresNeeded()) .__("ExecutionType", info.getExecutionType()) .__("logs", info.getShortLogLink(), "Link to logs"); html.__(InfoBlock.class); } }