hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r705124 - in /hadoop/core/trunk: CHANGES.txt src/core/org/apache/hadoop/fs/FsShell.java
Date Thu, 16 Oct 2008 03:07:59 GMT
Author: cdouglas
Date: Wed Oct 15 20:07:59 2008
New Revision: 705124

URL: http://svn.apache.org/viewvc?rev=705124&view=rev
Log:
HADOOP-4335. Fix FsShell -ls for filesystems without owners/groups. Contributed
by David Phillips.

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

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=705124&r1=705123&r2=705124&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Oct 15 20:07:59 2008
@@ -931,6 +931,9 @@
 
     HADOOP-4053. Schedulers must be notified when jobs complete. (Amar Kamat via omalley)
 
+    HADOOP-4335. Fix FsShell -ls for filesystems without owners/groups. (David
+    Phillips via cdouglas)
+
 Release 0.18.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/FsShell.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/FsShell.java?rev=705124&r1=705123&r2=705124&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/FsShell.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/FsShell.java Wed Oct 15 20:07:59 2008
@@ -623,9 +623,10 @@
           stat.getPermission() + " ");
         System.out.printf("%"+ maxReplication + 
           "s ", (!stat.isDir() ? stat.getReplication() : "-"));
-        System.out.printf("%-"+ maxOwner +
-          "s ", stat.getOwner());
-        System.out.printf("%-"+ maxGroup +"s ", stat.getGroup());
+        if (maxOwner > 0)
+          System.out.printf("%-"+ maxOwner + "s ", stat.getOwner());
+        if (maxGroup > 0)
+          System.out.printf("%-"+ maxGroup + "s ", stat.getGroup());
         System.out.printf("%"+ maxLen + "d ", stat.getLen());
         System.out.print(mdate + " ");
         System.out.println(cur.toUri().getPath());



Mime
View raw message