[
https://issues.apache.org/jira/browse/NIFI-2267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16053383#comment-16053383
]
Calvin Pietersen commented on NIFI-2267:
----------------------------------------
I see this has now been resolved for Processors with the getNodeTypeProvider on
ProcessorInitializationContext. What about Controller Services? Can we add this
to the ControllerServiceInitializationContext? I need to be able to determine
from a controller service if it is running on the Primary node.
> Provide a way for Processor to determine running NiFi node type -
> standalone/clustered, primary/node
> ----------------------------------------------------------------------------------------------------
>
> Key: NIFI-2267
> URL: https://issues.apache.org/jira/browse/NIFI-2267
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Affects Versions: 1.0.0
> Reporter: Koji Kawamura
> Assignee: Koji Kawamura
> Fix For: 1.0.0, 1.0.0-Beta
>
>
> Currently, there's no way for processor to understand if it's running on:
> - Standalone or Cluster?
> - If in a cluster, is it a Primary node or not?
> There're processors that need this information to provide more cluster
> friendly behavior, such as MonitorActivity.
> @OnPrimaryNodeStateChange annotation is already available. However, it's
> notified only when a primary node has been changed. So, If a processor is
> added to an existing NiFi cluster, which has already one node elected as a
> primary node, the processor is not notified, thus it won't be able to know
> it's a primary node.
> This ticket is meant for tracking the effort of adding such capability to
> provide node type information.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)