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();
}
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);
}
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);
}
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);
}
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);
}
Aggregations