camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chirag Dewan <>
Subject Issue with special characters in file for Camel HDFS
Date Fri, 12 Sep 2014 08:50:28 GMT
Hi All,

Recently I faced a problem in HDFS producer with files which have special characters in the
name. Apparently,when we create hadoop file system in and pass the hdfsPath(hdfs://ip:port/filename,file
name is abc}123.txt) it is unable to create the URI and it throws some exception for "}" in
the URI.

I was able to fix this by encoding my path in UTF-8 (I used

But now hadoop file system cannot be initialzed since URI scheme was not found(which I think
is because URLEncoder encoded the path and URI.getScheme() failed or returned null).

Now,only solution I can think of is by only encoding the file name,keeping the rest of the
path as is. For example :

Does anyone else faced a similar issue?  Is it a bug in HDFS for files with special characters?
Any better solution for this?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message