@Override public void registerEvent(final ProvenanceEventRecord event) { final StandardProvenanceEventRecord newRecord; if (event instanceof StandardProvenanceEventRecord) { newRecord = (StandardProvenanceEventRecord) event; } else { newRecord = new StandardProvenanceEventRecord.Builder().fromEvent(event).build(); } newRecord.setEventId(idGenerator.getAndIncrement()); records.add(newRecord); }
private StandardProvenanceEventRecord truncateAttributes(final StandardProvenanceEventRecord original) { boolean requireTruncation = false; for (final String updatedAttr : original.getUpdatedAttributes().values()) { if (updatedAttr != null && updatedAttr.length() > maxAttributeChars) { requireTruncation = true; break; } } if (!requireTruncation) { for (final String previousAttr : original.getPreviousAttributes().values()) { if (previousAttr != null && previousAttr.length() > maxAttributeChars) { requireTruncation = true; break; } } } if (!requireTruncation) { return original; } final StandardProvenanceEventRecord.Builder builder = new StandardProvenanceEventRecord.Builder().fromEvent(original); builder.setAttributes(truncateAttributes(original.getPreviousAttributes()), truncateAttributes(original.getUpdatedAttributes())); final StandardProvenanceEventRecord truncated = builder.build(); truncated.setEventId(original.getEventId()); return truncated; }
builder.setStorageLocation(getFilename(), startOffset); final StandardProvenanceEventRecord record = builder.build(); record.setEventId(eventId); return record;
private StandardProvenanceEventRecord truncateAttributes(final StandardProvenanceEventRecord original) { boolean requireTruncation = false; for (final String updatedAttr : original.getUpdatedAttributes().values()) { if (updatedAttr != null && updatedAttr.length() > maxAttributeChars) { requireTruncation = true; break; } } if (!requireTruncation) { for (final String previousAttr : original.getPreviousAttributes().values()) { if (previousAttr != null && previousAttr.length() > maxAttributeChars) { requireTruncation = true; break; } } } if (!requireTruncation) { return original; } final StandardProvenanceEventRecord.Builder builder = new StandardProvenanceEventRecord.Builder().fromEvent(original); builder.setAttributes(truncateAttributes(original.getPreviousAttributes()), truncateAttributes(original.getUpdatedAttributes())); final StandardProvenanceEventRecord truncated = builder.build(); truncated.setEventId(original.getEventId()); return truncated; }
@Override public void registerEvent(final ProvenanceEventRecord event) { final StandardProvenanceEventRecord newRecord; if (event instanceof StandardProvenanceEventRecord) { newRecord = (StandardProvenanceEventRecord) event; } else { newRecord = new StandardProvenanceEventRecord.Builder().fromEvent(event).build(); } newRecord.setEventId(idGenerator.getAndIncrement()); records.add(newRecord); }
.setComponentType(event.getComponentType()) .setComponentId(event.getComponentId()) .build(); provenanceRepository.registerEvent(replayEvent);
return builder.build();
final StandardProvenanceEventRecord record = builder.build(); record.setEventId(eventId); return record;
return builder.build();
.setComponentId(flowManager.getRootGroupId()) .setDetails("Download of " + (direction == ContentDirection.INPUT ? "Input" : "Output") + " Content requested by " + requestor + " for Provenance Event " + provEvent.getEventId()) .build();
final ProvenanceEventRecord sendEvent = sendEventBuilder.build(); provenanceRepository.registerEvent(sendEvent); return stream;
recordBuilder.setEventDuration(TimeUnit.NANOSECONDS.toMillis(commitNanos - repoRecord.getStartNanos())); return recordBuilder.build();
return recordBuilder.build();