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 {
|
try {
|
||||||
final ProvenanceEventRecord record = build(flowFile, ProvenanceEventType.SEND).setTransitUri(transitUri).setEventDuration(transmissionMillis).setDetails(details).build();
|
final ProvenanceEventRecord record = build(flowFile, ProvenanceEventType.SEND).setTransitUri(transitUri).setEventDuration(transmissionMillis).setDetails(details).build();
|
||||||
|
|
||||||
|
final ProvenanceEventRecord enriched = eventEnricher.enrich(record, flowFile);
|
||||||
|
|
||||||
if (force) {
|
if (force) {
|
||||||
if (eventEnricher == null) {
|
repository.registerEvent(enriched);
|
||||||
repository.registerEvent(record);
|
|
||||||
} else {
|
} else {
|
||||||
repository.registerEvent(eventEnricher.enrich(record, flowFile));
|
events.add(enriched);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
events.add(record);
|
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to generate Provenance Event due to " + e);
|
logger.error("Failed to generate Provenance Event due to " + e);
|
||||||
|
|
Loading…
Reference in New Issue