You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/11/01 21:48:00 UTC

[GitHub] [helix] pkuwm commented on a change in pull request #548: Add max capacity usage metric for instance monitor.

pkuwm commented on a change in pull request #548: Add max capacity usage metric for instance monitor.
URL: https://github.com/apache/helix/pull/548#discussion_r341762932
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/monitoring/mbeans/InstanceMonitor.java
 ##########
 @@ -24,35 +24,86 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.management.JMException;
+import javax.management.ObjectName;
+
 import com.google.common.base.Joiner;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
+import org.apache.helix.monitoring.mbeans.dynamicMBeans.DynamicMBeanProvider;
+import org.apache.helix.monitoring.mbeans.dynamicMBeans.DynamicMetric;
+import org.apache.helix.monitoring.mbeans.dynamicMBeans.SimpleDynamicMetric;
+
 
 /**
  * Implementation of the instance status bean
  */
-public class InstanceMonitor implements InstanceMonitorMBean {
+public class InstanceMonitor extends DynamicMBeanProvider {
+  /**
+   * Metric names for instance capacity.
+   */
+  public enum InstanceMonitorMetrics {
+    TOTAL_MESSAGE_RECEIVED_COUNTER("TotalMessageReceivedCounter"),
+    ENABLED_STATUS_GAUGE("EnabledStatusGauge"),
+    ONLINE_STATUS_GAUGE("OnlineStatusGauge"),
+    MAX_CAPACITY_USAGE_GAUGE("MaxCapacityUsageGauge"),
+    DISABLED_PARTITIONS_GAUGE("DisabledPartitionsGauge");
 
 Review comment:
   Changed. I am cleared about the static metric names. The names are decided by the getters' names.

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org