- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
On Nifi Is it possible using PutHdfs Processor to configure so that files are written to day wise folder ,rolling to new day folder everyday
- Labels:
-
Apache Hadoop
-
Apache NiFi
Created ‎09-05-2017 11:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For Ex:
USing getKafka -to read the stream
PutHDFS to write to HDFS
Can it be configured in the processor to create new folders when a new day starts and write the kafka topic data to that folder.
Basically to maintain day wise folders in HDFS using putHDFS processor in nifi.
Created on ‎09-06-2017 02:17 PM - edited ‎08-18-2019 02:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @manisha jain, yep it is possible with PutHDFS processor.
in puthdfs processor keep directory property as
/user/kafka/${now():format("yyyy-MM-dd")}Expression:-
${now():format("yyyy-MM-dd")}
above expression now will be the current timestamp and extracts only the date and creates the directory with the date dynamically and and stores all the flow files that are generated with same date will be stored into the same directory.
PutHDFS properties:-
Created on ‎09-06-2017 02:17 PM - edited ‎08-18-2019 02:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @manisha jain, yep it is possible with PutHDFS processor.
in puthdfs processor keep directory property as
/user/kafka/${now():format("yyyy-MM-dd")}Expression:-
${now():format("yyyy-MM-dd")}
above expression now will be the current timestamp and extracts only the date and creates the directory with the date dynamically and and stores all the flow files that are generated with same date will be stored into the same directory.
PutHDFS properties:-
Created ‎09-07-2017 04:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @Yash i have used the same approach,it works.
