You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "caofangkun (JIRA)" <ji...@apache.org> on 2014/12/16 05:35:13 UTC
[jira] [Assigned] (STORM-548) Receive Thread Shutdown hook should
connect to local hostname but not "localhost"
[ https://issues.apache.org/jira/browse/STORM-548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
caofangkun reassigned STORM-548:
--------------------------------
Assignee: caofangkun
> Receive Thread Shutdown hook should connect to local hostname but not "localhost"
> ----------------------------------------------------------------------------------
>
> Key: STORM-548
> URL: https://issues.apache.org/jira/browse/STORM-548
> Project: Apache Storm
> Issue Type: Bug
> Affects Versions: 0.9.3-rc2
> Reporter: caofangkun
> Assignee: caofangkun
> Priority: Minor
> Fix For: 0.10.0
>
>
> backtype.storm.messaging.loader#launch-receive-thread!
> kill-socket should connect to local hostname but not "localhost"
> See Code Line 72:
> https://github.com/apache/storm/blob/master/storm-core/src/clj/backtype/storm/messaging/loader.clj#L72
> {code:title=loader.clj|borderStyle=solid}
> Index: src/clj/backtype/storm/messaging/loader.clj
> ===================================================================
> --- src/clj/backtype/storm/messaging/loader.clj (revision 4017)
> +++ src/clj/backtype/storm/messaging/loader.clj (working copy)
> @@ -65,11 +65,12 @@
> :kill-fn (fn [t] (System/exit 1))
> :priority Thread/NORM_PRIORITY]
> (let [max-buffer-size (int max-buffer-size)
> + local-hostname (memoized-local-hostname)
> socket (.bind ^IContext context storm-id port)
> thread-count (if receiver-thread-count receiver-thread-count 1)
> vthreads (mk-receive-threads context storm-id port transfer-local-fn daemon kill-fn priority socket max-buffer-size thread-count)]
> (fn []
> - (let [kill-socket (.connect ^IContext context storm-id "localhost" port)]
> + (let [kill-socket (.connect ^IContext context storm-id local-hostname port)]
> (log-message "Shutting down receiving-thread: [" storm-id ", " port "]")
> (.send ^IConnection kill-socket
> -1 (byte-array []))
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)