| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use YARN; | ||
| 6 | use Data::Dumper; | ||
| 7 | |||
| 8 | # global variables | ||
| 9 | my $yarnHost = 'hadoop-master.aossama.com'; | ||
| 10 | |||
| 11 | my $client = YARN->new( host => $yarnHost ); | ||
| 12 | #print Dumper $client; | ||
| 13 | |||
| 14 | # get root queue name | ||
| 15 | my $scheduler = $client->scheduler(); print $scheduler->{'type'}; | ||
| 16 | my @allQueues = $client->getAllQueues(); print Dumper @allQueues; | ||
| 17 | |||
| 18 | print $client->info('id') . "\n" . $client->metrics('availableMB') . "\n" . $client->scheduler->{'type'}; | ||
| 19 | |||
| 20 | #print Dumper $client->apps(); |