hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject svn commit: r1590046 - in /hadoop/common/trunk/hadoop-mapreduce-project: CHANGES.txt hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java
Date Fri, 25 Apr 2014 14:53:17 GMT
Author: jlowe
Date: Fri Apr 25 14:53:17 2014
New Revision: 1590046

URL: http://svn.apache.org/r1590046
Log:
MAPREDUCE-5749. TestRMContainerAllocator#testReportedAppProgress Failed. Contributed by Jason
Lowe

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java

Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1590046&r1=1590045&r2=1590046&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Fri Apr 25 14:53:17 2014
@@ -189,6 +189,9 @@ Release 2.5.0 - UNRELEASED
 
     MAPREDUCE-5837. MRAppMaster fails when checking on uber mode. (wheat9)
 
+    MAPREDUCE-5749. TestRMContainerAllocator#testReportedAppProgress Failed
+    (jlowe)
+
 Release 2.4.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java?rev=1590046&r1=1590045&r2=1590046&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java
Fri Apr 25 14:53:17 2014
@@ -122,6 +122,9 @@ public class TestRMContainerAllocator {
   public void setup() {
     MyContainerAllocator.getJobUpdatedNodeEvents().clear();
     MyContainerAllocator.getTaskAttemptKillEvents().clear();
+
+    // make each test create a fresh user to avoid leaking tokens between tests
+    UserGroupInformation.setLoginUser(null);
   }
 
   @After
@@ -1519,17 +1522,15 @@ public class TestRMContainerAllocator {
     @Override
     protected void register() {
       ApplicationAttemptId attemptId = getContext().getApplicationAttemptId();
-      UserGroupInformation ugi =
-          UserGroupInformation.createRemoteUser(attemptId.toString());
       Token<AMRMTokenIdentifier> token =
           rm.getRMContext().getRMApps().get(attemptId.getApplicationId())
             .getRMAppAttempt(attemptId).getAMRMToken();
       try {
+        UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
         ugi.addTokenIdentifier(token.decodeIdentifier());
       } catch (IOException e) {
         throw new YarnRuntimeException(e);
       }
-      UserGroupInformation.setLoginUser(ugi);
       super.register();
     }
 



Mime
View raw message