mirror of https://github.com/apache/nifi.git
NIFI-174: Always 'enrich' the Provenance SEND event, regardless of whether or not we are commiting ot he repository immediately
This commit is contained in:
parent
05cc6f045d
commit
7589ad356e
|
@ -159,14 +159,12 @@ public class StandardProvenanceReporter implements ProvenanceReporter {
|
|||
try {
|
||||
final ProvenanceEventRecord record = build(flowFile, ProvenanceEventType.SEND).setTransitUri(transitUri).setEventDuration(transmissionMillis).setDetails(details).build();
|
||||
|
||||
final ProvenanceEventRecord enriched = eventEnricher.enrich(record, flowFile);
|
||||
|
||||
if (force) {
|
||||
if (eventEnricher == null) {
|
||||
repository.registerEvent(record);
|
||||
repository.registerEvent(enriched);
|
||||
} else {
|
||||
repository.registerEvent(eventEnricher.enrich(record, flowFile));
|
||||
}
|
||||
} else {
|
||||
events.add(record);
|
||||
events.add(enriched);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to generate Provenance Event due to " + e);
|
||||
|
|
Loading…
Reference in New Issue