hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1126800 - in /hadoop/common/branches/yahoo-merge: ./ CHANGES.txt src/contrib/ec2/ src/docs/ src/java/ src/java/org/apache/hadoop/fs/FsShell.java src/java/org/apache/hadoop/fs/FsShellPermissions.java src/test/core/
Date Mon, 23 May 2011 22:41:29 GMT
Author: szetszwo
Date: Mon May 23 22:41:28 2011
New Revision: 1126800

URL: http://svn.apache.org/viewvc?rev=1126800&view=rev
Log:
svn merge -c 1076296 from trunk for HADOOP-7114.

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)

Propchange: hadoop/common/branches/yahoo-merge/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:41:28 2011
@@ -1,2 +1,2 @@
-/hadoop/common/trunk:1043117,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,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=1126800&r1=1126799&r2=1126800&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/CHANGES.txt (original)
+++ hadoop/common/branches/yahoo-merge/CHANGES.txt Mon May 23 22:41:28 2011
@@ -44,6 +44,9 @@ Trunk (unreleased changes)
     HADOOP-7250. Refactor the setrep command to conform to new FsCommand class.
     (Daryn Sharp via szetszwo)
 
+    HADOOP-7114. FsShell should dump all exceptions at DEBUG level.
+    (todd via tomwhite)
+
   OPTIMIZATIONS
 
   BUG FIXES

Propchange: hadoop/common/branches/yahoo-merge/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:41:28 2011
@@ -1,4 +1,4 @@
-/hadoop/common/trunk/CHANGES.txt:1043117,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,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:41:28 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/src/contrib/ec2:1043117,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,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:41:28 2011
@@ -1,2 +1,2 @@
-/hadoop/common/trunk/src/docs:1043117,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,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:41:28 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/src/java:1043117,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,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=1126800&r1=1126799&r2=1126800&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:41:28 2011
@@ -30,6 +30,8 @@ import java.util.List;
 import java.util.TimeZone;
 import java.util.zip.GZIPInputStream;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
@@ -55,6 +57,8 @@ import org.apache.hadoop.util.ToolRunner
 /** Provide command line access to a FileSystem. */
 @InterfaceAudience.Private
 public class FsShell extends Configured implements Tool {
+  
+  static final Log LOG = LogFactory.getLog(FsShell.class);
 
   private FileSystem fs;
   private Trash trash;
@@ -722,6 +726,7 @@ public class FsShell extends Configured 
         try {
           dstFstatus = fs.getFileStatus(dst);
         } catch(IOException e) {
+          LOG.debug("Error getting file status of " + dst, e);
         }
         if((srcFstatus!= null) && (dstFstatus!= null)) {
           if (srcFstatus.isDirectory()  && !dstFstatus.isDirectory()) {
@@ -769,6 +774,7 @@ public class FsShell extends Configured 
         //
         rename(argv[i], dest);
       } catch (RemoteException e) {
+        LOG.debug("Error renaming " + argv[i], e);
         //
         // This is a error returned by hadoop server. Print
         // out the first line of the error mesage.
@@ -783,6 +789,7 @@ public class FsShell extends Configured 
                              ex.getLocalizedMessage());
         }
       } catch (IOException e) {
+        LOG.debug("Error renaming " + argv[i], e);
         //
         // IO exception encountered locally.
         //
@@ -854,6 +861,7 @@ public class FsShell extends Configured 
         //
         copy(argv[i], dest, conf);
       } catch (RemoteException e) {
+        LOG.debug("Error copying " + argv[i], e);
         //
         // This is a error returned by hadoop server. Print
         // out the first line of the error mesage.
@@ -869,6 +877,7 @@ public class FsShell extends Configured 
                              ex.getLocalizedMessage());
         }
       } catch (IOException e) {
+        LOG.debug("Error copying " + argv[i], e);
         //
         // IO exception encountered locally.
         //
@@ -929,6 +938,7 @@ public class FsShell extends Configured 
           return;
         }
       } catch (IOException e) {
+        LOG.debug("Error with trash", e);
         Exception cause = (Exception) e.getCause();
         String msg = "";
         if(cause != null) {
@@ -995,6 +1005,7 @@ public class FsShell extends Configured 
     } catch(FileNotFoundException fnfe) {
       System.err.println(cmd + ": could not get listing for '" + path + "'");
     } catch (IOException e) {
+      LOG.debug("Error listing " + path, e);
       System.err.println(cmd + 
                          ": could not get get listing for '" + path + "' : " +
                          e.getMessage().split("\n")[0]);
@@ -1051,6 +1062,7 @@ public class FsShell extends Configured 
             errors += runCmdHandler(handler, file, srcFs, recursive);
           }
         } catch (IOException e) {
+          LOG.debug("Error getting status for " + path, e);
           String msg = (e.getMessage() != null ? e.getLocalizedMessage() :
             (e.getCause().getMessage() != null ? 
                 e.getCause().getLocalizedMessage() : "null"));
@@ -1383,6 +1395,7 @@ public class FsShell extends Configured 
           text(argv[i]);
         }
       } catch (RemoteException e) {
+        LOG.debug("Error", e);
         //
         // This is a error returned by hadoop server. Print
         // out the first line of the error message.
@@ -1398,6 +1411,7 @@ public class FsShell extends Configured 
                              ex.getLocalizedMessage());
         }
       } catch (IOException e) {
+        LOG.debug("Error", e);
         //
         // IO exception encountered locally.
         //
@@ -1551,11 +1565,13 @@ public class FsShell extends Configured 
     // initialize FsShell
     try {
       init();
-    } catch (RPC.VersionMismatch v) { 
+    } catch (RPC.VersionMismatch v) {
+      LOG.debug("Version mismatch", v);
       System.err.println("Version Mismatch between client and server" +
                          "... command aborted.");
       return exitCode;
     } catch (IOException e) {
+      LOG.debug("Error", e);
       System.err.println("Bad connection to FS. Command aborted. Exception: " +
           e.getLocalizedMessage());
       return exitCode;
@@ -1644,10 +1660,12 @@ public class FsShell extends Configured 
         printUsage("");
       }
     } catch (IllegalArgumentException arge) {
+      LOG.debug("Error", arge);
       exitCode = -1;
       System.err.println(cmd.substring(1) + ": " + arge.getLocalizedMessage());
       printUsage(cmd);
     } catch (RemoteException e) {
+      LOG.debug("Error", e);
       //
       // This is a error returned by hadoop server. Print
       // out the first line of the error mesage, ignore the stack trace.
@@ -1662,6 +1680,7 @@ public class FsShell extends Configured 
                            ex.getLocalizedMessage());  
       }
     } catch (IOException e) {
+      LOG.debug("Error", e);
       //
       // IO exception encountered locally.
       // 
@@ -1669,6 +1688,7 @@ public class FsShell extends Configured 
       System.err.println(cmd.substring(1) + ": " + 
                          e.getLocalizedMessage());  
     } catch (Exception re) {
+      LOG.debug("Error", re);
       exitCode = -1;
       System.err.println(cmd.substring(1) + ": " + re.getLocalizedMessage());  
     } finally {

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=1126800&r1=1126799&r2=1126800&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:41:28 2011
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.commons.logging.Log;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.fs.FsShell.CmdHandler;
@@ -35,6 +36,8 @@ import org.apache.hadoop.fs.permission.C
 @InterfaceAudience.Private
 @InterfaceStability.Unstable
 class FsShellPermissions {
+
+  static Log LOG = FsShell.LOG;
   
   /*========== chmod ==========*/
 
@@ -75,6 +78,7 @@ class FsShellPermissions {
           srcFs.setPermission(file.getPath(), 
                                 new FsPermission((short)newperms));
         } catch (IOException e) {
+          LOG.debug("Error changing permissions of " + file.getPath(), e);
           System.err.println(getName() + ": changing permissions of '" + 
                              file.getPath() + "':" + e.getMessage());
         }
@@ -133,6 +137,7 @@ class FsShellPermissions {
         try {
           srcFs.setOwner(file.getPath(), newOwner, newGroup);
         } catch (IOException e) {
+          LOG.debug("Error changing ownership of " + file.getPath(), e);
           System.err.println(getName() + ": changing ownership of '" + 
                              file.getPath() + "':" + e.getMessage());
 

Propchange: hadoop/common/branches/yahoo-merge/src/test/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:41:28 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/src/test/core:1043117,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,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



Mime
View raw message