NIFI-10: Added FETCH and DOWNLOAD Provenance Events; updated FlowController to use DOWNLOAD event instead of SEND whenever a user downloads/views content via Provenance Event

This commit is contained in:
Mark Payne 2015-10-25 11:53:46 -04:00
parent 51f564024a
commit fc2aa2764c
2 changed files with 69 additions and 66 deletions

View File

@ -46,6 +46,11 @@ public enum ProvenanceEventType {
*/ */
SEND, SEND,
/**
* Indicates that the contents of a FlowFile were downloaded by a user or external entity.
*/
DOWNLOAD,
/** /**
* Indicates a provenance event for the conclusion of an object's life for * Indicates a provenance event for the conclusion of an object's life for
* some reason other than object expiration * some reason other than object expiration

View File

@ -3180,7 +3180,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
// Register a Provenance Event to indicate that we replayed the data. // Register a Provenance Event to indicate that we replayed the data.
final ProvenanceEventRecord sendEvent = new StandardProvenanceEventRecord.Builder() final ProvenanceEventRecord sendEvent = new StandardProvenanceEventRecord.Builder()
.setEventType(ProvenanceEventType.SEND) .setEventType(ProvenanceEventType.DOWNLOAD)
.setFlowFileUUID(provEvent.getFlowFileUuid()) .setFlowFileUUID(provEvent.getFlowFileUuid())
.setAttributes(provEvent.getAttributes(), Collections.<String, String> emptyMap()) .setAttributes(provEvent.getAttributes(), Collections.<String, String> emptyMap())
.setCurrentContentClaim(resourceClaim.getContainer(), resourceClaim.getSection(), resourceClaim.getId(), offset, size) .setCurrentContentClaim(resourceClaim.getContainer(), resourceClaim.getSection(), resourceClaim.getId(), offset, size)
@ -3436,9 +3436,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
LOG.debug( LOG.debug(
String.format( String.format(
"Sending bulletins to cluster manager at %s", "Sending bulletins to cluster manager at %s",
dateFormatter.format(new Date()) dateFormatter.format(new Date())));
)
);
} }
} catch (final UnknownServiceAddressException usae) { } catch (final UnknownServiceAddressException usae) {