[
https://issues.apache.org/jira/browse/HADOOP-14944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16206709#comment-16206709
]
Xiao Chen commented on HADOOP-14944:
------------------------------------
Discussed John offline, and both of us investigated around this. Summarizing
below:
- Test failure in patch 1 was due to {{MetricsSystemImpl}}'s init and register
is different. Created HDFS-12668 for that. (But looking again now this should
be okay if we {{DefaultMetricsSystem.setMiniClusterMode(true)}} in the test)
- For trunk, {{KMSWebServer}} would be a better place since that's the 'main'
class where start/stop happens.
- For branch-2, since there is no 'main' class currently, this will go with
{{KMSWebApp}}. This may be an issue with [Tomcat virtual
host|https://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html], in
the sense that {{contextInitialized}} could be called multiple times. The
metrics are still fine since it's singleton and reference counted, but multiple
{{JvmPauseMonitor}}'s may be created. Solving that would involve in fundamental
changes in how the pause monitor and the metrics class interact, so that will
be left for a future jira.
Also, when verifying the test, running {{TestKMS#testKMSJMX}} alone passes, but
running with the whole test class, {{testKMSJMX}} fails. This is because the
JvmMetrics' singleton's {{impl}} won't change once it's created by the first
test case in the JVM. Added a flag similar to {{DefaultMetricsSystem}} to get
over this.
Attached patch 4 for trunk and patch 1 for branch-2.
> Add JvmMetrics to KMS
> ---------------------
>
> Key: HADOOP-14944
> URL: https://issues.apache.org/jira/browse/HADOOP-14944
> Project: Hadoop Common
> Issue Type: Improvement
> Components: kms
> Affects Versions: 2.6.0
> Reporter: Xiao Chen
> Assignee: Xiao Chen
> Attachments: HADOOP-14944.01.patch, HADOOP-14944.02.patch,
> HADOOP-14944.03.patch, HADOOP-14944.04.patch, HADOOP-14944.branch-2.01.patch
>
>
> Let's make KMS to use {{JvmMetrics}} to report aggregated statistics about
> heap / GC etc.
> This will make statistics monitoring easier, and compatible across the
> tomcat-based (branch-2) KMS and the jetty-based (branch-3) KMS.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]