public void incrNodeTypeAggregations(String user, NodeType type) { if (type == NodeType.NODE_LOCAL) { aggregateNodeLocalContainersAllocated.incr(); } else if (type == NodeType.RACK_LOCAL) { aggregateRackLocalContainersAllocated.incr(); } else if (type == NodeType.OFF_SWITCH) { aggregateOffSwitchContainersAllocated.incr(); } else { return; } QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.incrNodeTypeAggregations(user, type); } if (parent != null) { parent.incrNodeTypeAggregations(user, type); } }
public void incrNodeTypeAggregations(String user, NodeType type) { if (type == NodeType.NODE_LOCAL) { aggregateNodeLocalContainersAllocated.incr(); } else if (type == NodeType.RACK_LOCAL) { aggregateRackLocalContainersAllocated.incr(); } else if (type == NodeType.OFF_SWITCH) { aggregateOffSwitchContainersAllocated.incr(); } else { return; } QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.incrNodeTypeAggregations(user, type); } if (parent != null) { parent.incrNodeTypeAggregations(user, type); } }
public void incrNodeTypeAggregations(String user, NodeType type) { if (type == NodeType.NODE_LOCAL) { aggregateNodeLocalContainersAllocated.incr(); } else if (type == NodeType.RACK_LOCAL) { aggregateRackLocalContainersAllocated.incr(); } else if (type == NodeType.OFF_SWITCH) { aggregateOffSwitchContainersAllocated.incr(); } else { return; } QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.incrNodeTypeAggregations(user, type); } if (parent != null) { parent.incrNodeTypeAggregations(user, type); } }
public static void updateMetrics(ApplicationId applicationId, NodeType type, SchedulerNode node, Container containerAllocated, String user, Queue queue) { if (LOG.isDebugEnabled()) { LOG.debug("allocate: applicationId=" + applicationId + " container=" + containerAllocated.getId() + " host=" + containerAllocated .getNodeId().toString() + " user=" + user + " resource=" + containerAllocated.getResource() + " type=" + type); } if(node != null) { queue.getMetrics().allocateResources(node.getPartition(), user, 1, containerAllocated.getResource(), true); } queue.getMetrics().incrNodeTypeAggregations(user, type); }
metrics.incrNodeTypeAggregations(user, type); return resourceRequests;
metrics.incrNodeTypeAggregations(user, type); return resourceRequests;
MetricsSource parentUserSource = userSource(ms, parentQueueName, user); metrics.incrNodeTypeAggregations(user, NodeType.NODE_LOCAL); checkAggregatedNodeTypes(queueSource,1L,0L,0L); checkAggregatedNodeTypes(parentQueueSource,1L,0L,0L); checkAggregatedNodeTypes(parentUserSource,1L,0L,0L); metrics.incrNodeTypeAggregations(user, NodeType.RACK_LOCAL); checkAggregatedNodeTypes(queueSource,1L,1L,0L); checkAggregatedNodeTypes(parentQueueSource,1L,1L,0L); checkAggregatedNodeTypes(parentUserSource,1L,1L,0L); metrics.incrNodeTypeAggregations(user, NodeType.OFF_SWITCH); checkAggregatedNodeTypes(queueSource,1L,1L,1L); checkAggregatedNodeTypes(parentQueueSource,1L,1L,1L); checkAggregatedNodeTypes(parentUserSource,1L,1L,1L); metrics.incrNodeTypeAggregations(user, NodeType.OFF_SWITCH); checkAggregatedNodeTypes(queueSource,1L,1L,2L); checkAggregatedNodeTypes(parentQueueSource,1L,1L,2L);
MetricsSource parentUserSource = userSource(ms, parentQueueName, user); metrics.incrNodeTypeAggregations(user, NodeType.NODE_LOCAL); checkAggregatedNodeTypes(queueSource,1L,0L,0L); checkAggregatedNodeTypes(parentQueueSource,1L,0L,0L); checkAggregatedNodeTypes(parentUserSource,1L,0L,0L); metrics.incrNodeTypeAggregations(user, NodeType.RACK_LOCAL); checkAggregatedNodeTypes(queueSource,1L,1L,0L); checkAggregatedNodeTypes(parentQueueSource,1L,1L,0L); checkAggregatedNodeTypes(parentUserSource,1L,1L,0L); metrics.incrNodeTypeAggregations(user, NodeType.OFF_SWITCH); checkAggregatedNodeTypes(queueSource,1L,1L,1L); checkAggregatedNodeTypes(parentQueueSource,1L,1L,1L); checkAggregatedNodeTypes(parentUserSource,1L,1L,1L); metrics.incrNodeTypeAggregations(user, NodeType.OFF_SWITCH); checkAggregatedNodeTypes(queueSource,1L,1L,2L); checkAggregatedNodeTypes(parentQueueSource,1L,1L,2L);