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.

Flume HDFS sink %y-%m-%d issue

Solved Go to solution

Flume HDFS sink %y-%m-%d issue

While running flume agent with HDFS sink settings

 

agent1.sinks.sink1.hdfs.path = /user/cloudera/myflume/to-hdfs/%y-%m-%d

the files are written in folder 18-03-13, whereas I would like a 4 digit year such as 2018-03-13. Is there a specific setting that I need to include?

 

Screen Shot 2018-03-13 at 21.53.40.png

Screen Shot 2018-03-13 at 21.55.22.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Flume HDFS sink %y-%m-%d issue

Right, I needed to use %Y rather than %y
1 REPLY 1
Highlighted

Re: Flume HDFS sink %y-%m-%d issue

Right, I needed to use %Y rather than %y