Thursday, 15 March 2012

java - Storm acking and failing -



java - Storm acking and failing -

the bolts using based on basebasicbolt, supposed ensure input tuple execute gets acked default. after reading documentation, appeared not doing right not failing tuples when exception caught. let's topology looks this, bolts basebasicbolts:

spout -> bolt -> bolt b -> bolt c

if error happens in bolt b phone call this:

basicoutputcollector.getoutputter().fail(inputtuple)

is plenty ensure failure @ bolt b cause tuple failed @ b kicked out of topology?

i don't think right word "kicked". if anchor tuple through whole chain

spout -> bolt -> bolt b

then fail() method in bolt b have effect of calling method fail() in spout. spout fail() method receive id of root tuple of tuple you've failed. root tuple tuple first came out of spout , caused chain of new tuples includes failed tuple in bolt b, example

root tuple -> tuple -> tuple b

it or maybe nil @ all. problem failed tuple leave undesired trail in chain. illustration tuple can cause update counter in bolt after fail tuple b in bolt b update can invalid.

so trying that, in case, tuple cannot kicked topology because in sense went through (partially).

java groovy apache-storm

No comments:

Post a Comment