Monica
Monica

Reputation: 99

can't read csv file on hdfs - Hadoop

I'm trying to read a csv file but i get : No such file or directory.

the file is on tmp folder.

This is the commands:

1

Upvotes: 1

Views: 374

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191738

Your file is not at hdfs:///user/hdfs/titles.csv, and this is what the error is saying.

You are only showing ls, not hdfs dfs -ls, so you should be using just cat titles.csv

If you want to read a file from HDFS, you need to hdfs dfs -put titles.csv /user/hdfs/ first. (And create the user directory using hdfs dfs -mkdir -p /user/hdfs if it doesn't already exist)

Upvotes: 1

Related Questions