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
HADOOP-17131. Refactor S3A Listing code for better isolation. #2148
HADOOP-17131. Refactor S3A Listing code for better isolation. #2148
Conversation
Test failures: The reason test fails is we are mocking the ITtlTimeProvider after the fileSystem is initialised thus not propagating the updated ITtlTimeProvider instance to StoreContext. One solution I have in my mind is to add one method to fetch the update TtlProvider in OperationCallbacks. |
Tested raw and guarded config in ap-south-1 bucket. All good. |
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.
LGTM overall, I'll run the tests against ireland and give it another look.
I like the fact that we factor out logic from S3AFs.
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.
tested against ireland without errors
+1 from me, let's wait if @steveloughran has any comments
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.
Like the overall design. I'd like to keep the OperationCallbacks separate and exclusive to rename/delete, with the new ListingCallbacks having all operations and accessors needed for listing. And both to stay out of StoreContext.
IMO StoreContext should be a minimal view of the store, and operations manipulating the state should be given their own interface to do so. Rename and Delete share one because they are so close. (list, copy, delete). If we put everything into StoreContext we've just recreated S3AFileSystem again with all its interdependencies
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/OperationCallbacks.java
Outdated
Show resolved
Hide resolved
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/StoreContext.java
Outdated
Show resolved
Hide resolved
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/Listing.java
Outdated
Show resolved
Hide resolved
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
Outdated
Show resolved
Hide resolved
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
Show resolved
Hide resolved
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
Show resolved
Hide resolved
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/Listing.java
Outdated
Show resolved
Hide resolved
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.
this is good. Just reinstate the class as an AbstractStoreOperation just so that if we ever add more to the base class, it will get picked up
yetus doesn't seem to be live right now, so we don't have a final check. But some of its earlier comments are still there by the look of things, especially
Can you fix that? All the checkstyles seem to have been dealt with. +1 pending the license |
💔 -1 overall
This message was automatically generated. |
Not fixing first checkstyle here https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2148/7/artifact/out/patch-asflicense-problems.txt as the line length is only 82. Cutting it will make the side by side review difficult. |
💔 -1 overall
This message was automatically generated. |
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.
+1, approved
Thanks |
Contributed by Mukund Thakur. Change-Id: I79160b236a92fdd67565a4b4974f1862e600c210
Hi @steveloughran and @mukund-thakur
|
I was ignoring java doc issues because of https://issues.apache.org/jira/browse/HADOOP-17091. Looks like it got fixed recently. Sorry. |
…#2148) Contributed by Mukund Thakur. Conflicts: hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java Change-Id: Idc9ac4848b857362dee5574a912e4f36e586091e
Ran tests in ap-south-1 bucket using mvn clean verify -Dparallel-tests and mvn clean verify -Ds3guard -Ddynamo -Dparallel-tests
All good.