Ahmed Ossama

NAME

YARN - short for Yet Another Resource Negotiator (or if you prefer recursive acronyms, YARN Application Resource Negotiator).

VERSION

Version 0.01

SYNOPSIS

    use YARN;

    my $yarn = YARN->new( host => "hadoop-master.example.com" );
    
    print $client->info('id');

Methods

Construction and setup

new

Construct a new YARN.

ResourceManager REST API's

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.

info

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');

metrics

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');

scheduler

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');

apps

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');

nodes

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');

node

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');

getAllQueues

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';

getRootQueueInfos

Get information about top level queues.

AUTHOR

Ahmed Ossama, <ahmed at aossama.com>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc YARN

You can also look for information at:

LICENSE AND COPYRIGHT

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.