Search in sources :

Example 1 with LeaderElectionManager

use of org.apache.nifi.controller.leader.election.LeaderElectionManager in project nifi by apache.

the class NodeClusterCoordinatorFactoryBean method getObject.

@Override
public NodeClusterCoordinator getObject() throws Exception {
    if (nodeClusterCoordinator == null && properties.isNode()) {
        final ClusterCoordinationProtocolSenderListener protocolSenderListener = applicationContext.getBean("clusterCoordinationProtocolSenderListener", ClusterCoordinationProtocolSenderListener.class);
        final EventReporter eventReporter = applicationContext.getBean("eventReporter", EventReporter.class);
        final ClusterNodeFirewall clusterFirewall = applicationContext.getBean("clusterFirewall", ClusterNodeFirewall.class);
        final RevisionManager revisionManager = applicationContext.getBean("revisionManager", RevisionManager.class);
        final LeaderElectionManager electionManager = applicationContext.getBean("leaderElectionManager", LeaderElectionManager.class);
        final FlowElection flowElection = applicationContext.getBean("flowElection", FlowElection.class);
        final NodeProtocolSender nodeProtocolSender = applicationContext.getBean("nodeProtocolSender", NodeProtocolSender.class);
        nodeClusterCoordinator = new NodeClusterCoordinator(protocolSenderListener, eventReporter, electionManager, flowElection, clusterFirewall, revisionManager, properties, nodeProtocolSender);
    }
    return nodeClusterCoordinator;
}
Also used : NodeProtocolSender(org.apache.nifi.cluster.protocol.NodeProtocolSender) LeaderElectionManager(org.apache.nifi.controller.leader.election.LeaderElectionManager) NodeClusterCoordinator(org.apache.nifi.cluster.coordination.node.NodeClusterCoordinator) ClusterNodeFirewall(org.apache.nifi.cluster.firewall.ClusterNodeFirewall) RevisionManager(org.apache.nifi.web.revision.RevisionManager) FlowElection(org.apache.nifi.cluster.coordination.flow.FlowElection) ClusterCoordinationProtocolSenderListener(org.apache.nifi.cluster.protocol.impl.ClusterCoordinationProtocolSenderListener) EventReporter(org.apache.nifi.events.EventReporter)

Aggregations

FlowElection (org.apache.nifi.cluster.coordination.flow.FlowElection)1 NodeClusterCoordinator (org.apache.nifi.cluster.coordination.node.NodeClusterCoordinator)1 ClusterNodeFirewall (org.apache.nifi.cluster.firewall.ClusterNodeFirewall)1 NodeProtocolSender (org.apache.nifi.cluster.protocol.NodeProtocolSender)1 ClusterCoordinationProtocolSenderListener (org.apache.nifi.cluster.protocol.impl.ClusterCoordinationProtocolSenderListener)1 LeaderElectionManager (org.apache.nifi.controller.leader.election.LeaderElectionManager)1 EventReporter (org.apache.nifi.events.EventReporter)1 RevisionManager (org.apache.nifi.web.revision.RevisionManager)1