mirror of https://github.com/apache/nifi.git
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:
parent
51f564024a
commit
fc2aa2764c
|
@ -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
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue