/** * This submits a topology after loading the configured Spout (and optionally, Bolt), which is either the {@link DSLSpout} * and {@link DSLBolt} or a custom Spout and Bolt. The topology is submitted with the given configuration as the source * of {@link com.yahoo.bullet.record.BulletRecord} using the given {@link TopologyBuilder} * * @param config The Storm settings for this Bullet topology. * @param builder The {@link TopologyBuilder} to use to add the topology to. * @throws Exception if there were any issues submitting the topology. */ public static void submit(BulletStormConfig config, TopologyBuilder builder) throws Exception { Boolean dslSpoutEnable = config.getAs(BulletStormConfig.DSL_SPOUT_ENABLE, Boolean.class); if (dslSpoutEnable) { addDSLSpout(config, builder); } else { addBulletSpout(config, builder); } submit(config, TopologyConstants.RECORD_COMPONENT, builder); } }