Search in sources :

Example 6 with S3ObjectMetadata

use of com.emc.object.s3.S3ObjectMetadata in project pravega by pravega.

the class S3ProxyImpl method putObject.

@Override
public PutObjectResult putObject(PutObjectRequest request) {
    S3ObjectMetadata metadata = request.getObjectMetadata();
    if (request.getObjectMetadata() != null) {
        request.setObjectMetadata(null);
    }
    PutObjectResult retVal = client.putObject(request);
    if (request.getAcl() != null) {
        long size = 0;
        if (request.getRange() != null) {
            size = request.getRange().getLast() - 1;
        }
        aclMap.put(request.getKey(), new AclSize(request.getAcl(), size));
    }
    return retVal;
}
Also used : PutObjectResult(com.emc.object.s3.bean.PutObjectResult) S3ObjectMetadata(com.emc.object.s3.S3ObjectMetadata)

Aggregations

S3ObjectMetadata (com.emc.object.s3.S3ObjectMetadata)5 AccessControlList (com.emc.object.s3.bean.AccessControlList)2 S3Exception (com.emc.object.s3.S3Exception)1 CanonicalUser (com.emc.object.s3.bean.CanonicalUser)1 CopyPartResult (com.emc.object.s3.bean.CopyPartResult)1 Grant (com.emc.object.s3.bean.Grant)1 MultipartPartETag (com.emc.object.s3.bean.MultipartPartETag)1 PutObjectResult (com.emc.object.s3.bean.PutObjectResult)1 CompleteMultipartUploadRequest (com.emc.object.s3.request.CompleteMultipartUploadRequest)1 CopyPartRequest (com.emc.object.s3.request.CopyPartRequest)1 PutObjectRequest (com.emc.object.s3.request.PutObjectRequest)1 ImmutableDate (io.pravega.common.util.ImmutableDate)1 SegmentProperties (io.pravega.segmentstore.contracts.SegmentProperties)1 StreamSegmentExistsException (io.pravega.segmentstore.contracts.StreamSegmentExistsException)1 StreamSegmentInformation (io.pravega.segmentstore.contracts.StreamSegmentInformation)1 StreamSegmentNotExistsException (io.pravega.segmentstore.contracts.StreamSegmentNotExistsException)1 Path (java.nio.file.Path)1 Date (java.util.Date)1 TreeSet (java.util.TreeSet)1 Node (javax.jcr.Node)1