Hdfs default directory


#1

When i searched on internet then it said “there is no pwd for hdfs” so i expect that on doing
``hadoop fs -ls` it must give me the contents of root directory i.e

'[manisood001@gw02 arnav]$ hadoop fs -ls 
Found 16 items
drwxr-xr-x   - hdfs   hdfs            0 2018-04-25 13:50 /HyperSecuredCluster
drwxrwxrwx   - yarn   hadoop          0 2018-12-28 09:15 /app-logs
drwxr-xr-x   - hdfs   hdfs            0 2017-03-10 10:03 /apps
drwxrwxrwx   - hdfs   hdfs            0 2017-10-17 08:58 /appsplay
drwxr-xr-x   - yarn   hadoop          0 2016-11-14 19:03 /ats
drwxr-xr-x   - hdfs   hdfs            0 2016-11-14 19:03 /hdp
drwxr-xr-x   - hdfs   hdfs            0 2018-07-08 03:46 /home
drwx------   - livy   hdfs            0 2018-08-03 03:03 /livy-recovery
drwxr-xr-x   - mapred hdfs            0 2016-11-14 19:03 /mapred
drwxrwxrwx   - mapred hadoop          0 2018-08-06 19:42 /mr-history
drwxr-xr-x   - hdfs   hdfs            0 2018-09-05 09:09 /public
drwxrwxrwx   - spark  hadoop          0 2018-12-29 10:25 /spark-history
drwxrwxrwx   - spark  hadoop          0 2018-12-29 10:25 /spark2-history
drwxrwxr-x   - hdfs   hdfs            0 2018-07-02 05:13 /system
drwxrwxrwx   - hdfs   hdfs            0 2018-12-29 04:21 /tmp
drwxr-xr-x   - hdfs   hdfs            0 2018-12-29 04:40 /user'

but what i saw is it shows
the contents of user/username/bla bla bla i.e

    [manisood001@gw02 arnav]$ hadoop fs -ls
    Found 2 items
    drwx------   - manisood001 hdfs          0 2018-12-29 09:32 .Trash
    drwxr-xr-x   - manisood001 hdfs          0 2018-12-29 09:53 mydata

so my ques is if hdfs has no cd and pwd the why my root directory is not as default and why root/user/username/bla bla bla is default.


#2

@ArnavSood If you run hadoop fs -ls command without any specific path it will give you result under your user directory hadoop fs -ls /user/manisood001/

Please refer screenshot to understand