You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Ashish Singhi <as...@gmail.com> on 2015/04/24 18:47:20 UTC

How to retrieve master metrics from JMX client

Hi devs.

I see that in all other code branches other than 0.98 we do not load
JMXListener for masters.
Here is the below code snippet from JMXListener class.

{code}
    if (env instanceof MasterCoprocessorEnvironment) {
      LOG.error("JMXListener should not be loaded in Master Environment!");
    } else if (env instanceof RegionServerCoprocessorEnvironment) {
      // running on RegionServer --since 0.99 HMaster is also a HRegionServer
      rmiRegistryPort =
        conf.getInt("regionserver" + RMI_REGISTRY_PORT_CONF_KEY,
defRMIRegistryPort);
      rmiConnectorPort =
        conf.getInt("regionserver" + RMI_CONNECTOR_PORT_CONF_KEY,
rmiRegistryPort);
      LOG.info("RegionServer rmiRegistryPort:" + rmiRegistryPort
        + ",RegionServer rmiConnectorPort:" + rmiConnectorPort);

    } else if (env instanceof RegionCoprocessorEnvironment) {
      LOG.error("JMXListener should not be loaded in Region Environment!");
    }
{code}

How can one retrieve master metrics from JMX client ? As we have a
system like OM(operation management) which monitors master metrics
using JMX client. We used to retrieve these metrics successfully from
0.98 code branch as there JMListener is loaded in both Master and
RegionServer environments.

-- 
Ashish Singhi

Re: How to retrieve master metrics from JMX client

Posted by Ashish Singhi <as...@gmail.com>.
Thanks Stack for the confirmation. I will create a jira and handle this in
same way as 0.98 tomorrow.

-- Ashish Singhi

On Fri, Apr 24, 2015 at 11:17 PM, Stack <st...@duboce.net> wrote:

> On Fri, Apr 24, 2015 at 10:40 AM, Ashish Singhi <
> ashish.singhi.apache@gmail.com> wrote:
>
> > Hit enter pretty fast. My bad.
> >
> > Yes, it got implemented as part of HBASE-10289 and here it only says
> "since
> > 0.99 HMaster is also a HRegionServer". I agree but what about the master
> > metrics. Master mbean is not loaded in RegionServer env. So how a user
> can
> > retrieve master metrics from JMX client  where the listener is loaded
> only
> > in RegionServer env ?
> >
>
> Master MBean should be published too. Sounds like a bug.
> St.Ack
>

Re: How to retrieve master metrics from JMX client

Posted by Stack <st...@duboce.net>.
On Fri, Apr 24, 2015 at 10:40 AM, Ashish Singhi <
ashish.singhi.apache@gmail.com> wrote:

> Hit enter pretty fast. My bad.
>
> Yes, it got implemented as part of HBASE-10289 and here it only says "since
> 0.99 HMaster is also a HRegionServer". I agree but what about the master
> metrics. Master mbean is not loaded in RegionServer env. So how a user can
> retrieve master metrics from JMX client  where the listener is loaded only
> in RegionServer env ?
>

Master MBean should be published too. Sounds like a bug.
St.Ack

Re: How to retrieve master metrics from JMX client

Posted by Ashish Singhi <as...@gmail.com>.
Hit enter pretty fast. My bad.

Yes, it got implemented as part of HBASE-10289 and here it only says "since
0.99 HMaster is also a HRegionServer". I agree but what about the master
metrics. Master mbean is not loaded in RegionServer env. So how a user can
retrieve master metrics from JMX client  where the listener is loaded only
in RegionServer env ?

-- Ashish Singhi

On Fri, Apr 24, 2015 at 10:59 PM, Ashish Singhi <
ashish.singhi.apache@gmail.com> wrote:

> Yes, HBASE-10289
>
> -- Ashish Singhi
>
> On Fri, Apr 24, 2015 at 10:54 PM, Stack <st...@duboce.net> wrote:
>
>> Does git blame take you to an issue with any reasoning as to why master
>> jmx
>> is turned off Ashish?
>> St.Ack
>>
>> On Fri, Apr 24, 2015 at 9:47 AM, Ashish Singhi <
>> ashish.89.singhi@gmail.com>
>> wrote:
>>
>> > Hi devs.
>> >
>> > I see that in all other code branches other than 0.98 we do not load
>> > JMXListener for masters.
>> > Here is the below code snippet from JMXListener class.
>> >
>> > {code}
>> >     if (env instanceof MasterCoprocessorEnvironment) {
>> >       LOG.error("JMXListener should not be loaded in Master
>> Environment!");
>> >     } else if (env instanceof RegionServerCoprocessorEnvironment) {
>> >       // running on RegionServer --since 0.99 HMaster is also a
>> > HRegionServer
>> >       rmiRegistryPort =
>> >         conf.getInt("regionserver" + RMI_REGISTRY_PORT_CONF_KEY,
>> > defRMIRegistryPort);
>> >       rmiConnectorPort =
>> >         conf.getInt("regionserver" + RMI_CONNECTOR_PORT_CONF_KEY,
>> > rmiRegistryPort);
>> >       LOG.info("RegionServer rmiRegistryPort:" + rmiRegistryPort
>> >         + ",RegionServer rmiConnectorPort:" + rmiConnectorPort);
>> >
>> >     } else if (env instanceof RegionCoprocessorEnvironment) {
>> >       LOG.error("JMXListener should not be loaded in Region
>> Environment!");
>> >     }
>> > {code}
>> >
>> > How can one retrieve master metrics from JMX client ? As we have a
>> > system like OM(operation management) which monitors master metrics
>> > using JMX client. We used to retrieve these metrics successfully from
>> > 0.98 code branch as there JMListener is loaded in both Master and
>> > RegionServer environments.
>> >
>> > --
>> > Ashish Singhi
>> >
>>
>
>

Re: How to retrieve master metrics from JMX client

Posted by Ashish Singhi <as...@gmail.com>.
Yes, HBASE-10289

-- Ashish Singhi

On Fri, Apr 24, 2015 at 10:54 PM, Stack <st...@duboce.net> wrote:

> Does git blame take you to an issue with any reasoning as to why master jmx
> is turned off Ashish?
> St.Ack
>
> On Fri, Apr 24, 2015 at 9:47 AM, Ashish Singhi <ashish.89.singhi@gmail.com
> >
> wrote:
>
> > Hi devs.
> >
> > I see that in all other code branches other than 0.98 we do not load
> > JMXListener for masters.
> > Here is the below code snippet from JMXListener class.
> >
> > {code}
> >     if (env instanceof MasterCoprocessorEnvironment) {
> >       LOG.error("JMXListener should not be loaded in Master
> Environment!");
> >     } else if (env instanceof RegionServerCoprocessorEnvironment) {
> >       // running on RegionServer --since 0.99 HMaster is also a
> > HRegionServer
> >       rmiRegistryPort =
> >         conf.getInt("regionserver" + RMI_REGISTRY_PORT_CONF_KEY,
> > defRMIRegistryPort);
> >       rmiConnectorPort =
> >         conf.getInt("regionserver" + RMI_CONNECTOR_PORT_CONF_KEY,
> > rmiRegistryPort);
> >       LOG.info("RegionServer rmiRegistryPort:" + rmiRegistryPort
> >         + ",RegionServer rmiConnectorPort:" + rmiConnectorPort);
> >
> >     } else if (env instanceof RegionCoprocessorEnvironment) {
> >       LOG.error("JMXListener should not be loaded in Region
> Environment!");
> >     }
> > {code}
> >
> > How can one retrieve master metrics from JMX client ? As we have a
> > system like OM(operation management) which monitors master metrics
> > using JMX client. We used to retrieve these metrics successfully from
> > 0.98 code branch as there JMListener is loaded in both Master and
> > RegionServer environments.
> >
> > --
> > Ashish Singhi
> >
>

Re: How to retrieve master metrics from JMX client

Posted by Stack <st...@duboce.net>.
Does git blame take you to an issue with any reasoning as to why master jmx
is turned off Ashish?
St.Ack

On Fri, Apr 24, 2015 at 9:47 AM, Ashish Singhi <as...@gmail.com>
wrote:

> Hi devs.
>
> I see that in all other code branches other than 0.98 we do not load
> JMXListener for masters.
> Here is the below code snippet from JMXListener class.
>
> {code}
>     if (env instanceof MasterCoprocessorEnvironment) {
>       LOG.error("JMXListener should not be loaded in Master Environment!");
>     } else if (env instanceof RegionServerCoprocessorEnvironment) {
>       // running on RegionServer --since 0.99 HMaster is also a
> HRegionServer
>       rmiRegistryPort =
>         conf.getInt("regionserver" + RMI_REGISTRY_PORT_CONF_KEY,
> defRMIRegistryPort);
>       rmiConnectorPort =
>         conf.getInt("regionserver" + RMI_CONNECTOR_PORT_CONF_KEY,
> rmiRegistryPort);
>       LOG.info("RegionServer rmiRegistryPort:" + rmiRegistryPort
>         + ",RegionServer rmiConnectorPort:" + rmiConnectorPort);
>
>     } else if (env instanceof RegionCoprocessorEnvironment) {
>       LOG.error("JMXListener should not be loaded in Region Environment!");
>     }
> {code}
>
> How can one retrieve master metrics from JMX client ? As we have a
> system like OM(operation management) which monitors master metrics
> using JMX client. We used to retrieve these metrics successfully from
> 0.98 code branch as there JMListener is loaded in both Master and
> RegionServer environments.
>
> --
> Ashish Singhi
>