/** * Returns a unique identifier for the record. By default, it uses * {@link ProvenanceEventRecord#getEventId()} but if it has not been persisted to the * repository, this is {@code -1}, so it constructs a String of the format * {@code <event type>_on_<flowfile UUID>_by_<component UUID>_at_<event time>}. * * @return a String identifying the record for later analysis */ @Override public String getBestEventIdentifier() { if (getEventId() != -1) { return Long.toString(getEventId()); } else { return getEventType().name() + "_on_" + getFlowFileUuid() + "_by_" + getComponentId() + "_at_" + getEventTime(); } }
addField(doc, SearchableFields.FlowFileUUID, record.getFlowFileUuid(), Store.NO); addField(doc, SearchableFields.Filename, record.getAttribute(CoreAttributes.FILENAME.key()), Store.NO); addField(doc, SearchableFields.ComponentID, record.getComponentId(), Store.NO); addField(doc, SearchableFields.AlternateIdentifierURI, record.getAlternateIdentifierUri(), Store.NO); addField(doc, SearchableFields.EventType, record.getEventType().name(), Store.NO);
/** * Returns a unique identifier for the record. By default, it uses * {@link ProvenanceEventRecord#getEventId()} but if it has not been persisted to the * repository, this is {@code -1}, so it constructs a String of the format * {@code <event type>_on_<flowfile UUID>_by_<component UUID>_at_<event time>}. * * @return a String identifying the record for later analysis */ @Override public String getBestEventIdentifier() { if (getEventId() != -1) { return Long.toString(getEventId()); } else { return getEventType().name() + "_on_" + getFlowFileUuid() + "_by_" + getComponentId() + "_at_" + getEventTime(); } }