Search in sources :

Example 11 with ZooKeeperSpout

use of org.openkilda.wfm.share.zk.ZooKeeperSpout in project open-kilda by telstra.

the class PortStateTopology method createTopology.

@Override
public StormTopology createTopology() {
    logger.info("Creating PortStateTopology - {}", topologyName);
    TopologyBuilder builder = new TopologyBuilder();
    /*
         *  Topology:
         *
         *  TOPO_DISCO_SPOUT ---> TopoDiscoParseBolt ---> ParsePortInfoBolt ---> OtsdbKafkaBolt(kilda.otsdb topic)
         *                                                         ^
         *                                                         |
         *  WFM_STATS_SPOUT ---> WfmStatsParseBolt -----------------
         *
         *
         *  SwitchPortsSpout ---> SpeakerKafkaBolt(kilda.speaker topic)
         *
         */
    ZooKeeperSpout zooKeeperSpout = new ZooKeeperSpout(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig());
    declareSpout(builder, zooKeeperSpout, ZooKeeperSpout.SPOUT_ID);
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(TOPO_DISCO_PARSE_BOLT_NAME, WFM_STATS_PARSE_BOLT_NAME, REQUEST_SPEAKER_BOLT_NAME));
    declareBolt(builder, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(TOPO_DISCO_PARSE_BOLT_NAME, ZkStreams.ZK.toString()).allGrouping(WFM_STATS_PARSE_BOLT_NAME, ZkStreams.ZK.toString()).allGrouping(REQUEST_SPEAKER_BOLT_NAME, ZkStreams.ZK.toString());
    // Setup spout and bolt for TOPO_DISCO_SPOUT line
    String topoDiscoTopic = topologyConfig.getKafkaTopoDiscoTopic();
    logger.debug("connecting to {} topic", topoDiscoTopic);
    declareKafkaSpout(builder, topoDiscoTopic, TOPO_DISCO_SPOUT);
    TopoDiscoParseBolt topoDiscoParseBolt = new TopoDiscoParseBolt(ZooKeeperSpout.SPOUT_ID);
    declareBolt(builder, topoDiscoParseBolt, TOPO_DISCO_PARSE_BOLT_NAME).shuffleGrouping(TOPO_DISCO_SPOUT).allGrouping(ZooKeeperSpout.SPOUT_ID);
    ParsePortInfoBolt parsePortInfoBolt = new ParsePortInfoBolt(topologyConfig.getMetricPrefix());
    declareBolt(builder, parsePortInfoBolt, PARSE_PORT_INFO_BOLT_NAME).shuffleGrouping(TOPO_DISCO_PARSE_BOLT_NAME, TopoDiscoParseBolt.TOPO_TO_PORT_INFO_STREAM).shuffleGrouping(WFM_STATS_PARSE_BOLT_NAME, WfmStatsParseBolt.WFM_TO_PARSE_PORT_INFO_STREAM);
    String openTsdbTopic = topologyConfig.getKafkaOtsdbTopic();
    KafkaBolt openTsdbBolt = createKafkaBolt(openTsdbTopic);
    declareBolt(builder, openTsdbBolt, OTSDB_KAFKA_BOLT_NAME).shuffleGrouping(PARSE_PORT_INFO_BOLT_NAME);
    // Setup spout and bolt for WFM_STATS_SPOUT line
    String wfmStatsTopic = topologyConfig.getKafkaStatsTopic();
    logger.debug("connecting to {} topic", wfmStatsTopic);
    declareKafkaSpout(builder, wfmStatsTopic, WFM_STATS_SPOUT);
    WfmStatsParseBolt wfmStatsParseBolt = new WfmStatsParseBolt(ZooKeeperSpout.SPOUT_ID);
    declareBolt(builder, wfmStatsParseBolt, WFM_STATS_PARSE_BOLT_NAME).shuffleGrouping(WFM_STATS_SPOUT).allGrouping(ZooKeeperSpout.SPOUT_ID);
    // Setup spout and bolt for sending SwitchPortsCommand every frequency seconds
    SwitchPortsSpout switchPortsSpout = new SwitchPortsSpout(JANITOR_REFRESH);
    declareSpout(builder, switchPortsSpout, SWITCH_PORTS_SPOUT_NAME);
    RequestSpeakerBolt bolt = new RequestSpeakerBolt(ZooKeeperSpout.SPOUT_ID);
    declareBolt(builder, bolt, REQUEST_SPEAKER_BOLT_NAME).shuffleGrouping(SWITCH_PORTS_SPOUT_NAME).allGrouping(ZooKeeperSpout.SPOUT_ID);
    String speakerTopic = topologyConfig.getKafkaSpeakerTopic();
    KafkaBolt speakerBolt = buildKafkaBolt(speakerTopic);
    declareBolt(builder, speakerBolt, SPEAKER_KAFKA_BOLT_NAME).shuffleGrouping(REQUEST_SPEAKER_BOLT_NAME);
    return builder.createTopology();
}
Also used : ParsePortInfoBolt(org.openkilda.wfm.topology.portstate.bolt.ParsePortInfoBolt) SwitchPortsSpout(org.openkilda.wfm.topology.portstate.spout.SwitchPortsSpout) TopologyBuilder(org.apache.storm.topology.TopologyBuilder) ZooKeeperSpout(org.openkilda.wfm.share.zk.ZooKeeperSpout) ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt) WfmStatsParseBolt(org.openkilda.wfm.topology.portstate.bolt.WfmStatsParseBolt) TopoDiscoParseBolt(org.openkilda.wfm.topology.portstate.bolt.TopoDiscoParseBolt) KafkaBolt(org.apache.storm.kafka.bolt.KafkaBolt) RequestSpeakerBolt(org.openkilda.wfm.topology.portstate.bolt.RequestSpeakerBolt)

Example 12 with ZooKeeperSpout

use of org.openkilda.wfm.share.zk.ZooKeeperSpout in project open-kilda by telstra.

the class NbWorkerTopology method createTopology.

@Override
public StormTopology createTopology() {
    logger.info("Creating NbWorkerTopology - {}", topologyName);
    TopologyBuilder tb = new TopologyBuilder();
    declareSpout(tb, new CoordinatorSpout(), CoordinatorSpout.ID);
    declareBolt(tb, new CoordinatorBolt(), CoordinatorBolt.ID).allGrouping(CoordinatorSpout.ID).fieldsGrouping(FlowMeterModifyHubBolt.ID, CoordinatorBolt.INCOME_STREAM, FIELDS_KEY).fieldsGrouping(METER_MODIFY_WORKER_BOLT, CoordinatorBolt.INCOME_STREAM, FIELDS_KEY);
    declareKafkaSpout(tb, topologyConfig.getKafkaTopoNbTopic(), NB_SPOUT_ID);
    RouterBolt router = new RouterBolt(ZooKeeperSpout.SPOUT_ID);
    declareBolt(tb, router, ROUTER_BOLT_NAME).shuffleGrouping(NB_SPOUT_ID).allGrouping(ZooKeeperSpout.SPOUT_ID);
    ZooKeeperSpout zooKeeperSpout = new ZooKeeperSpout(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig());
    declareSpout(tb, zooKeeperSpout, ZooKeeperSpout.SPOUT_ID);
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(ROUTER_BOLT_NAME, FlowMeterModifyHubBolt.ID));
    declareBolt(tb, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(ROUTER_BOLT_NAME, ZkStreams.ZK.toString()).allGrouping(FlowMeterModifyHubBolt.ID, ZkStreams.ZK.toString());
    PersistenceManager persistenceManager = new PersistenceManager(configurationProvider);
    PathComputerConfig pathComputerConfig = configurationProvider.getConfiguration(PathComputerConfig.class);
    HubBolt.Config meterModifyHubConfig = HubBolt.Config.builder().requestSenderComponent(ROUTER_BOLT_NAME).workerComponent(METER_MODIFY_WORKER_BOLT).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).timeoutMs((int) TimeUnit.SECONDS.toMillis(topologyConfig.getProcessTimeout())).build();
    declareBolt(tb, new FlowMeterModifyHubBolt(meterModifyHubConfig, persistenceManager), FlowMeterModifyHubBolt.ID).fieldsGrouping(ROUTER_BOLT_NAME, FlowMeterModifyHubBolt.INCOME_STREAM, FIELDS_KEY).directGrouping(METER_MODIFY_WORKER_BOLT, FlowMeterModifyHubBolt.INCOME_STREAM).directGrouping(CoordinatorBolt.ID).allGrouping(ZooKeeperSpout.SPOUT_ID);
    WorkerBolt.Config speakerMeterModifyWorkerConfig = WorkerBolt.Config.builder().hubComponent(FlowMeterModifyHubBolt.ID).streamToHub(FlowMeterModifyHubBolt.INCOME_STREAM).workerSpoutComponent(ROUTER_BOLT_NAME).defaultTimeout((int) TimeUnit.SECONDS.toMillis(topologyConfig.getOperationTimeout())).build();
    declareBolt(tb, new SpeakerWorkerBolt(speakerMeterModifyWorkerConfig), METER_MODIFY_WORKER_BOLT).fieldsGrouping(ROUTER_BOLT_NAME, SpeakerWorkerBolt.INCOME_STREAM, FIELDS_KEY).fieldsGrouping(FlowMeterModifyHubBolt.ID, StreamType.METER_MODIFY_WORKER.toString(), FIELDS_KEY).directGrouping(CoordinatorBolt.ID);
    SwitchOperationsBolt switchesBolt = new SwitchOperationsBolt(persistenceManager);
    declareBolt(tb, switchesBolt, SWITCHES_BOLT_NAME).shuffleGrouping(ROUTER_BOLT_NAME, StreamType.SWITCH.toString());
    LinkOperationsBolt linksBolt = new LinkOperationsBolt(persistenceManager);
    declareBolt(tb, linksBolt, LINKS_BOLT_NAME).shuffleGrouping(ROUTER_BOLT_NAME, StreamType.ISL.toString());
    FlowOperationsBolt flowsBolt = new FlowOperationsBolt(persistenceManager);
    declareBolt(tb, flowsBolt, FLOWS_BOLT_NAME).shuffleGrouping(ROUTER_BOLT_NAME, StreamType.FLOW.toString());
    FlowPatchBolt flowPatchBolt = new FlowPatchBolt(persistenceManager);
    declareBolt(tb, flowPatchBolt, FLOW_PATCH_BOLT_NAME).shuffleGrouping(ROUTER_BOLT_NAME, StreamType.FLOW_PATCH.toString());
    FeatureTogglesBolt featureTogglesBolt = new FeatureTogglesBolt(persistenceManager);
    declareBolt(tb, featureTogglesBolt, FEATURE_TOGGLES_BOLT_NAME).shuffleGrouping(ROUTER_BOLT_NAME, StreamType.FEATURE_TOGGLES.toString());
    KildaConfigurationBolt kildaConfigurationBolt = new KildaConfigurationBolt(persistenceManager);
    declareBolt(tb, kildaConfigurationBolt, KILDA_CONFIG_BOLT_NAME).shuffleGrouping(ROUTER_BOLT_NAME, StreamType.KILDA_CONFIG.toString());
    PathsBolt pathsBolt = new PathsBolt(persistenceManager, pathComputerConfig);
    declareBolt(tb, pathsBolt, PATHS_BOLT_NAME).shuffleGrouping(ROUTER_BOLT_NAME, StreamType.PATHS.toString());
    HistoryOperationsBolt historyBolt = new HistoryOperationsBolt(persistenceManager);
    declareBolt(tb, historyBolt, HISTORY_BOLT_NAME).shuffleGrouping(ROUTER_BOLT_NAME, StreamType.HISTORY.toString());
    ResponseSplitterBolt splitterBolt = new ResponseSplitterBolt();
    declareBolt(tb, splitterBolt, SPLITTER_BOLT_NAME).shuffleGrouping(SWITCHES_BOLT_NAME).shuffleGrouping(LINKS_BOLT_NAME).shuffleGrouping(FLOWS_BOLT_NAME).shuffleGrouping(FEATURE_TOGGLES_BOLT_NAME).shuffleGrouping(KILDA_CONFIG_BOLT_NAME).shuffleGrouping(PATHS_BOLT_NAME).shuffleGrouping(HISTORY_BOLT_NAME).shuffleGrouping(FlowMeterModifyHubBolt.ID).shuffleGrouping(FLOW_PATCH_BOLT_NAME);
    MessageEncoder messageEncoder = new MessageEncoder();
    declareBolt(tb, messageEncoder, MESSAGE_ENCODER_BOLT_NAME).shuffleGrouping(LINKS_BOLT_NAME, StreamType.ERROR.toString()).shuffleGrouping(LINKS_BOLT_NAME, StreamType.REROUTE.toString()).shuffleGrouping(FLOWS_BOLT_NAME, StreamType.ERROR.toString()).shuffleGrouping(FLOWS_BOLT_NAME, StreamType.REROUTE.toString()).shuffleGrouping(SWITCHES_BOLT_NAME, StreamType.ERROR.toString()).shuffleGrouping(SWITCHES_BOLT_NAME, StreamType.REROUTE.toString()).shuffleGrouping(SWITCHES_BOLT_NAME, StreamType.TO_SWITCH_MANAGER.toString()).shuffleGrouping(ROUTER_BOLT_NAME, StreamType.ERROR.toString()).shuffleGrouping(FEATURE_TOGGLES_BOLT_NAME, StreamType.ERROR.toString()).shuffleGrouping(FEATURE_TOGGLES_BOLT_NAME, StreamType.TO_SWITCH_MANAGER.toString()).shuffleGrouping(KILDA_CONFIG_BOLT_NAME, StreamType.ERROR.toString()).shuffleGrouping(PATHS_BOLT_NAME, StreamType.ERROR.toString()).shuffleGrouping(HISTORY_BOLT_NAME, StreamType.ERROR.toString()).shuffleGrouping(FlowMeterModifyHubBolt.ID, StreamType.ERROR.toString()).shuffleGrouping(FLOW_PATCH_BOLT_NAME, StreamType.ERROR.toString());
    DiscoveryEncoderBolt discoveryEncoder = new DiscoveryEncoderBolt();
    declareBolt(tb, discoveryEncoder, DISCOVERY_ENCODER_BOLT_NAME).shuffleGrouping(LINKS_BOLT_NAME, StreamType.DISCO.toString()).shuffleGrouping(SWITCHES_BOLT_NAME, StreamType.DISCO.toString()).shuffleGrouping(FEATURE_TOGGLES_BOLT_NAME, FeatureTogglesBolt.STREAM_NOTIFICATION_ID);
    KafkaBolt kafkaNbBolt = buildKafkaBolt(topologyConfig.getKafkaNorthboundTopic());
    declareBolt(tb, kafkaNbBolt, NB_KAFKA_BOLT_NAME).fieldsGrouping(SPLITTER_BOLT_NAME, FIELDS_KEY).shuffleGrouping(MESSAGE_ENCODER_BOLT_NAME, StreamType.ERROR.toString());
    KafkaBolt kafkaFlowHsBolt = buildKafkaBolt(topologyConfig.getKafkaFlowHsTopic());
    declareBolt(tb, kafkaFlowHsBolt, FLOW_HS_KAFKA_BOLT_NAME).shuffleGrouping(MESSAGE_ENCODER_BOLT_NAME, StreamType.FLOWHS.toString()).shuffleGrouping(FLOW_PATCH_BOLT_NAME, StreamType.FLOWHS.toString());
    KafkaBolt kafkaDiscoBolt = buildKafkaBolt(topologyConfig.getKafkaDiscoTopic());
    declareBolt(tb, kafkaDiscoBolt, DISCO_KAFKA_BOLT_NAME).shuffleGrouping(DISCOVERY_ENCODER_BOLT_NAME);
    KafkaBolt kafkaPingBolt = buildKafkaBolt(topologyConfig.getKafkaPingTopic());
    declareBolt(tb, kafkaPingBolt, PING_KAFKA_BOLT_NAME).shuffleGrouping(FLOW_PATCH_BOLT_NAME, StreamType.PING.toString());
    declareBolt(tb, buildKafkaBolt(topologyConfig.getKafkaSpeakerTopic()), SPEAKER_KAFKA_BOLT).shuffleGrouping(METER_MODIFY_WORKER_BOLT, StreamType.TO_SPEAKER.toString());
    declareBolt(tb, buildKafkaBolt(topologyConfig.getKafkaSwitchManagerTopic()), SWITCH_MANAGER_KAFKA_BOLT).shuffleGrouping(MESSAGE_ENCODER_BOLT_NAME, StreamType.TO_SWITCH_MANAGER.toString());
    Server42EncoderBolt server42EncoderBolt = new Server42EncoderBolt();
    declareBolt(tb, server42EncoderBolt, SERVER42_ENCODER_BOLT_NAME).shuffleGrouping(SWITCHES_BOLT_NAME, StreamType.TO_SERVER42.toString()).shuffleGrouping(FEATURE_TOGGLES_BOLT_NAME, FeatureTogglesBolt.STREAM_NOTIFICATION_ID);
    declareBolt(tb, buildKafkaBolt(topologyConfig.getKafkaServer42StormNotifyTopic()), SERVER42_KAFKA_BOLT).shuffleGrouping(SERVER42_ENCODER_BOLT_NAME);
    declareBolt(tb, buildKafkaBolt(topologyConfig.getKafkaRerouteTopic()), REROUTE_KAFKA_BOLT).shuffleGrouping(MESSAGE_ENCODER_BOLT_NAME, StreamType.REROUTE.toString());
    metrics(tb);
    return tb.createTopology();
}
Also used : TopologyBuilder(org.apache.storm.topology.TopologyBuilder) FeatureTogglesBolt(org.openkilda.wfm.topology.nbworker.bolts.FeatureTogglesBolt) HistoryOperationsBolt(org.openkilda.wfm.topology.nbworker.bolts.HistoryOperationsBolt) CoordinatorSpout(org.openkilda.wfm.share.hubandspoke.CoordinatorSpout) KildaConfigurationBolt(org.openkilda.wfm.topology.nbworker.bolts.KildaConfigurationBolt) CoordinatorBolt(org.openkilda.wfm.share.hubandspoke.CoordinatorBolt) ZooKeeperSpout(org.openkilda.wfm.share.zk.ZooKeeperSpout) ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt) KafkaBolt(org.apache.storm.kafka.bolt.KafkaBolt) SpeakerWorkerBolt(org.openkilda.wfm.topology.nbworker.bolts.SpeakerWorkerBolt) FlowOperationsBolt(org.openkilda.wfm.topology.nbworker.bolts.FlowOperationsBolt) PersistenceManager(org.openkilda.persistence.PersistenceManager) LinkOperationsBolt(org.openkilda.wfm.topology.nbworker.bolts.LinkOperationsBolt) HubBolt(org.openkilda.wfm.share.hubandspoke.HubBolt) FlowMeterModifyHubBolt(org.openkilda.wfm.topology.nbworker.bolts.FlowMeterModifyHubBolt) DiscoveryEncoderBolt(org.openkilda.wfm.topology.nbworker.bolts.DiscoveryEncoderBolt) FlowPatchBolt(org.openkilda.wfm.topology.nbworker.bolts.FlowPatchBolt) ResponseSplitterBolt(org.openkilda.wfm.topology.nbworker.bolts.ResponseSplitterBolt) RouterBolt(org.openkilda.wfm.topology.nbworker.bolts.RouterBolt) PathsBolt(org.openkilda.wfm.topology.nbworker.bolts.PathsBolt) SpeakerWorkerBolt(org.openkilda.wfm.topology.nbworker.bolts.SpeakerWorkerBolt) WorkerBolt(org.openkilda.wfm.share.hubandspoke.WorkerBolt) PathComputerConfig(org.openkilda.pce.PathComputerConfig) SwitchOperationsBolt(org.openkilda.wfm.topology.nbworker.bolts.SwitchOperationsBolt) FlowMeterModifyHubBolt(org.openkilda.wfm.topology.nbworker.bolts.FlowMeterModifyHubBolt) MessageEncoder(org.openkilda.wfm.topology.nbworker.bolts.MessageEncoder) Server42EncoderBolt(org.openkilda.wfm.topology.nbworker.bolts.Server42EncoderBolt)

Example 13 with ZooKeeperSpout

use of org.openkilda.wfm.share.zk.ZooKeeperSpout in project open-kilda by telstra.

the class IslLatencyTopology method createZooKeeperSpout.

private void createZooKeeperSpout(TopologyBuilder builder) {
    ZooKeeperSpout zooKeeperSpout = new ZooKeeperSpout(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig());
    declareSpout(builder, zooKeeperSpout, ZooKeeperSpout.SPOUT_ID);
}
Also used : ZooKeeperSpout(org.openkilda.wfm.share.zk.ZooKeeperSpout)

Example 14 with ZooKeeperSpout

use of org.openkilda.wfm.share.zk.ZooKeeperSpout in project open-kilda by telstra.

the class SwitchManagerTopology method createTopology.

@Override
public StormTopology createTopology() {
    logger.info("Creating SwitchManagerTopology - {}", topologyName);
    TopologyBuilder builder = new TopologyBuilder();
    ZooKeeperSpout zooKeeperSpout = new ZooKeeperSpout(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig());
    declareSpout(builder, zooKeeperSpout, ZooKeeperSpout.SPOUT_ID);
    declareSpout(builder, new CoordinatorSpout(), CoordinatorSpout.ID);
    declareBolt(builder, new CoordinatorBolt(), CoordinatorBolt.ID).allGrouping(CoordinatorSpout.ID).fieldsGrouping(SwitchManagerHub.ID, CoordinatorBolt.INCOME_STREAM, FIELDS_KEY);
    PersistenceManager persistenceManager = new PersistenceManager(configurationProvider);
    HubBolt.Config hubConfig = HubBolt.Config.builder().requestSenderComponent(HUB_SPOUT).workerComponent(SpeakerWorkerBolt.ID).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).timeoutMs((int) TimeUnit.SECONDS.toMillis(topologyConfig.getProcessTimeout())).build();
    List<String> inputTopics = Lists.newArrayList(topologyConfig.getKafkaSwitchManagerNbTopic(), topologyConfig.getKafkaSwitchManagerNetworkTopic(), topologyConfig.getKafkaSwitchManagerNbWorkerTopic());
    declareKafkaSpout(builder, inputTopics, HUB_SPOUT);
    declareBolt(builder, new SwitchManagerHub(hubConfig, persistenceManager, topologyConfig, configurationProvider.getConfiguration(FlowResourcesConfig.class), configurationProvider.getConfiguration(RuleManagerConfig.class)), SwitchManagerHub.ID).allGrouping(ZooKeeperSpout.SPOUT_ID).fieldsGrouping(HUB_SPOUT, FIELDS_KEY).directGrouping(SpeakerWorkerBolt.ID, SwitchManagerHub.INCOME_STREAM).directGrouping(CoordinatorBolt.ID);
    WorkerBolt.Config speakerWorkerConfig = WorkerBolt.Config.builder().hubComponent(SwitchManagerHub.ID).streamToHub(SwitchManagerHub.INCOME_STREAM).workerSpoutComponent(WORKER_SPOUT).defaultTimeout((int) TimeUnit.SECONDS.toMillis(topologyConfig.getOperationTimeout())).build();
    declareKafkaSpout(builder, Lists.newArrayList(topologyConfig.getKafkaSwitchManagerTopic(), topologyConfig.getGrpcResponseTopic()), WORKER_SPOUT);
    declareBolt(builder, new SpeakerWorkerBolt(speakerWorkerConfig), SpeakerWorkerBolt.ID).fieldsGrouping(WORKER_SPOUT, FIELDS_KEY).fieldsGrouping(SwitchManagerHub.ID, SpeakerWorkerBolt.INCOME_STREAM, FIELDS_KEY).directGrouping(CoordinatorBolt.ID);
    declareBolt(builder, buildKafkaBolt(topologyConfig.getKafkaNorthboundTopic()), NB_KAFKA_BOLT).shuffleGrouping(SwitchManagerHub.ID, StreamType.TO_NORTHBOUND.toString());
    declareBolt(builder, buildKafkaBolt(topologyConfig.getKafkaSpeakerTopic()), SPEAKER_KAFKA_BOLT).shuffleGrouping(SpeakerWorkerBolt.ID, StreamType.TO_FLOODLIGHT.toString());
    declareBolt(builder, buildKafkaBolt(topologyConfig.getGrpcSpeakerTopic()), GRPC_SPEAKER_KAFKA_BOLT).shuffleGrouping(SpeakerWorkerBolt.ID, StreamType.TO_GRPC.toString());
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(SwitchManagerHub.ID));
    declareBolt(builder, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(SwitchManagerHub.ID, ZkStreams.ZK.toString());
    metrics(builder);
    return builder.createTopology();
}
Also used : SpeakerWorkerBolt(org.openkilda.wfm.topology.switchmanager.bolt.SpeakerWorkerBolt) TopologyBuilder(org.apache.storm.topology.TopologyBuilder) PersistenceManager(org.openkilda.persistence.PersistenceManager) HubBolt(org.openkilda.wfm.share.hubandspoke.HubBolt) CoordinatorSpout(org.openkilda.wfm.share.hubandspoke.CoordinatorSpout) CoordinatorBolt(org.openkilda.wfm.share.hubandspoke.CoordinatorBolt) WorkerBolt(org.openkilda.wfm.share.hubandspoke.WorkerBolt) SpeakerWorkerBolt(org.openkilda.wfm.topology.switchmanager.bolt.SpeakerWorkerBolt) ZooKeeperSpout(org.openkilda.wfm.share.zk.ZooKeeperSpout) ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt) SwitchManagerHub(org.openkilda.wfm.topology.switchmanager.bolt.SwitchManagerHub)

Aggregations

ZooKeeperSpout (org.openkilda.wfm.share.zk.ZooKeeperSpout)14 TopologyBuilder (org.apache.storm.topology.TopologyBuilder)4 ZooKeeperBolt (org.openkilda.wfm.share.zk.ZooKeeperBolt)4 KafkaBolt (org.apache.storm.kafka.bolt.KafkaBolt)2 PersistenceManager (org.openkilda.persistence.PersistenceManager)2 CoordinatorBolt (org.openkilda.wfm.share.hubandspoke.CoordinatorBolt)2 CoordinatorSpout (org.openkilda.wfm.share.hubandspoke.CoordinatorSpout)2 HubBolt (org.openkilda.wfm.share.hubandspoke.HubBolt)2 WorkerBolt (org.openkilda.wfm.share.hubandspoke.WorkerBolt)2 OpenTsdbBolt (org.apache.storm.opentsdb.bolt.OpenTsdbBolt)1 OpenTsdbClient (org.apache.storm.opentsdb.client.OpenTsdbClient)1 Fields (org.apache.storm.tuple.Fields)1 PathComputerConfig (org.openkilda.pce.PathComputerConfig)1 DiscoveryEncoderBolt (org.openkilda.wfm.topology.nbworker.bolts.DiscoveryEncoderBolt)1 FeatureTogglesBolt (org.openkilda.wfm.topology.nbworker.bolts.FeatureTogglesBolt)1 FlowMeterModifyHubBolt (org.openkilda.wfm.topology.nbworker.bolts.FlowMeterModifyHubBolt)1 FlowOperationsBolt (org.openkilda.wfm.topology.nbworker.bolts.FlowOperationsBolt)1 FlowPatchBolt (org.openkilda.wfm.topology.nbworker.bolts.FlowPatchBolt)1 HistoryOperationsBolt (org.openkilda.wfm.topology.nbworker.bolts.HistoryOperationsBolt)1 KildaConfigurationBolt (org.openkilda.wfm.topology.nbworker.bolts.KildaConfigurationBolt)1