You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sn...@apache.org on 2019/08/12 13:16:24 UTC
[hadoop] branch branch-3.2 updated: YARN-9723.
ApplicationPlacementContext is not required for terminated jobs during
recovery. Contributed by Prabhu Joseph
This is an automated email from the ASF dual-hosted git repository.
snemeth pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new c5aea8c YARN-9723. ApplicationPlacementContext is not required for terminated jobs during recovery. Contributed by Prabhu Joseph
c5aea8c is described below
commit c5aea8ca567fd4e12f8e784343c04a5304ece403
Author: Szilard Nemeth <sn...@apache.org>
AuthorDate: Mon Aug 12 15:15:43 2019 +0200
YARN-9723. ApplicationPlacementContext is not required for terminated jobs during recovery. Contributed by Prabhu Joseph
(cherry picked from commit e4b538bbda6dc25d7f45bffd6a4ce49f3f84acdc)
---
.../yarn/server/resourcemanager/RMAppManager.java | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAppManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAppManager.java
index feaff00..c7dcacf 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAppManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAppManager.java
@@ -64,6 +64,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppMetrics;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppRecoverEvent;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl;
+import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppState;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerUtils;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue;
@@ -367,7 +368,7 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
// Passing start time as -1. It will be eventually set in RMAppImpl
// constructor.
RMAppImpl application = createAndPopulateNewRMApp(
- submissionContext, submitTime, user, false, -1);
+ submissionContext, submitTime, user, false, -1, null);
try {
if (UserGroupInformation.isSecurityEnabled()) {
this.rmContext.getDelegationTokenRenewer()
@@ -404,18 +405,22 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
// create and recover app.
RMAppImpl application =
createAndPopulateNewRMApp(appContext, appState.getSubmitTime(),
- appState.getUser(), true, appState.getStartTime());
+ appState.getUser(), true, appState.getStartTime(),
+ appState.getState());
application.handle(new RMAppRecoverEvent(appId, rmState));
}
private RMAppImpl createAndPopulateNewRMApp(
ApplicationSubmissionContext submissionContext, long submitTime,
- String user, boolean isRecovery, long startTime) throws YarnException {
+ String user, boolean isRecovery, long startTime,
+ RMAppState recoveredFinalState) throws YarnException {
- ApplicationPlacementContext placementContext =
- placeApplication(rmContext.getQueuePlacementManager(),
- submissionContext, user, isRecovery);
+ ApplicationPlacementContext placementContext = null;
+ if (recoveredFinalState == null) {
+ placementContext = placeApplication(rmContext.getQueuePlacementManager(),
+ submissionContext, user, isRecovery);
+ }
// We only replace the queue when it's a new application
if (!isRecovery) {
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org