storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/4] git commit: add memoized version of local-hostname in util ns
Date Fri, 25 Jul 2014 18:54:59 GMT
Repository: incubator-storm
Updated Branches:
  refs/heads/master 3a19ccc84 -> 30efc8a53


add memoized version of local-hostname in util ns


Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/a5c97d79
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/a5c97d79
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/a5c97d79

Branch: refs/heads/master
Commit: a5c97d79e0e809a43b962a8a6753f376e8bc020f
Parents: 85c9cd5
Author: Homer Strong <homer.strong@gmail.com>
Authored: Sun Jul 20 12:39:20 2014 -0700
Committer: Homer Strong <homer.strong@gmail.com>
Committed: Sun Jul 20 12:39:20 2014 -0700

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/util.clj | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/a5c97d79/storm-core/src/clj/backtype/storm/util.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/util.clj b/storm-core/src/clj/backtype/storm/util.clj
index 7c1d19e..3df25b7 100644
--- a/storm-core/src/clj/backtype/storm/util.clj
+++ b/storm-core/src/clj/backtype/storm/util.clj
@@ -204,6 +204,8 @@
   []
   (.getCanonicalHostName (InetAddress/getLocalHost)))
 
+(def memoized-local-hostname (memoize local-hostname))
+
 (letfn [(try-port [port]
                   (with-open [socket (java.net.ServerSocket. port)]
                     (.getLocalPort socket)))]


Mime
View raw message