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

MetricsSystemImpl#init should increment refCount when already initialized

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.7.0
    • Fix Version/s: None
    • Component/s: metrics
    • Labels:
      None
    • Target Version/s:

      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

              People

              • Assignee:
                jzhuge John Zhuge
                Reporter:
                jzhuge John Zhuge
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: