You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Siddharth Wagle (JIRA)" <ji...@apache.org> on 2019/03/12 03:09:00 UTC
[jira] [Comment Edited] (HDDS-918) Expose SCMMXBean
[ https://issues.apache.org/jira/browse/HDDS-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16790034#comment-16790034 ]
Siddharth Wagle edited comment on HDDS-918 at 3/12/19 3:08 AM:
---------------------------------------------------------------
Thanks for the review [~elek].
[~arpitagarwal] The {{org.apache.hadoop.hdds.scm.server.StorageContainerManager#getContainerStateCount}}
makes a call to: {{org.apache.hadoop.hdds.scm.container.SCMContainerManager#getContainers}}, which acquires lock and flattens the lifeCycleStateMap.
[~elek] I definitely see your concern, the only problem I see is that, since we are reporting state metrics (more like a snapshot in time), maintaining accurate counters would be non-trivial. IMO ContainerStateManger should maintain a simple data structure like: Map<LifeCycleState, Integer> stateCounters in the and update the values on {{org.apache.hadoop.hdds.scm.container.ContainerStateManager#updateContainerState}}
The metrics gauges will report these values. Else, the updateContainerState() would have to dcr() the currentState counter and incr() newState.
Working on the optimization.
was (Author: swagle):
Thanks for the review [~elek].
[~arpitagarwal] The {{org.apache.hadoop.hdds.scm.server.StorageContainerManager#getContainerStateCount}}
makes a call to: {{org.apache.hadoop.hdds.scm.container.SCMContainerManager#getContainers}}, which acquires lock and flattens the lifeCycleStateMap.
[~elek] I definitely see your concern, the only problem I see is that, since we are reporting state metrics (more like a snapshot in time), maintaining accurate counters would be non-trivial. Would it make sense to maintain a simple data structure like: Map<LifeCycleState, Integer> stateCounters in the ContainerStateManger and update the values on {{org.apache.hadoop.hdds.scm.container.ContainerStateManager#updateContainerState}}
The metrics gauges will report these values. Else, the updateContainerState() would have to dcr() the currentState counter and incr() newState.
> Expose SCMMXBean
> ----------------
>
> Key: HDDS-918
> URL: https://issues.apache.org/jira/browse/HDDS-918
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Reporter: Bharat Viswanadham
> Assignee: Siddharth Wagle
> Priority: Major
> Labels: newbie
> Attachments: HDDS-918.01.patch, HDDS-918.02.patch, HDDS-918.03.patch, HDDS-918.04.patch
>
>
> Implement MetricsSource interface, so that external metrics can collect the SCMMXBean metrics information.
>
> From *MetricsSource.java:*
> It registers with \{@link MetricsSystem}, which periodically polls it to collect \{@link MetricsRecord} and passes it to \{@link MetricsSink}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org