Search in sources :

Example 6 with ZooKeeperSpout

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

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

the class PingTopology method zooKeeperSpout.

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

Example 8 with ZooKeeperSpout

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

the class StatsTopology method zooKeeperSpout.

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

Example 9 with ZooKeeperSpout

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

the class ControlTopology method zooKeeperSpout.

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

Example 10 with ZooKeeperSpout

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

the class ConnectedDevicesTopology method createZkSpout.

private void createZkSpout(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)

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