JCLOUDS-1337: restore tier from stub blob

This allows completeMultipartUpload to propagate the tier set in
initiateMultipartUpload.
This commit is contained in:
Andrew Gaul 2017-11-03 09:51:36 -07:00
parent 98c289721c
commit 83d10e8194
1 changed files with 5 additions and 0 deletions

View File

@ -63,6 +63,7 @@ import org.jclouds.blobstore.domain.MutableStorageMetadata;
import org.jclouds.blobstore.domain.PageSet;
import org.jclouds.blobstore.domain.StorageMetadata;
import org.jclouds.blobstore.domain.StorageType;
import org.jclouds.blobstore.domain.Tier;
import org.jclouds.blobstore.domain.internal.MutableStorageMetadataImpl;
import org.jclouds.blobstore.domain.internal.PageSetImpl;
import org.jclouds.blobstore.options.CopyOptions;
@ -848,6 +849,10 @@ public final class LocalBlobStore implements BlobStore {
if (expires != null) {
blobBuilder.expires(expires);
}
Tier tier = mpu.blobMetadata().getTier();
if (tier != null) {
blobBuilder.tier(tier);
}
String eTag = putBlob(mpu.containerName(), blobBuilder.build());