hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ling Kun <lkun.e...@gmail.com>
Subject What is the difference between URI, Home Directory, Working Directory in FileSystem.java or HDFS
Date Thu, 11 Apr 2013 10:33:02 GMT
Dear all,
   I am a little confusing about the URI, Home Directory and Working
Directory in the FileSystem.java or HDFS.

  I have listed my understanding about these concept, can someone please
figure out whether I am correct?  Thanks.

   The Home directory: This is usually a directory for a specific Hadoop
users. And for the path, it is a user specific path. In HDFS, it is like

   The URI: Is this the root of the distributed filesystem. for HDFS, it is
just the HDFS://NameNode:port/ , each file/directory in the distributed
filesystem is just a file or subdirectory in this path.

   The working directory: I am a little confused about this variable. At a
given time, there exists only one instance of the filesystem class, and the
working dir is a private state of the FS. And during the job running,
hadoop will switch among several dirs, and the working dir will be modified
once it is switched. Like in the shared system dir, home dir, or
input/output dir.

   Although I have looked through the related document, I am still a little
confused about the java.net.URI,  java.io.File and
org.apache.hadoop.fs.Path class. It seems URI could be
hdfs://XXX/XXX/FILENAME, while Path only can be the path without the
scheme, hostname and the port.  For the File class, it is just an object
for a specific file.


Ling Kun


View raw message