本文整理了Java中org.jclouds.blobstore.BlobStore.initiateMultipartUpload()
方法的一些代码示例,展示了BlobStore.initiateMultipartUpload()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlobStore.initiateMultipartUpload()
方法的具体详情如下:
包路径:org.jclouds.blobstore.BlobStore
类名称:BlobStore
方法名:initiateMultipartUpload
暂无
代码示例来源:origin: gaul/s3proxy
@Override
public MultipartUpload initiateMultipartUpload(String container,
BlobMetadata blobMetadata, PutOptions options) {
MultipartUpload mpu = delegate().initiateMultipartUpload(container,
blobMetadata, options);
return mpu;
}
代码示例来源:origin: gaul/s3proxy
MultipartUpload mpu = blobStore.initiateMultipartUpload(containerName,
builder.build().getMetadata(), options);
代码示例来源:origin: org.apache.jclouds/jclouds-blobstore
@Override
public MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options) {
return delegate().initiateMultipartUpload(container, blobMetadata, options);
}
代码示例来源:origin: org.gaul/s3proxy
@Override
public MultipartUpload initiateMultipartUpload(String container,
BlobMetadata blobMetadata, PutOptions options) {
MultipartUpload mpu = delegate().initiateMultipartUpload(container,
blobMetadata, options);
return mpu;
}
代码示例来源:origin: Nextdoor/bender
@Override
public MultipartUpload initiateMultipartUpload(String container,
BlobMetadata blobMetadata, PutOptions options) {
MultipartUpload mpu = delegate().initiateMultipartUpload(container,
blobMetadata, options);
return mpu;
}
代码示例来源:origin: Nextdoor/bender
@Override
public MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options) {
return delegate().initiateMultipartUpload(container, blobMetadata, options);
}
代码示例来源:origin: com.amysta.jclouds/jclouds-blobstore
@Override
public MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options) {
return delegate().initiateMultipartUpload(container, blobMetadata, options);
}
代码示例来源:origin: apache/jclouds
@Override
public MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options) {
return delegate().initiateMultipartUpload(container, blobMetadata, options);
}
代码示例来源:origin: org.gaul/s3proxy
MultipartUpload mpu = blobStore.initiateMultipartUpload(containerName,
builder.build().getMetadata(), options);
代码示例来源:origin: Nextdoor/bender
MultipartUpload mpu = blobStore.initiateMultipartUpload(containerName,
builder.build().getMetadata(), options);
代码示例来源:origin: apache/jclouds
@Test(groups = { "integration", "live" })
public void testMultipartUploadNoPartsAbort() throws Exception {
BlobStore blobStore = view.getBlobStore();
String container = getContainerName();
try {
String name = "blob-name";
Blob blob = blobStore.blobBuilder(name).build();
MultipartUpload mpu = blobStore.initiateMultipartUpload(container, blob.getMetadata(), new PutOptions());
List<MultipartPart> parts = blobStore.listMultipartUpload(mpu);
assertThat(parts).isEqualTo(ImmutableList.of());
blobStore.abortMultipartUpload(mpu);
blob = blobStore.getBlob(container, name);
assertThat(blob).isNull();
} finally {
returnContainer(container);
}
}
代码示例来源:origin: apache/jclouds
@Test(groups = { "integration", "live" })
public void test10000PartMultipartUpload() throws Exception {
BlobStore blobStore = view.getBlobStore();
String container = getContainerName();
int partSize = (int) blobStore.getMinimumMultipartPartSize();
try {
String name = "blob-name";
BlobBuilder blobBuilder = blobStore.blobBuilder(name);
Blob blob = blobBuilder.build();
MultipartUpload mpu = blobStore.initiateMultipartUpload(container, blob.getMetadata(), new PutOptions());
ImmutableList.Builder<MultipartPart> parts = ImmutableList.builder();
byte[] content = new byte[partSize];
for (int i = 0; i < 10 * 1000; ++i) {
Payload payload = Payloads.newByteArrayPayload(content);
payload.getContentMetadata().setContentLength((long) partSize);
parts.add(blobStore.uploadMultipartPart(mpu, i, payload));
}
blobStore.completeMultipartUpload(mpu, parts.build());
BlobMetadata newBlobMetadata = blobStore.blobMetadata(container, name);
assertThat(newBlobMetadata.getSize()).isEqualTo(10 * 1000 * partSize);
} finally {
returnContainer(container);
}
}
代码示例来源:origin: apache/jclouds
@Test(groups = { "integration", "live" })
public void testMultipartUploadMultiplePartsKnownETag() throws Exception {
BlobStore blobStore = view.getBlobStore();
String container = getContainerName();
// Pre-computed ETag returned by AWS S3 for the MPU consisting of two 5MB parts filled with 'b'
String expectedETag = "\"84462a16f6a60478d50148808aa609c1-2\"";
int partSize = 5 * 1024 * 1024;
try {
String name = "blob-name";
BlobBuilder blobBuilder = blobStore.blobBuilder(name);
Blob blob = blobBuilder.build();
MultipartUpload mpu = blobStore.initiateMultipartUpload(container, blob.getMetadata(), new PutOptions());
byte[] content = new byte[partSize];
Arrays.fill(content, (byte) 'b');
Payload payload = Payloads.newByteArrayPayload(content);
payload.getContentMetadata().setContentLength((long) partSize);
MultipartPart part1 = blobStore.uploadMultipartPart(mpu, 1, payload);
MultipartPart part2 = blobStore.uploadMultipartPart(mpu, 2, payload);
blobStore.completeMultipartUpload(mpu, ImmutableList.of(part1, part2));
BlobMetadata newBlobMetadata = blobStore.blobMetadata(container, name);
assertThat(newBlobMetadata.getETag()).isEqualTo(expectedETag);
} finally {
returnContainer(container);
}
}
代码示例来源:origin: apache/jclouds
addContentMetadata(blobBuilder);
Blob blob = blobBuilder.build();
MultipartUpload mpu = blobStore.initiateMultipartUpload(container, blob.getMetadata(), new PutOptions());
代码示例来源:origin: apache/jclouds
addContentMetadata(blobBuilder);
Blob blob = blobBuilder.build();
MultipartUpload mpu = blobStore.initiateMultipartUpload(container, blob.getMetadata(), new PutOptions());
代码示例来源:origin: apache/jclouds
assertThat(uploads).isEmpty();
mpu = blobStore.initiateMultipartUpload(container, blob.getMetadata(), new PutOptions());
内容来源于网络,如有侵权,请联系作者删除!