Search in sources :

Example 1 with FlowRerouteHubBolt

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

the class FlowHsTopology method flowRerouteHub.

private void flowRerouteHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getRerouteHubTimeoutSeconds());
    FlowRerouteConfig config = FlowRerouteConfig.flowRerouteBuilder().pathAllocationRetriesLimit(topologyConfig.getPathAllocationRetriesLimit()).pathAllocationRetryDelay(topologyConfig.getPathAllocationRetryDelay()).speakerCommandRetriesLimit(topologyConfig.getRerouteSpeakerCommandRetries()).resourceAllocationRetriesLimit(topologyConfig.getResourceAllocationRetriesLimit()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.FLOW_REROUTE_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    PathComputerConfig pathComputerConfig = configurationProvider.getConfiguration(PathComputerConfig.class);
    FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    FlowRerouteHubBolt hubBolt = new FlowRerouteHubBolt(config, persistenceManager, pathComputerConfig, flowResourcesConfig);
    declareBolt(topologyBuilder, hubBolt, ComponentId.FLOW_REROUTE_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_FLOW_REROUTE_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.FLOW_REROUTE_SPEAKER_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_REROUTE.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowRerouteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt) YFlowRerouteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt) FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) PathComputerConfig(org.openkilda.pce.PathComputerConfig) YFlowRerouteConfig(org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt.YFlowRerouteConfig) FlowRerouteConfig(org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt.FlowRerouteConfig)

Aggregations

PathComputerConfig (org.openkilda.pce.PathComputerConfig)1 FlowResourcesConfig (org.openkilda.wfm.share.flow.resources.FlowResourcesConfig)1 FlowRerouteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt)1 FlowRerouteConfig (org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt.FlowRerouteConfig)1 YFlowRerouteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt)1 YFlowRerouteConfig (org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt.YFlowRerouteConfig)1