hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Rawson <ryano...@gmail.com>
Subject Re: JMX bean registrations for Master & RegionServers
Date Fri, 09 Apr 2010 07:53:52 GMT
Yeah I have no idea where that might be coming from.  I think if you
set some breakpoints and ran the HMaster you might see what pops up

good luck!

On Fri, Apr 9, 2010 at 12:40 AM,  <psmith@aconex.com> wrote:
> On 09/04/2010, at 17:15, Ryan Rawson <ryanobjc@gmail.com> wrote:
>> In the HMaster, there is this:
>>  private void startServiceThreads() {
>>   // Do after main thread name has been set
>>   this.metrics = new MasterMetrics();
>> which calls the MBeanUtil registration (a hadoop utility) which
>> registers the MasterMetrics which contains all those metrics you are
>> interested in.  The HMaster constructor will block until the ZK master
>> node is available.
>> does this help?
> Thanks for replying. I'm not sure I get it though (it's Friday and I've had
> a beer), for a Master I can block and wait for that to complete but then if
> the current process is a regionserver it would wait forever.  How can I
> differentiate a Master from a RegionServer process?
> One way would be to change the JMX namespace for the RPC bean in the master
> so it doesn't look like it's an RS?  Be nice if my requirement didn't
> require HBase code changes though.
> This sniffing works ok for straight Hadoop nodes because the NN, JT, TT and
> DN all have distinct JMX names to sniff for.
>> On Thu, Apr 8, 2010 at 11:48 PM, Paul Smith <psmith@aconex.com> wrote:
>>> Hi gents, related to the Parfait/PCP discussion recently, I'm hitting a
>>> problem that I need your help.
>>> Right now a MetricContext implementation is initialised fairly early
>>> within the Hbase/Hadoop lifecycle, and is given a chance to initialise which
>>> is good.  However what I've noticed is that other parts of the JMX namespace
>>> do not appear for, say, the HMaster process until quite late; well after the
>>> MetricContext impl is initialized.
>>> My PCPContext implementation I'm working on is going to want to 'sniff'
>>> and identify what type of process it is, mainly so as to be able to route
>>> metrics to a locally named file identifying it as metrics from that service.
>>>  There is no way that I can spot at the moment where a MetricContext can be
>>> told that the process own initialization is complete.  I'd like to have this
>>> so that a proper exploration of the JMX namespace can happen to export
>>> things like JVM metrics etc.
>>> Can someone point me in the right direction here?  For example, once the
>>> HMaster is started up, there exists a JMX bean with the name pattern
>>> 'hadoop:service=Master' namespace.  Unfortunately the RegionServer process
>>> has a pattern that is 'hadoop:service=HBase', but that ALSO appears in the
>>> Master process (and early) so right now my naive topology sniffing is seeing
>>> this and thinking the Master is a RegionServer.
>>> If I can delay my PCPContext initialization (even by just waiting until I
>>> can detect something has occurred) until the rest of the HBase process is
>>> properly up and running, then I think I'm off and racing.
>>> Any hooks or ideas on this would be appreciated.
>>> Paul

View raw message