[ 
https://issues.apache.org/jira/browse/NIFI-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16542314#comment-16542314
 ] 

ASF GitHub Bot commented on NIFI-5420:
--------------------------------------

Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2886#discussion_r202205608
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProvenanceReporter.java
 ---
    @@ -226,7 +228,7 @@ public void send(final FlowFile flowFile, final String 
transitUri, final String
     
         @Override
         public void send(final FlowFile flowFile, final String transitUri, 
final boolean force) {
    -        send(flowFile, transitUri, -1L, true);
    +        send(flowFile, transitUri, -1L, force);
    --- End diff --
    
    This one I fixed while I was in there, the only thing that calls it is 
InvokeHttp which passes in true, so it hasn't been a bug, but it could be some 
day :P


> Allow StandardProcessSession to calculate duration for provenance events
> ------------------------------------------------------------------------
>
>                 Key: NIFI-5420
>                 URL: https://issues.apache.org/jira/browse/NIFI-5420
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>            Priority: Major
>
> Besides some automatic provenance events being emitted by the framework, the 
> onus is on each processor to register provenance events and to provide a 
> duration for the amount of time spent on the operation that results in the 
> provenance event(s). However, supplying the duration is not mandatory, and if 
> not provided, a value of -1 is stored to indicate that the duration is 
> unknown.
> Unfortunately there are many processors that do not track the operation time 
> and thus do not store it in the provenance event. However, the time from when 
> a flow file is fetched or created in a session to the time the provenance 
> event is recorded is a legitimate measure of the time the flow file spent 
> "active" in the session, which is the same as the duration of a provenance 
> event.
> This Jira proposes to record the "start" time of each flow file (more 
> specifically, it's StandardRepositoryRecord), and upon session.commit(), 
> record the duration of the flow file while active in the session into the 
> provenance event(s), only if the duration has not already been supplied to 
> the provenance events.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to