Search in sources :

Example 1 with HubBolt

use of org.openkilda.wfm.share.hubandspoke.HubBolt in project open-kilda by telstra.

the class FlowHsTopology method flowValidationHub.

private void flowValidationHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getValidationHubTimeoutSeconds());
    HubBolt.Config config = HubBolt.Config.builder().requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.FLOW_VALIDATION_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).timeoutMs(hubTimeout).build();
    FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    FlowValidationHubBolt hubBolt = new FlowValidationHubBolt(config, persistenceManager, flowResourcesConfig, topologyConfig.getFlowMeterMinBurstSizeInKbits(), topologyConfig.getFlowMeterBurstCoefficient());
    declareBolt(topologyBuilder, hubBolt, ComponentId.FLOW_VALIDATION_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), Stream.ROUTER_TO_FLOW_VALIDATION_HUB.name(), FIELDS_KEY).directGrouping(ComponentId.FLOW_VALIDATION_SPEAKER_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_VALIDATION.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) YFlowValidationHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowValidationHubBolt) FlowValidationHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowValidationHubBolt) YFlowValidationHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowValidationHubBolt) FlowMirrorPointCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointCreateHubBolt) FlowRerouteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt) YFlowDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt) FlowUpdateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowUpdateHubBolt) FlowMirrorPointDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointDeleteHubBolt) FlowPathSwapHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt) YFlowRerouteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt) FlowSwapEndpointsHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowSwapEndpointsHubBolt) FlowCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowCreateHubBolt) HubBolt(org.openkilda.wfm.share.hubandspoke.HubBolt) FlowDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowDeleteHubBolt) YFlowCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowCreateHubBolt) FlowValidationHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowValidationHubBolt) YFlowUpdateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowUpdateHubBolt)

Example 2 with HubBolt

use of org.openkilda.wfm.share.hubandspoke.HubBolt in project open-kilda by telstra.

the class FlowHsTopology method yFlowValidationHub.

private void yFlowValidationHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getValidationHubTimeoutSeconds());
    HubBolt.Config config = HubBolt.Config.builder().requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.YFLOW_VALIDATION_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).timeoutMs(hubTimeout).build();
    FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    YFlowValidationHubBolt hubBolt = new YFlowValidationHubBolt(config, persistenceManager, flowResourcesConfig, topologyConfig.getFlowMeterMinBurstSizeInKbits(), topologyConfig.getFlowMeterBurstCoefficient());
    declareBolt(topologyBuilder, hubBolt, ComponentId.YFLOW_VALIDATION_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), Stream.ROUTER_TO_YFLOW_VALIDATION_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.YFLOW_VALIDATION_SPEAKER_WORKER.name(), SPEAKER_WORKER_TO_HUB_YFLOW_VALIDATION.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) YFlowValidationHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowValidationHubBolt) YFlowValidationHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowValidationHubBolt) FlowMirrorPointCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointCreateHubBolt) FlowRerouteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt) YFlowDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt) FlowUpdateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowUpdateHubBolt) FlowMirrorPointDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointDeleteHubBolt) FlowPathSwapHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt) YFlowRerouteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt) FlowSwapEndpointsHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowSwapEndpointsHubBolt) FlowCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowCreateHubBolt) HubBolt(org.openkilda.wfm.share.hubandspoke.HubBolt) FlowDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowDeleteHubBolt) YFlowCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowCreateHubBolt) FlowValidationHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowValidationHubBolt) YFlowUpdateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowUpdateHubBolt)

Example 3 with HubBolt

use of org.openkilda.wfm.share.hubandspoke.HubBolt in project open-kilda by telstra.

the class FlowHsTopology method flowSwapEndpointsHub.

private void flowSwapEndpointsHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getSwapEndpointsHubTimeoutSeconds());
    HubBolt.Config config = HubBolt.Config.builder().requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.FLOW_UPDATE_HUB.name()).timeoutMs(hubTimeout).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    FlowSwapEndpointsHubBolt hubBolt = new FlowSwapEndpointsHubBolt(config, persistenceManager);
    declareBolt(topologyBuilder, hubBolt, ComponentId.FLOW_SWAP_ENDPOINTS_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_FLOW_SWAP_ENDPOINTS_HUB.name(), FIELDS_KEY).fieldsGrouping(ComponentId.FLOW_UPDATE_HUB.name(), UPDATE_HUB_TO_SWAP_ENDPOINTS_HUB.name(), FIELDS_KEY).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowSwapEndpointsHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowSwapEndpointsHubBolt) YFlowValidationHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowValidationHubBolt) FlowMirrorPointCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointCreateHubBolt) FlowRerouteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt) YFlowDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt) FlowUpdateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowUpdateHubBolt) FlowMirrorPointDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointDeleteHubBolt) FlowPathSwapHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt) YFlowRerouteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt) FlowSwapEndpointsHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowSwapEndpointsHubBolt) FlowCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowCreateHubBolt) HubBolt(org.openkilda.wfm.share.hubandspoke.HubBolt) FlowDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowDeleteHubBolt) YFlowCreateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowCreateHubBolt) FlowValidationHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowValidationHubBolt) YFlowUpdateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowUpdateHubBolt)

Aggregations

HubBolt (org.openkilda.wfm.share.hubandspoke.HubBolt)3 FlowCreateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowCreateHubBolt)3 FlowDeleteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowDeleteHubBolt)3 FlowMirrorPointCreateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointCreateHubBolt)3 FlowMirrorPointDeleteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointDeleteHubBolt)3 FlowPathSwapHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt)3 FlowRerouteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt)3 FlowSwapEndpointsHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowSwapEndpointsHubBolt)3 FlowUpdateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowUpdateHubBolt)3 FlowValidationHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowValidationHubBolt)3 YFlowCreateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowCreateHubBolt)3 YFlowDeleteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt)3 YFlowRerouteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt)3 YFlowUpdateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowUpdateHubBolt)3 YFlowValidationHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowValidationHubBolt)3 FlowResourcesConfig (org.openkilda.wfm.share.flow.resources.FlowResourcesConfig)2