Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

hdfs upload fails with ugly file name

SOLVED Go to solution
Highlighted

hdfs upload fails with ugly file name

Contributor

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

Accepted Solutions

Re: hdfs upload fails with ugly file name

Expert Contributor

try scp

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

Re: hdfs upload fails with ugly file name

Expert Contributor

try scp

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

Re: hdfs upload fails with ugly file name

Expert Contributor

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/

Re: hdfs upload fails with ugly file name

Contributor

thanks @hduraiswamy

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

Re: hdfs upload fails with ugly file name

Contributor

@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.

Re: hdfs upload fails with ugly file name

Expert Contributor

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

Re: hdfs upload fails with ugly file name

New Contributor

have the same issue using Edge browser