JetS3t Supports "Reduced Redundancy" Storage

2010-05-19

As of a few minutes ago the latest JetS3t code includes support for a new S3 feature called Reduced Redundancy Storage. If you keep non-vital data in S3 you can now choose to accept "reduced redundancy" for this data in return for a cheaper storage rate.

Accept a little more risk, save some bucks. For many S3 customers this will be an attractive option.

See Amazon's RRS blog post for more information.

Below is a brief overview of how you can use the feature in JetS3t once you have downloaded and built the latest code.

Cockpit

The Cockpit application has support for the new storage class in a few places:

API

In the API you set the storage class of an object prior to uploading it:

// Create an object as usual
S3Object object = new S3Object("my-object", "some data");
// Set the non-default storage class prior to upload
object.setStorageClass(S3Object.STORAGE_CLASS_REDUCED_REDUNDANCY);
// Upload as usual
s3Service.putObject("bucket-name", object);

To apply the new storage class to existing objects you call the normal RestS3Service copyObject or moveObject methods after setting the storage class attribute of each destination object.

To check the storage class an object is stored under you perform a bucket listing then call the S3Object's getStorageClass method:

S3Object[] objects = s3Service.listObjects("bucket-name");
for (int i = 0; i < objects.length; i++) {
    System.out.println(objects[i].getKey()
        + ": " + objects[i].getStorageClass());
}
Tags: JetS3t

Comments