The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Hadoop::Admin - Module for administration of Hadoop clusters

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 the namenode's, and the jobtracker's hostnames. Optionally, you may provide a socksproxy for the http connection.

Creation of this object will cause an immediate querry to both the NameNode and JobTracker.

namenode => <hostname>
jobtracker => <hostname>
socksproxy => <hostname>
Returns newly created object.

get_namenode ()

Description

Returns the JobTracker from instantiation

get_namenode ()

Description

Returns the JobTracker from instantiation

get_namenode ()

Description

Returns the Socks Proxy from instantiation

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.

tasktracker_live_list ()

Description

Returns a list of the current live TaskTrackers.

Return values

Array containing hostnames.

tasktracker_live_list ()

Description

Returns a list of the current blacklisted TaskTrackers.

Return values

Array containing hostnames.

tasktracker_live_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

Copyright (C) 2012 Charles Wimmer. This program is free software; you can redistribute and/or modify program under the same terms as Perl itself or in terms of Gnu General Public license v2 or later.