Search in sources :

Example 1 with FlowPathSwapHubBolt

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

the class FlowHsTopology method flowSwapProtectedHub.

private void flowSwapProtectedHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getPathSwapHubTimeoutSeconds());
    FlowPathSwapConfig config = FlowPathSwapConfig.flowPathSwapBuilder().speakerCommandRetriesLimit(topologyConfig.getPathSwapSpeakerCommandRetries()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.FLOW_PATH_SWAP_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    RuleManagerConfig ruleManagerConfig = configurationProvider.getConfiguration(RuleManagerConfig.class);
    FlowPathSwapHubBolt hubBolt = new FlowPathSwapHubBolt(config, persistenceManager, flowResourcesConfig, ruleManagerConfig);
    declareBolt(topologyBuilder, hubBolt, ComponentId.FLOW_PATH_SWAP_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_FLOW_PATH_SWAP_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.FLOW_PATH_SWAP_SPEAKER_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_PATH_SWAP.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) FlowPathSwapHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt) FlowPathSwapConfig(org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt.FlowPathSwapConfig)

Aggregations

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