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

Joe Witt commented on NIP-3:
----------------------------

Good scenario to account for.  Makes sense

> Allow components to be notified when cluster topology changes
> -------------------------------------------------------------
>
>                 Key: NIP-3
>                 URL: https://issues.apache.org/jira/browse/NIP-3
>             Project: NiFi Improvement Proposal
>          Issue Type: New Feature
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Minor
>
> The NiFi API provides several annotations that components can use to have 
> code triggered or to be notified when things occur. A great example is the 
> {{@OnPrimaryNodeChange}} annotation.
> We should provide the ability for components to be notified when the cluster 
> topology changes. That is, when a node is added or removed from the cluster. 
> This should not include when a node's state changes, for example from 
> CONNECTED to DISCONNECTED or vice versa, but only when the nodes that make up 
> the cluster change.
> The reasoning behind this is for cases in which data is load balanced across 
> the cluster using an "Attribute Name." When the cluster topology changes, it 
> is possible that data with attribute {{a=123}} will no longer go to Node 1 
> but now go to Node 2. When this happens, Processors, Controller Services, 
> etc. may need to be notified of this in order to cleanup resources. For 
> example, a Processor may need to invalidate an internal cache data that 
> corresponded to {{a=123}} may be outdated, since the data may have moved to 
> another node and now back, etc.
> This will require adding a new annotation to the nifi-api that is scoped the 
> same as {{@OnPrimaryNodeChange}} (i.e., it has a Target of METHOD, a 
> Retention of RUNTIME, and is {{{}@Inherited{}}}). It will also require an 
> update to the framework to call the methods when appropriate.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to