anujmodi2021 commented on code in PR #6409:
URL: https://github.com/apache/hadoop/pull/6409#discussion_r1464713380
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -1053,12 +1053,24 @@ public AbfsRestOperation read(final String path,
return op;
}
- public AbfsRestOperation deletePath(final String path, final boolean
recursive, final String continuation,
+ public AbfsRestOperation deletePath(final String path, final boolean
recursive,
+ final String continuation,
TracingContext tracingContext)
throws AzureBlobFileSystemException {
final List<AbfsHttpHeader> requestHeaders = createDefaultHeaders();
-
final AbfsUriQueryBuilder abfsUriQueryBuilder =
createDefaultUriQueryBuilder();
+
+ if (abfsConfiguration.isPaginatedDeleteEnabled() && recursive) {
+ // Change the x-ms-version to "2023-08-03" if its less than that.
+ if (xMsVersion.compareTo(AUGUST_2023_API_VERSION) < 0) {
Review Comment:
Nice suggestion...
Added a new enum class to define all the versions currently in use
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -1053,12 +1053,24 @@ public AbfsRestOperation read(final String path,
return op;
}
- public AbfsRestOperation deletePath(final String path, final boolean
recursive, final String continuation,
+ public AbfsRestOperation deletePath(final String path, final boolean
recursive,
+ final String continuation,
TracingContext tracingContext)
throws AzureBlobFileSystemException {
final List<AbfsHttpHeader> requestHeaders = createDefaultHeaders();
-
final AbfsUriQueryBuilder abfsUriQueryBuilder =
createDefaultUriQueryBuilder();
+
+ if (abfsConfiguration.isPaginatedDeleteEnabled() && recursive) {
+ // Change the x-ms-version to "2023-08-03" if its less than that.
+ if (xMsVersion.compareTo(AUGUST_2023_API_VERSION) < 0) {
+ requestHeaders.removeIf(header ->
header.getName().equalsIgnoreCase(X_MS_VERSION));
Review Comment:
Taken
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]