Search in sources :

Example 11 with KafkaBolt

use of org.apache.storm.kafka.bolt.KafkaBolt in project open-kilda by telstra.

the class NbWorkerTopology method metrics.

private void metrics(TopologyBuilder topologyBuilder) {
    String openTsdbTopic = topologyConfig.getKafkaTopics().getOtsdbTopic();
    KafkaBolt kafkaBolt = createKafkaBolt(openTsdbTopic);
    topologyBuilder.setBolt(METRICS_BOLT, kafkaBolt).shuffleGrouping(FLOWS_BOLT_NAME, StreamType.TO_METRICS_BOLT.name()).shuffleGrouping(LINKS_BOLT_NAME, StreamType.TO_METRICS_BOLT.name()).shuffleGrouping(SWITCHES_BOLT_NAME, StreamType.TO_METRICS_BOLT.name()).shuffleGrouping(HISTORY_BOLT_NAME, StreamType.TO_METRICS_BOLT.name());
}
Also used : KafkaBolt(org.apache.storm.kafka.bolt.KafkaBolt)

Example 12 with KafkaBolt

use of org.apache.storm.kafka.bolt.KafkaBolt in project open-kilda by telstra.

the class NetworkTopology method outputSwitchManager.

private void outputSwitchManager(TopologyBuilder topology) {
    SwitchManagerEncoder bolt = new SwitchManagerEncoder();
    declareBolt(topology, bolt, SwitchManagerEncoder.BOLT_ID).shuffleGrouping(SwitchManagerWorker.BOLT_ID);
    KafkaBolt output = buildKafkaBolt(kafkaTopics.getTopoSwitchManagerNetworkTopic());
    declareBolt(topology, output, ComponentId.SWMANAGER_OUTPUT.toString()).shuffleGrouping(SwitchManagerEncoder.BOLT_ID);
}
Also used : SwitchManagerEncoder(org.openkilda.wfm.topology.network.storm.bolt.SwitchManagerEncoder) KafkaBolt(org.apache.storm.kafka.bolt.KafkaBolt)

Example 13 with KafkaBolt

use of org.apache.storm.kafka.bolt.KafkaBolt in project open-kilda by telstra.

the class NetworkTopology method outputNorthbound.

private void outputNorthbound(TopologyBuilder topology) {
    NorthboundEncoder bolt = new NorthboundEncoder();
    declareBolt(topology, bolt, NorthboundEncoder.BOLT_ID).shuffleGrouping(PortHandler.BOLT_ID, PortHandler.STREAM_NORTHBOUND_ID);
    KafkaBolt kafkaNorthboundBolt = buildKafkaBolt(kafkaTopics.getNorthboundTopic());
    declareBolt(topology, kafkaNorthboundBolt, ComponentId.NB_OUTPUT.toString()).shuffleGrouping(NorthboundEncoder.BOLT_ID);
}
Also used : NorthboundEncoder(org.openkilda.wfm.topology.network.storm.bolt.NorthboundEncoder) KafkaBolt(org.apache.storm.kafka.bolt.KafkaBolt)

Example 14 with KafkaBolt

use of org.apache.storm.kafka.bolt.KafkaBolt in project open-kilda by telstra.

the class NetworkTopology method outputReroute.

private void outputReroute(TopologyBuilder topology) {
    RerouteEncoder bolt = new RerouteEncoder();
    declareBolt(topology, bolt, RerouteEncoder.BOLT_ID).shuffleGrouping(IslHandler.BOLT_ID, IslHandler.STREAM_REROUTE_ID).shuffleGrouping(SwitchHandler.BOLT_ID, SwitchHandler.STREAM_REROUTE_ID);
    KafkaBolt output = buildKafkaBolt(kafkaTopics.getTopoRerouteTopic());
    declareBolt(topology, output, ComponentId.REROUTE_OUTPUT.toString()).shuffleGrouping(RerouteEncoder.BOLT_ID);
}
Also used : RerouteEncoder(org.openkilda.wfm.topology.network.storm.bolt.RerouteEncoder) KafkaBolt(org.apache.storm.kafka.bolt.KafkaBolt)

Example 15 with KafkaBolt

use of org.apache.storm.kafka.bolt.KafkaBolt in project open-kilda by telstra.

the class PingTopology method flowStatusEncoder.

private void flowStatusEncoder(TopologyBuilder topology) {
    FlowStatusEncoder bolt = new FlowStatusEncoder();
    declareBolt(topology, bolt, FlowStatusEncoder.BOLT_ID).shuffleGrouping(FailReporter.BOLT_ID);
    KafkaBolt output = buildKafkaBolt(topologyConfig.getKafkaFlowStatusTopic());
    declareBolt(topology, output, ComponentId.FLOW_STATUS_OUTPUT.toString()).shuffleGrouping(FlowStatusEncoder.BOLT_ID);
}
Also used : FlowStatusEncoder(org.openkilda.wfm.topology.ping.bolt.FlowStatusEncoder) KafkaBolt(org.apache.storm.kafka.bolt.KafkaBolt)

Aggregations

KafkaBolt (org.apache.storm.kafka.bolt.KafkaBolt)31 TopologyBuilder (org.apache.storm.topology.TopologyBuilder)5 KafkaSpout (org.apache.storm.kafka.spout.KafkaSpout)4 BoltDeclarer (org.apache.storm.topology.BoltDeclarer)3 CtrlBoltRef (org.openkilda.wfm.CtrlBoltRef)3 ArrayList (java.util.ArrayList)2 ZooKeeperBolt (org.openkilda.wfm.share.zk.ZooKeeperBolt)2 ZooKeeperSpout (org.openkilda.wfm.share.zk.ZooKeeperSpout)2 Properties (java.util.Properties)1 PathComputerConfig (org.openkilda.pce.PathComputerConfig)1 PersistenceManager (org.openkilda.persistence.PersistenceManager)1 RouteBolt (org.openkilda.wfm.ctrl.RouteBolt)1 CoordinatorBolt (org.openkilda.wfm.share.hubandspoke.CoordinatorBolt)1 CoordinatorSpout (org.openkilda.wfm.share.hubandspoke.CoordinatorSpout)1 HubBolt (org.openkilda.wfm.share.hubandspoke.HubBolt)1 WorkerBolt (org.openkilda.wfm.share.hubandspoke.WorkerBolt)1 CrudBolt (org.openkilda.wfm.topology.flow.bolts.CrudBolt)1 ErrorBolt (org.openkilda.wfm.topology.flow.bolts.ErrorBolt)1 NorthboundReplyBolt (org.openkilda.wfm.topology.flow.bolts.NorthboundReplyBolt)1 SpeakerBolt (org.openkilda.wfm.topology.flow.bolts.SpeakerBolt)1