YARN-1617. Remove ancient comment and surround LOG.debug in AppSchedulingInfo.allocate (Sandy Ryza)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1563005 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sanford Ryza 2014-01-30 22:41:16 +00:00
parent dff75d1e4b
commit e03d7a2e8f
2 changed files with 10 additions and 27 deletions

View File

@ -70,6 +70,9 @@ Release 2.4.0 - UNRELEASED
YARN-1630. Introduce timeout for async polling operations in YarnClientImpl YARN-1630. Introduce timeout for async polling operations in YarnClientImpl
(Aditya Acharya via Sandy Ryza) (Aditya Acharya via Sandy Ryza)
YARN-1617. Remove ancient comment and surround LOG.debug in
AppSchedulingInfo.allocate (Sandy Ryza)
OPTIMIZATIONS OPTIMIZATIONS
BUG FIXES BUG FIXES

View File

@ -262,8 +262,13 @@ public class AppSchedulingInfo {
pending = false; pending = false;
metrics.runAppAttempt(applicationId, user); metrics.runAppAttempt(applicationId, user);
} }
LOG.debug("allocate: user: " + user + ", memory: " if (LOG.isDebugEnabled()) {
+ request.getCapability()); LOG.debug("allocate: applicationId=" + applicationId
+ " container=" + container.getId()
+ " host=" + container.getNodeId().toString()
+ " user=" + user
+ " resource=" + request.getCapability());
}
metrics.allocateResources(user, 1, request.getCapability()); metrics.allocateResources(user, 1, request.getCapability());
} }
@ -277,9 +282,6 @@ public class AppSchedulingInfo {
synchronized private void allocateNodeLocal( synchronized private void allocateNodeLocal(
SchedulerNode node, Priority priority, SchedulerNode node, Priority priority,
ResourceRequest nodeLocalRequest, Container container) { ResourceRequest nodeLocalRequest, Container container) {
// Update consumption and track allocations
allocate(container);
// Update future requirements // Update future requirements
nodeLocalRequest.setNumContainers(nodeLocalRequest.getNumContainers() - 1); nodeLocalRequest.setNumContainers(nodeLocalRequest.getNumContainers() - 1);
if (nodeLocalRequest.getNumContainers() == 0) { if (nodeLocalRequest.getNumContainers() == 0) {
@ -306,10 +308,6 @@ public class AppSchedulingInfo {
synchronized private void allocateRackLocal( synchronized private void allocateRackLocal(
SchedulerNode node, Priority priority, SchedulerNode node, Priority priority,
ResourceRequest rackLocalRequest, Container container) { ResourceRequest rackLocalRequest, Container container) {
// Update consumption and track allocations
allocate(container);
// Update future requirements // Update future requirements
rackLocalRequest.setNumContainers(rackLocalRequest.getNumContainers() - 1); rackLocalRequest.setNumContainers(rackLocalRequest.getNumContainers() - 1);
if (rackLocalRequest.getNumContainers() == 0) { if (rackLocalRequest.getNumContainers() == 0) {
@ -329,10 +327,6 @@ public class AppSchedulingInfo {
synchronized private void allocateOffSwitch( synchronized private void allocateOffSwitch(
SchedulerNode node, Priority priority, SchedulerNode node, Priority priority,
ResourceRequest offSwitchRequest, Container container) { ResourceRequest offSwitchRequest, Container container) {
// Update consumption and track allocations
allocate(container);
// Update future requirements // Update future requirements
decrementOutstanding(offSwitchRequest); decrementOutstanding(offSwitchRequest);
} }
@ -365,20 +359,6 @@ public class AppSchedulingInfo {
} }
} }
synchronized private void allocate(Container container) {
// Update consumption and track allocations
//TODO: fixme sharad
/* try {
store.storeContainer(container);
} catch (IOException ie) {
// TODO fix this. we shouldnt ignore
}*/
LOG.debug("allocate: applicationId=" + applicationId + " container="
+ container.getId() + " host="
+ container.getNodeId().toString());
}
synchronized public void stop(RMAppAttemptState rmAppAttemptFinalState) { synchronized public void stop(RMAppAttemptState rmAppAttemptFinalState) {
// clear pending resources metrics for the application // clear pending resources metrics for the application
QueueMetrics metrics = queue.getMetrics(); QueueMetrics metrics = queue.getMetrics();