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

Region Server metrics context will be wrong when machine hostname contain "master" word

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.0, 0.98.21, 2.0.0
    • 1.3.0, 1.1.6, 1.2.3, 0.98.22, 2.0.0
    • metrics
    • None
    • Reviewed

    Description

      While initializing RSRpcServices server name is formed as,

          String name = rs.getProcessName() + "/" + initialIsa.toString();
      

      So name will be like "regionserver/host_Name/host_IP:port".

      During MetricsHBaseServer intializing, we create server context name using String contains() which will be wrong when machine hostname contain "master" words.
      In MetricsHBaseServerSourceFactory,

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

      For example, "regionserver/node-master1-xyz/host-IP:16020"

      Attachments

        1. HBASE-16471.patch
          3 kB
          Pankaj Kumar
        2. HBASE-16471-V2.patch
          3 kB
          Pankaj Kumar
        3. HBASE-16471-0.98.patch
          3 kB
          Pankaj Kumar

        Activity

          People

            pankaj2461 Pankaj Kumar
            pankaj2461 Pankaj Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: