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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]
> >> 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
Problems worthy of attack prove their worth by hitting back. - Piet Hein
(via Tom White)