hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-2865) FsShell.ls() should print file attributes first then the path name.
Date Mon, 14 Apr 2008 22:45:05 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-2865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588832#action_12588832
] 

Konstantin Shvachko commented on HADOOP-2865:
---------------------------------------------

+0.7
I think this is good as a first step in improving the formatting of ls.
There are 3 cases when formatting brakes
# when file size is larger than 7 digits
# when user names substantially differ in length
# when group names differ

{code}
2	168	2007-10-09 20:21	-rw-rw-rw-	shv	supergroup	/README.txt
	0	2008-04-09 18:47	drwxr-xr-x	administrator	supergroup	/conf
3	12345678	2008-04-09 18:46	-rw-r--r--	shv	supergroup	/conf/.svn/README.txt
3	1234567	2008-04-09 18:47	-rw-r--r--	shv	supergroup	/conf/.svn/dir-prop-base
3	90	2008-04-09 18:46	-rw-r--r--	shv	user	/conf/.svn/dir-wcprops
3	9012345	2008-04-09 18:47	-rw-r--r--	shv	supergroup	/conf/.svn/dir-props
{code}
The first one is going to be very common, since we expect large files and design for it. And
we should fix it.
The best way would be to convert bytes into MB, GB, TB, or even PB if needed, but at least
using "%-XXd" as in DU would be better.
This should also produce right aligned column.

Dynamically calculating column widths is probably the next logical improvement step, which
belongs to a different issue.

We should mark this issue as an incomatible change.

> FsShell.ls() should print file attributes first then the path name.
> -------------------------------------------------------------------
>
>                 Key: HADOOP-2865
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2865
>             Project: Hadoop Core
>          Issue Type: Improvement
>    Affects Versions: 0.15.0
>            Reporter: Konstantin Shvachko
>            Assignee: Edward J. Yoon
>             Fix For: 0.18.0
>
>         Attachments: 2865_v01.patch
>
>
> When we had a handful of attributes this looked OK. But after the permissions the ls
output is just unreadable.
> This how the output looks now:
> {code}
> /CHANGES.txt    <r 2>   174779  2008-01-29 10:00        rw-r--r--       shv   
 supergroup
> /LICENSE.txt    <r 2>   11358   2008-01-28 17:27        rw-r--r--       shv   
 supergroup
> /NOTICE.txt     <r 2>   101     2008-01-29 12:06        rw-r--r--       shv   
 supergroup
> /Work   <dir>           2008-01-23 17:43        rwxr-xr-x       shv     supergroup
> /Work/hadoop-data       <dir>           2008-01-23 17:43        rwxr-xr-x     
 shv     supergroup
> {code}
> This is how it should look:
> {code}
> 2   174779  2008-01-29 10:00       -rw-r--r--       shv     supergroup     /CHANGES.txt
> 2   11358   2008-01-28 17:27       -rw-r--r--       shv     supergroup     /LICENSE.txt
> 2   101     2008-01-29 12:06       -rw-r--r--       shv     supergroup     /NOTICE.txt
>             2008-01-23 17:43       drwxr-xr-x       shv     supergroup     /Work
>             2008-01-23 17:43       drwxr-xr-x       shv     supergroup     /Work/hadoop-data
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message