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:
[email protected]
With regards,
Apache Git Services