decl.declare(declarer); declarer.addConfigurations(masterBolt.componentConf); for (String id : bolts.keySet()) { Component component = bolts.get(id); input.addConfigurations(component.componentConf);
public static StormTopology buildTopology(Map<String, SpoutDetails> spoutMap, Map<String, BoltDetails> boltMap) { TopologyBuilder builder = new TopologyBuilder(); for (Entry<String, SpoutDetails> entry : spoutMap.entrySet()) { String spoutId = entry.getKey(); SpoutDetails spec = entry.getValue(); SpoutDeclarer spoutDeclarer = builder.setSpout(spoutId, spec.getSpout(), spec.getParallelism()); spoutDeclarer.addConfigurations(spec.getConf()); } for (Entry<String, BoltDetails> entry : boltMap.entrySet()) { String spoutId = entry.getKey(); BoltDetails spec = entry.getValue(); BoltDeclarer boltDeclarer = null; if (spec.bolt instanceof IRichBolt) { boltDeclarer = builder.setBolt(spoutId, (IRichBolt) spec.getBolt(), spec.getParallelism()); } else { boltDeclarer = builder.setBolt(spoutId, (IBasicBolt) spec.getBolt(), spec.getParallelism()); } boltDeclarer.addConfigurations(spec.getConf()); addInputs(boltDeclarer, spec.getInputs()); } return builder.createTopology(); }
scd.addSharedMemory(request); scd.addConfigurations(c.componentConf); bd.allGrouping(masterCoordinator(batchGroup), MasterBatchCoordinator.COMMIT_STREAM_ID); bd.addConfigurations(c.componentConf); d.addSharedMemory(request); d.addConfigurations(c.componentConf);
declarer.addConfigurations(component.componentConf);
declarer.addConfigurations(conf); component.parallelism); for(Map conf: component.componentConfs) { input.addConfigurations(conf);
scd.addConfigurations(m); bd.addConfigurations(m); d.addConfigurations(conf);
declarer.addConfigurations(conf);
component.parallelism); for(Map conf: component.componentConfs) { input.addConfigurations(conf);
.addConfigurations(sinkConfig.asMap()) .shuffleGrouping(getAdapterName());
new Fields(LGConstants.LG_JOB_ID)); builder.setBolt("rabbitmq-sink", new RabbitMQBolt(new AdapterSinkScheme()), LGProperties.getInteger("rabbit.sink.threads", 1)) .addConfigurations(sinkConfig.asMap()) .shuffleGrouping(LGConstants.LEMONGRENADE_COORDINATOR); )); builder.setBolt("cmd-rabbitmq-sink", new RabbitMQBolt(new CommandSinkScheme())) .addConfigurations(sinkConfig.asMap()) .shuffleGrouping(LGConstants.LEMONGRENADE_COORDINATORCMD);