Apache::Hadoop::Watcher::Jmx - Hadoop JMX extractor
use Apache::Hadoop::Watcher::Jmx; my $w = Apache::Hadoop::Watcher::Jmx->new; my $listref = $w->request->list; $w->request (service=>'Hadoop:service=NameNode,name=FSNamesystemState')->print; $w->request (method =>'system_state')->print;
This package Apache::Hadoop::Watcher::Jmx connects to JMX webservice to extract runtime information about the cluster. It connects to namenode /jmx context.
To list all possible service options:
my $list = $w->request->list; foreach ( @{$list} ) { print $_,"\n"; }
For individual service extraction:
$w->request (service=>'Hadoop:service=NameNode,name=FSNamesystemState')->print;
Or, by method name, such as 'system_state':
$w->request (method =>'system_state')->print;
Methods can be customized using add subroutine:
$w->add (method=>'system_memory', service=>
Apache::Hadoop::Watcher Apache::Hadoop::Watcher::Base JSON
Snehasis Sinha, <snehasis@cpan.org>
Copyright (C) 2015 by Snehasis Sinha
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
To install Apache::Hadoop::Watcher, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::Hadoop::Watcher
CPAN shell
perl -MCPAN -e shell install Apache::Hadoop::Watcher
For more information on module installation, please visit the detailed CPAN module installation guide.