Search in sources :

Example 11 with ZooKeeperBolt

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

the class PingTopology method zooKeeperBolt.

private void zooKeeperBolt(TopologyBuilder topology) {
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(InputRouter.BOLT_ID, TickDeduplicator.BOLT_ID));
    declareBolt(topology, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(InputRouter.BOLT_ID, InputRouter.STREAM_ZOOKEEPER).allGrouping(TickDeduplicator.BOLT_ID, TickDeduplicator.STREAM_ZOOKEEPER);
}
Also used : ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt)

Example 12 with ZooKeeperBolt

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

the class ControlTopology method zooKeeperBolt.

private void zooKeeperBolt(TopologyBuilder topology) {
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(Router.BOLT_ID));
    declareBolt(topology, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(Router.BOLT_ID, ZkStreams.ZK.toString());
}
Also used : ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt)

Example 13 with ZooKeeperBolt

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

the class IslLatencyTopology method createZooKeeperBolt.

private void createZooKeeperBolt(TopologyBuilder builder) {
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(ROUTER_BOLT_ID, ISL_STATUS_UPDATE_BOLT_ID));
    declareBolt(builder, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(ROUTER_BOLT_ID, ZkStreams.ZK.toString()).allGrouping(ISL_STATUS_UPDATE_BOLT_ID, ZkStreams.ZK.toString());
}
Also used : ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt)

Example 14 with ZooKeeperBolt

use of org.openkilda.wfm.share.zk.ZooKeeperBolt 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

ZooKeeperBolt (org.openkilda.wfm.share.zk.ZooKeeperBolt)14 TopologyBuilder (org.apache.storm.topology.TopologyBuilder)4 ZooKeeperSpout (org.openkilda.wfm.share.zk.ZooKeeperSpout)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