Hi,
Do not get confused between local Linux file system (which is in web console) and HDFS.
/home/dhksk09430 is your home directory on Linux console (web console)
/user/dhksk09430 is your home directory on HDFS.
Please note that on HDFS and web console, you will have permissions to create files only in your home directory.
We can load files either from HDFS or web console.
Load files from HDFS
To load files from HDFS use one the below commands
sc.textFile("hdfs:///user/dhksk09430/gh-driver-schedule.csv")
sc.textFile("hdfs://gh-driver-schedule.csv")
sc.textFile("hdfs://ip-172-31-53-48.ec2.internal:8020/user/dhksk09430/gh-driver-schedule.csv")
Load files from web console or Linux file system
To load files from web console use below command
sc.textFile("file:///home/dhksk09430/gh-driver-schedule.csv")
Hope this helps. Feel free to let me know if you have any queries.