简体   繁体   English

在Storm中,是否有一种方法可以计算由于超时而失败的元组的数量?

[英]In Storm is there a way to count the number of tuples that failed due to timeout?

I'm trying to develop some reporting around our Storm topologies and one metric we would like to report on is the number of tuples that fail due to timing out. 我正在尝试围绕Storm拓扑开发一些报告,我们要报告的一个指标是由于超时而失败的元组数。

From what I understand Storm will automatically fail a tuple when it fails to complete before the timeout length, but this seems to happen "behind the scenes" and I don't see a way to distinguish between timeout failures vs other types of failures. 据我了解,当Storm在超时长度之前未能完成时,它将自动使一个元组失败,但是这似乎是在“幕后”发生的,并且我看不到区分超时失败与其他类型失败的方法。

Is there any way to expose or capture this information? 有什么办法可以暴露或捕获此信息?

If you consider Storm's WebUI, for each bolt there is a count of failed tuples. 如果考虑Storm的WebUI,则每个螺栓都有一个失败的元组计数。 Those counts are only the manually failed tuples (ie, failed via OutputCollector.fail(...) ) of the bolt and do not include tuples that ran into a timeout. 这些计数仅是螺栓的手动失败的元组(即,通过OutputCollector.fail(...)失败),并且不包括遇到超时的元组。 The spout has an overall counter of failed tuples. 喷口有一个失败元组的整体计数器。 Thus, you can simply sum up the number of manually failed tuples over all bolts and subtract if from the global spout count to get the number of tuples that timed-out. 因此,您可以简单地求和所有螺栓上手动失败的元组的数量,并从全局喷口计数中减去是否获得超时的元组的数量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM