hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-14954) MetricsSystemImpl#init should increment refCount when already initialized
Date Tue, 24 Oct 2017 03:52:00 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-14954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16216257#comment-16216257
] 

Hudson commented on HADOOP-14954:
---------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #13127 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/13127/])
Revert "HADOOP-14954. MetricsSystemImpl#init should increment refCount (jzhuge: rev c904d60c38fe2720513a4824a56e9e8ebef6e17f)
* (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestMetricsSystemImpl.java
* (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/MetricsSystemImpl.java


> 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
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message