Example usage for com.amazonaws.services.s3.transfer.model UploadResult getKey

List of usage examples for com.amazonaws.services.s3.transfer.model UploadResult getKey

Introduction

In this page you can find the example usage for com.amazonaws.services.s3.transfer.model UploadResult getKey.

Prototype

public String getKey() 

Source Link

Document

Returns the key by which the newly created object is stored.

Usage

From source file:org.apache.storm.s3.output.BlockingTransferManagerUploader.java

License:Apache License

@Override
public void upload(String bucketName, String name, InputStream input, ObjectMetadata meta) throws IOException {
    final Upload myUpload = tx.upload(bucketName, name, input, meta);
    try {//from   w  ww.j a  va2s  .c o m
        UploadResult uploadResult = myUpload.waitForUploadResult();
        LOG.info("Upload completed, bucket={}, key={}", uploadResult.getBucketName(), uploadResult.getKey());
    } catch (InterruptedException e) {
        throw new IOException(e);
    }
}