我想将我的数据输出到kafka
队列,所以我写下{{1}}如下:
topology
当我提交拓扑时,它返回:
LinearDRPCTopologyBuilder builder = new LinearDRPCTopologyBuilder("xx");
builder.addBolt(new JdEntryParseBolt(config), 2);
builder.addBolt(new JdCrawlerBolt(config), 2).shuffleGrouping();
builder.addBolt(new JdParseBolt(config), 2).shuffleGrouping();
builder.addBolt(new KafkaBolt<String, Integer>(), 2).shuffleGrouping();
Config conf = new Config();
Map<String, String> map = new HashMap<>();
map.put("metadata.broker.list", "127.0.0.1:9092");
map.put("serializer.class", "kafka.serializer.StringEncoder");
conf.put("topic", "jdQueryCrawler");
conf.setMaxTaskParallelism(10);
LocalDRPC drpc = new LocalDRPC();
LocalCluster cluster = new LocalCluster();
cluster.submitTopology("xx-drpc", conf, builder.createLocalTopology(drpc));
什么&#34;完全来自LinearDRPC&#34;中最后一个螺栓的一个流?意思?我不添加多个流。