Hi Sergey,

actor probably gets restarted. You can add logging of lifecycle events with:

akka {
  loglevel = "DEBUG"
  actor {
    debug {
      lifecycle = on
    }
  }
}


On Mon, Apr 14, 2014 at 3:25 PM, Sergey Starodubtsev <[email protected]>wrote:

> Hi Guys,
>  could you look at this. Maybe it is a bug or I missed something ?
>
> I have 
> this<https://github.com/Sergey80/akka-samples/blob/master/src/main/java/s2_example/actors/AggregateWordCountActor.java>
>  actor
> that is involved in *parallel-word-count-calculation*.
>
> It has a state:
>
> private Map<String, Integer> wordCountMap = new HashMap<String, Integer>();
>
> As it received WordCountMapMessage message, it changed the state to have 9
> elements in it:
>
> {over=1, fell=1, fox=1, quick=1, tried=1, brown=1, lazy=1, dog=2, jump=1}
>
> (there 
> is<https://github.com/Sergey80/akka-samples/blob/master/src/main/java/s2_example/WordCountApp.java>
>  main class for that - you can see outputs if you launch it)
>
> Then when it receives ResultMessage, then wordCountMap is empty.
>
> *Q:* How come, all of the sudden it has empty map/state?
>
> Is that possible that Actor is re-initializing its state somehow with no
> message passed?
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Martynas Mickevičius
Typesafe <http://typesafe.com/> –
Reactive<http://www.reactivemanifesto.org/>Apps on the JVM

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to