Search in sources :

Example 1 with YFlowDeleteConfig

use of org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt.YFlowDeleteConfig in project open-kilda by telstra.

the class FlowHsTopology method yFlowDeleteHub.

private void yFlowDeleteHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getDeleteHubTimeoutSeconds());
    YFlowDeleteConfig config = YFlowDeleteConfig.builder().speakerCommandRetriesLimit(topologyConfig.getYFlowDeleteSpeakerCommandRetriesLimit()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.YFLOW_DELETE_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    RuleManagerConfig ruleManagerConfig = configurationProvider.getConfiguration(RuleManagerConfig.class);
    YFlowDeleteHubBolt hubBolt = new YFlowDeleteHubBolt(config, persistenceManager, flowResourcesConfig, ruleManagerConfig);
    declareBolt(topologyBuilder, hubBolt, ComponentId.YFLOW_DELETE_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), Stream.ROUTER_TO_YFLOW_DELETE_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.YFLOW_DELETE_SPEAKER_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_YFLOW_DELETE.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) YFlowDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt) YFlowDeleteConfig(org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt.YFlowDeleteConfig)

Aggregations

RuleManagerConfig (org.openkilda.rulemanager.RuleManagerConfig)1 FlowResourcesConfig (org.openkilda.wfm.share.flow.resources.FlowResourcesConfig)1 YFlowDeleteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt)1 YFlowDeleteConfig (org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt.YFlowDeleteConfig)1