hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1126803 - in /hadoop/common/branches/yahoo-merge: ./ src/contrib/ec2/ src/docs/ src/java/ src/java/org/apache/hadoop/fs/ src/test/core/ src/test/core/org/apache/hadoop/fs/
Date Mon, 23 May 2011 22:59:15 GMT
Author: szetszwo
Date: Mon May 23 22:59:15 2011
New Revision: 1126803

URL: http://svn.apache.org/viewvc?rev=1126803&view=rev
Log:
svn merge -c 1084415 from trunk for HADOOP-7204.

Modified:
    hadoop/common/branches/yahoo-merge/   (props changed)
    hadoop/common/branches/yahoo-merge/CHANGES.txt   (contents, props changed)
    hadoop/common/branches/yahoo-merge/src/contrib/ec2/   (props changed)
    hadoop/common/branches/yahoo-merge/src/docs/   (props changed)
    hadoop/common/branches/yahoo-merge/src/java/   (props changed)
    hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java
    hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShellPermissions.java
    hadoop/common/branches/yahoo-merge/src/test/core/   (props changed)
    hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/fs/TestFsShellReturnCode.java

Propchange: hadoop/common/branches/yahoo-merge/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:59:15 2011
@@ -1,2 +1,2 @@
-/hadoop/common/trunk:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
+/hadoop/common/trunk:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084415,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
 /hadoop/core/branches/branch-0.19/core:713112

Modified: hadoop/common/branches/yahoo-merge/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/CHANGES.txt?rev=1126803&r1=1126802&r2=1126803&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/CHANGES.txt (original)
+++ hadoop/common/branches/yahoo-merge/CHANGES.txt Mon May 23 22:59:15 2011
@@ -70,6 +70,9 @@ Trunk (unreleased changes)
     HADOOP-6920, HADOOP-7292, HADOOP-7306. Porting bugfixes portion of the 
     three patches to yahoo-merge branch.
 
+    HADOOP-7204. remove local unused fs variable from CmdHandler 
+    and FsShellPermissions.changePermissions (boryas)
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Propchange: hadoop/common/branches/yahoo-merge/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:59:15 2011
@@ -1,4 +1,4 @@
-/hadoop/common/trunk/CHANGES.txt:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1092832,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
+/hadoop/common/trunk/CHANGES.txt:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084415,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1092832,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
 /hadoop/core/branches/branch-0.18/CHANGES.txt:727226
 /hadoop/core/branches/branch-0.19/CHANGES.txt:713112
 /hadoop/core/trunk/CHANGES.txt:776175-785643,785929-786278

Propchange: hadoop/common/branches/yahoo-merge/src/contrib/ec2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:59:15 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/src/contrib/ec2:1043117,1076296,1078148,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
+/hadoop/common/trunk/src/contrib/ec2:1043117,1076296,1078148,1081598,1082329,1082787-1082788,1084415,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
 /hadoop/core/branches/branch-0.19/core/src/contrib/ec2:713112
 /hadoop/core/trunk/src/contrib/ec2:776175-784663

Propchange: hadoop/common/branches/yahoo-merge/src/docs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:59:15 2011
@@ -1,2 +1,2 @@
-/hadoop/common/trunk/src/docs:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
+/hadoop/common/trunk/src/docs:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084415,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
 /hadoop/core/branches/branch-0.19/src/docs:713112

Propchange: hadoop/common/branches/yahoo-merge/src/java/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:59:15 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/src/java:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
+/hadoop/common/trunk/src/java:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084415,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
 /hadoop/core/branches/branch-0.19/core/src/java:713112
 /hadoop/core/trunk/src/core:776175-785643,785929-786278

Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java?rev=1126803&r1=1126802&r2=1126803&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java (original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java Mon May
23 22:59:15 2011
@@ -982,7 +982,7 @@ public class FsShell extends Configured 
     boolean okToContinue() { return okToContinue; }
     String getName() { return cmdName; }
     
-    protected CmdHandler(String cmdName, FileSystem fs) {
+    protected CmdHandler(String cmdName) {
       this.cmdName = cmdName;
     }
     
@@ -1617,7 +1617,7 @@ public class FsShell extends Configured 
       } else if ("-chmod".equals(cmd) || 
                  "-chown".equals(cmd) ||
                  "-chgrp".equals(cmd)) {
-        exitCode = FsShellPermissions.changePermissions(fs, cmd, argv, i, this);
+        exitCode = FsShellPermissions.changePermissions(cmd, argv, i, this);
       } else if ("-mv".equals(cmd)) {
         exitCode = rename(argv, getConf());
       } else if ("-cp".equals(cmd)) {

Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShellPermissions.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShellPermissions.java?rev=1126803&r1=1126802&r2=1126803&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShellPermissions.java
(original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShellPermissions.java
Mon May 23 22:59:15 2011
@@ -55,8 +55,8 @@ class FsShellPermissions {
   
   private static class ChmodHandler extends CmdHandler {
 
-    ChmodHandler(FileSystem fs, String modeStr) throws IOException {
-      super("chmod", fs);
+    ChmodHandler(String modeStr) throws IOException {
+      super("chmod");
       try {
         pp = new ChmodParser(modeStr);
       } catch(IllegalArgumentException iea) {
@@ -103,12 +103,14 @@ class FsShellPermissions {
     protected String owner = null;
     protected String group = null;
 
-    protected ChownHandler(String cmd, FileSystem fs) { //for chgrp
-      super(cmd, fs);
+    protected ChownHandler(String cmd) { //for chgrp
+      super(cmd);
     }
 
-    ChownHandler(FileSystem fs, String ownerStr) throws IOException {
-      super("chown", fs);
+    ChownHandler(String cmd, String ownerStr) throws IOException {
+      super(cmd);
+      if(!cmd.equals("chown"))
+        return;
       Matcher matcher = chownPattern.matcher(ownerStr);
       if (!matcher.matches()) {
         throw new IOException("'" + ownerStr + "' does not match " +
@@ -149,8 +151,8 @@ class FsShellPermissions {
   /*========== chgrp ==========*/    
   
   private static class ChgrpHandler extends ChownHandler {
-    ChgrpHandler(FileSystem fs, String groupStr) throws IOException {
-      super("chgrp", fs);
+    ChgrpHandler(String groupStr) throws IOException {
+      super("chgrp");
 
       Matcher matcher = chgrpPattern.matcher(groupStr);
       if (!matcher.matches()) {
@@ -161,7 +163,7 @@ class FsShellPermissions {
     }
   }
 
-  static int changePermissions(FileSystem fs, String cmd, 
+  static int changePermissions(String cmd, 
                                 String argv[], int startIndex, FsShell shell)
                                 throws IOException {
     CmdHandler handler = null;
@@ -178,11 +180,11 @@ class FsShellPermissions {
     }
 
     if (cmd.equals("-chmod")) {
-      handler = new ChmodHandler(fs, argv[startIndex++]);
+      handler = new ChmodHandler(argv[startIndex++]);
     } else if (cmd.equals("-chown")) {
-      handler = new ChownHandler(fs, argv[startIndex++]);
+      handler = new ChownHandler(argv[startIndex++]);
     } else if (cmd.equals("-chgrp")) {
-      handler = new ChgrpHandler(fs, argv[startIndex++]);
+      handler = new ChgrpHandler(argv[startIndex++]);
     }
 
     return shell.runCmdHandler(handler, argv, startIndex, recursive);

Propchange: hadoop/common/branches/yahoo-merge/src/test/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:59:15 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/src/test/core:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
+/hadoop/common/trunk/src/test/core:1043117,1076296,1078148,1080396,1081598,1082329,1082787-1082788,1084415,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1096522,1096988,1099612,1099633,1100026
 /hadoop/core/branches/branch-0.19/core/src/test/core:713112
 /hadoop/core/trunk/src/test/core:776175-785643,785929-786278

Modified: hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/fs/TestFsShellReturnCode.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/fs/TestFsShellReturnCode.java?rev=1126803&r1=1126802&r2=1126803&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/fs/TestFsShellReturnCode.java
(original)
+++ hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/fs/TestFsShellReturnCode.java
Mon May 23 22:59:15 2011
@@ -55,7 +55,7 @@ public class TestFsShellReturnCode {
   public void verify(FileSystem fs, String cmd, String argv[], int cmdIndex,
       FsShell fsShell, int exitCode) throws Exception {
     int ec;
-    ec = FsShellPermissions.changePermissions(fs, cmd, argv, cmdIndex, fsShell);
+    ec = FsShellPermissions.changePermissions(cmd, argv, cmdIndex, fsShell);
     Assert.assertEquals(ec, exitCode);
   }
 



Mime
View raw message