Hi,
Are the 2 executors on the same worker (ie in the same JVM)?
If yes, your question should be fix a static field.
If no, I have no simple idea.
Denis
Le 31/08/2015 16:28, #ZHANG SHUHAO# a écrit :
Hi,
Basically, it’s the standard word-count topology, 1 spout, 1 split, 1
count, and 1 sink.
Now, suppose I give the parallelism hint to each of them as 1:2:1:1.
Hence, there are two executors for split are created. My questions is
how can I maintain _a global shared counter_ for both of the two
threads of split.
Is it possible to do that in storm? I have tried some methods e.g.,
AtomicInteger, but later I realized that the use of serlization makes
the contents of every thread instance of split isolated.
Is there any way to work-around of it?
Many thanks.
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel
antivirus Avast.
https://www.avast.com/antivirus