hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Wiley <kwi...@keithwiley.com>
Subject Re: Is there a way to get an absolute HDFS path?
Date Mon, 12 Mar 2012 21:38:33 GMT
In the first example you want it to chop off the /sub/ directory.  Why?  What is the indicator
as to how many lower directories you want chopped off?  In the second example, how can it
turn a relative path into an absolute path considering that there may be multiple "top" directories
scattered all over the file system?  How should it know which "top" you want it to build an
absolute path to?  For example, why not /top/sub or /user/top/sub?

On Mar 12, 2012, at 14:20 , W.P. McNeill wrote:

> Is there an API that returns absolute HDFS paths? So something that would
> turn "/user/myname/top/sub/.." into "/user/myname/top" and "top/sub" into
> "/user/mynname/top/sub"? I've been looking for this functionality where I
> think it would be (e.g. FileSystem or Path) but can't find it.

Keith Wiley     kwiley@keithwiley.com     keithwiley.com    music.keithwiley.com

"You can scratch an itch, but you can't itch a scratch. Furthermore, an itch can
itch but a scratch can't scratch. Finally, a scratch can itch, but an itch can't
scratch. All together this implies: He scratched the itch from the scratch that
itched but would never itch the scratch from the itch that scratched."
                                           --  Keith Wiley

View raw message