use new hostname util consistently in daemons
Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/46ffd19e Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/46ffd19e Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/46ffd19e Branch: refs/heads/master Commit: 46ffd19e910fea1979be547ad7894faf0dcc371f Parents: 04583cf Author: Homer Strong <[email protected]> Authored: Sat Nov 8 13:06:23 2014 -0800 Committer: Homer Strong <[email protected]> Committed: Sat Nov 8 13:06:23 2014 -0800 ---------------------------------------------------------------------- storm-core/src/clj/backtype/storm/daemon/executor.clj | 5 ++--- storm-core/src/clj/backtype/storm/daemon/supervisor.clj | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/46ffd19e/storm-core/src/clj/backtype/storm/daemon/executor.clj ---------------------------------------------------------------------- diff --git a/storm-core/src/clj/backtype/storm/daemon/executor.clj b/storm-core/src/clj/backtype/storm/daemon/executor.clj index a5df9cc..63428d5 100644 --- a/storm-core/src/clj/backtype/storm/daemon/executor.clj +++ b/storm-core/src/clj/backtype/storm/daemon/executor.clj @@ -176,7 +176,7 @@ (when (<= @interval-errors max-per-interval) (cluster/report-error (:storm-cluster-state executor) (:storm-id executor) (:component-id executor) - (:storm-conf STORM-LOCAL-HOSTNAME (memoized-local-hostname)) + (hostname storm-conf) (.getThisWorkerPort (:worker-context executor)) error) )))) @@ -279,8 +279,7 @@ task-id (:task-id task-data) name->imetric (-> interval->task->metric-registry (get interval) (get task-id)) task-info (IMetricsConsumer$TaskInfo. - (get-in executor-data [:storm-conf STORM-LOCAL-HOSTNAME] - (memoized-local-hostname)) + (hostname (:storm-conf executor-data)) (.getThisWorkerPort worker-context) (:component-id executor-data) task-id http://git-wip-us.apache.org/repos/asf/storm/blob/46ffd19e/storm-core/src/clj/backtype/storm/daemon/supervisor.clj ---------------------------------------------------------------------- diff --git a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj index b370eb7..71f9bfb 100644 --- a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj +++ b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj @@ -212,9 +212,7 @@ :local-state (supervisor-state conf) :supervisor-id (.getSupervisorId isupervisor) :assignment-id (.getAssignmentId isupervisor) - :my-hostname (if (contains? conf STORM-LOCAL-HOSTNAME) - (conf STORM-LOCAL-HOSTNAME) - (local-hostname)) + :my-hostname (hostname conf) :curr-assignment (atom nil) ;; used for reporting used ports when heartbeating :timer (mk-timer :kill-fn (fn [t] (log-error t "Error when processing event")
