You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cd...@apache.org on 2008/10/16 05:07:59 UTC
svn commit: r705124 - in /hadoop/core/trunk: CHANGES.txt
src/core/org/apache/hadoop/fs/FsShell.java
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());