Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

hdfs upload fails with ugly file name

avatar
Rising Star

attempts to upload a file from ambari fails by generating an invalid target file name. it creates a target filename (hdfs) by removing all of the path delimiters from the source file name, resulting in a ridiculously long file name that additionally contains "c:". I don't see any way of controlling this. running it all on windows. all I do is browse for the local file and then upload.

exception:

500

Pathname /tmp/maria_dev/data/C:UsersXXXXXDownloadsHortonworksGeolocationgeolocation.csv from /tmp/maria_dev/data/C:UsersXXXXXDownloadsHortonworksGeolocationgeolocation.csv is not a valid DFS filename.

Collapse Stack Trace

java.lang.IllegalArgumentException: Pathname /tmp/maria_dev/data/C:UsersklyborDownloadsHortonworksGeolocationgeolocation.csv from /tmp/maria_dev/data/C:UsersklyborDownloadsHortonworksGeolocationgeolocation.csv is not a valid DFS filename
1 ACCEPTED SOLUTION

avatar
Super Collaborator

try scp

scp -P 2222 Downloads/HortonworksGeolocationgeolocation.csv root@<hadoop node>:/tmp/maria_dev/data/

View solution in original post

6 REPLIES 6

avatar
Super Collaborator

try scp

scp -P 2222 Downloads/HortonworksGeolocationgeolocation.csv root@<hadoop node>:/tmp/maria_dev/data/

avatar
Super Collaborator

if it is sandbox, the above command will look like:

scp -P 2222 Downloads/HortonworksGeolocationgeolocation.csv root@127.0.0.1:/tmp/maria_dev/data/

avatar
Rising Star

thanks @hduraiswamy

used filezilla to do the uploads. would be nice it this ambari feature worked because it is really convenient.

avatar
Rising Star

@hduraiswamy

I know the problem. It is an IE 11 feature that I encountered and dealt with for one of my own apps.

I can do the upload with Chrome. IE 11 passes the full local file pathname at times (depends upon user browser options) . Ambari needs to strip off the path prefix when forming the server filename.

avatar
Super Collaborator

@michael klybor - good point.. It actually makes sense to post that to the Ambari forum as a suggestion..

avatar

have the same issue using Edge browser