You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Peter Radden (JIRA)" <ji...@apache.org> on 2018/05/04 10:38:00 UTC
[jira] [Created] (NIFI-5150) ProcessSession.append resulting in
content from wrong FlowFile
Peter Radden created NIFI-5150:
----------------------------------
Summary: ProcessSession.append resulting in content from wrong FlowFile
Key: NIFI-5150
URL: https://issues.apache.org/jira/browse/NIFI-5150
Project: Apache NiFi
Issue Type: Bug
Components: Core Framework
Affects Versions: 1.6.0, 1.5.0
Reporter: Peter Radden
Consider the following two processors with these simple implementations:
Processor1:
{quote}
{code:java}
FlowFile ffa = session.create();
ffa = session.write(ffa, (out) -> out.write('A'));
session.transfer(ffa, REL_SUCCESS);
FlowFile ffb = session.create();
ffb = session.write(ffb, (out) -> out.write('B'));
session.transfer(ffb, REL_SUCCESS);{code}
{quote}
Processor2:
{quote}
{code:java}
FlowFile ff = session.get();
ff = session.append(ff, (out) -> out.write('C'));
session.transfer(ff, REL_SUCCESS);{code}
{quote}
Processor2 is connected to the Success relationship of Processor1.
After Processor1 has been triggered, the connecting queue should have two FlowFiles with content "A" and "B". This is correct, and they seem to have the same Content Claim identifier with offsets 1 byte apart, and size also 1 byte.
After Processor2, the expected contents are "AC" and "BC".
In fact, both flowfiles are 3 bytes in size with contents "ABC".
This suggests that the claim offset and size are not applied correctly when using ProcessSession.append.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)