The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Apache::Hadoop::Watcher::Jmx - Hadoop JMX extractor

SYNOPSIS

  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;

DESCRIPTION

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=>

SEE ALSO

  Apache::Hadoop::Watcher
  Apache::Hadoop::Watcher::Base
  JSON

AUTHOR

Snehasis Sinha, <snehasis@cpan.org>

COPYRIGHT AND LICENSE

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.