| 1 | #!/usr/bin/perl | ||
| 2 | package JMX::Jmx4Perl::Product::Hadoop; | ||
| 3 | |||
| 4 | 4 | ▶ | use JMX::Jmx4Perl::Product::BaseHandler; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 4 | ▶ | use base "JMX::Jmx4Perl::Product::BaseHandler"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 4 | ▶ | use Data::Dumper; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 4 | ▶ | use Carp qw(croak); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | =head1 NAME | ||
| 12 | |||
| 13 | JMX::Jmx4Perl::Product::Hadoop - Handler for Hadoop | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | This is the product handler support Hadoop (L<http://hadoop.apache.org/>) | ||
| 18 | which works with the JVM Agent provided for Sun JDK 6 based applications. | ||
| 19 | |||
| 20 | =cut | ||
| 21 | |||
| 22 | 4 | ▶ | sub id { |
|
Subroutine
id: called CC=1 SCAR=0.0
Pod
documented
| |||
| 23 | 4 | return "hadoop"; | |
| 24 | } | ||
| 25 | |||
| 26 | 0 | ▶ | sub name { |
|
Subroutine
name: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 27 | 0 | return "Hadoop"; | |
| 28 | } | ||
| 29 | |||
| 30 | 0 | ▶ | sub vendor { |
|
Subroutine
vendor: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 31 | 0 | return "Apache"; | |
| 32 | } | ||
| 33 | |||
| 34 | 0 | ▶ | sub version { |
|
Subroutine
version: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 35 | # No way to detect version until yet. | ||
| 36 | 0 | return ""; | |
| 37 | } | ||
| 38 | 4 | ▶ | sub order { |
|
Subroutine
order: called CC=1 SCAR=0.0
Pod
documented
| |||
| 39 | 4 | return 220; | |
| 40 | } | ||
| 41 | |||
| 42 | 0 | ▶ | sub autodetect_pattern { |
|
Subroutine
autodetect_pattern: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 43 | 0 | ▶ | return sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 44 | 0 | my $self = shift; | |
| 45 | 0 | my $j4p = $self->{jmx4perl}; | |
| 46 | 0 | my $ret = $j4p->search("hadoop:*"); | |
| 47 | #print Dumper($ret); | ||
| 48 | 0 | return $ret; | |
| 49 | 0 | }; | |
| 50 | } | ||
| 51 | |||
| 52 | =head1 LICENSE | ||
| 53 | |||
| 54 | This file is part of jmx4perl. | ||
| 55 | |||
| 56 | Jmx4perl is free software: you can redistribute it and/or modify | ||
| 57 | it under the terms of the GNU General Public License as published by | ||
| 58 | the Free Software Foundation, either version 2 of the License, or | ||
| 59 | (at your option) any later version. | ||
| 60 | |||
| 61 | jmx4perl is distributed in the hope that it will be useful, | ||
| 62 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 63 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 64 | GNU General Public License for more details. | ||
| 65 | |||
| 66 | You should have received a copy of the GNU General Public License | ||
| 67 | along with jmx4perl. If not, see <http://www.gnu.org/licenses/>. | ||
| 68 | |||
| 69 | A commercial license is available as well. Please contact roland@cpan.org for | ||
| 70 | further details. | ||
| 71 | |||
| 72 | =head1 AUTHOR | ||
| 73 | |||
| 74 | roland@cpan.org | ||
| 75 | |||
| 76 | =cut | ||
| 77 | |||
| 78 | 4 | 1; | |