[jira] [Updated] (YARN-2128) SchedulerApplicationAttempt's amResource should be normalized instead of fetching from ApplicationSubmissionContext directly

2014-06-06 Thread Wei Yan (JIRA)

 [ 
https://issues.apache.org/jira/browse/YARN-2128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wei Yan updated YARN-2128:
--

Attachment: YARN-2128.patch

Update a new patch combing YARN-2126.

 SchedulerApplicationAttempt's amResource should be normalized instead of 
 fetching from ApplicationSubmissionContext directly
 

 Key: YARN-2128
 URL: https://issues.apache.org/jira/browse/YARN-2128
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Wei Yan
Assignee: Wei Yan
 Attachments: YARN-2128.patch, YARN-2128.patch


 The amResource should be normalized.
 {code}
 ApplicationSubmissionContext appSubmissionContext =
 rmContext.getRMApps().get(applicationAttemptId.getApplicationId())
 .getApplicationSubmissionContext();
 if (appSubmissionContext != null) {
 amResource = appSubmissionContext.getResource();
 unmanagedAM = appSubmissionContext.getUnmanagedAM();
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (YARN-2128) SchedulerApplicationAttempt's amResource should be normalized instead of fetching from ApplicationSubmissionContext directly

2014-06-06 Thread Wei Yan (JIRA)

 [ 
https://issues.apache.org/jira/browse/YARN-2128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wei Yan updated YARN-2128:
--

Description: 
1. The amResource should be normalized instead of fetching from 
ApplicationSubmissionContext directly.
{code}
ApplicationSubmissionContext appSubmissionContext =
rmContext.getRMApps().get(applicationAttemptId.getApplicationId())
.getApplicationSubmissionContext();
if (appSubmissionContext != null) {
amResource = appSubmissionContext.getResource();
unmanagedAM = appSubmissionContext.getUnmanagedAM();
}
{code}

2. When one application is removed, the FSLeafQueue's amResourceUsage should be 
updated only if the app has started its AM.
{code}
  if (runnableAppScheds.remove(app.getAppSchedulable())) {
  // Update AM resource usage
  if (app.getAMResource() != null) {
Resources.subtractFrom(amResourceUsage, app.getAMResource());
  }
  return true;
  }
{code}

  was:
The amResource should be normalized.
{code}
ApplicationSubmissionContext appSubmissionContext =
rmContext.getRMApps().get(applicationAttemptId.getApplicationId())
.getApplicationSubmissionContext();
if (appSubmissionContext != null) {
amResource = appSubmissionContext.getResource();
unmanagedAM = appSubmissionContext.getUnmanagedAM();
}
{code}


 SchedulerApplicationAttempt's amResource should be normalized instead of 
 fetching from ApplicationSubmissionContext directly
 

 Key: YARN-2128
 URL: https://issues.apache.org/jira/browse/YARN-2128
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Wei Yan
Assignee: Wei Yan
 Attachments: YARN-2128.patch, YARN-2128.patch


 1. The amResource should be normalized instead of fetching from 
 ApplicationSubmissionContext directly.
 {code}
 ApplicationSubmissionContext appSubmissionContext =
 rmContext.getRMApps().get(applicationAttemptId.getApplicationId())
 .getApplicationSubmissionContext();
 if (appSubmissionContext != null) {
 amResource = appSubmissionContext.getResource();
 unmanagedAM = appSubmissionContext.getUnmanagedAM();
 }
 {code}
 2. When one application is removed, the FSLeafQueue's amResourceUsage should 
 be updated only if the app has started its AM.
 {code}
   if (runnableAppScheds.remove(app.getAppSchedulable())) {
   // Update AM resource usage
   if (app.getAMResource() != null) {
 Resources.subtractFrom(amResourceUsage, app.getAMResource());
   }
   return true;
   }
 {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (YARN-2128) SchedulerApplicationAttempt's amResource should be normalized instead of fetching from ApplicationSubmissionContext directly

2014-06-05 Thread Wei Yan (JIRA)

 [ 
https://issues.apache.org/jira/browse/YARN-2128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wei Yan updated YARN-2128:
--

Attachment: YARN-2128.patch

 SchedulerApplicationAttempt's amResource should be normalized instead of 
 fetching from ApplicationSubmissionContext directly
 

 Key: YARN-2128
 URL: https://issues.apache.org/jira/browse/YARN-2128
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Wei Yan
Assignee: Wei Yan
 Attachments: YARN-2128.patch


 The amResource should be normalized.
 {code}
 ApplicationSubmissionContext appSubmissionContext =
 rmContext.getRMApps().get(applicationAttemptId.getApplicationId())
 .getApplicationSubmissionContext();
 if (appSubmissionContext != null) {
 amResource = appSubmissionContext.getResource();
 unmanagedAM = appSubmissionContext.getUnmanagedAM();
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)