hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohithsharm...@apache.org
Subject hadoop git commit: YARN-3986. getTransferredContainers in AbstractYarnScheduler should be present in YarnScheduler interface
Date Fri, 21 Aug 2015 05:27:31 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 c8f109798 -> 27ced8253


YARN-3986. getTransferredContainers in AbstractYarnScheduler should be present in YarnScheduler
interface

(cherry picked from commit 22de7c1dca1be63d523de833163ae51bfe638a79)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/27ced825
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/27ced825
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/27ced825

Branch: refs/heads/branch-2
Commit: 27ced8253b5573b44522e4ffdd9ca1e1c58aa914
Parents: c8f1097
Author: Rohith Sharma K S <rohithsharmaks@apache.org>
Authored: Fri Aug 21 10:51:11 2015 +0530
Committer: Rohith Sharma K S <rohithsharmaks@apache.org>
Committed: Fri Aug 21 10:56:45 2015 +0530

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                          |  3 +++
 .../server/resourcemanager/ApplicationMasterService.java |  3 +--
 .../server/resourcemanager/scheduler/YarnScheduler.java  | 11 +++++++++++
 .../resourcemanager/TestWorkPreservingRMRestart.java     |  2 +-
 4 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/27ced825/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 7b8756b..a335ec1 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -734,6 +734,9 @@ Release 2.8.0 - UNRELEASED
     YARN-4028. AppBlock page key update and diagnostics value null on recovery
     (Bibin A Chundatt via xgong)
 
+    YARN-3986. getTransferredContainers in AbstractYarnScheduler should be present
+    in YarnScheduler interface instead. (Varun Saxena via rohithsharmaks)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/27ced825/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
index ff9b820..c8b985d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
@@ -89,7 +89,6 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.event.RMAppAt
 import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.event.RMAppAttemptStatusupdateEvent;
 import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.event.RMAppAttemptUnregistrationEvent;
 import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
-import org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler;
 import org.apache.hadoop.yarn.server.resourcemanager.scheduler.Allocation;
 import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport;
 import org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler;
@@ -305,7 +304,7 @@ public class ApplicationMasterService extends AbstractService implements
       // and corresponding NM tokens.
       if (app.getApplicationSubmissionContext()
           .getKeepContainersAcrossApplicationAttempts()) {
-        List<Container> transferredContainers = ((AbstractYarnScheduler) rScheduler)
+        List<Container> transferredContainers = rScheduler
             .getTransferredContainers(applicationAttemptId);
         if (!transferredContainers.isEmpty()) {
           response.setContainersFromPreviousAttempts(transferredContainers);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/27ced825/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java
index 0fa23e1..4fd16c0 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport;
+import org.apache.hadoop.yarn.api.records.Container;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.api.records.NodeId;
 import org.apache.hadoop.yarn.api.records.Priority;
@@ -317,4 +318,14 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent>
{
    */
   public void updateApplicationPriority(Priority newPriority,
       ApplicationId applicationId) throws YarnException;
+
+  /**
+   *
+   * Get previous attempts' live containers for work-preserving AM restart.
+   *
+   * @param appAttemptId the id of the application attempt
+   *
+   * @return list of live containers for the given attempt
+   */
+  List<Container> getTransferredContainers(ApplicationAttemptId appAttemptId);
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/27ced825/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
index b556335..77e9838 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
@@ -770,7 +770,7 @@ public class TestWorkPreservingRMRestart extends ParameterizedSchedulerTestBase
       am0.getApplicationAttemptId()));
 
     // getTransferredContainers should not throw NPE.
-    ((AbstractYarnScheduler) rm2.getResourceScheduler())
+    rm2.getResourceScheduler()
       .getTransferredContainers(am0.getApplicationAttemptId());
 
     List<NMContainerStatus> containers = createNMContainerStatusForApp(am0);


Mime
View raw message