hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: Is there a way to get an absolute HDFS path?
Date Mon, 12 Mar 2012 22:24:37 GMT
Why retranslate?

Even better is to instead do:
p.toUri().getPath()

On Tue, Mar 13, 2012 at 3:52 AM, W.P. McNeill <billmcn@gmail.com> wrote:
> That works. Note that this returns the full HDFS URI. If you want to remove
> protocol and server information you must do something like:
>
> Path p = fs.getFileStatus(new Path(".")).getPath();
> URI(p.toString()).getPath();



-- 
Harsh J

Mime
View raw message