Thanks for reply I am able to restore the serialized object but the Hashmap in wordcounter.java "counters" returns null when I try to access it after de-serialization Can you check that thing? On Jan 17, 2014 5:04 PM, "Klausen Schaefersinho" <[email protected]> wrote:
> Hi, you could try to sync to some remote datebase. Off course this is > somehow slow, maybe batching could help. In another thread someone > discussed using Cassandra with some partition tricks... Cheers > Am 17.01.2014 11:32 schrieb "Aniket Alhat" <[email protected]>: > >> Hello, >> I want to periodically serialize the state of a bolt and remember what >> tuples it has processed up until particular point. Then when you restart >> the Bolt you can deserialize that state into the new bolt instance and >> replay/*process* the tuples from where it was last. >> >> Consider the WordCount Topology, I want to store the WordCounter.java >> bolt state for which I wrote following code in TopologyMain.java >> >> TopologyMain.java *http://pastebin.com/suyL4dSB >> <http://pastebin.com/suyL4dSB>* >> WordCouter.java *http://pastebin.com/pzEgXCgx >> <http://pastebin.com/pzEgXCgx>* >> >> Now when ever I de-serialize the object back, The HashMap in WordCouter >> bolt behaves like it has nothing stored in it and starts again as normal >> bolt rather it should re-count the words but HashMap remains NULL >> >> *Whether should I write serialization logic any where else ?* >> -- >> >> *Aniket Alhatlinkedin.com/in/aniketalhat >> <http://linkedin.com/in/aniketalhat>* >> *+91 976 603 9317 <%2B91%20976%20603%209317>* >> >
