Github user JPercivall commented on a diff in the pull request:
https://github.com/apache/nifi/pull/575#discussion_r70739419
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MonitorActivity.java
---
@@ -234,4 +361,10 @@ public void process(final OutputStream out) throws
IOException {
}
}
}
+
+ @OnPrimaryNodeStateChange
+ public void onPrimaryNodeChange(final PrimaryNodeState newState) {
+ isPrimaryNode = (newState ==
PrimaryNodeState.ELECTED_PRIMARY_NODE);
--- End diff --
(adding for transparency) @ijokarumawak and I talked out of band. Current
thinking is to add another variable to the Initialization Contexts in order to
know when the component is created if it is clustered or not and if it is on
the primary node.
---
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.
---