public interface ProvenanceRepository extends ProvenanceEventRepository
| Modifier and Type | Method and Description |
|---|---|
long |
getContainerCapacity(String containerName) |
String |
getContainerFileStoreName(String containerName)
Returns the name of the FileStore that the given container is stored on, or
null
if not applicable or unable to determine the file store name |
Set<String> |
getContainerNames() |
long |
getContainerUsableSpace(String containerName) |
ProvenanceEventRecord |
getEvent(long id,
NiFiUser user)
Retrieves the Provenance Event with the given ID.
|
List<ProvenanceEventRecord> |
getEvents(long firstRecordId,
int maxRecords,
NiFiUser user)
Returns a List of all
ProvenanceEventRecords in the
repository starting with the given ID. |
Optional<ProvenanceEventRecord> |
getLatestCachedEvent(String componentId)
Retrieves the most recent Provenance Event that is cached for the given component that is also accessible by the given user
|
ProvenanceEventRepository |
getProvenanceEventRepository() |
List<SearchableField> |
getSearchableAttributes() |
List<SearchableField> |
getSearchableFields() |
void |
initialize(EventReporter eventReporter,
Authorizer authorizer,
ProvenanceAuthorizableFactory resourceFactory,
IdentifierLookup identifierLookup)
Performs any initialization needed.
|
ComputeLineageSubmission |
retrieveLineageSubmission(String lineageIdentifier,
NiFiUser user) |
QuerySubmission |
retrieveQuerySubmission(String queryIdentifier,
NiFiUser user) |
ComputeLineageSubmission |
submitExpandChildren(long eventId,
NiFiUser user)
Submits a request to expand the children of the event with the given id.
|
ComputeLineageSubmission |
submitExpandParents(long eventId,
NiFiUser user)
Submits a request to expand the parents of the event with the given id.
|
ComputeLineageSubmission |
submitLineageComputation(long eventId,
NiFiUser user)
Submits a Lineage Computation to be completed and returns the
AsynchronousLineageResult that indicates the status of the request and
the results, if the computation is complete.
|
ComputeLineageSubmission |
submitLineageComputation(String flowFileUuid,
NiFiUser user)
Submits a Lineage Computation to be completed and returns the
AsynchronousLineageResult that indicates the status of the request and
the results, if the computation is complete.
|
QuerySubmission |
submitQuery(Query query,
NiFiUser user)
Submits an asynchronous request to process the given query, returning an
identifier that can be used to fetch the results at a later time
|
close, eventBuilder, getEvent, getEvents, getMaxEventId, registerEvent, registerEventsvoid initialize(EventReporter eventReporter, Authorizer authorizer, ProvenanceAuthorizableFactory resourceFactory, IdentifierLookup identifierLookup) throws IOException
eventReporter - to report toauthorizer - the authorizer to use for authorizing individual eventsresourceFactory - the resource factory to use for generating Provenance Resource objects for authorization purposesidentifierLookup - a mechanism for looking up identifiers in the flowIOException - if unable to initializeProvenanceEventRecord getEvent(long id, NiFiUser user) throws IOException
id - to lookupuser - The NiFi user that the event should be authorized against.
It can be null if called by NiFi components internally where authorization is not required.null otherwiseIOException - if failure while retrieving eventList<ProvenanceEventRecord> getEvents(long firstRecordId, int maxRecords, NiFiUser user) throws IOException
ProvenanceEventRecords in the
repository starting with the given ID. The first ID in the repository
will always be 0 or higher. Each event that is found will be authorized
against the given NiFiUser. If the user does not have authorization for
the event, the event will not be returned.firstRecordId - id of the first record to retrievemaxRecords - maximum number of records to retrieveuser - The NiFi user that the events should be authorized against.
It can be null if called by NiFi components internally
where authorization is not required.IOException - if error reading from repositoryProvenanceEventRepository getProvenanceEventRepository()
ProvenanceEventRepository backing this ProvenanceRepositoryQuerySubmission submitQuery(Query query, NiFiUser user)
query - to submituser - The NiFi User to authorize the events against.
It can be null if called by NiFi components internally where authorization is not required.Optional<ProvenanceEventRecord> getLatestCachedEvent(String componentId) throws IOException
componentId - the ID of the componentIOException - if unable to read from the repositoryQuerySubmission retrieveQuerySubmission(String queryIdentifier, NiFiUser user)
queryIdentifier - of the queryuser - The user who is retrieving the query.
It can be null if the request was made by NiFi components internally where authorization is not required.
If the queried user and the retrieved user do not match, AccessDeniedException will be thrown.nullComputeLineageSubmission submitLineageComputation(String flowFileUuid, NiFiUser user)
flowFileUuid - the UUID of the FlowFile for which the Lineage should
be calculateduser - The NiFi User to authorize the events against.
It can be null if called by NiFi components internally where authorization is not required.ComputeLineageSubmission object that can be used to
check if the computing is complete and if so get the resultsComputeLineageSubmission submitLineageComputation(long eventId, NiFiUser user)
submitLineageComputation(String, NiFiUser) because
it is much more efficient, but the former may be used if a particular Event ID is not
available.eventId - the numeric ID of the event that the lineage is foruser - The NiFi User to authorize the events against.
It can be null if called by NiFi components internally where authorization is not required.ComputeLineageSubmission object that can be used to
check if the computing is complete and if so get the resultsComputeLineageSubmission retrieveLineageSubmission(String lineageIdentifier, NiFiUser user)
lineageIdentifier - identifier of lineage to computeuser - The user who is retrieving the lineage submission.
It can be null if the request was made by NiFi components internally where authorization is not required.
If the queried user and the retrieved user do not match, AccessDeniedException will be thrown.ComputeLineageSubmission associated with the given
identifierComputeLineageSubmission submitExpandParents(long eventId, NiFiUser user)
eventId - the one-up id of the Event to expanduser - The NiFi user to authorize events against.
It can be null if called by NiFi components internally where authorization is not required.IllegalArgumentException - if the given identifier identifies a
Provenance Event that has a Type that is not expandable or if the
identifier cannot be foundComputeLineageSubmission submitExpandChildren(long eventId, NiFiUser user)
eventId - the one-up id of the Eventuser - The NiFi user to authorize events against.
It can be null if called by NiFi components internally where authorization is not required.IllegalArgumentException - if the given identifier identifies a
Provenance Event that has a Type that is not expandable or if the
identifier cannot be foundList<SearchableField> getSearchableFields()
submitQuery(Query, NiFiUser) methodList<SearchableField> getSearchableAttributes()
submitQuery(Query, NiFiUser) methodSet<String> getContainerNames()
long getContainerCapacity(String containerName) throws IOException
containerName - name of container to check capacity onIOException - if unable to check capacityIllegalArgumentException - if no container exists with the given
nameString getContainerFileStoreName(String containerName)
null
if not applicable or unable to determine the file store namecontainerName - the name of the containerlong getContainerUsableSpace(String containerName) throws IOException
containerName - to check space onIOException - if unable to check spaceIllegalArgumentException - if no container exists with the given
nameCopyright © 2023 Apache NiFi Project. All rights reserved.