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

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

Introduction

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

Prototype

public String getBucketName() 

Source Link

Document

Returns the name of the bucket containing the uploaded object.

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  v a  2  s .co  m
        UploadResult uploadResult = myUpload.waitForUploadResult();
        LOG.info("Upload completed, bucket={}, key={}", uploadResult.getBucketName(), uploadResult.getKey());
    } catch (InterruptedException e) {
        throw new IOException(e);
    }
}