@Override public List<String> getParentUuids() { return event.getParentUuids(); }
@Override public List<String> getParentUuids() { return record.getParentUuids(); }
@Override public List<String> getParentUuids() { return record.getParentUuids(); }
private static String stringify(final ProvenanceEventRecord event, final int index, final long byteOffset) { final StringBuilder sb = new StringBuilder(); sb.append("Event Index in File = ").append(index).append(", Byte Offset = ").append(byteOffset); sb.append("\n\t").append("Event ID = ").append(event.getEventId()); sb.append("\n\t").append("Event Type = ").append(event.getEventType()); sb.append("\n\t").append("Event Time = ").append(new Date(event.getEventTime())); sb.append("\n\t").append("Event UUID = ").append(event.getFlowFileUuid()); sb.append("\n\t").append("Component ID = ").append(event.getComponentId()); sb.append("\n\t").append("Event ID = ").append(event.getComponentType()); sb.append("\n\t").append("Transit URI = ").append(event.getTransitUri()); sb.append("\n\t").append("Parent IDs = ").append(event.getParentUuids()); sb.append("\n\t").append("Child IDs = ").append(event.getChildUuids()); sb.append("\n\t").append("Previous Attributes = ").append(event.getPreviousAttributes()); sb.append("\n\t").append("Updated Attributes = ").append(event.getUpdatedAttributes()); return sb.toString(); } }
@Override public boolean select(final ProvenanceEventRecord event) { if (!isAuthorized(event, user)) { return false; } if (flowFileUuids.contains(event.getFlowFileUuid())) { return true; } for (final String parentId : event.getParentUuids()) { if (flowFileUuids.contains(parentId)) { return true; } } for (final String childId : event.getChildUuids()) { if (flowFileUuids.contains(childId)) { return true; } } return false; } };
for (final String uuid : event.getParentUuids()) { if (pattern.matcher(uuid).matches()) { found = true; continue; } else if (event.getFlowFileUuid().equals(searchValue) || event.getParentUuids().contains(searchValue) || event.getChildUuids().contains(searchValue)) { continue;
for (final String parentUuid : record.getParentUuids()) { LineageNode lastNodeForParent = lastEventMap.get(parentUuid); if (lastNodeForParent != null && !lastNodeForParent.equals(lineageNode)) {
@Override public ComputeLineageSubmission submitExpandParents(final long eventId, final NiFiUser user) { final String userId = user == null ? null : user.getIdentity(); final ProvenanceEventRecord event = getEvent(eventId, user); if (event == null) { final AsyncLineageSubmission submission = new AsyncLineageSubmission(LineageComputationType.EXPAND_PARENTS, eventId, Collections.emptyList(), 1, userId); lineageSubmissionMap.put(submission.getLineageIdentifier(), submission); submission.getResult().update(Collections.emptyList(), 0L); return submission; } switch (event.getEventType()) { case JOIN: case FORK: case REPLAY: case CLONE: return submitLineageComputation(event.getParentUuids(), user, LineageComputationType.EXPAND_PARENTS, eventId); default: { final AsyncLineageSubmission submission = new AsyncLineageSubmission(LineageComputationType.EXPAND_PARENTS, eventId, Collections.emptyList(), 1, userId); lineageSubmissionMap.put(submission.getLineageIdentifier(), submission); submission.getResult().setError("Event ID " + eventId + " indicates an event of type " + event.getEventType() + " so its parents cannot be expanded"); return submission; } } }
case CLONE: case REPLAY: { return submitLineageComputation(event.getParentUuids(), user, authorizer, LineageComputationType.EXPAND_PARENTS, eventId, event.getLineageStartDate(), event.getEventTime());
case CLONE: case REPLAY: return submitLineageComputation(event.getParentUuids(), user, LineageComputationType.EXPAND_PARENTS, eventId, event.getLineageStartDate(), event.getEventTime()); default: { final AsyncLineageSubmission submission = new AsyncLineageSubmission(LineageComputationType.EXPAND_PARENTS, eventId, Collections.<String>emptyList(), 1, userId);
addEventType(eventTypesPerFlowFileId, childUuid, event.getEventType()); for (final String parentUuid : event.getParentUuids()) { addEventType(eventTypesPerFlowFileId, parentUuid, event.getEventType());
writeUUIDs(out, record.getParentUuids()); writeUUIDs(out, record.getChildUuids()); } else if (recordType == ProvenanceEventType.RECEIVE) {
for (final String uuid : record.getParentUuids()) { if (!uuid.equals(record.getFlowFileUuid())) { addField(doc, SearchableFields.FlowFileUUID, uuid);
addField(builder, factory, "parentIds", event.getParentUuids()); addField(builder, factory, "childIds", event.getChildUuids()); addField(builder, "transitUri", event.getTransitUri());
final List<String> parentUuids = new ArrayList<>(event.getParentUuids()); parentUuids.sort(Collator.getInstance(Locale.US)); dto.setParentUuids(parentUuids);
return (int) (event.getLineageStartDate() - startTimeOffset); case EventFieldNames.PARENT_UUIDS: return event.getParentUuids(); case EventFieldNames.PREVIOUS_ATTRIBUTES: return event.getPreviousAttributes();
return event.getLineageStartDate(); case EventFieldNames.PARENT_UUIDS: return event.getParentUuids(); case EventFieldNames.PREVIOUS_ATTRIBUTES: return event.getPreviousAttributes();
sourceSystemFlowFileIdentifier = event.getSourceSystemFlowFileIdentifier(); uuid = event.getFlowFileUuid(); parentUuids = event.getParentUuids(); childrenUuids = event.getChildUuids(); alternateIdentifierUri = event.getAlternateIdentifierUri();
@Override public List<String> getParentUuids() { return record.getParentUuids(); }
addField(builder, factory, "parentIds", event.getParentUuids()); addField(builder, factory, "childIds", event.getChildUuids()); addField(builder, "transitUri", event.getTransitUri());