You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by Darwin Chase <ca...@outlook.com> on 2015/09/10 15:50:38 UTC
found useless code in worker.clj
Dear all,
These time i start reading the storm code, i found much duplicate or useless code i think, just like "mk-refresh-connections" function in worker.clj:
(let [missing-tasks (->> needed-tasks
(filter (complement my-assignment)))]
(when-not (empty? missing-tasks)
(log-warn "Missing assignment for following tasks: " (pr-str missing-tasks))
))
the needed-tasks comes from my-assignment, of course every element can be found in map my-assignment, why this code was added here?
Darwin
Best regards..
Re: found useless code in worker.clj
Posted by Brandon Adams <em...@gmail.com>.
I'd suggest reading the git log for that file.
On Thu, Sep 10, 2015 at 8:50 AM, Darwin Chase <ca...@outlook.com> wrote:
> Dear all,
> These time i start reading the storm code, i found much duplicate or
> useless code i think, just like "mk-refresh-connections" function in
> worker.clj:
> (let [missing-tasks (->> needed-tasks
> (filter (complement my-assignment)))]
> (when-not (empty? missing-tasks)
> (log-warn "Missing assignment for following tasks: " (pr-str
> missing-tasks))
> ))
>
> the needed-tasks comes from my-assignment, of course every element can be
> found in map my-assignment, why this code was added here?
>
>
>
> Darwin
> Best regards..
>
>