hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-245) Create symbolic links in HDFS
Date Thu, 17 Sep 2009 19:44:57 GMT

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

Doug Cutting commented on HDFS-245:
-----------------------------------

The most succinct test I've come up with for when it's appropriate to use exceptions is whether
the target is known.  If you know exactly what class and where on the stack an exception will
be caught, then it's just a glorified goto statement working around poor API modeling.  If
you genuinely have no idea how a situation should be handled, then an exception is appropriate.

In this case the exception will always be caught by FileSytem/FileContext and always be handled
in precisely the same way by the same boilerplate code.  There's nothing ambiguous about this
situation that justifies exceptions.

That's the negative case.  The postive case is that we are adding the notion of symlinks to
our FileSystem API, including cross-FileSystem symlinks.  Thus, a FileSystem becomes not just
fundamentally a mapping of path->bytes, but a mapping of path->[bytes|path].  This is
a fundamental change to our FileSystem metaphor, and, as such, it requires a fundamental change
to its SPI.  The SPI can and should model this functionality directly with parameters and
return values, not through values passed in exceptions.

> It is a shame that this isn't looking like it will make 0.21's cutoff. 

I agree that it would be shameful if this does not make it into 0.21.  The patch has been
here for 9 months!


> Create symbolic links in HDFS
> -----------------------------
>
>                 Key: HDFS-245
>                 URL: https://issues.apache.org/jira/browse/HDFS-245
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>            Reporter: dhruba borthakur
>            Assignee: Eli Collins
>         Attachments: 4044_20081030spi.java, HADOOP-4044-strawman.patch, symlink-0.20.0.patch,
symLink1.patch, symLink1.patch, symLink11.patch, symLink12.patch, symLink13.patch, symLink14.patch,
symLink15.txt, symLink15.txt, symLink4.patch, symLink5.patch, symLink6.patch, symLink8.patch,
symLink9.patch
>
>
> HDFS should support symbolic links. A symbolic link is a special type of file that contains
a reference to another file or directory in the form of an absolute or relative path and that
affects pathname resolution. Programs which read or write to files named by a symbolic link
will behave as if operating directly on the target file. However, archiving utilities can
handle symbolic links specially and manipulate them directly.

-- 
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