You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by Karthick Duraisamy Soundararaj <ka...@gmail.com> on 2015/04/10 01:45:48 UTC
Clarification - "should synchronize supervisor so it doesn't launch
anything after being down (optimization)"
Hi Team,
I find the following snippet of code in the supervisor.clj.
In short, when the supervisor starts up.
;; should synchronize supervisor so it doesn't launch anything after
being down (optimization)
(schedule-recurring (:timer supervisor)
0
(conf SUPERVISOR-HEARTBEAT-FREQUENCY-SECS)
heartbeat-fn)
All the above snippet does is registers a heartbeat function which
spins off a thread to run heartbeat function periodically. All the
heartbeat function does is write SupervisorInfo into znode. So I am
not able to comprehend the comment. I am not able to explain the
following
- Does this comment mean to say supervisor need to be synchronized
in the future as an optimization or does it provide a reason as why
its being synchronized. I dont see any synchronization code - so i
would assume earlier but just making sure that I understand it right.
- Why does the supervisor need to be synchronised in the context of
the heartbeat function - afterall all, the heartbeat function only
writes the supervisor info into the zookeeper?
Re: Clarification - "should synchronize supervisor so it doesn't
launch anything after being down (optimization)"
Posted by Karthick Duraisamy Soundararaj <ka...@gmail.com>.
Hi Team,
Sorry about partial message. I find the following snippet of
code in the supervisor.clj. In short, when the supervisor starts up.
;; should synchronize supervisor so it doesn't launch anything after
being down (optimization)
(schedule-recurring (:timer supervisor)
0
(conf SUPERVISOR-HEARTBEAT-FREQUENCY-SECS)
heartbeat-fn)
All the above snippet does is registers a heartbeat function which
spins off a thread to run heartbeat function periodically. All the
heartbeat function does is write SupervisorInfo into znode. So I am
not able to comprehend the comment. I am not able to explain the
following
- Does this comment mean to say supervisor need to be synchronized
in the future as an optimization or does it provide a reason as why
its being synchronized. I dont see any synchronization code - so i
would assume earlier but just making sure that I understand it right.
- Why does the supervisor need to be synchronised in the context of
the heartbeat function - afterall all, the heartbeat function only
writes the supervisor info into the zookeeper?
It would great if someone could throw light on this.
Thanks,
Karthick
On Thu, Apr 9, 2015 at 4:45 PM, Karthick Duraisamy Soundararaj <
karthick.soundararaj@gmail.com> wrote:
> Hi Team,
> I find the following snippet of code in the supervisor.clj.
> In short, when the supervisor starts up.
>
> ;; should synchronize supervisor so it doesn't launch anything after being down (optimization)
> (schedule-recurring (:timer supervisor)
> 0
> (conf SUPERVISOR-HEARTBEAT-FREQUENCY-SECS)
> heartbeat-fn)
>
> All the above snippet does is registers a heartbeat function which spins off a thread to run heartbeat function periodically. All the heartbeat function does is write SupervisorInfo into znode. So I am not able to comprehend the comment. I am not able to explain the following
>
>
> - Does this comment mean to say supervisor need to be synchronized in the future as an optimization or does it provide a reason as why its being synchronized. I dont see any synchronization code - so i would assume earlier but just making sure that I understand it right.
> - Why does the supervisor need to be synchronised in the context of the heartbeat function - afterall all, the heartbeat function only writes the supervisor info into the zookeeper?
>
>
>
>