hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject svn commit: r920751 - in /hadoop/mapreduce/trunk: CHANGES.txt src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingAsDifferentUser.java src/test/mapred/org/apache/hadoop/mapred/ClusterWithLinuxTaskController.java
Date Tue, 09 Mar 2010 09:31:40 GMT
Author: vinodkv
Date: Tue Mar  9 09:31:40 2010
New Revision: 920751

URL: http://svn.apache.org/viewvc?rev=920751&view=rev
Log:
MAPREDUCE-1573. TestStreamingAsDifferentUser fails if run as tt_user. Contributed by Ravi
Gummadi.

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingAsDifferentUser.java
    hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/ClusterWithLinuxTaskController.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=920751&r1=920750&r2=920751&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Tue Mar  9 09:31:40 2010
@@ -427,6 +427,9 @@ Trunk (unreleased changes)
     MAPREDUCE-1518. RaidNode does not run the deletion check on the
     directory that stores the parity files.  (Rodrigo Schmidt via dhruba)
 
+    MAPREDUCE-1573. TestStreamingAsDifferentUser fails if run as tt_user.
+    (Ravi Gummadi via vinodkv)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/mapreduce/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingAsDifferentUser.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingAsDifferentUser.java?rev=920751&r1=920750&r2=920751&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingAsDifferentUser.java
(original)
+++ hadoop/mapreduce/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingAsDifferentUser.java
Tue Mar  9 09:31:40 2010
@@ -155,7 +155,8 @@ public class TestStreamingAsDifferentUse
 
         // validate private cache files' permissions
         checkPermissionsOnPrivateDistCache(localDirs,
-            jobOwner.getShortUserName(), taskTrackerSpecialGroup);
+            jobOwner.getShortUserName(), taskTrackerUser,
+            taskTrackerSpecialGroup);
         
         // check the file is present even after the job is over.
         // work directory symlink cleanup should not have removed the target 

Modified: hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/ClusterWithLinuxTaskController.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/ClusterWithLinuxTaskController.java?rev=920751&r1=920750&r2=920751&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/ClusterWithLinuxTaskController.java
(original)
+++ hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/ClusterWithLinuxTaskController.java
Tue Mar  9 09:31:40 2010
@@ -346,13 +346,23 @@ public class ClusterWithLinuxTaskControl
    * Validates permissions of private distcache dir and its contents fully
    */
   public static void checkPermissionsOnPrivateDistCache(String[] localDirs,
-      String user, String groupOwner) throws IOException {
+      String user, String taskTrackerUser, String groupOwner)
+      throws IOException {
+    // user-dir, jobcache and distcache will have
+    //     2770 permissions if jobOwner is same as tt_user
+    //     2570 permissions for any other user
+    String expectedDirPerms  = taskTrackerUser.equals(user)
+                               ? "drwxrws---"
+                               : "dr-xrws---";
+    String expectedFilePerms = taskTrackerUser.equals(user)
+                               ? "-rwxrwx---"
+                               : "-r-xrwx---";
     for (String localDir : localDirs) {
       File distCacheDir = new File(localDir,
           TaskTracker.getPrivateDistributedCacheDir(user));
       if (distCacheDir.exists()) {
-        checkPermissionsOnDir(distCacheDir, user, groupOwner, "dr-xrws---",
-            "-r-xrwx---");
+        checkPermissionsOnDir(distCacheDir, user, groupOwner, expectedDirPerms,
+            expectedFilePerms);
       }
     }
   }



Mime
View raw message