mirror of https://github.com/apache/nifi.git
Update BinFiles not to write attributes to FlowFiles for auto-terminated ORIGINAL relationship
Signed-off-by: Matt Burgess <mattyb149@apache.org> This closes #8911
This commit is contained in:
parent
f9aefc2d5e
commit
5e3f1dbaf6
|
@ -252,7 +252,9 @@ public abstract class BinFiles extends AbstractSessionFactoryProcessor {
|
|||
// If this bin's session has been committed, move on.
|
||||
if (!binProcessingResult.isCommitted()) {
|
||||
final ProcessSession binSession = bin.getSession();
|
||||
bin.getContents().forEach(ff -> binSession.putAllAttributes(ff, binProcessingResult.getAttributes()));
|
||||
if (!context.isAutoTerminated(REL_ORIGINAL)) {
|
||||
bin.getContents().forEach(ff -> binSession.putAllAttributes(ff, binProcessingResult.getAttributes()));
|
||||
}
|
||||
binSession.transfer(bin.getContents(), REL_ORIGINAL);
|
||||
binSession.commitAsync();
|
||||
}
|
||||
|
|
|
@ -527,7 +527,9 @@ public class JoinEnrichment extends BinFiles {
|
|||
// If this bin's session has been committed, move on.
|
||||
if (!binProcessingResult.isCommitted()) {
|
||||
final ProcessSession binSession = bin.getSession();
|
||||
bin.getContents().forEach(ff -> binSession.putAllAttributes(ff, binProcessingResult.getAttributes()));
|
||||
if (!context.isAutoTerminated(REL_ORIGINAL)) {
|
||||
bin.getContents().forEach(ff -> binSession.putAllAttributes(ff, binProcessingResult.getAttributes()));
|
||||
}
|
||||
binSession.transfer(bin.getContents(), REL_ORIGINAL);
|
||||
|
||||
// Migrate FlowFiles to our batch session. Then commit the bin session to free up any resources
|
||||
|
|
Loading…
Reference in New Issue