You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Sanghyun Yun (JIRA)" <ji...@apache.org> on 2014/11/22 09:29:34 UTC
[jira] [Updated] (HBASE-12327)
MetricsHBaseServerSourceFactory#createContextName has wrong conditions
[ https://issues.apache.org/jira/browse/HBASE-12327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sanghyun Yun updated HBASE-12327:
---------------------------------
Resolution: Fixed
Fix Version/s: 0.99.2
2.0.0
Status: Resolved (was: Patch Available)
> 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
> Fix For: 2.0.0, 0.99.2
>
> Attachments: HBASE-12327.2.patch, 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)