Reputation: 468
I am trying to copy some files from my hard drive to HDFS , I am using this command
hadoop fs -copyFromLocal /home/hduser/Pictures/Event\ ordering/* input/
Is this the correct syntax ?
PS : I am using linux
PPS: I get this error
copyFromLocal: unexpected URISyntaxException
Upvotes: 13
Views: 19174
Reputation: 1751
This happens when you have files with space. Linux doesn't recognize spaces in their filenames. So, if you want to move those files, you first have to remove those spaces and then execute. Also, it is always recommended to not have space in Linux.
hadoop fs -copyFromLocal /home/hduser/Pictures/Eventordering/* input/
Upvotes: 0
Reputation: 794
You need to represent Space as %20
, i.e.
Event ordering
-> Event%20ordering
try
hadoop fs -copyFromLocal /my/local/dir/Event%20ordering/* input/
It will work.
Upvotes: 28
Reputation: 67
Remove space between Directory name and it will work
steps are as follows
1.Rename directory name and remove space between them
change Event ordering to Eventordering
2 now run following command
hadoop fs -copyFromLocal /home/hduser/Pictures/Eventordering/* input/
Upvotes: 2