public void runAppAttempt(ApplicationId appId, String user) { runBuckets.add(appId, System.currentTimeMillis()); appsRunning.incr(); appsPending.decr(); QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.runAppAttempt(appId, user); } if (parent != null) { parent.runAppAttempt(appId, user); } }
public void runAppAttempt(ApplicationId appId, String user) { runBuckets.add(appId, System.currentTimeMillis()); appsRunning.incr(); appsPending.decr(); QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.runAppAttempt(appId, user); } if (parent != null) { parent.runAppAttempt(appId, user); } }
public void runAppAttempt(ApplicationId appId, String user) { runBuckets.add(appId, System.currentTimeMillis()); appsRunning.incr(); appsPending.decr(); QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.runAppAttempt(appId, user); } if (parent != null) { parent.runAppAttempt(appId, user); } }
private void updateMetricsForAllocatedContainer(NodeType type, SchedulerNode node, Container containerAllocated) { QueueMetrics metrics = queue.getMetrics(); if (pending) { // once an allocation is done we assume the application is // running from scheduler's POV. pending = false; metrics.runAppAttempt(applicationId, user); } updateMetrics(applicationId, type, node, containerAllocated, user, queue); }
public void recoverContainer(RMContainer rmContainer, String partition) { if (rmContainer.getExecutionType() != ExecutionType.GUARANTEED) { return; } try { this.writeLock.lock(); QueueMetrics metrics = queue.getMetrics(); if (pending) { // If there was any container to recover, the application was // running from scheduler's POV. pending = false; metrics.runAppAttempt(applicationId, user); } // Container is completed. Skip recovering resources. if (rmContainer.getState().equals(RMContainerState.COMPLETED)) { return; } metrics.allocateResources(partition, user, 1, rmContainer.getAllocatedResource(), false); } finally { this.writeLock.unlock(); } }
public synchronized void recoverContainer(RMContainer rmContainer) { QueueMetrics metrics = queue.getMetrics(); if (pending) { // If there was any container to recover, the application was // running from scheduler's POV. pending = false; metrics.runAppAttempt(applicationId, user); } // Container is completed. Skip recovering resources. if (rmContainer.getState().equals(RMContainerState.COMPLETED)) { return; } metrics.allocateResources(user, 1, rmContainer.getAllocatedResource(), false); }
public synchronized void recoverContainer(RMContainer rmContainer) { QueueMetrics metrics = queue.getMetrics(); if (pending) { // If there was any container to recover, the application was // running from scheduler's POV. pending = false; metrics.runAppAttempt(applicationId, user); } // Container is completed. Skip recovering resources. if (rmContainer.getState().equals(RMContainerState.COMPLETED)) { return; } metrics.allocateResources(user, 1, rmContainer.getAllocatedResource(), false); }
metrics.runAppAttempt(applicationId, user);
metrics.runAppAttempt(applicationId, user);
checkApps(queueSource, 1, 1, 0, 0, 0, 0, true); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); checkApps(queueSource, 1, 1, 0, 0, 0, 0, true); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); checkApps(queueSource, 1, 1, 0, 0, 0, 0, true); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true);
checkApps(queueSource, 1, 1, 0, 0, 0, 0, true); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); checkApps(queueSource, 1, 1, 0, 0, 0, 0, true); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); checkApps(queueSource, 1, 1, 0, 0, 0, 0, true); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true);
metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true);
checkResources(parentUserSource, 0, 0, 0, 0, 0, 10*GB, 10, 15*GB, 15, 5, 0, 0, 0); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); checkApps(userSource, 1, 0, 1, 0, 0, 0, true);
metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true);
checkResources(userSource, 0, 0, 0, 0, 0, 10*GB, 10, 15*GB, 15, 5, 0, 0, 0); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); checkApps(userSource, 1, 0, 1, 0, 0, 0, true);
checkResources(userSource, 0, 0, 0, 0, 0, 10*GB, 10, 15*GB, 15, 5, 0, 0, 0); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); checkApps(userSource, 1, 0, 1, 0, 0, 0, true);
checkResources(parentUserSource, 0, 0, 0, 0, 0, 10*GB, 10, 15*GB, 15, 5, 0, 0, 0); metrics.runAppAttempt(app.getApplicationId(), user); checkApps(queueSource, 1, 0, 1, 0, 0, 0, true); checkApps(userSource, 1, 0, 1, 0, 0, 0, true);