Copy file from local to hdfs fails


#1

I have created a csv on the local file system:
RXIE@RXIE-SERVER /cygdrive/c/RXIE/Learning/Scala/cca175/96
$ cat /cygdrive/c/RXIE/Learning/Scala/cca175/96/updated_departments.csv
2,fitness
3,footwear
12,fathematics
13,fcience
14,engineering
1000,management

Now I need to copy the csv to hdfs, I am using this command -put:

[paslechoix@gw01 ~]$ hdfs dfs -put /cygdrive/c/RXIE/Learning/Scala/cca175/96/updated_departments.csv updated_departments
put: `/cygdrive/c/RXIE/Learning/Scala/cca175/96/updated_departments.csv’: No such file or directory

Why am I getting the error? How do I fix it?

Thank you very much.


#2

If you are trying to copy from your local system to gateway you should use the command like below from cygwin.

scp file user@gateway:

image

To copy into HDFS from local refer screenshot.

image


#3