joewitt commented on code in PR #9171:
URL: https://github.com/apache/nifi/pull/9171#discussion_r1713057112
##########
nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventRecord.java:
##########
@@ -34,6 +35,12 @@ public interface ProvenanceEventRecord {
*/
long getEventId();
+ /**
+ * @return a unique ID for the "parent" Provenance Event, namely the one
that came directly before this event
+ * for the given FlowFile. For source events such as CREATE, this value
should be set to -1
+ */
+ Set<Long> getPreviousEventIds();
Review Comment:
Why choose '-1' as a value to indicate this is the first in a chain rather
than an empty set which would also be consistent with other methods?
What scenario could result in more than one previous event identifier? In
the case this event represents a JOIN then there will have been one to many
parent flow files and we already have those captured as parent flow file
references. That seems correct as the mechanism then to follow the provenance
event trail of those flowfiles already referenced here. Capturing both the
event ids and the parent flowfile references seems unnecessary. If there is no
previousEventIdentifier it should suggest you check the parentFlowFiles to
iterate and follow their provenance path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]