hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joey Echeverria <j...@cloudera.com>
Subject Re: Is there a way to get an absolute HDFS path?
Date Mon, 12 Mar 2012 23:02:14 GMT
HDFS has the notion of a working directory which defaults to
/user/<username>. Check out:

http://hadoop.apache.org/common/docs/r1.0.1/api/org/apache/hadoop/fs/FileSystem.html#getWorkingDirectory()

and

http://hadoop.apache.org/common/docs/r1.0.1/api/org/apache/hadoop/fs/FileSystem.html#setWorkingDirectory(org.apache.hadoop.fs.Path)

-Joey

On Mon, Mar 12, 2012 at 5:44 PM, Keith Wiley <kwiley@keithwiley.com> wrote:
> So, you're say that hadoop assumes there is a specific directory hierarchy on HDFS?  Namely
that there exists a top-level directory /user/ and that there exist various username directories
under /user/?
>
> I only ask because I've never bothered to configure an HDFS system that specific way?
 I didn't think there was any reason to impose such a directory hierarchy, but if hadoop
really builds implicit paths on such an assumption then that is a good reason to be somewhat
strict about organizing files on HDFS in a corresponding fashion.
>
> On Mar 12, 2012, at 15:24 , W.P. McNeill wrote:
>
>> HDFS always translates non-absolute paths like "top/sub" into absolute
>> paths of the form "/user/USERNAME/top/sub". So in HDFS "top/sub" is
>> unambiguous.
>
>
> ________________________________________________________________________________
> Keith Wiley     kwiley@keithwiley.com     keithwiley.com    music.keithwiley.com
>
> "Luminous beings are we, not this crude matter."
>                                           --  Yoda
> ________________________________________________________________________________
>



-- 
Joseph Echeverria
Cloudera, Inc.
443.305.9434

Mime
View raw message