Merge pull request #4119 from eduardofontes/patch-4

NIFI-7233 - Fix Mongo Processors to avoid cycle in provenance graph
This commit is contained in:
Mike 2020-03-08 13:18:12 -04:00 committed by GitHub
commit a33a5e35b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -347,7 +347,9 @@ public abstract class AbstractMongoProcessor extends AbstractProcessor {
FlowFile flowFile = parent != null ? session.create(parent) : session.create();
flowFile = session.importFrom(new ByteArrayInputStream(payload.getBytes(charset)), flowFile);
flowFile = session.putAllAttributes(flowFile, extraAttributes);
session.getProvenanceReporter().receive(flowFile, getURI(context));
if (parent == null) {
session.getProvenanceReporter().receive(flowFile, getURI(context));
}
session.transfer(flowFile, rel);
}