• A::H::P::Output::CSV
  • A::H::P::Output::HadoopMap
  • A::H::P::Analyze::*

dispatch.pl書いてるけどこれをバンドルしたい

#!/usr/bin/perl

use strict;
use warnings;
use Net::Amazon::HadoopEC2;
use Net::Amazon::HadoopEC2::S3fs;

my $cluster = Net::Amazon::HadoopEC2->new(
    {   
        aws_access_key_id => $ENV{AWS_ACCESS_KEY_ID},
        aws_secret_access_key => $ENV{AWS_SECRET_ACCESS_KEY},
        aws_account_id => $ENV{AWS_ACCOUNT_NUMBER},
    }
)->launch_cluster(
    {   
        name => 'hadoop',
        image_id => 'ami-6610f40f',
        instance_type => 'm1.large',
        slaves => 6,
        key_name => 'gsg-keypair',
        key_file => '/home/danjou/.ssh/id_rsa-gsg-keypair',
    }
);
# you can also use N::A::H::S3fs instead.

$cluster->push_file(
    {
        files => [
            map {File::Spec->catfile($FindBin::Bin, $_)} qw(
                 MyAnalyzer.pm
                mapper.yaml
                reducer.yaml
            )
        ],
        destination => '/root/',
    }
);
my $result = $cluster->execute({command => $cmd});
$cluster->terminate_cluster;

おおざっぱにこんな感じ。