Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> Is there a way to get an absolute HDFS path?

Copy link to this message
Re: Is there a way to get an absolute HDFS path?
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     [EMAIL PROTECTED]     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