I am trying to access hadoop file in spark but I am getting this error

```
org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://localhost:9000/ex1/cen.csv
  at org.apache.hadoop.mapred.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:287)

```

I am able to display the file in hadoop

```
hadoop dfs -cat ex1/cen.csv

```