hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pankaj Kumar (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-16471) Region Server metrics context will be wrong when machine hostname contain master word
Date Tue, 23 Aug 2016 04:10:20 GMT
Pankaj Kumar created HBASE-16471:
------------------------------------

             Summary: Region Server metrics context will be wrong when machine hostname contain
master word
                 Key: HBASE-16471
                 URL: https://issues.apache.org/jira/browse/HBASE-16471
             Project: HBase
          Issue Type: Bug
          Components: metrics
    Affects Versions: 0.98.21, 2.0.0, 1.3.0
            Reporter: Pankaj Kumar
            Priority: Minor


While initializing RSRpcServices server name is formed as,
{code}
    String name = rs.getProcessName() + "/" + initialIsa.toString();
{code}
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, 
{code}
  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";
  }
{code}

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message