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

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

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

    https://github.com/apache/nifi/pull/575#discussion_r70645469
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MonitorActivity.java
 ---
    @@ -168,17 +216,49 @@ public void onTrigger(final ProcessContext context, 
final ProcessSession session
             final long now = System.currentTimeMillis();
     
             final ComponentLog logger = getLogger();
    +        final String monitoringScope = 
context.getProperty(MONITORING_SCOPE).getValue();
    +        final boolean copyAttributes = 
context.getProperty(COPY_ATTRIBUTES).asBoolean();
    +        final boolean isClusterScope = 
SCOPE_CLUSTER.equals(monitoringScope);
             final List<FlowFile> flowFiles = session.get(50);
    +
    +        boolean isInactive = false;
    +        long updatedLatestSuccessTransfer = -1;
    +        StateMap clusterState = null;
    +        final boolean shouldThisNodeReport = !isClusterScope
    --- End diff --
    
    I like the change to add the ability to report on the primary node or all. 
That said, this check should probably be moved to a function that is used 
before each time it would report. Since the primary node change could happen at 
any time this function should wait to do the check to try and prevent two nodes 
from each sending a message.


> update MonitorActivity processor to be cluster friendly
> -------------------------------------------------------
>
>                 Key: NIFI-619
>                 URL: https://issues.apache.org/jira/browse/NIFI-619
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Brandon DeVries
>            Assignee: Koji Kawamura
>            Priority: Minor
>             Fix For: 1.0.0
>
>
> This processor should be able to be used to monitor activity across the 
> cluster.  In its current state, alerting is based on activity of a single 
> node, not the entire cluster.
> For example, in a 2 node cluster, if system A is getting data from a given 
> flow and system B is not, system B will alert for lack of activity even 
> though the flow is functioning "normally".
> The ideal behavior would be fore an alert to be generated only if both 
> systems did not see data in the specified time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to