hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12327) MetricsHBaseServerSourceFactory#createContextName has wrong conditions
Date Thu, 23 Oct 2014 14:13:34 GMT

    [ https://issues.apache.org/jira/browse/HBASE-12327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14181373#comment-14181373
] 

Ted Yu commented on HBASE-12327:
--------------------------------

Why are both "HMaster" and "master" checked ?

Thanks

> MetricsHBaseServerSourceFactory#createContextName has wrong conditions
> ----------------------------------------------------------------------
>
>                 Key: HBASE-12327
>                 URL: https://issues.apache.org/jira/browse/HBASE-12327
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Sanghyun Yun
>         Attachments: HBASE-12327.patch
>
>
> MetricsHBaseServerSourceFactory#createContextName has wrong conditions.
> It checks serverName contains "HMaster" or "HRegion".
> {code:title=MetricsHBaseServerSourceFactory.java}
> ...
>   protected static String createContextName(String serverName) {
>     if (serverName.contains("HMaster")) {
>       return "Master";
>     } else if (serverName.contains("HRegion")) {
>       return "RegionServer";
>     }
>     return "IPC";
>   }
> ...
> {code}
> But, passed serverName actually contains "master" or "regionserver" by HMaster#getProcessName
and HRegionServer#getProcessName.
> {code:title=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;
>   }
> ...
> {code}
> {code:title=HRegionServer.java}
> ...
>   /** region server process name */
>   public static final String REGIONSERVER = "regionserver";
> ...
>   protected String getProcessName() {
>     return REGIONSERVER;
>   }
> ...
> {code}



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

Mime
View raw message