hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bochun Bai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1788) FsShell ls: Show symlinks properties
Date Thu, 16 Jun 2011 07:40:47 GMT

    [ https://issues.apache.org/jira/browse/HDFS-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050261#comment-13050261
] 

Bochun Bai commented on HDFS-1788:
----------------------------------

Thanks daryn, your reviews encourage me a lot.
I will rewrite the patch and follow your advises.

But I got some difficult while keeping PathData maximum compatible: 
  Adds lstat, leaving fs, stat, exists.
  And fc should be added because HADOOP-6446. Further works should use FileContext instead
of FileSystem.
  And lexists is requeired to identify broken links.

  The problem is fc should be initialized in ctor like fs, whether it is parameter or not,
breaks compatible by requiring new parameter or throwing exceptions.
  If fc is not a field of PathData and initialized when item.lstat() is called. RPC to NN
will increased.

To satisfies both compatible and feature, I suggest create a object named StatusData:
  contains fc, lstat and string.
  represent the link itself, not the real file.
  when cat/tail/stat is called, lstat.symlink will be resolved recursively and the real target
is returned.
  FileStatus is recursively, and StatusData is independent to link or not.
  RPC to NN is decreased while listing a directory containing symlink. stat/read/write overhead
to the symlink is the same, but lazy-inited. It should also improve GC activities to HADOOP-6732.

And I have noticed @eli created a serial issues about porting FileContext. I will submit next
patch to HADOOP-6424.


> FsShell ls: Show symlinks properties
> ------------------------------------
>
>                 Key: HDFS-1788
>                 URL: https://issues.apache.org/jira/browse/HDFS-1788
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: tools
>            Reporter: Jonathan Eagles
>            Assignee: John George
>            Priority: Minor
>         Attachments: HDFS-1788.patch
>
>
> ls FsShell command implementation has been consistent with the linux implementations
of ls \-l. With the addition of symlinks, I would expect the ability to show file type 'd'
for directory, '\-' for file, and 'l' for symlink. In addition, following the linkname entry
for symlinks, I would expect the ability to show "\-> <link target>". In linux, the
default is to the the properties of the link and not of the link target. In linux, '-L' option
allows for the dereferencing of symlinks to show link target properties, but it is not the
default. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message