简体   繁体   English

在Storm中取消锚定元组

[英]Un-anchoring tuples in Storm

I have a mostly-linear Storm topology. 我有一个基本上线性的St​​orm拓扑。 There is a bolt in the middle that's doing work that may take time. 中间有一个螺栓在工作,可能需要一些时间。 Some tuples might be able to get processed immediately, some others the bolt will stash somewhere for later. 一些元组可能能够立即得到处理,而另一些元组则可能会藏在某个地方以便以后使用。 (It's trying not to hammer external resources too much.) (它试图避免过多地利用外部资源。)

I'm using BaseBasicBolt -derived bolts up until this one, which is a BaseRichBolt subclass. 我一直使用BaseBasicBolt派生的螺栓,直到该螺栓为止,这是BaseRichBolt子类。 So the tuples it receives are correctly anchored to the whole tree up to the spout. 因此,它接收到的元组被正确地锚定到整个树,直到喷口。

Can I ack these tuples and emit brand new, unanchored tuples from my bolt? 我可以确认这些元组并从螺栓中发出全新的未固定元组吗? If the bolts after this one (all BaseBasicBolts again) emit anchored tuples, will replaying work correctly and how? 如果在此之后的螺栓(又是所有BaseBasicBolts )发出锚定的元组,重播将正常工作,如何进行?

Yes, you can emit unachored tuples. 是的,您可以发出未修饰的元组。 However, there is no way to recover those tuples. 但是,无法恢复这些元组。

If you special bolt acks a tuple, the spout will drop the source tuple that are required to recompute this input tuple. 如果使用特殊螺栓固定一个元组,则喷口将丢弃重新计算此输入元组所需的源元组。 Thus, you cannot recover this input tuple any more and therefore you can't recompute the unanchored result tuple. 因此,您无法再恢复该输入元组,因此无法重新计算未锚定的结果元组。

IMHO, the only way to get fault-tolerance in you case, is to increase message timeout such that the long processing tuples in your special bolt do not get timed-out. 恕我直言,在您的情况下获得容错的唯一方法是增加消息超时,以使特殊螺栓中的长处理元组不会超时。 Your emitted tuples need to get anchored regularly to the stashed input tuples and those input tuplse can be acked when youe removed them from stashing space. 您发出的元组需要定期锚定到隐藏的输入元组,并且当您将它们从存储空间中删除时,这些输入元组可以被确认。

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

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