| Net-Amazon-HadoopEC2-S3fs documentation | view source | Contained in the Net-Amazon-HadoopEC2-S3fs distribution. |
Net::Amazon::HadoopEC2::S3fs - Perl interface to hadoop s3fs
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;
}
Net::Amazon::HadoopEC2::S3fs is a Perl interface to hadoop s3fs.
Constructor. The arguments are:
Your aws access key.
Your aws secret key.
The bucket name to use.
Returns arrayref of Net::Amazon::HadoopEC2::S3fs::Inode instances. Pass the path to list.
Puts file to s3fs. returns Net::Amazon::HadoopEC2::S3fs::Inode instance of the file on success, undef on failure. The arguments are:
The file path to put.
The destination path to put.
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.
Gets a file from S3fs. Returns the file path on success, undef on failure. The arguments are:
The S3fs path of the file to get.
The path to save the file.
Removes S3fs inode. Returns 1 on success, undef on failure.
Nobuo Danjou <nobuo.danjou@gmail.com>
Hadoop project - http://hadoop.apache.org/
Hadoop Wiki, AmazonS3 - http://wiki.apache.org/hadoop/AmazonS3
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.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Net-Amazon-HadoopEC2-S3fs documentation | view source | Contained in the Net-Amazon-HadoopEC2-S3fs distribution. |