Skip to content

Commit

Permalink
JCLOUDS-1639: Allow filtering Azure getBlockList
Browse files Browse the repository at this point in the history
  • Loading branch information
gaul committed Nov 10, 2024
1 parent 5b65094 commit 770bcce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ String putBlockList(@PathParam("container") @ParamValidators(ContainerNameValida
@PathParam("name") @ParamParser(BlobName.class) @BinderParam(BindAzureBlobMetadataToMultipartRequest.class) AzureBlob object,
@BinderParam(BindAzureBlocksToRequest.class) List<String> blockIdList);

@Deprecated
@Named("GetBlockList")
@GET
@Path("{container}/{name}")
Expand All @@ -403,6 +404,16 @@ ListBlobBlocksResponse getBlockList(
@PathParam("container") @ParamValidators(ContainerNameValidator.class) String container,
@PathParam("name") String name);

@Named("GetBlockList")
@GET
@Path("{container}/{name}")
@XMLResponseParser(BlobBlocksResultsHandler.class)
@QueryParams(keys = { "comp" }, values = { "blocklist" })
ListBlobBlocksResponse getBlockList(
@PathParam("container") @ParamValidators(ContainerNameValidator.class) String container,
@PathParam("name") String name,
// valid values are committed, uncommitted, or all
@QueryParam("blocklisttype") String blockListType);

/**
* The Get Blob Properties operation returns all user-defined metadata, standard HTTP properties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Pa
public List<MultipartPart> listMultipartUpload(MultipartUpload mpu) {
ListBlobBlocksResponse response;
try {
response = sync.getBlockList(mpu.containerName(), mpu.blobName());
response = sync.getBlockList(mpu.containerName(), mpu.blobName(), "uncommitted");
} catch (KeyNotFoundException knfe) {
return ImmutableList.<MultipartPart>of();
}
Expand Down

0 comments on commit 770bcce

Please sign in to comment.