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

NAME

Hadoop::Admin - Module for administration of Hadoop clusters

VERSION

version 0.4

SYNOPSIS

    use Hadoop::Admin; 

    my $cluster=Hadoop::Admin->new({
      'namenode'          => 'namenode.host.name',
      'jobtracker'        => 'jobtracker.host.name',
    });

    print $cluster->datanode_live_list();

DESCRIPTION

This module connects to Hadoop servers using http. The JMX Proxy Servlet is queried for specific mbeans.

This module requires Hadoop the changes in https://issues.apache.org/jira/browse/HADOOP-7144. They are available in versions 0.20.204.0, 0.23.0 or later.

INTERFACE FUNCTIONS

new ()

Description

Create a new instance of the Hadoop::Admin class.

The method requires a hash containing at minimum one of the namenode's, the resourcemanager's, and the jobtracker's hostnames. Optionally, you may provide a socksproxy for the http connection. Use of both a jobtracker and resourcemanger is prohibited. It is not a valid cluster configuration to have both a jobtracker and a resourcemanager.

Creation of this object will cause an immediate querry to servers provided to the constructor.

namenode => <hostname>
namenode_port => <port number>
jobtracker => <hostname>
jobtracker_port => <port number>
resourcemanager => <hostname>
resourcemanager_port => <port number>
socksproxy => <hostname>
socksproxy_port => <port number>

datanode_live_list ()

Description

Returns a list of the current live DataNodes.

Return values

Array containing hostnames.

datanode_dead_list ()

Description

Returns a list of the current dead DataNodes.

Return values

Array containing hostnames.

datanode_decom_list ()

Description

Returns a list of the currently decommissioning DataNodes.

Return values

Array containing hostnames.

nodemanager_live_list ()

Description

Returns a list of the current live NodeManagers.

Return values

Array containing hostnames.

tasktracker_live_list ()

Description

Returns a list of the current live TaskTrackers.

Return values

Array containing hostnames.

tasktracker_blacklist_list ()

Description

Returns a list of the current blacklisted TaskTrackers.

Return values

Array containing hostnames.

tasktracker_graylist_list ()

Description

Returns a list of the current graylisted TaskTrackers.

Return values

Array containing hostnames.

KNOWN BUGS

None known at this time. Please log issues at:

https://github.com/cwimmer/hadoop-admin/issues

AVAILABILITY

Source code is available on GitHub:

https://github.com/cwimmer/hadoop-admin

Module available on CPAN as Hadoop::Admin:

http://search.cpan.org/~cwimmer/

AUTHOR

Charles A. Wimmmer (charles@wimmer.net)

COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Charles A. Wimmer.

This is free software, licensed under:

  The (three-clause) BSD License