You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Ilya Kovalev (Jira)" <ji...@apache.org> on 2021/01/14 20:05:00 UTC

[jira] [Created] (NIFI-8141) errorHandlingOutputStream don't close inner output stream

Ilya Kovalev created NIFI-8141:
----------------------------------

             Summary: errorHandlingOutputStream don't close inner output stream
                 Key: NIFI-8141
                 URL: https://issues.apache.org/jira/browse/NIFI-8141
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
            Reporter: Ilya Kovalev


Try to execute below groovy script 

 
{code:java}
FlowFile ff = session.get()
OutputStream os = session.write(ff)
os.write("1".getBytes("UTF-8"))
os.flush()
os.close()

session.transfer(ff, REL_SUCCESS)

os.write("2".getBytes("UTF-8"))
os.flush()
os.close(){code}
in success queue you find 1 flowfile with 1 byte size but in content repository you can find 
file with content "12"
In this way NiFi write all content after stream was closed but not claim it.

write(ff) in MockProcessSession has the same problem.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)