What is the path to directory within Hadoop filesystem? What is the path to directory within Hadoop filesystem? hadoop hadoop

What is the path to directory within Hadoop filesystem?


Your first call to hadoop fs -ls is a relative directory listing, for the current user typically rooted in a directory called /user/${user.name} in HDFS. So your hadoop fs -ls command is listing files / directories relative to this location - in your case /user/Li/

You should be able to assert this by running a aboolute listing and confirm the contents / output match: hadoop fs -ls /user/Li/

As these files are in HDFS, you will not be able to find them on the local filesystem - they are distributed across your cluster nodes as blocks (for real files), and metadata entries (for files and directories) in the NameNode.


All the files are present under hdfs which is Hadoop Distributed File System.so these files are not present in your filesystem or your directory structure

inside hdfs these are stored as

Path("hdfs://host:port/file"));

The setting of the port is present in your xml file under configuration directory of hadoop$HADOOP_HOME/etc/hadoop/core-site.xml

<property>    <name>fs.defaultFS</name>    <value>hdfs://localhost:9010</value></property>

you can view the file present under hdfs with the help of command line

hdfs dfs -ls

Basic linux command can be run from the command line

hdfs dfs -<Command>

with the help of this you can create dir delete file or dir and other things also