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

MetricsSystemImpl#init should increment refCount when already initialized

    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

            People

              jzhuge John Zhuge
              jzhuge John Zhuge
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: