use of org.openkilda.wfm.topology.flowhs.bolts.FlowValidationHubBolt 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);
}
Aggregations