-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Return headers sync upload #11433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rickle-msft
merged 8 commits into
Azure:master
from
rickle-msft:returnHeadersSyncUpload
May 29, 2020
Merged
Return headers sync upload #11433
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
754b58c
Changed internal implementation of sync buffered upload
rickle-msft f5e8a30
Added new upload method with return value
rickle-msft 4985f6f
Changelog
rickle-msft e50b051
removed tags from upload options
rickle-msft 741dd68
Removed unused import
rickle-msft 1425177
CI fixes
rickle-msft 7b18c97
Updated recording
rickle-msft d218a88
Unused imports
rickle-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
184 changes: 103 additions & 81 deletions
184
...tography/src/test/resources/session-records/EncyptedBlockBlobAPITestdownloadsnapshot.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
...e-storage-blob/src/main/java/com/azure/storage/blob/models/BlobParallelUploadOptions.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| package com.azure.storage.blob.models; | ||
|
|
||
| import com.azure.core.annotation.Fluent; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| /** | ||
| * Extended options that may be passed when uploading a Block Blob in parallel. | ||
| */ | ||
| @Fluent | ||
| public class BlobParallelUploadOptions { | ||
alzimmermsft marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| private ParallelTransferOptions parallelTransferOptions; | ||
| private BlobHttpHeaders headers; | ||
| private Map<String, String> metadata; | ||
| private AccessTier tier; | ||
| private BlobRequestConditions requestConditions; | ||
|
|
||
| /** | ||
| * @return {@link ParallelTransferOptions} | ||
| */ | ||
| public ParallelTransferOptions getParallelTransferOptions() { | ||
| return parallelTransferOptions; | ||
| } | ||
|
|
||
| /** | ||
| * @param parallelTransferOptions {@link ParallelTransferOptions} | ||
| * @return The updated options. | ||
| */ | ||
| public BlobParallelUploadOptions setParallelTransferOptions(ParallelTransferOptions parallelTransferOptions) { | ||
| this.parallelTransferOptions = parallelTransferOptions; | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * @return {@link BlobHttpHeaders} | ||
| */ | ||
| public BlobHttpHeaders getHeaders() { | ||
| return headers; | ||
| } | ||
|
|
||
| /** | ||
| * @param headers {@link BlobHttpHeaders} | ||
| * @return The updated options | ||
| */ | ||
| public BlobParallelUploadOptions setHeaders(BlobHttpHeaders headers) { | ||
| this.headers = headers; | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * @return The metadata to associate with the blob. | ||
| */ | ||
| public Map<String, String> getMetadata() { | ||
| return metadata; | ||
| } | ||
|
|
||
| /** | ||
| * @param metadata The metadata to associate with the blob. | ||
| * @return The updated options. | ||
| */ | ||
| public BlobParallelUploadOptions setMetadata(Map<String, String> metadata) { | ||
| this.metadata = metadata; | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * @return {@link AccessTier} | ||
| */ | ||
| public AccessTier getTier() { | ||
| return tier; | ||
| } | ||
|
|
||
| /** | ||
| * @param tier {@link AccessTier} | ||
| * @return The updated options. | ||
| */ | ||
| public BlobParallelUploadOptions setTier(AccessTier tier) { | ||
| this.tier = tier; | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * @return {@link BlobRequestConditions} | ||
| */ | ||
| public BlobRequestConditions getRequestConditions() { | ||
| return requestConditions; | ||
| } | ||
|
|
||
| /** | ||
| * @param requestConditions {@link BlobRequestConditions} | ||
| * @return The updated options. | ||
| */ | ||
| public BlobParallelUploadOptions setRequestConditions(BlobRequestConditions requestConditions) { | ||
| this.requestConditions = requestConditions; | ||
| return this; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
...e/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadreturnvalue.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| { | ||
| "networkCallRecords" : [ { | ||
| "Method" : "PUT", | ||
| "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadreturnvalue0blobapitestuploadreturnvalueac375005572?restype=container", | ||
| "Headers" : { | ||
| "x-ms-version" : "2019-07-07", | ||
| "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.5; Windows 10 10.0)", | ||
| "x-ms-client-request-id" : "18215bde-49e1-4684-98b4-1ffc35ae1fe5" | ||
| }, | ||
| "Response" : { | ||
| "x-ms-version" : "2019-07-07", | ||
| "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", | ||
| "ETag" : "0x8D801A7397A7BE3", | ||
| "Last-Modified" : "Tue, 26 May 2020 19:01:40 GMT", | ||
| "retry-after" : "0", | ||
| "Content-Length" : "0", | ||
| "StatusCode" : "201", | ||
| "x-ms-request-id" : "dc92cad7-e01e-0130-2090-330d62000000", | ||
| "Date" : "Tue, 26 May 2020 19:01:40 GMT", | ||
| "x-ms-client-request-id" : "18215bde-49e1-4684-98b4-1ffc35ae1fe5" | ||
| }, | ||
| "Exception" : null | ||
| }, { | ||
| "Method" : "PUT", | ||
| "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadreturnvalue0blobapitestuploadreturnvalueac375005572/javablobuploadreturnvalue1blobapitestuploadreturnvalueac350727", | ||
| "Headers" : { | ||
| "x-ms-version" : "2019-07-07", | ||
| "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.5; Windows 10 10.0)", | ||
| "x-ms-client-request-id" : "c32a1b3d-0aaf-4bc7-815a-eb26ea2e2d9c", | ||
| "Content-Type" : "application/octet-stream" | ||
| }, | ||
| "Response" : { | ||
| "x-ms-version" : "2019-07-07", | ||
| "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", | ||
| "x-ms-content-crc64" : "6RYQPwaVsyQ=", | ||
| "Last-Modified" : "Tue, 26 May 2020 19:01:41 GMT", | ||
| "retry-after" : "0", | ||
| "StatusCode" : "201", | ||
| "x-ms-request-server-encrypted" : "true", | ||
| "Date" : "Tue, 26 May 2020 19:01:41 GMT", | ||
| "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", | ||
| "ETag" : "0x8D801A739B591A0", | ||
| "Content-Length" : "0", | ||
| "x-ms-request-id" : "35a22e23-e01e-0016-6c90-33d083000000", | ||
| "x-ms-client-request-id" : "c32a1b3d-0aaf-4bc7-815a-eb26ea2e2d9c" | ||
| }, | ||
| "Exception" : null | ||
| }, { | ||
| "Method" : "PUT", | ||
| "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadreturnvalue0blobapitestuploadreturnvalueac375005572/javablobuploadreturnvalue1blobapitestuploadreturnvalueac350727", | ||
| "Headers" : { | ||
| "x-ms-version" : "2019-07-07", | ||
| "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.5; Windows 10 10.0)", | ||
| "x-ms-client-request-id" : "97217080-b607-4c5a-9377-9402de2fbbb0", | ||
| "Content-Type" : "application/octet-stream" | ||
| }, | ||
| "Response" : { | ||
| "x-ms-version" : "2019-07-07", | ||
| "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", | ||
| "x-ms-content-crc64" : "6RYQPwaVsyQ=", | ||
| "Last-Modified" : "Tue, 26 May 2020 19:01:41 GMT", | ||
| "retry-after" : "0", | ||
| "StatusCode" : "201", | ||
| "x-ms-request-server-encrypted" : "true", | ||
| "Date" : "Tue, 26 May 2020 19:01:40 GMT", | ||
| "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", | ||
| "ETag" : "0x8D801A739DBE7A7", | ||
| "Content-Length" : "0", | ||
| "x-ms-request-id" : "45a43c8b-501e-0129-5090-33210a000000", | ||
| "x-ms-client-request-id" : "97217080-b607-4c5a-9377-9402de2fbbb0" | ||
| }, | ||
| "Exception" : null | ||
| }, { | ||
| "Method" : "GET", | ||
| "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadreturnvalue&comp=list", | ||
| "Headers" : { | ||
| "x-ms-version" : "2019-07-07", | ||
| "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.5; Windows 10 10.0)", | ||
| "x-ms-client-request-id" : "77ce1921-fe00-4f0d-89e6-81b20026fb4a" | ||
| }, | ||
| "Response" : { | ||
| "Transfer-Encoding" : "chunked", | ||
| "x-ms-version" : "2019-07-07", | ||
| "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", | ||
| "retry-after" : "0", | ||
| "StatusCode" : "200", | ||
| "x-ms-request-id" : "953dace8-b01e-0128-5690-3320f7000000", | ||
| "Body" : "<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults ServiceEndpoint=\"https://xclientdev2.blob.core.windows.net/\"><Prefix>jtcuploadreturnvalue</Prefix><Containers><Container><Name>jtcuploadreturnvalue0blobapitestuploadreturnvalueac375005572</Name><Properties><Last-Modified>Tue, 26 May 2020 19:01:40 GMT</Last-Modified><Etag>\"0x8D801A7397A7BE3\"</Etag><LeaseStatus>unlocked</LeaseStatus><LeaseState>available</LeaseState><DefaultEncryptionScope>$account-encryption-key</DefaultEncryptionScope><DenyEncryptionScopeOverride>false</DenyEncryptionScopeOverride><HasImmutabilityPolicy>false</HasImmutabilityPolicy><HasLegalHold>false</HasLegalHold></Properties></Container></Containers><NextMarker /></EnumerationResults>", | ||
| "Date" : "Tue, 26 May 2020 19:01:41 GMT", | ||
| "x-ms-client-request-id" : "77ce1921-fe00-4f0d-89e6-81b20026fb4a", | ||
| "Content-Type" : "application/xml" | ||
| }, | ||
| "Exception" : null | ||
| }, { | ||
| "Method" : "DELETE", | ||
| "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadreturnvalue0blobapitestuploadreturnvalueac375005572?restype=container", | ||
| "Headers" : { | ||
| "x-ms-version" : "2019-07-07", | ||
| "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.5; Windows 10 10.0)", | ||
| "x-ms-client-request-id" : "7bd95de9-39e6-43c6-9798-8e034a96a037" | ||
| }, | ||
| "Response" : { | ||
| "x-ms-version" : "2019-07-07", | ||
| "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", | ||
| "retry-after" : "0", | ||
| "Content-Length" : "0", | ||
| "StatusCode" : "202", | ||
| "x-ms-request-id" : "ef6e1ddd-001e-001c-4a90-33c90a000000", | ||
| "Date" : "Tue, 26 May 2020 19:01:41 GMT", | ||
| "x-ms-client-request-id" : "7bd95de9-39e6-43c6-9798-8e034a96a037" | ||
| }, | ||
| "Exception" : null | ||
| } ], | ||
| "variables" : [ "jtcuploadreturnvalue0blobapitestuploadreturnvalueac375005572", "javablobuploadreturnvalue1blobapitestuploadreturnvalueac350727" ] | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.