-
Notifications
You must be signed in to change notification settings - Fork 9.2k
[ABFS] HADOOP-18656: Paginated Delete Driver Testing #5661
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2979332
Added pagination query param for delete path
sreeb-msft cc80b77
Adding tests for paginated delete
sreeb-msft 4ee8a1b
Default config value and test changes
sreeb-msft 6418bc1
Adding users in test
sreeb-msft 6f8ebab
Paginated Delete driver side short tests
sreeb-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
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
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 |
|---|---|---|
|
|
@@ -38,6 +38,7 @@ | |
| import java.util.concurrent.TimeUnit; | ||
|
|
||
| import org.apache.hadoop.classification.VisibleForTesting; | ||
| import org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys; | ||
| import org.apache.hadoop.fs.store.LogExactlyOnce; | ||
| import org.apache.hadoop.util.Preconditions; | ||
| import org.apache.hadoop.thirdparty.com.google.common.base.Strings; | ||
|
|
@@ -72,8 +73,7 @@ | |
| import static org.apache.hadoop.fs.azurebfs.AbfsStatistic.RENAME_PATH_ATTEMPTS; | ||
| import static org.apache.hadoop.fs.azurebfs.AzureBlobFileSystemStore.extractEtagHeader; | ||
| import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.*; | ||
| import static org.apache.hadoop.fs.azurebfs.constants.FileSystemConfigurations.DEFAULT_DELETE_CONSIDERED_IDEMPOTENT; | ||
| import static org.apache.hadoop.fs.azurebfs.constants.FileSystemConfigurations.SERVER_SIDE_ENCRYPTION_ALGORITHM; | ||
| import static org.apache.hadoop.fs.azurebfs.constants.FileSystemConfigurations.*; | ||
| import static org.apache.hadoop.fs.azurebfs.constants.FileSystemUriSchemes.HTTPS_SCHEME; | ||
| import static org.apache.hadoop.fs.azurebfs.constants.HttpHeaderConfigurations.*; | ||
| import static org.apache.hadoop.fs.azurebfs.constants.HttpQueryParams.*; | ||
|
|
@@ -87,7 +87,7 @@ public class AbfsClient implements Closeable { | |
|
|
||
| private final URL baseUrl; | ||
| private final SharedKeyCredentials sharedKeyCredentials; | ||
| private final String xMsVersion = "2019-12-12"; | ||
| private String xMsVersion = "2019-12-12"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dont we need to switch it to "2023-08-03"? Should we switch only for deletePath and not for others? |
||
| private final ExponentialRetryPolicy retryPolicy; | ||
| private final String filesystem; | ||
| private final AbfsConfiguration abfsConfiguration; | ||
|
|
@@ -867,6 +867,14 @@ public AbfsRestOperation deletePath(final String path, final boolean recursive, | |
| final List<AbfsHttpHeader> requestHeaders = createDefaultHeaders(); | ||
|
|
||
| final AbfsUriQueryBuilder abfsUriQueryBuilder = createDefaultUriQueryBuilder(); | ||
|
|
||
| boolean enablePagination = abfsConfiguration.getBoolean( | ||
| ConfigurationKeys.FS_AZURE_ENABLE_PAGINATED_DELETE, | ||
| DEFAULT_ENABLE_PAGINATED_DELETE | ||
| ); | ||
|
|
||
|
Comment on lines
+871
to
+875
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets use |
||
| abfsUriQueryBuilder.addQuery(QUERY_PARAM_PAGINATED, String.valueOf(enablePagination)); | ||
|
|
||
| abfsUriQueryBuilder.addQuery(QUERY_PARAM_RECURSIVE, String.valueOf(recursive)); | ||
| abfsUriQueryBuilder.addQuery(QUERY_PARAM_CONTINUATION, continuation); | ||
| String operation = recursive ? SASTokenProvider.DELETE_RECURSIVE_OPERATION : SASTokenProvider.DELETE_OPERATION; | ||
|
|
||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wildcard import.