[
https://issues.apache.org/jira/browse/HADOOP-10169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13851303#comment-13851303
]
Liang Xie commented on HADOOP-10169:
------------------------------------
[~jingzhao], [~jlowe], thanks for your review, yes, seems my original thought
has some flaw:)
I just attached another small v2 patch, could you help to review again? thanks
in advance! I think it's enough to use the ConcurrentHashMap to replace the big
Synchronized, and it should be OK for all the read-only requests once
initialization done.
[~jlowe], thanks for your detailed pseudo-code, IMHO, it seems a bit tricky
here to work correctly maybe, since the getGcInfo() is invoked by a loop in
getGcUsage(), then if the first time in loop initialized successful, then the
latter ones will be omitted:)
> remove the unnecessary synchronized in JvmMetrics class
> --------------------------------------------------------
>
> Key: HADOOP-10169
> URL: https://issues.apache.org/jira/browse/HADOOP-10169
> Project: Hadoop Common
> Issue Type: Improvement
> Components: metrics
> Affects Versions: 3.0.0, 2.2.0
> Reporter: Liang Xie
> Assignee: Liang Xie
> Priority: Minor
> Attachments: HADOOP-10169-v2.txt, HADOOP-10169.txt
>
>
> When i looked into a HBase JvmMetric impl, just found this synchronized seems
> not essential.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)