You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Shilun Fan (Jira)" <ji...@apache.org> on 2024/01/04 11:29:00 UTC
[jira] [Updated] (HADOOP-14954) MetricsSystemImpl#init should increment refCount when already initialized
[ https://issues.apache.org/jira/browse/HADOOP-14954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shilun Fan updated HADOOP-14954:
--------------------------------
Target Version/s: 3.5.0 (was: 3.4.0)
> MetricsSystemImpl#init should increment refCount when already initialized
> -------------------------------------------------------------------------
>
> Key: HADOOP-14954
> URL: https://issues.apache.org/jira/browse/HADOOP-14954
> Project: Hadoop Common
> Issue Type: Bug
> Components: metrics
> Affects Versions: 2.7.0
> Reporter: John Zhuge
> Assignee: John Zhuge
> Priority: Minor
> Attachments: HADOOP-14954.001.patch, HADOOP-14954.002.patch, HADOOP-14954.002a.patch
>
>
> {{++refCount}} here in {{init}} should be symmetric to {{--refCount}} in {{shutdown}}.
> {code:java}
> public synchronized MetricsSystem init(String prefix) {
> if (monitoring && !DefaultMetricsSystem.inMiniClusterMode()) {
> LOG.warn(this.prefix +" metrics system already initialized!");
> return this;
> }
> this.prefix = checkNotNull(prefix, "prefix");
> ++refCount;
> {code}
> Move {{++refCount}} to the beginning of this method.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org