You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Demai Ni <ni...@gmail.com> on 2013/08/19 19:23:01 UTC

[question] command line to get replication metrics info

hi, folks

Looking for your kind suggestions again.

I am working on a command line feature to retrieve the replication metrics
info such as :
replicationSource: ageOfLastShippedOp, timeStampsOfLastShippedOp and
sizeOfLogQueue
replicationSink: ageOfLastAppliedOp, and timeStampsOfLastAppliedOp

The idea is to get the point of time info through either linux command line
or hbase shell command, as a light-weight client interface, comparing to a
completed(certainly better)GUI monitoring  package.

I understand that hbase is using Hadoop metrics(
http://hbase.apache.org/metrics.html). Is there an example that I can
follow to retrieve such info, maybe need to plug in some code into
replicationAdmin or hbaseAdmin?

thanks

Demai

Re: [question] command line to get replication metrics info

Posted by Jean-Daniel Cryans <jd...@apache.org>.
On Wed, Aug 21, 2013 at 10:30 AM, Demai Ni <ni...@gmail.com> wrote:

> JD and all,
>
> I have been looking into the shell "status" command in the past couple
> days. "status 'replication'" sound a good way to display the info to users.
> So I will follow the external.
>
> While tracing back the API supporting "status", I looked at ClusterStatus,
> HRegionServer, etc, but wasn't able to find the direct connection to the
> metrics info.
>

See HRS.buildServerLoad and where it's called.


>
> Is it ok to put getters in Source and Sink, such as "public
> getAgeOfLastShippedOp()"  in ReplicationSource.java?  Maybe there are some
> good ways to  retrieve metrics data programmatically?
>

JMX :) Getters are ok as long as you don't go from HRS directly to
ReplicationSource. Ask Replication to build a "ReplicationLoad" for you or
something like that.


>
> Many thanks
>
> Demai
>
>
>
> On Mon, Aug 19, 2013 at 3:27 PM, Demai Ni <ni...@gmail.com> wrote:
>
> > JD, thanks a lot. I will look into it.... Demai
> >
> >
> > On Mon, Aug 19, 2013 at 2:44 PM, Jean-Daniel Cryans <jdcryans@apache.org
> >wrote:
> >
> >> See what the "status" command calls in the shell, I would suggest
> >> following
> >> similar flows.
> >>
> >> Maybe you could also add to it, like a "status 'replication'" option,
> >> instead of having a different command.
> >>
> >> J-D
> >>
> >>
> >> On Mon, Aug 19, 2013 at 10:23 AM, Demai Ni <ni...@gmail.com> wrote:
> >>
> >> > hi, folks
> >> >
> >> > Looking for your kind suggestions again.
> >> >
> >> > I am working on a command line feature to retrieve the replication
> >> metrics
> >> > info such as :
> >> > replicationSource: ageOfLastShippedOp, timeStampsOfLastShippedOp and
> >> > sizeOfLogQueue
> >> > replicationSink: ageOfLastAppliedOp, and timeStampsOfLastAppliedOp
> >> >
> >> > The idea is to get the point of time info through either linux command
> >> line
> >> > or hbase shell command, as a light-weight client interface, comparing
> >> to a
> >> > completed(certainly better)GUI monitoring  package.
> >> >
> >> > I understand that hbase is using Hadoop metrics(
> >> > http://hbase.apache.org/metrics.html). Is there an example that I can
> >> > follow to retrieve such info, maybe need to plug in some code into
> >> > replicationAdmin or hbaseAdmin?
> >> >
> >> > thanks
> >> >
> >> > Demai
> >> >
> >>
> >
> >
>

Re: [question] command line to get replication metrics info

Posted by Demai Ni <ni...@gmail.com>.
JD and all,

I have been looking into the shell "status" command in the past couple
days. "status 'replication'" sound a good way to display the info to users.
So I will follow the external.

While tracing back the API supporting "status", I looked at ClusterStatus,
HRegionServer, etc, but wasn't able to find the direct connection to the
metrics info.

Is it ok to put getters in Source and Sink, such as "public
getAgeOfLastShippedOp()"  in ReplicationSource.java?  Maybe there are some
good ways to  retrieve metrics data programmatically?

Many thanks

Demai



On Mon, Aug 19, 2013 at 3:27 PM, Demai Ni <ni...@gmail.com> wrote:

> JD, thanks a lot. I will look into it.... Demai
>
>
> On Mon, Aug 19, 2013 at 2:44 PM, Jean-Daniel Cryans <jd...@apache.org>wrote:
>
>> See what the "status" command calls in the shell, I would suggest
>> following
>> similar flows.
>>
>> Maybe you could also add to it, like a "status 'replication'" option,
>> instead of having a different command.
>>
>> J-D
>>
>>
>> On Mon, Aug 19, 2013 at 10:23 AM, Demai Ni <ni...@gmail.com> wrote:
>>
>> > hi, folks
>> >
>> > Looking for your kind suggestions again.
>> >
>> > I am working on a command line feature to retrieve the replication
>> metrics
>> > info such as :
>> > replicationSource: ageOfLastShippedOp, timeStampsOfLastShippedOp and
>> > sizeOfLogQueue
>> > replicationSink: ageOfLastAppliedOp, and timeStampsOfLastAppliedOp
>> >
>> > The idea is to get the point of time info through either linux command
>> line
>> > or hbase shell command, as a light-weight client interface, comparing
>> to a
>> > completed(certainly better)GUI monitoring  package.
>> >
>> > I understand that hbase is using Hadoop metrics(
>> > http://hbase.apache.org/metrics.html). Is there an example that I can
>> > follow to retrieve such info, maybe need to plug in some code into
>> > replicationAdmin or hbaseAdmin?
>> >
>> > thanks
>> >
>> > Demai
>> >
>>
>
>

Re: [question] command line to get replication metrics info

Posted by Demai Ni <ni...@gmail.com>.
JD, thanks a lot. I will look into it.... Demai


On Mon, Aug 19, 2013 at 2:44 PM, Jean-Daniel Cryans <jd...@apache.org>wrote:

> See what the "status" command calls in the shell, I would suggest following
> similar flows.
>
> Maybe you could also add to it, like a "status 'replication'" option,
> instead of having a different command.
>
> J-D
>
>
> On Mon, Aug 19, 2013 at 10:23 AM, Demai Ni <ni...@gmail.com> wrote:
>
> > hi, folks
> >
> > Looking for your kind suggestions again.
> >
> > I am working on a command line feature to retrieve the replication
> metrics
> > info such as :
> > replicationSource: ageOfLastShippedOp, timeStampsOfLastShippedOp and
> > sizeOfLogQueue
> > replicationSink: ageOfLastAppliedOp, and timeStampsOfLastAppliedOp
> >
> > The idea is to get the point of time info through either linux command
> line
> > or hbase shell command, as a light-weight client interface, comparing to
> a
> > completed(certainly better)GUI monitoring  package.
> >
> > I understand that hbase is using Hadoop metrics(
> > http://hbase.apache.org/metrics.html). Is there an example that I can
> > follow to retrieve such info, maybe need to plug in some code into
> > replicationAdmin or hbaseAdmin?
> >
> > thanks
> >
> > Demai
> >
>

Re: [question] command line to get replication metrics info

Posted by Jean-Daniel Cryans <jd...@apache.org>.
See what the "status" command calls in the shell, I would suggest following
similar flows.

Maybe you could also add to it, like a "status 'replication'" option,
instead of having a different command.

J-D


On Mon, Aug 19, 2013 at 10:23 AM, Demai Ni <ni...@gmail.com> wrote:

> hi, folks
>
> Looking for your kind suggestions again.
>
> I am working on a command line feature to retrieve the replication metrics
> info such as :
> replicationSource: ageOfLastShippedOp, timeStampsOfLastShippedOp and
> sizeOfLogQueue
> replicationSink: ageOfLastAppliedOp, and timeStampsOfLastAppliedOp
>
> The idea is to get the point of time info through either linux command line
> or hbase shell command, as a light-weight client interface, comparing to a
> completed(certainly better)GUI monitoring  package.
>
> I understand that hbase is using Hadoop metrics(
> http://hbase.apache.org/metrics.html). Is there an example that I can
> follow to retrieve such info, maybe need to plug in some code into
> replicationAdmin or hbaseAdmin?
>
> thanks
>
> Demai
>