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

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 0.98.21, 2.0.0
    • Fix Version/s: 1.3.0, 1.1.6, 1.2.3, 0.98.22, 2.0.0
    • Component/s: metrics
    • Labels:
      None
    • Hadoop Flags:
      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-0.98.patch
          3 kB
          Pankaj Kumar
        2. HBASE-16471-V2.patch
          3 kB
          Pankaj Kumar
        3. HBASE-16471.patch
          3 kB
          Pankaj Kumar

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: