D.per
D.per

Reputation: 97

Load file csv from hdfs

I am trying to upload a CSV file to the distributed file system hdfs with:

hadoop fs -put

jps

But I get the following error:
put: ´.´: No such file or directory: ´hdfs://localhost:54310/user/hduser´

load csv

Upvotes: 2

Views: 900

Answers (2)

Mike Pone
Mike Pone

Reputation: 19330

It looks like you are trying to upload the file without specifying an explicit location. If you don't specify a destination, it will upload it to the current user's hdfs home directory, which doesn't exist for the current user.

try specifying an hdfs folder location.

hadoop fs -put <local file> <hdfs directory>

Upvotes: 0

Paul
Paul

Reputation: 1194

Create a Destination HDFS directory first. It looks like /user/hduser directory is not present in HDFS.

hdfs dfs -mkdir -p /user/hduser

Then copy the file to HDFS.

hdfs dfs -put LOCAL_FILE_PATH DESTINATION_HDFS_PATH

Example: hdfs dfs -put ./ /tmp

Note: Replace LOCAL_FILE_PATH with your local file and DESTINATION_HDFS_PATH with the destination HDFS Path.

Upvotes: 1

Related Questions