Can we define a StateFactory (sf) and do those 2 things with it ? (or would that be a bad practice?)
- update a state with something like partitionAggregate(sf) or partitionPersist(sf) - create a newStatic(sf) for querying this state (that we have updated) later in the topology On Jun 17, 2014 2:18 AM, "Nathan Marz" <[email protected]> wrote: > Static state just refers to a state that is not maintained by your Trident > topology but which you still want to be able to query, so something like a > database that some other system is responsible for updating. > > > On Mon, Jun 16, 2014 at 4:21 AM, Carlos Rodriguez <[email protected]> > wrote: > >> Hi guys, >> >> We are using Riak as a State to write and read data from different riak >> buckets. (We are using this code >> https://github.com/hackreduce/storm-hackathon/blob/master/src/main/java/org/hackreduce/storm/example/riak/RiakBackingMap.java >> ) >> >> We first write to a bucket with partitionPersist, which returns a >> TridentState var, and then we get data from this bucket with the >> TridentState var returned previously. >> >> The problem is that sometimes we just need to read (because another >> process is filling this bucket with data), so no partitionPersist is done, >> and therefore we have no TridentState var to get data from that bucket. >> >> I've seen in the Trident State API doc ( >> https://github.com/nathanmarz/storm/wiki/Trident-state) a call to >> topology.newStaticState(), and thought that maybe it would do the trick. >> >> I didn't find more info about these "Static" states, so I would like to >> know what does "Static" means in that context and the difference between >> this and the TridentState var returned when a partitonPersist() is done. >> >> Greetings, >> Carlos >> > > > > -- > Twitter: @nathanmarz > http://nathanmarz.com >
