mirror of
https://github.com/apache/nifi.git
synced 2025-02-16 23:15:36 +00:00
NIFI-647: When FORK Event emitted by processor, Framework generates CREATE events for each child in addition to the FORK event; this commit fixes that bug
This commit is contained in:
parent
310ae3ebcd
commit
9fbd88f034
@ -519,9 +519,13 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE
|
|||||||
updateEventContentClaims(builder, flowFile, checkpoint.records.get(flowFile));
|
updateEventContentClaims(builder, flowFile, checkpoint.records.get(flowFile));
|
||||||
final ProvenanceEventRecord event = builder.build();
|
final ProvenanceEventRecord event = builder.build();
|
||||||
|
|
||||||
if (!event.getChildUuids().isEmpty() && !isSpuriousForkEvent(event, checkpoint.removedFlowFiles) && !processorGenerated.contains(event)) {
|
if (!event.getChildUuids().isEmpty() && !isSpuriousForkEvent(event, checkpoint.removedFlowFiles)) {
|
||||||
|
// If framework generated the event, add it to the 'recordsToSubmit' Set.
|
||||||
|
if (!processorGenerated.contains(event)) {
|
||||||
recordsToSubmit.add(event);
|
recordsToSubmit.add(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Register the FORK event for each child and each parent.
|
||||||
for (final String childUuid : event.getChildUuids()) {
|
for (final String childUuid : event.getChildUuids()) {
|
||||||
addEventType(eventTypesPerFlowFileId, childUuid, event.getEventType());
|
addEventType(eventTypesPerFlowFileId, childUuid, event.getEventType());
|
||||||
}
|
}
|
||||||
@ -536,13 +540,12 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE
|
|||||||
if (isSpuriousForkEvent(event, checkpoint.removedFlowFiles)) {
|
if (isSpuriousForkEvent(event, checkpoint.removedFlowFiles)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (isSpuriousRouteEvent(event, checkpoint.records)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the event indicates that the FlowFile was routed to the same
|
// Check if the event indicates that the FlowFile was routed to the same
|
||||||
// connection from which it was pulled (and only this connection). If so, discard the event.
|
// connection from which it was pulled (and only this connection). If so, discard the event.
|
||||||
isSpuriousRouteEvent(event, checkpoint.records);
|
if (isSpuriousRouteEvent(event, checkpoint.records)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
recordsToSubmit.add(event);
|
recordsToSubmit.add(event);
|
||||||
addEventType(eventTypesPerFlowFileId, event.getFlowFileUuid(), event.getEventType());
|
addEventType(eventTypesPerFlowFileId, event.getFlowFileUuid(), event.getEventType());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user