当我编写一个storm拓扑时,我发现元组的顺序并不总是和spout发出的元组的顺序相同(spout的功能是在一行中读取一个文件,并将该行发送给一个bolt,而不必使用它) Thread.sleep() ,所以这个过程会非常快)。有谁能告诉我怎样才能保证一个喷口或一个螺栓发出的元组的顺序?谢谢!
Thread.sleep()
iih3973s1#
你可能想看看三叉戟的拓扑结构
Trident solves this problem by doing two things: Each batch is given a unique id called the "transaction id". If a batch is retried it will have the exact same transaction id. State updates are ordered among batches. That is, the state updates for batch 3 won't be applied until the state updates for batch 2 have succeeded.
Trident solves this problem by doing two things:
Each batch is given a unique id called the "transaction id". If a batch is retried it will have the exact same transaction id.
State updates are ordered among batches. That is, the state updates for batch 3 won't be applied until the state updates for batch 2 have succeeded.
1条答案
按热度按时间iih3973s1#
你可能想看看三叉戟的拓扑结构