Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14954

MetricsSystemImpl#init should increment refCount when already initialized

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 2.7.0
    • None
    • metrics
    • None

    Description

      ++refCount here in init should be symmetric to --refCount in shutdown.

        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;
      

      Move ++refCount to the beginning of this method.

      Attachments

        1. HADOOP-14954.001.patch
          1 kB
          John Zhuge
        2. HADOOP-14954.002.patch
          4 kB
          John Zhuge
        3. HADOOP-14954.002a.patch
          16 kB
          John Zhuge

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jzhuge John Zhuge
            jzhuge John Zhuge

            Dates

              Created:
              Updated:

              Slack

                Issue deployment