[
https://issues.apache.org/jira/browse/STORM-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15108986#comment-15108986
]
ASF GitHub Bot commented on STORM-1227:
---------------------------------------
Github user zhuoliu commented on a diff in the pull request:
https://github.com/apache/storm/pull/1030#discussion_r50287206
--- Diff: storm-core/src/clj/org/apache/storm/config.clj ---
@@ -41,11 +41,30 @@
(dofor [f (seq (.getFields Config))]
(.get f nil)))
-
+;; TODO this function and its callings will be replace when nimbus and
supervisor move to Java
(defn cluster-mode
[conf & args]
(keyword (conf STORM-CLUSTER-MODE)))
+(defn sampling-rate
+ [conf]
+ (->> (conf TOPOLOGY-STATS-SAMPLE-RATE)
+ (/ 1)
+ int))
+
+;; TODO this function together with sampling-rate are to be replaced with
Java version when util.clj is in
+(defn mk-stats-sampler
+ [conf]
+ (even-sampler (sampling-rate conf)))
+
+;; TODO this function is to be replaced with Java version when util.clj is
in
+(defn read-default-config
+ []
+ (clojurify-structure (Utils/readDefaultConfig)))
+
+
+
+(comment
--- End diff --
Will delete.
> port backtype.storm.config to java
> ----------------------------------
>
> Key: STORM-1227
> URL: https://issues.apache.org/jira/browse/STORM-1227
> Project: Apache Storm
> Issue Type: New Feature
> Components: storm-core
> Reporter: Robert Joseph Evans
> Assignee: Zhuo Liu
> Labels: java-migration, jstorm-merger
>
> port backtype.storm.config to java. There are some parts of this that for
> convince sake may need to stay in clojure, or have clojure equivalents.
> The code that turns Config.* into clojure constants needs to stay, and
> reading the config may need to stay in clojure until we can cleanup all of
> the places it is used to not need the migration.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)