You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2015/10/05 23:00:45 UTC

[13/37] storm git commit: clearer docstrings

clearer docstrings


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

Branch: refs/heads/master
Commit: c1cc0bab5c9f0338b18cc431d36f8b5b465a195f
Parents: b3abf05
Author: Derek Dagit <de...@yahoo-inc.com>
Authored: Fri May 22 14:50:59 2015 -0500
Committer: Derek Dagit <de...@yahoo-inc.com>
Committed: Fri May 22 14:50:59 2015 -0500

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/stats.clj | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/c1cc0bab/storm-core/src/clj/backtype/storm/stats.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/stats.clj b/storm-core/src/clj/backtype/storm/stats.clj
index f9b0e35..cce2b3a 100644
--- a/storm-core/src/clj/backtype/storm/stats.clj
+++ b/storm-core/src/clj/backtype/storm/stats.clj
@@ -363,7 +363,7 @@
       rate)))
 
 (defn- agg-bolt-lat-and-count
-  "Aggregates number executed and process & execute latencies across all
+  "Aggregates number executed, process latency, and execute latency across all
   streams."
   [idk->exec-avg idk->proc-avg idk->num-executed]
   {:pre (apply = (map #(set (keys %))
@@ -440,8 +440,11 @@
             :acked (get idk->acked k)}]))))
 
 (defn swap-map-order
-  "{:a {:A 3, :B 5}, :b {:A 1, :B 2}}
-    -> {:A {:b 1, :a 3}, :B {:b 2, :a 5}}"
+  "For a nested map, rearrange data such that the top-level keys become the
+  nested map's keys and vice versa.
+  Example:
+  {:a {:X :banana, :Y :pear}, :b {:X :apple, :Y :orange}}
+  -> {:Y {:a :pear, :b :orange}, :X {:a :banana, :b :apple}}"
   [m]
   (apply merge-with
          merge