You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Grant Ingersoll <gs...@apache.org> on 2012/10/14 20:35:43 UTC

coprocessors and JMX

I have a Coprocessor, what's the best way to hook it into HBase's JMX setup so that I can get stats on the coprocessor?

Thanks,
Grant

Re: coprocessors and JMX

Posted by Andrew Purtell <ap...@apache.org>.
I'd guess on a short term basis you'd just want to hook up to JMX directly
from within your coprocessor code -- coprocessors can do anything with any
Java API -- but I agree it would be interesting to know more about the kind
of metrics you are looking to expose. Just echoing what Gary said, we have
some support for construction of dynamic metrics on a per CF basis. We
could plumb dynamic metrics to coprocessors maybe so it would be a natural
and easy thing to do in the future.

On Mon, Oct 15, 2012 at 5:31 PM, Gary Helmling <gh...@gmail.com> wrote:

> It sounds like you want to have the coprocessor expose it's own
> metrics as part of the HBase metrics?  If that's right, can you
> describe some of the metrics you might want to expose?
>
> We could possibly provide hooks to publish metrics through the
> CoprocessorEnvironment, which could then get pushed out with the other
> HBase metrics in some coprocessor namespace.  I haven't been following
> the latest metrics changes, but I assume this would mainly be some
> hooks for the coprocessor to register new metrics with the
> environment, using the existing metrics types.
>
> It would also make sense to expose some metrics on coprocessor
> endpoint RPCs, same as we do for other RPC methods but named for the
> endpoint method being called.  This is something I've considered in
> the past, but I'm not sure if there's an existing JIRA for it.
>
>
> On Mon, Oct 15, 2012 at 4:45 PM, Elliott Clark <ec...@apache.org> wrote:
> > There's not a special way inside of the coprocessor to get metrics.
> >
> >
> >    - RegionObservers can get the HRegion, through the ObserverContext,
> >    which has lots of metrics hanging off of it that might be useful
> >    - You can get it through the normal jmx system.  However that's pretty
> >    verbose.
> >    - Or the easiest way, which is a little bit slower, is though the info
> >    server http://<YourServerHostName>:<YourInfoServerPort>/jmx.
> >
> >
> > On Sun, Oct 14, 2012 at 11:35 AM, Grant Ingersoll <gsingers@apache.org
> >wrote:
> >
> >> I have a Coprocessor, what's the best way to hook it into HBase's JMX
> >> setup so that I can get stats on the coprocessor?
> >>
> >> Thanks,
> >> Grant
>



-- 
Best regards,

   - Andy

Problems worthy of attack prove their worth by hitting back. - Piet Hein
(via Tom White)

Re: coprocessors and JMX

Posted by Gary Helmling <gh...@gmail.com>.
It sounds like you want to have the coprocessor expose it's own
metrics as part of the HBase metrics?  If that's right, can you
describe some of the metrics you might want to expose?

We could possibly provide hooks to publish metrics through the
CoprocessorEnvironment, which could then get pushed out with the other
HBase metrics in some coprocessor namespace.  I haven't been following
the latest metrics changes, but I assume this would mainly be some
hooks for the coprocessor to register new metrics with the
environment, using the existing metrics types.

It would also make sense to expose some metrics on coprocessor
endpoint RPCs, same as we do for other RPC methods but named for the
endpoint method being called.  This is something I've considered in
the past, but I'm not sure if there's an existing JIRA for it.


On Mon, Oct 15, 2012 at 4:45 PM, Elliott Clark <ec...@apache.org> wrote:
> There's not a special way inside of the coprocessor to get metrics.
>
>
>    - RegionObservers can get the HRegion, through the ObserverContext,
>    which has lots of metrics hanging off of it that might be useful
>    - You can get it through the normal jmx system.  However that's pretty
>    verbose.
>    - Or the easiest way, which is a little bit slower, is though the info
>    server http://<YourServerHostName>:<YourInfoServerPort>/jmx.
>
>
> On Sun, Oct 14, 2012 at 11:35 AM, Grant Ingersoll <gs...@apache.org>wrote:
>
>> I have a Coprocessor, what's the best way to hook it into HBase's JMX
>> setup so that I can get stats on the coprocessor?
>>
>> Thanks,
>> Grant

Re: coprocessors and JMX

Posted by Elliott Clark <ec...@apache.org>.
There's not a special way inside of the coprocessor to get metrics.


   - RegionObservers can get the HRegion, through the ObserverContext,
   which has lots of metrics hanging off of it that might be useful
   - You can get it through the normal jmx system.  However that's pretty
   verbose.
   - Or the easiest way, which is a little bit slower, is though the info
   server http://<YourServerHostName>:<YourInfoServerPort>/jmx.


On Sun, Oct 14, 2012 at 11:35 AM, Grant Ingersoll <gs...@apache.org>wrote:

> I have a Coprocessor, what's the best way to hook it into HBase's JMX
> setup so that I can get stats on the coprocessor?
>
> Thanks,
> Grant