Search in sources :

Example 1 with FlowMirrorPointCreateHubBolt

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

the class FlowHsTopology method flowCreateMirrorPointHub.

private void flowCreateMirrorPointHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getCreateMirrorPointHubTimeoutSeconds());
    FlowMirrorPointCreateConfig config = FlowMirrorPointCreateConfig.flowMirrorPointCreateBuilder().pathAllocationRetriesLimit(topologyConfig.getPathAllocationRetriesLimit()).pathAllocationRetryDelay(topologyConfig.getPathAllocationRetryDelay()).speakerCommandRetriesLimit(topologyConfig.getCreateMirrorPointSpeakerCommandRetries()).resourceAllocationRetriesLimit(topologyConfig.getResourceAllocationRetriesLimit()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.FLOW_CREATE_MIRROR_POINT_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    PathComputerConfig pathComputerConfig = configurationProvider.getConfiguration(PathComputerConfig.class);
    FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    FlowMirrorPointCreateHubBolt hubBolt = new FlowMirrorPointCreateHubBolt(config, persistenceManager, pathComputerConfig, flowResourcesConfig);
    declareBolt(topologyBuilder, hubBolt, ComponentId.FLOW_CREATE_MIRROR_POINT_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_FLOW_CREATE_MIRROR_POINT_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.FLOW_CREATE_MIRROR_POINT_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_CREATE_MIRROR_POINT.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) PathComputerConfig(org.openkilda.pce.PathComputerConfig) FlowMirrorPointCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointCreateHubBolt) FlowMirrorPointCreateConfig(org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointCreateHubBolt.FlowMirrorPointCreateConfig)

Aggregations

PathComputerConfig (org.openkilda.pce.PathComputerConfig)1 FlowResourcesConfig (org.openkilda.wfm.share.flow.resources.FlowResourcesConfig)1 FlowMirrorPointCreateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointCreateHubBolt)1 FlowMirrorPointCreateConfig (org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointCreateHubBolt.FlowMirrorPointCreateConfig)1