Settings

Theme

Estimating Pi with Kafka streams

fredrikmeyer.net

12 points by FredrikMeyer 2 years ago · 2 comments

Reader

gus_massa 2 years ago

> : 4. * fractionAggregator.trues() / fractionAggregator.total();

Does that count again the number of trues each time or internaly it accumulates the number to recalculate it faster?

  • FredrikMeyerOP 2 years ago

    The FractionAggregator class has two fields (int trues, int total), and it is up to Kafka to keep track of the accumulated number. (perhaps someone who knows Kafka better could elaborate on how Kafka stores work "under the hood")

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection