ProvenanceEventRecord.getSourceQueueIdentifier
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.apache.nifi.provenance.ProvenanceEventRecord.getSourceQueueIdentifier (Showing top 13 results out of 315)

origin: apache/nifi

@Override
public String getSourceQueueIdentifier() {
  return record.getSourceQueueIdentifier();
}
origin: apache/nifi

@Override
public String getSourceQueueIdentifier() {
  return event.getSourceQueueIdentifier();
}
origin: apache/nifi

if (event.getSourceQueueIdentifier() == null) {
  return "Cannot replay data from Provenance Event because the event does not specify the Source FlowFile Queue";
FlowFileQueue queue = null;
for (final Connection connection : connections) {
  if (event.getSourceQueueIdentifier().equals(connection.getIdentifier())) {
    queue = connection.getFlowFileQueue();
    break;
  return "Cannot replay data from Provenance Event because the Source FlowFile Queue with ID " + event.getSourceQueueIdentifier() + " no longer exists";
origin: apache/nifi

/**
 * Authorizes access to replay for a specified provenance event.
 *
 * @param event event
 */
private void authorizeReplay(final ProvenanceEventRecord event) {
  // if the connection id isn't specified, then the replay wouldn't be available anyways and we have nothing to authorize against so deny it`
  if (event.getSourceQueueIdentifier() == null) {
    throw new AccessDeniedException("The connection id in the provenance event is unknown.");
  }
  final NiFiUser user = NiFiUserUtils.getNiFiUser();
  final Authorizable dataAuthorizable = getDataAuthorizable(event);
  // ensure we can read and write the data
  final Map<String, String> eventAttributes = event.getAttributes();
  dataAuthorizable.authorize(authorizer, RequestAction.READ, user, eventAttributes);
  dataAuthorizable.authorize(authorizer, RequestAction.WRITE, user, eventAttributes);
}
origin: apache/nifi

writeNullableString(out, record.getSourceQueueIdentifier(), "SourceQueueIdentifier");
origin: apache/nifi

/**
 * Authorizes access to replay a specified provenance event. Whether to check read data permission can be specified. The context this
 * method is invoked may have already verified these permissions. Using a flag here as it forces the caller to acknowledge this fact
 * limiting the possibility of overlooking it.
 *
 * @param event event
 * @param checkReadDataPermissions whether to verify read data permissions
 */
private AuthorizationResult checkAuthorizationForReplay(final ProvenanceEventRecord event, final boolean checkReadDataPermissions) {
  // if the connection id isn't specified, then the replay wouldn't be available anyways and we have nothing to authorize against so deny it`
  if (event.getSourceQueueIdentifier() == null) {
    return AuthorizationResult.denied("The connection id in the provenance event is unknown.");
  }
  final NiFiUser user = NiFiUserUtils.getNiFiUser();
  final Authorizable dataAuthorizable = getDataAuthorizable(event);
  final Map<String, String> eventAttributes = event.getAttributes();
  if (checkReadDataPermissions) {
    // ensure we can read the data
    final AuthorizationResult result = dataAuthorizable.checkAuthorization(authorizer, RequestAction.READ, user, eventAttributes);
    if (!Result.Approved.equals(result.getResult())) {
      return result;
    }
  }
  // ensure we can write the data; read the data should have been checked already
  return dataAuthorizable.checkAuthorization(authorizer, RequestAction.WRITE, user, eventAttributes);
}
origin: apache/nifi

if (event.getSourceQueueIdentifier() == null) {
  throw new IllegalArgumentException("Cannot replay data from Provenance Event because the event does not specify the Source FlowFile Queue");
FlowFileQueue queue = null;
for (final Connection connection : connections) {
  if (event.getSourceQueueIdentifier().equals(connection.getIdentifier())) {
    queue = connection.getFlowFileQueue();
    break;
  throw new IllegalStateException("Cannot replay data from Provenance Event because the Source FlowFile Queue with ID " + event.getSourceQueueIdentifier() + " no longer exists");
origin: apache/nifi

addField(doc, SearchableFields.ContentClaimContainer, record.getContentClaimContainer());
addField(doc, SearchableFields.ContentClaimIdentifier, record.getContentClaimIdentifier());
addField(doc, SearchableFields.SourceQueueIdentifier, record.getSourceQueueIdentifier());
addField(doc, SearchableFields.TransitURI, record.getTransitUri());
origin: apache/nifi

  dto.setReplayExplanation(contentAvailability.isReplayable()
      && !Result.Approved.equals(replayAuthorized.getResult()) ? replayAuthorized.getExplanation() : contentAvailability.getReasonNotReplayable());
  dto.setSourceConnectionIdentifier(event.getSourceQueueIdentifier());
} else {
  dto.setReplayAvailable(false);
origin: apache/nifi

  return event.getRelationship();
case EventFieldNames.SOURCE_QUEUE_IDENTIFIER:
  return createLookupValue(event.getSourceQueueIdentifier(), queueIdMap);
case EventFieldNames.SOURCE_SYSTEM_FLOWFILE_IDENTIFIER:
  return event.getSourceSystemFlowFileIdentifier();
origin: apache/nifi

  return event.getRelationship();
case EventFieldNames.SOURCE_QUEUE_IDENTIFIER:
  return event.getSourceQueueIdentifier();
case EventFieldNames.SOURCE_SYSTEM_FLOWFILE_IDENTIFIER:
  return event.getSourceSystemFlowFileIdentifier();
origin: apache/nifi

previousSize = event.getPreviousFileSize();
sourceQueueIdentifier = event.getSourceQueueIdentifier();
origin: org.apache.nifi/nifi-data-provenance-utils

previousSize = event.getPreviousFileSize();
sourceQueueIdentifier = event.getSourceQueueIdentifier();
org.apache.nifi.provenanceProvenanceEventRecordgetSourceQueueIdentifier

Popular methods of ProvenanceEventRecord

  • getEventId
  • getComponentId
  • getComponentType
  • getEventType
  • getFlowFileUuid
  • getTransitUri
  • getChildUuids
  • getEventDuration
  • getFileSize
  • getLineageStartDate
  • getParentUuids
  • getPreviousAttributes
  • getParentUuids,
  • getPreviousAttributes,
  • getPreviousFileSize,
  • getAlternateIdentifierUri,
  • getAttributes,
  • getDetails,
  • getEventTime,
  • getSourceSystemFlowFileIdentifier,
  • getUpdatedAttributes,
  • getContentClaimContainer

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)