[
https://issues.apache.org/jira/browse/NIFI-619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15376899#comment-15376899
]
ASF GitHub Bot commented on NIFI-619:
-------------------------------------
Github user ijokarumawak commented on the issue:
https://github.com/apache/nifi/pull/575
@JPercivall I've updated the PR:
- Rebased and squashed
- Added NodeTypeProvider to expose flowController's isClustered and
isPrimaryNode so that processor can know if it's running on a cluster and if
it's a primary node
- Removed `@OnPrimaryNodeStateChange` because NodeTypeProvider checks
current state so no longer need to be notified
- Updated mock framework accordingly to support cluster/primary node
simulation
- Added Property check regarding Node type
During test, I found a bug and fixed it, too. That is, after
MonitorActivity got `inactive` mode, stop the processor and restart the
processor, then it emits `activity.restored` flow-files immediately. Because
the instance hold `AtomicBoolean inactive` with previous state. I've added a
code to reset it with default value when `@OnScheduled` is called.
Also, added `@OnStopped` to clear persisted state, so that further activity
check won't get affected by the stale state.
The change had been bigger than I originally thought... but
NodeTypeProvider covers what I was trying to accomplish. Please take a look.
Thanks for your support!
> 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)