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();
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();