Skip to content

Commit

Permalink
Log "task is null" instead of let worker died
Browse files Browse the repository at this point in the history
* when task is null in transfer-fn, creating TaskMessage leads NPE
  • Loading branch information
HeartSaVioR committed Apr 17, 2015
1 parent a7c8310 commit 14477f4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions storm-core/src/clj/backtype/storm/daemon/worker.clj
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@
(when (not (.get remoteMap node+port))
(.put remoteMap node+port (ArrayList.)))
(let [remote (.get remoteMap node+port)]
(.add remote (TaskMessage. task (.serialize serializer tuple)))
))))
(if (not-nil? task)
(.add remote (TaskMessage. task (.serialize serializer tuple)))
(log-warn "Can't transfer tuple - task value is null. tuple information: " tuple))
))))
(local-transfer local)
(disruptor/publish transfer-queue remoteMap)
))]
Expand Down

0 comments on commit 14477f4

Please sign in to comment.