YARN - short for Yet Another Resource Negotiator (or if you prefer recursive acronyms, YARN Application Resource Negotiator).
Version 0.01
use YARN; my $yarn = YARN->new( host => "hadoop-master.example.com" ); print $client->info('id');
Construct a new YARN.
The ResourceManager REST API's allow the user to get information about the cluster - status on the cluster, metrics on the cluster, scheduler information, information about nodes in the cluster, and information about applications on the cluster.
The cluster information resource provides overall information about the cluster. Use this method to get general information about the cluster.
# Returns a JSON String with the elements of the clusterInfo object $client->info(); # Returns the value of an element from the clusterInfo object $client->info('id');
The cluster metrics resource provides some overall metrics about the cluster. Use this method to get metrics about the cluster.
# Returns a JSON String with the elements of the clusterMetrics object $client->metrics(); # Returns the value of an element from the metrics object $client->metrics('totalNodes');
A scheduler resource contains information about the current scheduler configured in a cluster. It currently supports both the Fifo and Capacity Scheduler. You will get different information depending on which scheduler is configured so be sure to look at the type information.
# TODO: Fix 4 lines below # Returns a JSON String with the elements of the scheduler object $client->scheduler();
# Returns the value of an element from the scheduler object $client->scheduler('XXX');
With the Applications API, you can obtain a collection of resources, each of which represents an application. When you run a GET operation on this resource, you obtain a collection of Application Objects.
# Returns a JSON String with the elements of the apps object $client->apps(); # Returns the value of an element from the apps object $client->apps('XXX');
With the Nodes API, you can obtain a collection of resources, each of which represents a node. When you run a GET operation on this resource, you obtain a collection of Node Objects. Use this method to get a report of all nodes in the cluster.
# Returns a JSON String with the elements of the nodes object $client->nodes(); # Returns the value of an element from the nodes object $client->nodes('XXX');
A node resource contains information about a node in the cluster. Use this method to get a report of a node in the cluster.
# Returns a JSON String with the elements of the node object $client->node(); # Returns the value of an element from the node object $client->node('XXX');
Returns an array with all queues defined in the scheduler.
print Dumper $client->getAllQueues(); $VAR1 = 'root'; $VAR2 = 'root.parent1'; $VAR3 = 'root.parent1.child1'; $VAR5 = 'root.foo'; $VAR6 = 'root.foo.f1'; $VAR7 = 'root.foo.f2'; $VAR8 = 'root.foo.f718'; $VAR9 = 'root.bar';
Get information about top level queues.
Ahmed Ossama, <ahmed at aossama.com>
<ahmed at aossama.com>
Please report any bugs or feature requests to bug-yarn at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=YARN. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-yarn at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc YARN
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=YARN
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/YARN
CPAN Ratings
http://cpanratings.perl.org/d/YARN
Search CPAN
http://search.cpan.org/dist/YARN/
Copyright 2015 Ahmed Ossama.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
L<http://www.apache.org/licenses/LICENSE-2.0>
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
To install YARN, copy and paste the appropriate command in to your terminal.
cpanm
cpanm YARN
CPAN shell
perl -MCPAN -e shell install YARN
For more information on module installation, please visit the detailed CPAN module installation guide.