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!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to