Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

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.

Error in PutHDFS while adding Time to file

avatar
Rising Star

I am using HDP 2.5. I try to add time for file which is locate in HDFS file. For that I use GetHDFS->UpdateAttribute->PutHDFS.

First I get file from HDFS through GetHDFS processor and then I change format of file in UpdateAttribute by adding property "

${filename}.${now():format("yyyy-MM-dd-HH:mm:ss.SSS'z'")}". Finally I try to put file in HDFS that time I got issue "

Failed to write to HDFS due to java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: .test.csv.2017-10-03:03:19.814z: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: .test.csv.2017-10-03:03:19.814z"
.

UpdateAttribute


39655-screenshot-from-2017-10-03-14-37-53.png

PutHDFS

39656-screenshot-from-2017-10-03-14-38-20.png

1 ACCEPTED SOLUTION

avatar
Master Guru

Hi @Narasimma varman,

if we are creating files or directories having {/,:} characters then HDFS wont allow to do that but in local we can use colon.

You can refer to below similar kind of issue.

https://community.hortonworks.com/questions/139512/create-hdfs-folder-having-namecreate-hdfs-folder-...

To resolve your issue:-

Replace all colons with some other character and try to run again.

${filename}.${now():format("yyyy-MM-dd-HH_mm_ss.SSS'z'")}"

(or)

${filename}.${now():format("yyyy-MM-dd-HHmmss.SSS'z'")}"

View solution in original post

2 REPLIES 2

avatar
Master Guru

Hi @Narasimma varman,

if we are creating files or directories having {/,:} characters then HDFS wont allow to do that but in local we can use colon.

You can refer to below similar kind of issue.

https://community.hortonworks.com/questions/139512/create-hdfs-folder-having-namecreate-hdfs-folder-...

To resolve your issue:-

Replace all colons with some other character and try to run again.

${filename}.${now():format("yyyy-MM-dd-HH_mm_ss.SSS'z'")}"

(or)

${filename}.${now():format("yyyy-MM-dd-HHmmss.SSS'z'")}"

avatar
Rising Star

Thanks Shu