风暴用户界面显示不同数量的执行者和任务

but5z9lq  于 2021-06-21  发布在  Storm
关注(0)|答案(1)|浏览(308)

我正在使用三叉戟拓扑的storm,但我无法理解并行性是如何实现的,根据我的计算和我在storm ui上看到的不同,
以下是分配工人数量的代码:

public Config getTopologyConfiguration() {
    Config conf = new Config();
    //conf.setDebug(true);
    conf.setNumWorkers(6);
    conf.setMessageTimeoutSecs(100);
    return conf;
}

下面是流处理代码:

s.name("aggregation_stream")
            .parallelismHint(invoiceAggregationConfig.getSpoutParallelism())
            .partitionBy(groupedFields)
            .partitionAggregate(aggregateInputFields,
                    new GenericAggregator(groupedFields, aggregatedFieldsList, aggregateFieldsOperationList),
                    aggregatorOutputFields)
            .parallelismHint(invoiceAggregationConfig.getAggregationParallelism())
            .shuffle()
            .each(aggregatorOutputFields,
                    new CreatePaymentFromInvoices(paymentType, groupMap, aggMap, paymentExtraParams),
                    Const.PAYMENT_FIELD)
            .each(TridentUtils.fieldsConcat(aggregatorOutputFields, Const.PAYMENT_FIELD),
                    new CreateApplicationFromPaymentAndInvoices(invoiceType),
                    Const.APPLICATIONS_FIELD)
            .each(TridentUtils.fieldsConcat(aggregatorOutputFields, Const.PAYMENT_FIELD, Const.APPLICATIONS_FIELD),
                    new RestbusFilterForPaymentAndApplications(environment, bu, serviceConfiguration))
            .parallelismHint(invoiceAggregationConfig.getPersistenceParallelism());

我在上面代码中使用的并行属性如下:

spoutParallelism: 3
aggregationParallelism: 6
persistenceParallelism: 6

根据我的计算,遗嘱执行人的数目应该是3*6+6=24
但在storm ui中显示的是23,如何??

编辑
添加包含单个组件信息的新屏幕截图

在这里我可以看到执行者和任务的数量是50个,但是我没有为此设置任何配置,storm本身提供了吗??
其次,发出的元组数量是巨大的,我没有产生这么多的数据,这是100多倍的元组,为什么有这么多元组显示在用户界面??

eqqqjvef

eqqqjvef1#

发射的元组数可能是一个巨大的数字原因:当喷口发射一个元组时,它将期望收到ack,如果没有收到ack,它将重新发送元组,因此发射和传输的计数可以是一个更高的值(检查ack count(它的小数字与发出的计数相比)

相关问题