storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Xor <>
Subject Trident State storage
Date Mon, 09 Feb 2015 02:42:42 GMT

 I've come across a topology that I need to have a persistent state​ which
will be a bit large in size; but for this example let's assume that I have
a simple count scenario. Now If I declare it as static inside the state
class such as:

public class MyState implements State {
    static int count;

    public void beginCommit(Lond txid) {;}

    public void commit(Long txid) {;}

    /* this method will be called from the BaseStateUpdater */
    public void updateCount() {count++;}

Will the updated count be transferred each time it is updated? Also if it
is indeed transferred, then if I have only one worker performing that task
(phint will be 1) will it be transferred again (I assume that it won't but
I just want to be sure)?

Finally (since the documentation is not very clear on that subject) what is
the best way to keep a large matrix or another big blob of data that needs
to be incrementally updated for each batch without paying the huge transfer
cost if you increase the parallelism hint.



View raw message