mirror of https://github.com/apache/nifi.git
NIFI-782: Make sure that FlowFiles' lineage identifiers are propagated properly
This commit is contained in:
parent
bf84ce6608
commit
496ebfb3be
|
@ -2522,7 +2522,9 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE
|
||||||
newAttributes.put(key, value);
|
newAttributes.put(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
fFileBuilder.lineageIdentifiers(parent.getLineageIdentifiers());
|
final Set<String> lineageIdentifiers = new HashSet<>(parent.getLineageIdentifiers());
|
||||||
|
lineageIdentifiers.add(parent.getAttribute(CoreAttributes.UUID.key()));
|
||||||
|
fFileBuilder.lineageIdentifiers(lineageIdentifiers);
|
||||||
fFileBuilder.lineageStartDate(parent.getLineageStartDate());
|
fFileBuilder.lineageStartDate(parent.getLineageStartDate());
|
||||||
fFileBuilder.addAttributes(newAttributes);
|
fFileBuilder.addAttributes(newAttributes);
|
||||||
|
|
||||||
|
@ -2549,6 +2551,7 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE
|
||||||
final Set<String> lineageIdentifiers = new HashSet<>();
|
final Set<String> lineageIdentifiers = new HashSet<>();
|
||||||
for (final FlowFile parent : parents) {
|
for (final FlowFile parent : parents) {
|
||||||
lineageIdentifiers.addAll(parent.getLineageIdentifiers());
|
lineageIdentifiers.addAll(parent.getLineageIdentifiers());
|
||||||
|
lineageIdentifiers.add(parent.getAttribute(CoreAttributes.UUID.key()));
|
||||||
|
|
||||||
final long parentLineageStartDate = parent.getLineageStartDate();
|
final long parentLineageStartDate = parent.getLineageStartDate();
|
||||||
if (lineageStartDate == 0L || parentLineageStartDate < lineageStartDate) {
|
if (lineageStartDate == 0L || parentLineageStartDate < lineageStartDate) {
|
||||||
|
|
Loading…
Reference in New Issue