Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-12327

MetricsHBaseServerSourceFactory#createContextName has wrong conditions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.99.2
    • None
    • None

    Description

      MetricsHBaseServerSourceFactory#createContextName has wrong conditions.

      It checks serverName contains "HMaster" or "HRegion".

      MetricsHBaseServerSourceFactory.java
      ...
        protected static String createContextName(String serverName) {
          if (serverName.contains("HMaster")) {
            return "Master";
          } else if (serverName.contains("HRegion")) {
            return "RegionServer";
          }
          return "IPC";
        }
      ...
      

      But, passed serverName actually contains "master" or "regionserver" by HMaster#getProcessName and HRegionServer#getProcessName.

      HMaster.java
      ...
        // MASTER is name of the webapp and the attribute name used stuffing this
        //instance into web context.
        public static final String MASTER = "master";
      ...
        protected String getProcessName() {
          return MASTER;
        }
      ...
      
      HRegionServer.java
      ...
        /** region server process name */
        public static final String REGIONSERVER = "regionserver";
      ...
        protected String getProcessName() {
          return REGIONSERVER;
        }
      ...
      

      Attachments

        1. HBASE-12327.2.patch
          1 kB
          Sanghyun Yun
        2. HBASE-12327.patch
          0.9 kB
          Sanghyun Yun

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yunsh Sanghyun Yun
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: