diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md index 9f82c3de79cd3..36e5f7e85e3cd 100644 --- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md @@ -11,6 +11,7 @@ ### Bugs Fixed ### Other Changes +- Deprecated the always-failing API `DataLakeFileClient.flush(long)` to avoid confusion regarding overwrite semantics in DataLake. ## 12.13.2 (2023-01-10) diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileAsyncClient.java index 816d3d1452048..e7bff24ee64db 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileAsyncClient.java @@ -1199,10 +1199,11 @@ Mono> appendWithResponse(Flux data, long fileOffset, * Docs

* * @param position The length of the file after all data has been written. - * * @return A reactive response containing the information of the created resource. + * @deprecated See {@link #flush(long, boolean)} instead. */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public Mono flush(long position) { return flush(position, false); } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileClient.java index 48b7daeb4dffb..f69e87b993b0f 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileClient.java @@ -868,10 +868,11 @@ public Response appendWithResponse(BinaryData data, long fileOffset, * Docs

* * @param position The length of the file after all data has been written. - * * @return Information about the created resource. + * @deprecated See {@link #flush(long, boolean)} instead. */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public PathInfo flush(long position) { return flush(position, false); }