Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Output to HDFS separate events one per line

avatar
Expert Contributor

I have been hunting online for awhile trying to find how one would tell Nifi to format the HDFS output with one event per line instead of one event immediately after the next. I am trying to set up a virtual index through HUNK and its registering my entire output file as one event.

Thanks in advance.

1 ACCEPTED SOLUTION

avatar
Master Mentor
@Eric Lloyd

Did you try using a "Demarcator" between your merged content? The MergeContent processor allows you to designate a Demarcator. Perhaps use new line or something else unique that can then be used later to differentiate between bits of content in the same HDFS file.

Thanks,

Matt

View solution in original post

3 REPLIES 3

avatar
Master Mentor
@Eric Lloyd

Did you try using a "Demarcator" between your merged content? The MergeContent processor allows you to designate a Demarcator. Perhaps use new line or something else unique that can then be used later to differentiate between bits of content in the same HDFS file.

Thanks,

Matt

avatar
Expert Contributor

Once again, thanks Matt! I think I'm finally starting to wrap my brain around how to adjust parameters to alter file flow.

avatar
Expert Contributor

I know this was from awhile ago but I just noticed with this solution, the appended data starts right at the end of the previous event causing data loss cause two events get smooshed together. Do you have this issue when you do this and how do you fix it?

Example:

Apr 11 05:00:39 fw01 /kernel: KERN_ARP_ADDR_CHANGE: arp info overwritten for 10.11.x.x from 00:xx:xx:xx:xx:cd to 00:xx:xx:xx:xx:a3Apr 11 05:00:39 fw01 /kernel: KERN_ARP_ADDR_CHANGE: arp info overwritten for 10.11.x.x from 00:xx:xx:xx:xx:a3 to 00:xx:xx:xx:xx:cd