Search in sources :

Example 1 with HealthCheckBolt

use of org.openkilda.wfm.topology.utils.HealthCheckBolt in project open-kilda by telstra.

the class AbstractTopology method createHealthCheckHandler.

/**
 * Creates health-check handler spout and bolts.
 *
 * @param builder topology builder
 * @param prefix  component id
 */
protected void createHealthCheckHandler(TopologyBuilder builder, String prefix) {
    checkAndCreateTopic(Topic.HEALTH_CHECK);
    KafkaSpout healthCheckKafkaSpout = createKafkaSpout(Topic.HEALTH_CHECK, prefix);
    builder.setSpout(prefix + "HealthCheckKafkaSpout", healthCheckKafkaSpout, 1);
    HealthCheckBolt healthCheckBolt = new HealthCheckBolt(prefix);
    builder.setBolt(prefix + "HealthCheckBolt", healthCheckBolt, 1).shuffleGrouping(prefix + "HealthCheckKafkaSpout");
    KafkaBolt healthCheckKafkaBolt = createKafkaBolt(Topic.HEALTH_CHECK);
    builder.setBolt(prefix + "HealthCheckKafkaBolt", healthCheckKafkaBolt, 1).shuffleGrouping(prefix + "HealthCheckBolt", Topic.HEALTH_CHECK);
}
Also used : HealthCheckBolt(org.openkilda.wfm.topology.utils.HealthCheckBolt) KafkaSpout(org.apache.storm.kafka.spout.KafkaSpout) KafkaBolt(org.apache.storm.kafka.bolt.KafkaBolt)

Aggregations

KafkaBolt (org.apache.storm.kafka.bolt.KafkaBolt)1 KafkaSpout (org.apache.storm.kafka.spout.KafkaSpout)1 HealthCheckBolt (org.openkilda.wfm.topology.utils.HealthCheckBolt)1