/** * @param ri response info to be rendered */ private void renderCommonLeafQueueInfo(final ResponseInfo ri) { ri. _("Num Schedulable Applications:", Integer.toString(lqinfo.getNumActiveApplications())). _("Num Non-Schedulable Applications:", Integer.toString(lqinfo.getNumPendingApplications())). _("Num Containers:", Integer.toString(lqinfo.getNumContainers())). _("Max Applications:", Integer.toString(lqinfo.getMaxApplications())). _("Max Applications Per User:", Integer.toString(lqinfo.getMaxApplicationsPerUser())). _("Max Application Master Resources:", lqinfo.getAMResourceLimit().toString()). _("Used Application Master Resources:", lqinfo.getUsedAMResource().toString()). _("Max Application Master Resources Per User:", lqinfo.getUserAMResourceLimit().toString()). _("Configured Minimum User Limit Percent:", Integer.toString(lqinfo.getUserLimit()) + "%"). _("Configured User Limit Factor:", StringUtils.format( "%.1f", lqinfo.getUserLimitFactor())). _("Accessible Node Labels:", StringUtils.join(",", lqinfo.getNodeLabels())). _("Preemption:", lqinfo.getPreemptionDisabled() ? "disabled" : "enabled"); } }
/** * @param ri response info to be rendered */ private void renderQueueCapacityInfo(final ResponseInfo ri) { ri. _("Used Capacity:", percent(lqinfo.getUsedCapacity() / 100)). _("Configured Capacity:", percent(lqinfo.getCapacity() / 100)). _("Configured Max Capacity:", percent(lqinfo.getMaxCapacity() / 100)). _("Absolute Used Capacity:", percent(lqinfo.getAbsoluteUsedCapacity() / 100)). _("Absolute Configured Capacity:", percent(lqinfo.getAbsoluteCapacity() / 100)). _("Absolute Configured Max Capacity:", percent(lqinfo.getAbsoluteMaxCapacity() / 100)). _("Used Resources:", lqinfo.getResourcesUsed().toString()); }
CapacitySchedulerQueueInfo info; if (queue instanceof LeafQueue) { info = new CapacitySchedulerLeafQueueInfo((LeafQueue) queue); } else { info = new CapacitySchedulerQueueInfo(queue);
private void renderCommonLeafQueueInfo(ResponseInfo ri) { ri. __("Num Schedulable Applications:", Integer.toString(lqinfo.getNumActiveApplications())). __("Num Non-Schedulable Applications:", Integer.toString(lqinfo.getNumPendingApplications())). __("Num Containers:", Integer.toString(lqinfo.getNumContainers())). __("Max Applications:", Integer.toString(lqinfo.getMaxApplications())). __("Max Applications Per User:", Integer.toString(lqinfo.getMaxApplicationsPerUser())). __("Configured Minimum User Limit Percent:", Integer.toString(lqinfo.getUserLimit()) + "%"). __("Configured User Limit Factor:", lqinfo.getUserLimitFactor()). __("Accessible Node Labels:", StringUtils.join(",", lqinfo.getNodeLabels())). __("Ordering Policy: ", lqinfo.getOrderingPolicyInfo()). __("Preemption:", lqinfo.getPreemptionDisabled() ? "disabled" : "enabled"). __("Intra-queue Preemption:", lqinfo.getIntraQueuePreemptionDisabled() ? "disabled" : "enabled"). __("Default Node Label Expression:", lqinfo.getDefaultNodeLabelExpression() == null ? NodeLabel.DEFAULT_NODE_LABEL_PARTITION : lqinfo.getDefaultNodeLabelExpression()). __("Default Application Priority:", Integer.toString(lqinfo.getDefaultApplicationPriority())); } }
assertEquals(1, origOldA1.getNumApplications()); assertEquals(1, origNumAppsA); assertEquals(2, origNumAppsRoot); assertEquals(0, origNewA1.getNumApplications()); assertEquals(1, newNumAppsA); assertEquals(2, newNumAppsRoot); assertEquals(3 * GB, origOldA1.getResourcesUsed().getMemorySize()); assertEquals(1, origOldA1.getResourcesUsed().getvCores()); assertEquals(0, origNewA1.getResourcesUsed().getMemorySize()); // after the move assertEquals(0, origNewA1.getResourcesUsed().getvCores()); // after the move assertEquals(3 * GB, targetNewA2.getResourcesUsed().getMemorySize()); assertEquals(1, targetNewA2.getResourcesUsed().getvCores()); assertEquals(0, targetOldA2.getNumApplications()); assertEquals(0, targetOldA2.getResourcesUsed().getMemorySize()); assertEquals(0, targetOldA2.getResourcesUsed().getvCores()); assertEquals(1, targetNewA2.getNumApplications()); assertEquals(1, origOldA1.getNumContainers()); assertEquals(0, origNewA1.getNumContainers()); assertEquals(1, targetNewA2.getNumContainers()); assertEquals(0, targetOldA2.getNumContainers());
@Override protected void render(Block html) { TBODY<TABLE<Hamlet>> tbody = html.table("#userinfo").thead().$class("ui-widget-header").tr().th() .$class("ui-state-default")._("User Name")._().th() .$class("ui-state-default")._("Max Resource")._().th() .$class("ui-state-default")._("Used Resource")._().th() .$class("ui-state-default")._("Max AM Resource")._().th() .$class("ui-state-default")._("Used AM Resource")._().th() .$class("ui-state-default")._("Schedulable Apps")._().th() .$class("ui-state-default")._("Non-Schedulable Apps")._()._()._() .tbody(); ArrayList<UserInfo> users = lqinfo.getUsers().getUsersList(); for (UserInfo userInfo : users) { tbody.tr().td(userInfo.getUsername()) .td(userInfo.getUserResourceLimit().toString()) .td(userInfo.getResourcesUsed().toString()) .td(lqinfo.getUserAMResourceLimit().toString()) .td(userInfo.getAMResourcesUsed().toString()) .td(Integer.toString(userInfo.getNumActiveApplications())) .td(Integer.toString(userInfo.getNumPendingApplications()))._(); } html.div().$class("usersinfo").h5("Active Users Info")._(); tbody._()._(); } }
private void renderQueueCapacityInfo(ResponseInfo ri, String label) { PartitionQueueCapacitiesInfo capacities = lqinfo.getCapacities().getPartitionQueueCapacitiesInfo(label); PartitionResourcesInfo resourceUsages = lqinfo.getResources().getPartitionResourceUsageInfo(label); ArrayList<UserInfo> usersList = lqinfo.getUsers().getUsersList(); if (!usersList.isEmpty()) { userAMResourceLimit = resourceUsages.getUserAmLimit();
lqinfo.getResources().getPartitionResourceUsageInfo( nodeLabel == null ? "" : nodeLabel); ArrayList<UserInfo> users = lqinfo.getUsers().getUsersList(); for (UserInfo userInfo : users) { ResourceInfo resourcesUsed = userInfo.getResourcesUsed();
assertEquals(1, origOldA1.getNumApplications()); assertEquals(1, origNumAppsA); assertEquals(2, origNumAppsRoot); assertEquals(0, origNewA1.getNumApplications()); assertEquals(1, newNumAppsA); assertEquals(2, newNumAppsRoot); assertEquals(3 * GB, origOldA1.getResourcesUsed().getMemory()); assertEquals(1, origOldA1.getResourcesUsed().getvCores()); assertEquals(0, origNewA1.getResourcesUsed().getMemory()); // after the move assertEquals(0, origNewA1.getResourcesUsed().getvCores()); // after the move assertEquals(3 * GB, targetNewA2.getResourcesUsed().getMemory()); assertEquals(1, targetNewA2.getResourcesUsed().getvCores()); assertEquals(0, targetOldA2.getNumApplications()); assertEquals(0, targetOldA2.getResourcesUsed().getMemory()); assertEquals(0, targetOldA2.getResourcesUsed().getvCores()); assertEquals(1, targetNewA2.getNumApplications()); assertEquals(1, origOldA1.getNumContainers()); assertEquals(0, origNewA1.getNumContainers()); assertEquals(1, targetNewA2.getNumContainers()); assertEquals(0, targetOldA2.getNumContainers());
@Override protected void render(Block html) { TBODY<TABLE<Hamlet>> tbody = html.table("#userinfo").thead().$class("ui-widget-header").tr().th() .$class("ui-state-default")._("User Name")._().th() .$class("ui-state-default")._("Max Resource")._().th() .$class("ui-state-default")._("Used Resource")._().th() .$class("ui-state-default")._("Max AM Resource")._().th() .$class("ui-state-default")._("Used AM Resource")._().th() .$class("ui-state-default")._("Schedulable Apps")._().th() .$class("ui-state-default")._("Non-Schedulable Apps")._()._()._() .tbody(); ArrayList<UserInfo> users = lqinfo.getUsers().getUsersList(); for (UserInfo userInfo : users) { tbody.tr().td(userInfo.getUsername()) .td(userInfo.getUserResourceLimit().toString()) .td(userInfo.getResourcesUsed().toString()) .td(lqinfo.getUserAMResourceLimit().toString()) .td(userInfo.getAMResourcesUsed().toString()) .td(Integer.toString(userInfo.getNumActiveApplications())) .td(Integer.toString(userInfo.getNumPendingApplications()))._(); } html.div().$class("usersinfo").h5("Active Users Info")._(); tbody._()._(); } }
/** * @param ri response info to be rendered */ private void renderCommonLeafQueueInfo(final ResponseInfo ri) { ri. _("Num Schedulable Applications:", Integer.toString(lqinfo.getNumActiveApplications())). _("Num Non-Schedulable Applications:", Integer.toString(lqinfo.getNumPendingApplications())). _("Num Containers:", Integer.toString(lqinfo.getNumContainers())). _("Max Applications:", Integer.toString(lqinfo.getMaxApplications())). _("Max Applications Per User:", Integer.toString(lqinfo.getMaxApplicationsPerUser())). _("Max Application Master Resources:", lqinfo.getAMResourceLimit().toString()). _("Used Application Master Resources:", lqinfo.getUsedAMResource().toString()). _("Max Application Master Resources Per User:", lqinfo.getUserAMResourceLimit().toString()). _("Configured Minimum User Limit Percent:", Integer.toString(lqinfo.getUserLimit()) + "%"). _("Configured User Limit Factor:", StringUtils.format( "%.1f", lqinfo.getUserLimitFactor())). _("Accessible Node Labels:", StringUtils.join(",", lqinfo.getNodeLabels())). _("Preemption:", lqinfo.getPreemptionDisabled() ? "disabled" : "enabled"); } }
/** * @param ri response info to be rendered */ private void renderQueueCapacityInfo(final ResponseInfo ri) { ri. _("Used Capacity:", percent(lqinfo.getUsedCapacity() / 100)). _("Configured Capacity:", percent(lqinfo.getCapacity() / 100)). _("Configured Max Capacity:", percent(lqinfo.getMaxCapacity() / 100)). _("Absolute Used Capacity:", percent(lqinfo.getAbsoluteUsedCapacity() / 100)). _("Absolute Configured Capacity:", percent(lqinfo.getAbsoluteCapacity() / 100)). _("Absolute Configured Max Capacity:", percent(lqinfo.getAbsoluteMaxCapacity() / 100)). _("Used Resources:", lqinfo.getResourcesUsed().toString()); }
if (queue instanceof LeafQueue) { info = new CapacitySchedulerLeafQueueInfo((LeafQueue) queue, nodeLabel.getLabelName()); } else {
if (queue instanceof LeafQueue) { info = new CapacitySchedulerLeafQueueInfo((LeafQueue) queue, nodeLabel.getLabelName()); } else {