Repository: storm Updated Branches: refs/heads/master d23bd3ed2 -> 647d672b5
Remove redundent clojure method system-id Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/82811153 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/82811153 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/82811153 Branch: refs/heads/master Commit: 8281115371e852eb540246fd127b29d1da5e6f6a Parents: f0049e6 Author: Kishor Patil <kpa...@yahoo-inc.com> Authored: Wed Oct 14 18:45:20 2015 +0000 Committer: Kishor Patil <kpa...@yahoo-inc.com> Committed: Wed Oct 14 18:45:20 2015 +0000 ---------------------------------------------------------------------- storm-core/src/clj/backtype/storm/daemon/common.clj | 7 ++----- storm-core/src/clj/backtype/storm/daemon/executor.clj | 2 +- storm-core/src/clj/backtype/storm/stats.clj | 8 ++++---- storm-core/src/clj/backtype/storm/ui/core.clj | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/82811153/storm-core/src/clj/backtype/storm/daemon/common.clj ---------------------------------------------------------------------- diff --git a/storm-core/src/clj/backtype/storm/daemon/common.clj b/storm-core/src/clj/backtype/storm/daemon/common.clj index a1b6241..a2bef00 100644 --- a/storm-core/src/clj/backtype/storm/daemon/common.clj +++ b/storm-core/src/clj/backtype/storm/daemon/common.clj @@ -29,9 +29,6 @@ (:require [backtype.storm.thrift :as thrift]) ) -(defn system-id? [id] - (Utils/isSystemId id)) - (def ACKER-COMPONENT-ID acker/ACKER-COMPONENT-ID) (def ACKER-INIT-STREAM-ID acker/ACKER-INIT-STREAM-ID) (def ACKER-ACK-STREAM-ID acker/ACKER-ACK-STREAM-ID) @@ -114,12 +111,12 @@ (doseq [f thrift/STORM-TOPOLOGY-FIELDS :let [obj-map (.getFieldValue topology f)]] (doseq [id (keys obj-map)] - (if (system-id? id) + (if (Utils/isSystemId id) (throw (InvalidTopologyException. (str id " is not a valid component id"))))) (doseq [obj (vals obj-map) id (-> obj .get_common .get_streams keys)] - (if (system-id? id) + (if (Utils/isSystemId id) (throw (InvalidTopologyException. (str id " is not a valid stream id")))))) )) http://git-wip-us.apache.org/repos/asf/storm/blob/82811153/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 746fde3..d91f3a5 100644 --- a/storm-core/src/clj/backtype/storm/daemon/executor.clj +++ b/storm-core/src/clj/backtype/storm/daemon/executor.clj @@ -349,7 +349,7 @@ receive-queue (:receive-queue executor-data) context (:worker-context executor-data)] (when tick-time-secs - (if (or (system-id? (:component-id executor-data)) + (if (or (Utils/isSystemId (:component-id executor-data)) (and (= false (storm-conf TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS)) (= :spout (:type executor-data)))) (log-message "Timeouts disabled for executor " (:component-id executor-data) ":" (:executor-id executor-data)) http://git-wip-us.apache.org/repos/asf/storm/blob/82811153/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 3f55fc1..7310f2c 100644 --- a/storm-core/src/clj/backtype/storm/stats.clj +++ b/storm-core/src/clj/backtype/storm/stats.clj @@ -23,9 +23,9 @@ ComponentPageInfo ComponentType BoltAggregateStats ExecutorAggregateStats SpecificAggregateStats SpoutAggregateStats TopologyPageInfo TopologyStats]) + (:import [backtype.storm.utils Utils]) (:use [backtype.storm log util]) - (:use [clojure.math.numeric-tower :only [ceil]]) - (:use [backtype.storm.daemon [common :only [system-id?]]])) + (:use [clojure.math.numeric-tower :only [ceil]])) ;;TODO: consider replacing this with some sort of RRD @@ -399,7 +399,7 @@ [include-sys?] (if include-sys? (fn [_] true) - (fn [stream] (and (string? stream) (not (system-id? stream)))))) + (fn [stream] (and (string? stream) (not (Utils/isSystemId stream)))))) (defn mk-include-sys-filter "Returns a function that includes or excludes map entries whose keys are @@ -892,7 +892,7 @@ :let [beat (beats executor) id (task->component start)] :when (and (or (nil? comp-id) (= comp-id id)) - (or include-sys? (not (system-id? id))))] + (or include-sys? (not (Utils/isSystemId id))))] {:exec-id executor :comp-id id :num-tasks (count (range start (inc end))) http://git-wip-us.apache.org/repos/asf/storm/blob/82811153/storm-core/src/clj/backtype/storm/ui/core.clj ---------------------------------------------------------------------- diff --git a/storm-core/src/clj/backtype/storm/ui/core.clj b/storm-core/src/clj/backtype/storm/ui/core.clj index 1f94098..9feab8e 100644 --- a/storm-core/src/clj/backtype/storm/ui/core.clj +++ b/storm-core/src/clj/backtype/storm/ui/core.clj @@ -24,7 +24,7 @@ (:use [backtype.storm config util log stats tuple zookeeper]) (:use [backtype.storm.ui helpers]) (:use [backtype.storm.daemon [common :only [ACKER-COMPONENT-ID ACKER-INIT-STREAM-ID ACKER-ACK-STREAM-ID - ACKER-FAIL-STREAM-ID system-id? mk-authorization-handler]]]) + ACKER-FAIL-STREAM-ID mk-authorization-handler]]]) (:use [clojure.string :only [blank? lower-case trim]]) (:import [backtype.storm.utils Utils] [backtype.storm.generated NimbusSummary])