Github user revans2 commented on a diff in the pull request:
https://github.com/apache/incubator-storm/pull/38#discussion_r10042474
--- Diff: storm-core/src/jvm/backtype/storm/metric/api/IMetric.java ---
@@ -17,6 +17,19 @@
*/
package backtype.storm.metric.api;
+import java.util.List;
+
public interface IMetric {
+ public static final String SHELL_METRICS_UPDATE_METHOD_NAME =
"updateMetricFromRPC";
+
public Object getValueAndReset();
+
+ /***
+ * @function
+ * This interface is used by ShellBolt, through RPC call to update
Metric
+ * @param
+ * params used to update metric, its's meaning change according
implementation
+ * Object is the type, should be String, Long, Double, Boolean
+ * */
+ public void updateMetricFromRPC(List<Object> params);
--- End diff --
I personally would prefer to see this method put into a separate interface
that other metrics can also implement if it makes sine for them to. This would
maintain backwards compatibility with existing user defined metrics
implementations.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---