NAME

Net::Amazon::HadoopEC2::S3fs - Perl interface to hadoop s3fs

SYNOPSIS

use Net::Amazon::HadoopEC2::S3fs;

my $fs = Net::Amazon::HadoopEC2::S3fs->new(
  {
      aws_access_key_id => $EVN{AWS_ACCESS_KEY_ID},
      aws_secret_access_key => $ENV{AWS_SECRET_ACCESS_KEY},
      bucket => 'your_bucket',
  }
);
my $file = $fs->put(
  {
      file => 'filename',
      destination => '/user/root',
  }
);
my $files_listed = $fs->ls(
  {
      path => '/user/root',
  }
);

for my $file (@{$files_listed}) {
    $file->remove;
}

DESCRIPTION

Net::Amazon::HadoopEC2::S3fs is a Perl interface to hadoop s3fs.

METHODS

new(\%args)

Constructor. The arguments are:

aws_access_key_id (required)

Your aws access key.

aws_secret_access_key (required)

Your aws secret key.

bucket (required)

The bucket name to use.

list($path)

Returns arrayref of Net::Amazon::HadoopEC2::S3fs::Inode instances. Pass the path to list.

put(\%args)

Puts file to s3fs. returns Net::Amazon::HadoopEC2::S3fs::Inode instance of the file on success, undef on failure. The arguments are:

file (required)

The file path to put.

destination (required)

The destination path to put.

mkdir($dir)

Makes directory on S3fs. Returns Net::Amazon::HadoopEC2::S3fs::Inode instance of the directory on success, undef on failure. Pass the directory path to make.

get(\%args)

Gets a file from S3fs. Returns the file path on success, undef on failure. The arguments are:

file (required)

The S3fs path of the file to get.

destination (required)

The path to save the file.

remove($path)

Removes S3fs inode. Returns 1 on success, undef on failure.

AUTHOR

Nobuo Danjou <nobuo.danjou@gmail.com>

SEE ALSO

Net::Amazon::S3

Net::Amazon::HadoopEC2

Hadoop project - http://hadoop.apache.org/

Hadoop Wiki, AmazonS3 - http://wiki.apache.org/hadoop/AmazonS3

REPOSITORY

svn co http://svn.coderepos.org/share/lang/perl/Net-Amazon-HadoopEC2-S3fs/trunk Net-Amazon-HadoopEC2-S3fs

The svn repository of this module is hosted at http://coderepos.org/share/. Patches and commits are welcome.

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.