Search in sources :

Example 1 with ZooKeeperBolt

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

the class FlowHsTopology method zkBolt.

private void zkBolt(TopologyBuilder topologyBuilder) {
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(ComponentId.FLOW_CREATE_HUB.name(), ComponentId.FLOW_UPDATE_HUB.name(), ComponentId.FLOW_DELETE_HUB.name(), ComponentId.FLOW_PATH_SWAP_HUB.name(), ComponentId.FLOW_REROUTE_HUB.name(), ComponentId.FLOW_SWAP_ENDPOINTS_HUB.name(), ComponentId.FLOW_ROUTER_BOLT.name(), ComponentId.FLOW_CREATE_MIRROR_POINT_HUB.name(), ComponentId.FLOW_DELETE_MIRROR_POINT_HUB.name(), ComponentId.FLOW_VALIDATION_HUB.name(), ComponentId.YFLOW_CREATE_HUB.name(), ComponentId.YFLOW_UPDATE_HUB.name(), ComponentId.YFLOW_REROUTE_HUB.name(), ComponentId.YFLOW_DELETE_HUB.name(), ComponentId.YFLOW_READ_BOLT.name(), ComponentId.YFLOW_VALIDATION_HUB.name()));
    declareBolt(topologyBuilder, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(ComponentId.FLOW_CREATE_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.FLOW_UPDATE_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.FLOW_DELETE_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.FLOW_PATH_SWAP_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.FLOW_REROUTE_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.FLOW_SWAP_ENDPOINTS_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.FLOW_CREATE_MIRROR_POINT_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.FLOW_DELETE_MIRROR_POINT_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.FLOW_VALIDATION_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.YFLOW_CREATE_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.YFLOW_UPDATE_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.YFLOW_REROUTE_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.YFLOW_DELETE_HUB.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.YFLOW_READ_BOLT.name(), ZkStreams.ZK.toString()).allGrouping(ComponentId.YFLOW_VALIDATION_HUB.name(), ZkStreams.ZK.toString());
}
Also used : ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt)

Example 2 with ZooKeeperBolt

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

the class RerouteTopology method zkBolt.

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

Example 3 with ZooKeeperBolt

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

the class OpenTsdbTopology method createTopology.

@Override
public StormTopology createTopology() {
    logger.info("Creating OpenTsdbTopology - {}", topologyName);
    TopologyBuilder tb = new TopologyBuilder();
    ZooKeeperSpout zooKeeperSpout = new ZooKeeperSpout(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig());
    declareSpout(tb, zooKeeperSpout, ZooKeeperSpout.SPOUT_ID);
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(OTSDB_PARSE_BOLT_ID));
    declareBolt(tb, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(OTSDB_PARSE_BOLT_ID, ZkStreams.ZK.toString());
    attachInput(tb);
    OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig();
    declareBolt(tb, new DatapointParseBolt(), OTSDB_PARSE_BOLT_ID).shuffleGrouping(OTSDB_SPOUT_ID).allGrouping(ZooKeeperSpout.SPOUT_ID);
    declareBolt(tb, new OpenTSDBFilterBolt(), OTSDB_FILTER_BOLT_ID).fieldsGrouping(OTSDB_PARSE_BOLT_ID, new Fields("hash"));
    OpenTsdbClient.Builder tsdbBuilder = OpenTsdbClient.newBuilder(openTsdbConfig.getHosts()).returnDetails();
    if (openTsdbConfig.getClientChunkedRequestsEnabled()) {
        tsdbBuilder.enableChunkedEncoding();
    }
    OpenTsdbBolt openTsdbBolt = new OpenTsdbBolt(tsdbBuilder, Collections.singletonList(TupleOpenTsdbDatapointMapper.DEFAULT_MAPPER));
    openTsdbBolt.withBatchSize(openTsdbConfig.getBatchSize()).withFlushInterval(openTsdbConfig.getFlushInterval());
    declareBolt(tb, openTsdbBolt, OTSDB_BOLT_ID).shuffleGrouping(OTSDB_FILTER_BOLT_ID);
    return tb.createTopology();
}
Also used : DatapointParseBolt(org.openkilda.wfm.topology.opentsdb.bolts.DatapointParseBolt) Fields(org.apache.storm.tuple.Fields) OpenTsdbClient(org.apache.storm.opentsdb.client.OpenTsdbClient) TopologyBuilder(org.apache.storm.topology.TopologyBuilder) ZooKeeperSpout(org.openkilda.wfm.share.zk.ZooKeeperSpout) ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt) OpenTsdbBolt(org.apache.storm.opentsdb.bolt.OpenTsdbBolt) OpenTsdbConfig(org.openkilda.wfm.topology.opentsdb.OpenTsdbTopologyConfig.OpenTsdbConfig) OpenTSDBFilterBolt(org.openkilda.wfm.topology.opentsdb.bolts.OpenTSDBFilterBolt)

Example 4 with ZooKeeperBolt

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

the class StatsTopology method zooKeeperBolt.

private void zooKeeperBolt(TopologyBuilder topologyBuilder) {
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(getConfig().getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(STATS_REQUESTER_BOLT.name(), STATS_OFS_ROUTER_BOLT.name(), SERVER42_STATS_FLOW_RTT_METRIC_GEN.name(), STATS_CACHE_BOLT.name()));
    declareBolt(topologyBuilder, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(STATS_REQUESTER_BOLT.name(), StatsRequesterBolt.ZOOKEEPER_STREAM).allGrouping(STATS_OFS_ROUTER_BOLT.name(), SpeakerStatsRouterBolt.ZOOKEEPER_STREAM).allGrouping(SERVER42_STATS_FLOW_RTT_METRIC_GEN.name(), FlowRttMetricGenBolt.ZOOKEEPER_STREAM).allGrouping(STATS_CACHE_BOLT.name(), CacheBolt.ZOOKEEPER_STREAM);
}
Also used : ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt)

Example 5 with ZooKeeperBolt

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

the class FloodlightRouterTopology method zkBolt.

private void zkBolt(TopologyBuilder topology) {
    ZooKeeperBolt zooKeeperBolt = new ZooKeeperBolt(topologyConfig.getBlueGreenMode(), getZkTopoName(), getZookeeperConfig(), getBoltInstancesCount(SpeakerToNetworkProxyBolt.BOLT_ID, ComponentType.SPEAKER_DISCO_REQUEST_BOLT, ComponentType.KILDA_FLOW_HS_REPLY_BOLT, ComponentType.SPEAKER_FLOW_REQUEST_BOLT, ComponentType.KILDA_PING_REPLY_BOLT, ComponentType.KILDA_STATS_REPLY_BOLT, ComponentType.KILDA_ISL_LATENCY_REPLY_BOLT, ComponentType.KILDA_CONNECTED_DEVICES_REPLY_BOLT, ComponentType.KILDA_SWITCH_MANAGER_REPLY_BOLT, ComponentType.NORTHBOUND_REPLY_BOLT, ComponentType.KILDA_NB_WORKER_REPLY_BOLT, ComponentType.SPEAKER_REQUEST_BOLT, RegionTrackerBolt.BOLT_ID, SwitchMonitorBolt.BOLT_ID));
    declareBolt(topology, zooKeeperBolt, ZooKeeperBolt.BOLT_ID).allGrouping(SpeakerToNetworkProxyBolt.BOLT_ID, ZkStreams.ZK.toString()).allGrouping(ComponentType.SPEAKER_DISCO_REQUEST_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.KILDA_FLOW_HS_REPLY_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.SPEAKER_FLOW_REQUEST_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.KILDA_PING_REPLY_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.KILDA_STATS_REPLY_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.KILDA_ISL_LATENCY_REPLY_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.KILDA_CONNECTED_DEVICES_REPLY_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.KILDA_SWITCH_MANAGER_REPLY_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.NORTHBOUND_REPLY_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.KILDA_NB_WORKER_REPLY_BOLT, ZkStreams.ZK.toString()).allGrouping(ComponentType.SPEAKER_REQUEST_BOLT, ZkStreams.ZK.toString()).allGrouping(RegionTrackerBolt.BOLT_ID, ZkStreams.ZK.toString()).allGrouping(SwitchMonitorBolt.BOLT_ID, ZkStreams.ZK.toString());
}
Also used : ZooKeeperBolt(org.openkilda.wfm.share.zk.ZooKeeperBolt)

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