storm-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [storm] d2r commented on a change in pull request #3050: STORM-3434: server: fix all checkstyle warnings
Date Sat, 10 Aug 2019 17:38:24 GMT
d2r commented on a change in pull request #3050: STORM-3434: server: fix all checkstyle warnings
URL: https://github.com/apache/storm/pull/3050#discussion_r312709531
 
 

 ##########
 File path: storm-server/src/main/java/org/apache/storm/Testing.java
 ##########
 @@ -314,6 +308,21 @@ public static void withTrackedCluster(MkClusterParam param, TestJob
code) {
         }
     }
 
+    /**
+     * In a tracked topology some metrics are tracked.  This provides a way to get those
metrics.
+     * This is intended mostly for internal testing.
+     *
+     * @param id the id of the tracked cluster
+     * @param key the name of the metric to get.
+     * @return the metric
+     */
+    @SuppressWarnings("unchecked")
+    @Deprecated
+    public static int globalAmt(String id, String key) {
+        LOG.warn("Reading tracked metrics for ID {}", id);
+        return ((ConcurrentHashMap<String, AtomicInteger>) RegisteredGlobalState.getState(id)).get(key).get();
+    }
+
 
 Review comment:
   Why was this moved?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message