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 2016/02/24 17:17:33 UTC

[23/27] storm git commit: convert ExecutorStats to stats of clojure by clojurify-executor-stats

convert ExecutorStats to stats of clojure by clojurify-executor-stats


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

Branch: refs/heads/master
Commit: d70952513336532c80957e5398bfbedacff78cb7
Parents: 581cd29
Author: xiaojian.fxj <xi...@alibaba-inc.com>
Authored: Tue Feb 23 22:05:50 2016 +0800
Committer: xiaojian.fxj <xi...@alibaba-inc.com>
Committed: Tue Feb 23 22:05:50 2016 +0800

----------------------------------------------------------------------
 storm-core/src/clj/org/apache/storm/converter.clj     | 2 +-
 storm-core/src/clj/org/apache/storm/daemon/nimbus.clj | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/d7095251/storm-core/src/clj/org/apache/storm/converter.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/converter.clj b/storm-core/src/clj/org/apache/storm/converter.clj
index c845cd4..e269c5d 100644
--- a/storm-core/src/clj/org/apache/storm/converter.clj
+++ b/storm-core/src/clj/org/apache/storm/converter.clj
@@ -241,7 +241,7 @@
 
 (defn clojurify-zk-executor-hb [^ExecutorBeat executor-hb]
   (if executor-hb
-    {:stats (.getStats executor-hb)
+    {:stats (clojurify-executor-stats (.getStats executor-hb))
      :uptime (.getUptime executor-hb)
      :time-secs (.getTimeSecs executor-hb)
      }

http://git-wip-us.apache.org/repos/asf/storm/blob/d7095251/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj b/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
index e43bab9..2f6587a 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
@@ -597,7 +597,6 @@
                          (->> (dofor [[^ExecutorInfo executor-info  ^ExecutorBeat executor-heartbeat] executor-stats-clojurify]
                              {[(.get_task_start executor-info) (.get_task_end executor-info)] (clojurify-zk-executor-hb executor-heartbeat)})
                            (apply merge)))
-
         cache (update-heartbeat-cache (@(:heartbeats-cache nimbus) storm-id)
                                       executor-beats
                                       all-executors
@@ -1918,16 +1917,16 @@
               executor-summaries (dofor [[executor [node port]] (:executor->node+port assignment)]
                                         (let [host (-> assignment :node->host (get node))
                                               heartbeat (get beats executor)
-                                              stats (:stats heartbeat)
-                                              stats (if stats
-                                                      (stats/thriftify-executor-stats stats))]
+                                              excutorstats (:stats heartbeat)
+                                              excutorstats (if excutorstats
+                                                      (stats/thriftify-executor-stats excutorstats))]
                                           (doto
                                               (ExecutorSummary. (thriftify-executor-id executor)
                                                                 (-> executor first task->component)
                                                                 host
                                                                 port
                                                                 (Utils/nullToZero (:uptime heartbeat)))
-                                            (.set_stats stats))
+                                            (.set_stats excutorstats))
                                           ))
               topo-info  (TopologyInfo. storm-id
                            storm-name