public void finishAppAttempt( ApplicationId appId, boolean isPending, String user) { runBuckets.remove(appId); if (isPending) { appsPending.decr(); } else { appsRunning.decr(); } QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.finishAppAttempt(appId, isPending, user); } if (parent != null) { parent.finishAppAttempt(appId, isPending, user); } }
public void finishAppAttempt( ApplicationId appId, boolean isPending, String user) { runBuckets.remove(appId); if (isPending) { appsPending.decr(); } else { appsRunning.decr(); } QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.finishAppAttempt(appId, isPending, user); } if (parent != null) { parent.finishAppAttempt(appId, isPending, user); } }
public void finishAppAttempt( ApplicationId appId, boolean isPending, String user) { runBuckets.remove(appId); if (isPending) { appsPending.decr(); } else { appsRunning.decr(); } QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.finishAppAttempt(appId, isPending, user); } if (parent != null) { parent.finishAppAttempt(appId, isPending, user); } }
synchronized public void stop(RMAppAttemptState rmAppAttemptFinalState) { // clear pending resources metrics for the application QueueMetrics metrics = queue.getMetrics(); for (Map<String, ResourceRequest> asks : requests.values()) { ResourceRequest request = asks.get(ResourceRequest.ANY); if (request != null) { metrics.decrPendingResources(user, request.getNumContainers(), request.getCapability()); } } metrics.finishAppAttempt(applicationId, pending, user); // Clear requests themselves clearRequests(); }
synchronized public void stop(RMAppAttemptState rmAppAttemptFinalState) { // clear pending resources metrics for the application QueueMetrics metrics = queue.getMetrics(); for (Map<String, ResourceRequest> asks : requests.values()) { ResourceRequest request = asks.get(ResourceRequest.ANY); if (request != null) { metrics.decrPendingResources(user, request.getNumContainers(), request.getCapability()); } } metrics.finishAppAttempt(applicationId, pending, user); // Clear requests themselves clearRequests(); }
public void stop() { // clear pending resources metrics for the application try { this.writeLock.lock(); QueueMetrics metrics = queue.getMetrics(); for (AppPlacementAllocator ap : schedulerKeyToAppPlacementAllocator .values()) { PendingAsk ask = ap.getPendingAsk(ResourceRequest.ANY); if (ask.getCount() > 0) { metrics.decrPendingResources(ap.getPrimaryRequestedNodePartition(), user, ask.getCount(), ask.getPerAllocationResource()); // Update Queue queue.decPendingResource( ap.getPrimaryRequestedNodePartition(), Resources.multiply(ask.getPerAllocationResource(), ask.getCount())); } } metrics.finishAppAttempt(applicationId, pending, user); // Clear requests themselves clearRequests(); } finally { this.writeLock.unlock(); } }
checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true);
checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true);
checkResources(queueSource, 4*GB, 4, 2, 3, 1, 100*GB, 100, 9*GB, 9, 2, 0, 0, 0); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true);
checkResources(parentUserSource, 4*GB, 4, 2, 3, 1, 10*GB, 10, 9*GB, 9, 2, 0, 0, 0); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true);
0, 0, 0); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true);
checkResources(userSource, 4*GB, 4, 2, 3, 1, 10*GB, 10, 9*GB, 9, 2, 0, 0, 0); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true);
checkResources(userSource, 4*GB, 4, 2, 3, 1, 10*GB, 10, 9*GB, 9, 2, 0, 0, 0); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true);
checkResources(parentUserSource, 4*GB, 4, 2, 3, 1, 10*GB, 10, 9*GB, 9, 2, 0, 0, 0); metrics.finishAppAttempt( app.getApplicationId(), app.isPending(), app.getUser()); checkApps(queueSource, 1, 0, 0, 0, 0, 0, true);