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 2021/03/25 21:25:13 UTC
[GitHub] [helix] zhangmeng916 commented on a change in pull request #1685: Change participant message monitor to use dynamic metric
zhangmeng916 commented on a change in pull request #1685:
URL: https://github.com/apache/helix/pull/1685#discussion_r601849577
##########
File path: helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ParticipantMessageMonitor.java
##########
@@ -19,86 +19,93 @@
* under the License.
*/
-public class ParticipantMessageMonitor implements ParticipantMessageMonitorMBean {
+import java.util.ArrayList;
+import java.util.List;
+import javax.management.JMException;
+import javax.management.ObjectName;
+import org.apache.helix.monitoring.mbeans.dynamicMBeans.DynamicMBeanProvider;
+import org.apache.helix.monitoring.mbeans.dynamicMBeans.DynamicMetric;
+import org.apache.helix.monitoring.mbeans.dynamicMBeans.SimpleDynamicMetric;
+
+
+public class ParticipantMessageMonitor extends DynamicMBeanProvider {
public static final String PARTICIPANT_KEY = "ParticipantName";
public static final String PARTICIPANT_STATUS_KEY = "ParticipantMessageStatus";
+ // For registering dynamic metrics
+ private final ObjectName _initObjectName;
+ private final String _participantName;
+
+ private SimpleDynamicMetric<Long> _receivedMessages;
+ private SimpleDynamicMetric<Long> _discardedMessages;
+ private SimpleDynamicMetric<Long> _completedMessages;
+ private SimpleDynamicMetric<Long> _failedMessages;
+ private SimpleDynamicMetric<Long> _pendingMessages;
+
/**
* The current processed state of the message
*/
public enum ProcessedMessageState {
- DISCARDED,
- FAILED,
- COMPLETED
+ DISCARDED, FAILED, COMPLETED
Review comment:
Yeah, seems caused by formatter. Changed back.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org