Support Questions

Find answers, ask questions, and share your expertise

URGENT query regarding ReplaceText error and processing

avatar
Contributor

I am using ReplaceText to replace JSON and avoid unnecessary escaping of JSON arrays.

However, it looks like there is some inherent problem in either the way I am using ReplaceText or with ReplaceText itself. I always end up having below error while processing of JSON data which I first Split into single items, usually at the end of the processing when fewer flow files are left in the queue and are always penalized for some reason. Please find below the error screenshot -

14612-replacetext-error-screen-shot.png

1 ACCEPTED SOLUTION

avatar
@Avish Saha

If you right click on the incoming connection a pop-up menu will appear:

14660-screen-shot-2017-04-17-at-100830-am.png

Select List queue, then you can look at the data the ReplaceText is trying to process. It looks like the end of the file being split may have incomplete lines?

View solution in original post

3 REPLIES 3

avatar
@Avish Saha

If you right click on the incoming connection a pop-up menu will appear:

14660-screen-shot-2017-04-17-at-100830-am.png

Select List queue, then you can look at the data the ReplaceText is trying to process. It looks like the end of the file being split may have incomplete lines?

avatar
Contributor

Thank you for the response, it helped. Though one thing I dont get is why ReplaceText waits forever as soon as an error occurs and it penalizes a flow file. Any clues or if anyone has seen this behavior ?

Please advice. Thank you.

avatar
Master Mentor

@Avish Saha

Some processors work in NiFi FlowFiles in batches. In your case one of the FlowFiles is failing to match on the regex which is causing a session roll back of the entire session. Also seeing as how the processor reports 8,000,000+ tasks in the last 5 minutes, it does not look like it is penalizing that one bad FlowFile. While all FlowFiles routed to a "failure" relationship are penalized, this is not true for all processors when a session rollback occurs.