hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r629891 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/FsShell.java src/test/org/apache/hadoop/dfs/TestDFSShell.java
Date Thu, 21 Feb 2008 17:49:49 GMT
Author: dhruba
Date: Thu Feb 21 09:49:47 2008
New Revision: 629891

URL: http://svn.apache.org/viewvc?rev=629891&view=rev
Log:
HADOOP-1902. "dfs du" command without any arguments operates on the
current working directory.  (Mahadev Konar via dhruba)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java
    hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=629891&r1=629890&r2=629891&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Feb 21 09:49:47 2008
@@ -13,6 +13,9 @@
     HADOOP-2192. Error messages from "dfs mv" command improved.
     (Mahadev Konar via dhruba)
 
+    HADOOP-1902. "dfs du" command without any arguments operates on the
+    current working directory.  (Mahadev Konar via dhruba)
+
   NEW FEATURES
 
     HADOOP-1398.  Add HBase in-memory block cache.  (tomwhite)

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java?rev=629891&r1=629890&r2=629891&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java Thu Feb 21 09:49:47 2008
@@ -1710,13 +1710,13 @@
         if (i < argv.length) {
           exitCode = doall(cmd, argv, getConf(), i);
         } else {
-          du("");
+          du(".");
         }
       } else if ("-dus".equals(cmd)) {
         if (i < argv.length) {
           exitCode = doall(cmd, argv, getConf(), i);
         } else {
-          dus("");
+          dus(".");
         }         
       } else if ("-mkdir".equals(cmd)) {
         exitCode = doall(cmd, argv, getConf(), i);

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java?rev=629891&r1=629890&r2=629891&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java Thu Feb 21 09:49:47
2008
@@ -292,6 +292,16 @@
       returned = out.toString();
       assertTrue(" unix like output",
           (returned.lastIndexOf("No such file or") != -1));
+      out.reset();
+      argv = new String[1];
+      argv[0] = "-du";
+      srcFs.mkdirs(new Path("/user/"+ 
+          System.getProperty("user.name")));
+      ret = ToolRunner.run(shell, argv);
+      returned = out.toString();
+      assertTrue(" no error ", (ret == 0));
+      assertTrue("empty path specified",
+          (returned.lastIndexOf("empty string") == -1));
     } finally {
       if (bak != null) {
         System.setErr(bak);



Mime
View raw message