Alan Jackoway created NIFI-7426:
-----------------------------------
Summary: ReplaceText Line-by-Line Does Not Respect Maximum Buffer
Size
Key: NIFI-7426
URL: https://issues.apache.org/jira/browse/NIFI-7426
Project: Apache NiFi
Issue Type: Improvement
Affects Versions: 1.11.4
Reporter: Alan Jackoway
Attachments: LineByLineBuffer.xml
According to the docs on Maximum Buffer Size:
{quote}Specifies the maximum amount of data to buffer (per file or per line,
depending on the Evaluation Mode) in order to apply the replacement. If 'Entire
Text' (in Evaluation Mode) is selected and the FlowFile is larger than this
value, the FlowFile will be routed to 'failure'. In 'Line-by-Line' Mode, if a
single line is larger than this value, the FlowFile will be routed to 'failure'.
{quote}
While working on NIFI-7425, I wanted to see if the single line larger than the
buffer case resulted in an error message that I could reuse when the entire
text didn't fit in the buffer.
A far as I can tell, it is not the case that a single line larger than the
buffer in line-by-line mode will send the file to the failure relationship. Or
at least not with small values of the buffer. It may be different when the max
buffer size is larger than the 8KB INIT_BUFFER_SIZE in AbstractTextDemarcator.
We should either change the docs to reflect how that parameter is used in
line-by-line mode, or change the code to work the way the docs say.
I attached a template from 1.11.4 where the buffer size is 5 bytes, but a file
with longer lines makes it through.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)