From 69900d11680fa1558a0be6dad417ecd9a2e75961 Mon Sep 17 00:00:00 2001 From: Rabab Date: Tue, 10 Jan 2023 11:26:46 -0800 Subject: [PATCH 01/11] testing overwrite --- .../blob/specialized/AppendBlobClient.java | 25 +++++++++++++++- .../storage/blob/BlobOutputStreamTest.groovy | 29 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 5e3329ac8c9e8..a8d218cc9caca 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -9,6 +9,7 @@ import com.azure.core.exception.UnexpectedLengthException; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobClientBuilder; import com.azure.storage.blob.BlobContainerClient; @@ -53,6 +54,8 @@ */ @ServiceClient(builder = SpecializedBlobClientBuilder.class) public final class AppendBlobClient extends BlobClientBase { + private static final ClientLogger LOGGER = new ClientLogger(AppendBlobAsyncClient.class); + private final AppendBlobAsyncClient appendBlobAsyncClient; /** @@ -100,7 +103,7 @@ public AppendBlobClient getCustomerProvidedKeyClient(CustomerProvidedKey custome /** * Creates and opens an output stream to write data to the append blob. If the blob already exists on the service, - * it will be overwritten. + * new data will get appended to the existing blob. * * @return A {@link BlobOutputStream} object used to write data to the blob. * @throws BlobStorageException If a storage service error occurred. @@ -109,6 +112,26 @@ public BlobOutputStream getBlobOutputStream() { return getBlobOutputStream(null); } + /** + * Creates and opens an output stream to write data to the append blob. + *

+ * + * @return A {@link BlobOutputStream} object used to write data to the blob. + * @param overwrite Whether to overwrite, should data exist on the blob. + * @throws BlobStorageException If a storage service error occurred. + */ + public BlobOutputStream getBlobOutputStream(boolean overwrite) { + AppendBlobRequestConditions requestConditions = null; + if (!overwrite) { + // fix logic to create a new blob + if (exists()) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)); + } + requestConditions = new AppendBlobRequestConditions().setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); + } + return getBlobOutputStream(requestConditions); + } + /** * Creates and opens an output stream to write data to the append blob. If the blob already exists on the service, * it will be overwritten. diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy index e79d09dcddc0d..80f3765303357 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy @@ -218,6 +218,35 @@ class BlobOutputStreamTest extends APISpec { convertInputStreamToByteArray(appendBlobClient.openInputStream()) == data } + @LiveOnly + def "AppendBlob output stream overwrite"() { + setup: + def data = getRandomByteArray(FOUR_MB) + def appendBlobClient = cc.getBlobClient(generateBlobName()).getAppendBlobClient() + appendBlobClient.create() + + when: + def outputStream = appendBlobClient.getBlobOutputStream() +// for (int i = 0; i != 4; i++) { +// outputStream.write(Arrays.copyOfRange(data, i * FOUR_MB, ((i + 1) * FOUR_MB))) +// } + outputStream.write(data) + outputStream.close() + + def data2 = getRandomByteArray(FOUR_MB) + + def outputStream2 = appendBlobClient.getBlobOutputStream(true) +// for (int i = 0; i != 4; i++) { +// outputStream2.write(Arrays.copyOfRange(data2, i * FOUR_MB, ((i + 1) * FOUR_MB))) +// } + outputStream2.write(data2) + outputStream2.close() + + then: + appendBlobClient.getProperties().getBlobSize() == data2.length +// convertInputStreamToByteArray(appendBlobClient.openInputStream()) == data2 + } + def convertInputStreamToByteArray(InputStream inputStream) { int b ByteArrayOutputStream outputStream = new ByteArrayOutputStream() From de7ac7fa22b0f6ace9aa10c9bad4ed0f3af3adc2 Mon Sep 17 00:00:00 2001 From: Rabab Date: Tue, 10 Jan 2023 17:11:38 -0800 Subject: [PATCH 02/11] overwrite test works with data2 --- .../azure/storage/blob/specialized/AppendBlobClient.java | 3 +++ .../com/azure/storage/blob/BlobOutputStreamTest.groovy | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index a8d218cc9caca..8e32398f0e824 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -128,6 +128,9 @@ public BlobOutputStream getBlobOutputStream(boolean overwrite) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)); } requestConditions = new AppendBlobRequestConditions().setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); + } else { + // creating new blob to overwrite existing blob + create(true); } return getBlobOutputStream(requestConditions); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy index 80f3765303357..2c9ee020f7d34 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy @@ -227,11 +227,10 @@ class BlobOutputStreamTest extends APISpec { when: def outputStream = appendBlobClient.getBlobOutputStream() -// for (int i = 0; i != 4; i++) { -// outputStream.write(Arrays.copyOfRange(data, i * FOUR_MB, ((i + 1) * FOUR_MB))) -// } outputStream.write(data) outputStream.close() + // assert that current stream is + convertInputStreamToByteArray(appendBlobClient.openInputStream()) == data def data2 = getRandomByteArray(FOUR_MB) @@ -244,7 +243,7 @@ class BlobOutputStreamTest extends APISpec { then: appendBlobClient.getProperties().getBlobSize() == data2.length -// convertInputStreamToByteArray(appendBlobClient.openInputStream()) == data2 + convertInputStreamToByteArray(appendBlobClient.openInputStream()) == data2 } def convertInputStreamToByteArray(InputStream inputStream) { From 922ef1b00679a63150b93f14265f3267db5d865b Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 12 Jan 2023 14:44:26 -0800 Subject: [PATCH 03/11] update javadocs --- .../com/azure/storage/blob/specialized/AppendBlobClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 2433600f8bc55..b436d4221f8d3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -116,7 +116,7 @@ public BlobOutputStream getBlobOutputStream() { *

* * @return A {@link BlobOutputStream} object used to write data to the blob. - * @param overwrite Whether to overwrite, should data exist on the blob. + * @param overwrite Whether an existing blob should be deleted and recreated, should data exist on the blob. * @throws BlobStorageException If a storage service error occurred. */ public BlobOutputStream getBlobOutputStream(boolean overwrite) { From 336063f0c7317a9ac78c7529ab6d914972c7655e Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 18 Jan 2023 15:30:06 -0800 Subject: [PATCH 04/11] changing logic for appendBlobClient.getBlobOutputStream(boolean) to overwrite if true --- .../azure/storage/blob/specialized/AppendBlobClient.java | 1 - .../com/azure/storage/blob/BlobOutputStreamTest.groovy | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index b436d4221f8d3..e0cd829dbcf04 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -122,7 +122,6 @@ public BlobOutputStream getBlobOutputStream() { public BlobOutputStream getBlobOutputStream(boolean overwrite) { AppendBlobRequestConditions requestConditions = null; if (!overwrite) { - // fix logic to create a new blob if (exists()) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy index 2c9ee020f7d34..cac42a0ddb176 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy @@ -229,15 +229,14 @@ class BlobOutputStreamTest extends APISpec { def outputStream = appendBlobClient.getBlobOutputStream() outputStream.write(data) outputStream.close() - // assert that current stream is + + then: convertInputStreamToByteArray(appendBlobClient.openInputStream()) == data + when: def data2 = getRandomByteArray(FOUR_MB) def outputStream2 = appendBlobClient.getBlobOutputStream(true) -// for (int i = 0; i != 4; i++) { -// outputStream2.write(Arrays.copyOfRange(data2, i * FOUR_MB, ((i + 1) * FOUR_MB))) -// } outputStream2.write(data2) outputStream2.close() From 3d743ecaae61caf21baf22f35e6321d115e8e76a Mon Sep 17 00:00:00 2001 From: Rabab Ibrahim Date: Wed, 18 Jan 2023 17:24:14 -0800 Subject: [PATCH 05/11] Update sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> --- .../com/azure/storage/blob/specialized/AppendBlobClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index e0cd829dbcf04..9e49899b1507e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -53,7 +53,7 @@ */ @ServiceClient(builder = SpecializedBlobClientBuilder.class) public final class AppendBlobClient extends BlobClientBase { - private static final ClientLogger LOGGER = new ClientLogger(AppendBlobAsyncClient.class); + private static final ClientLogger LOGGER = new ClientLogger(AppendBlobClient.class); private final AppendBlobAsyncClient appendBlobAsyncClient; From f0628c122b53bfaad9ee2b0efeff589d5b2d26df Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 18 Jan 2023 22:53:41 -0800 Subject: [PATCH 06/11] adding new test and updating changelog with breaking change --- sdk/storage/azure-storage-blob/CHANGELOG.md | 1 + .../blob/specialized/AppendBlobClient.java | 5 +--- .../storage/blob/BlobOutputStreamTest.groovy | 28 +++++++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 63d2a66167804..d743d46a18dee 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -8,6 +8,7 @@ - Fixed bug where `BlobErrorCode.IncrementalCopyOfEarlierVersionSnapshotNotAllowed` was spelled incorrectly. ### Breaking Changes +- `AppendBlobClient.getBlobOutputStream(boolean)` now appends to existing data if overwrite is specified `false`, and deletes and recreates a blob if overwrite is specified `true`. ### Bugs Fixed diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index e0cd829dbcf04..1a0aaf4fbfd3d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -53,7 +53,7 @@ */ @ServiceClient(builder = SpecializedBlobClientBuilder.class) public final class AppendBlobClient extends BlobClientBase { - private static final ClientLogger LOGGER = new ClientLogger(AppendBlobAsyncClient.class); + private static final ClientLogger LOGGER = new ClientLogger(AppendBlobClient.class); private final AppendBlobAsyncClient appendBlobAsyncClient; @@ -122,9 +122,6 @@ public BlobOutputStream getBlobOutputStream() { public BlobOutputStream getBlobOutputStream(boolean overwrite) { AppendBlobRequestConditions requestConditions = null; if (!overwrite) { - if (exists()) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(Constants.BLOB_ALREADY_EXISTS)); - } requestConditions = new AppendBlobRequestConditions().setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); } else { // creating new blob to overwrite existing blob diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy index cac42a0ddb176..4748ef7af8b9d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy @@ -245,6 +245,34 @@ class BlobOutputStreamTest extends APISpec { convertInputStreamToByteArray(appendBlobClient.openInputStream()) == data2 } + @LiveOnly + def "AppendBlob output stream overwrite false"() { + setup: + def data = getRandomByteArray(Constants.MB) + def appendBlobClient = cc.getBlobClient(generateBlobName()).getAppendBlobClient() + appendBlobClient.create() + + when: + def outputStream = appendBlobClient.getBlobOutputStream() + outputStream.write(data) + outputStream.close() + + then: + convertInputStreamToByteArray(appendBlobClient.openInputStream()) == data + + when: + def data2 = getRandomByteArray(Constants.MB) + outputStream = appendBlobClient.getBlobOutputStream(false) + outputStream.write(data2) + outputStream.close() + + then: + def finalData = new byte[2 * Constants.MB] + System.arraycopy(data, 0, finalData, 0, data.length) + System.arraycopy(data2, 0, finalData, data.length, data2.length) + convertInputStreamToByteArray(appendBlobClient.openInputStream()) == finalData + } + def convertInputStreamToByteArray(InputStream inputStream) { int b ByteArrayOutputStream outputStream = new ByteArrayOutputStream() From abbe24b33450690bbfdfd3a7f2cff800bc6d9074 Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 18 Jan 2023 22:54:18 -0800 Subject: [PATCH 07/11] logger is never used --- .../com/azure/storage/blob/specialized/AppendBlobClient.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 1a0aaf4fbfd3d..5124923d3b1a5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -53,7 +53,6 @@ */ @ServiceClient(builder = SpecializedBlobClientBuilder.class) public final class AppendBlobClient extends BlobClientBase { - private static final ClientLogger LOGGER = new ClientLogger(AppendBlobClient.class); private final AppendBlobAsyncClient appendBlobAsyncClient; From c4c730acb49eee9df57dbbe1237aa35a76bb3dcf Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 19 Jan 2023 12:24:28 -0800 Subject: [PATCH 08/11] updating changelog and javadocs --- sdk/storage/azure-storage-blob/CHANGELOG.md | 2 +- .../com/azure/storage/blob/specialized/AppendBlobClient.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index d743d46a18dee..1299838ca303e 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -6,9 +6,9 @@ - Added support for 2021-12-02 service version. - Added support for Blob Cold Tier `AccessTier.COLD`. - Fixed bug where `BlobErrorCode.IncrementalCopyOfEarlierVersionSnapshotNotAllowed` was spelled incorrectly. +- Added new overload `AppendBlobClient.getBlobOutputStream(boolean)` that takes in a boolean for overwrite and appends to existing data if overwrite is specified `false`, or deletes and recreates a blob if overwrite is specified `true`. ### Breaking Changes -- `AppendBlobClient.getBlobOutputStream(boolean)` now appends to existing data if overwrite is specified `false`, and deletes and recreates a blob if overwrite is specified `true`. ### Bugs Fixed diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 5124923d3b1a5..a26ac7c423f7a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -112,7 +112,6 @@ public BlobOutputStream getBlobOutputStream() { /** * Creates and opens an output stream to write data to the append blob. - *

* * @return A {@link BlobOutputStream} object used to write data to the blob. * @param overwrite Whether an existing blob should be deleted and recreated, should data exist on the blob. @@ -130,8 +129,7 @@ public BlobOutputStream getBlobOutputStream(boolean overwrite) { } /** - * Creates and opens an output stream to write data to the append blob. If the blob already exists on the service, - * it will be overwritten. + * Creates and opens an output stream to write data to the append blob. * * @param requestConditions A {@link BlobRequestConditions} object that represents the access conditions for the * blob. From a3400f3b5dcdfc6346ace9f820fd8c00b70a8387 Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 19 Jan 2023 12:43:38 -0800 Subject: [PATCH 09/11] updated description of method for better clarity --- .../com/azure/storage/blob/specialized/AppendBlobClient.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index a26ac7c423f7a..859062dfd64b8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -111,7 +111,9 @@ public BlobOutputStream getBlobOutputStream() { } /** - * Creates and opens an output stream to write data to the append blob. + * Creates and opens an output stream to write data to the append blob. If overwrite is specified {@code true}, + * the existing blob will be deleted and recreated, should data exist on the blob. If overwrite is specified + * {@code false}, new data will get appended to the existing blob, if it exists. * * @return A {@link BlobOutputStream} object used to write data to the blob. * @param overwrite Whether an existing blob should be deleted and recreated, should data exist on the blob. From ee23dc6208048ac3abe844585215fae7e55fc489 Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 19 Jan 2023 12:45:50 -0800 Subject: [PATCH 10/11] fixing wording --- .../com/azure/storage/blob/specialized/AppendBlobClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 859062dfd64b8..2c9e23688bc58 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -113,7 +113,7 @@ public BlobOutputStream getBlobOutputStream() { /** * Creates and opens an output stream to write data to the append blob. If overwrite is specified {@code true}, * the existing blob will be deleted and recreated, should data exist on the blob. If overwrite is specified - * {@code false}, new data will get appended to the existing blob, if it exists. + * {@code false}, new data will get appended to the existing blob. * * @return A {@link BlobOutputStream} object used to write data to the blob. * @param overwrite Whether an existing blob should be deleted and recreated, should data exist on the blob. From 4a549f37c79c083bcaf20bccf25341d0ca609c7b Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 19 Jan 2023 14:26:08 -0800 Subject: [PATCH 11/11] removing unused import --- .../com/azure/storage/blob/specialized/AppendBlobClient.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 2c9e23688bc58..a805f6e38e0ef 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -9,7 +9,6 @@ import com.azure.core.exception.UnexpectedLengthException; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobClientBuilder; import com.azure.storage.blob.BlobContainerClient;