-
Notifications
You must be signed in to change notification settings - Fork 483
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
HDDS-2665. Implement new Ozone Filesystem scheme ofs:// #1021
Conversation
Will open up a new jira to fix sonarcloud bugs, and address merge conflicts. |
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.
Thanks to drive this effort @smengcl. Overall it looks good to me. I agree that we are in the last step before the merge.
I have some questions about the code.
(And I feel myself guilty of the conflict, I can explain the changes on the master what I did, or I can help to rebase it.)
...one/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java
Outdated
Show resolved
Hide resolved
@RunWith(PowerMockRunner.class) | ||
@PrepareForTest({ OzoneClientFactory.class, UserGroupInformation.class }) | ||
@PowerMockIgnore("javax.management.*") | ||
public class TestRootedOzoneFileSystemWithMocks { |
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.
FYI: there is a full, in memory implementation of ObjectStore
in s3
project. Can be useful for similar tests if we move it to a common place. (BTW: I like this lightweight test).
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.
I removed TestRootedOzoneFileSystemWithMocks
in HDDS-3767 since TestOzoneFileSystemWithMocks
is also removed. We can restore this later.
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
Outdated
Show resolved
Hide resolved
if (recursive) { | ||
// Delete all buckets first | ||
OzoneVolume volume = | ||
adapterImpl.getObjectStore().getVolume(volumeName); |
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.
The main idea behind the adapter is that we can use only methods on the adapter which provides a clean definition of the used ozone method. I would the usage of getObjectStore() as it leaks the internal methods.
The original goal of adapter to support different classloaders, but still seems to be a good design pattern to use an adapter.getVolume
instead.
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.
Yes I agree. When implementing OFS volume and bucket deletion I tried to put the logic in adapter, but I realized if I want to do it the easy way (using recursion) I simply can't put the logic in adapter. Hence the hacky one you see here.
I will refactor this chunk of code and remove adapterImpl
in another refactoring jira later. But I think this shouldn't affect the merge.
Thanks for the comment @elek . The merge conflict comes from HDDS-3627 (commit) as far as I can tell. Shouldn't be a big problem. It is always a delight to see good refactoring. :)
|
Conflicts: hadoop-ozone/ozonefs-hadoop2/src/main/java/org/apache/hadoop/fs/ozone/TestOFSPath.java hadoop-ozone/ozonefs-hadoop2/src/main/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystemWithMocks.java hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/OzoneClientAdapterFactory.java
Some of the bugs that showed up in SonarCloud doesn't relate to OFS (e.g.
A closer look reveals that the bug isn't really a bug. If I "address" it by closing |
Codecov Report
@@ Coverage Diff @@
## master #1021 +/- ##
============================================
+ Coverage 70.48% 70.57% +0.08%
- Complexity 9260 9405 +145
============================================
Files 961 965 +4
Lines 48177 48979 +802
Branches 4678 4790 +112
============================================
+ Hits 33959 34565 +606
- Misses 11968 12104 +136
- Partials 2250 2310 +60
Continue to review full report at Codecov.
|
The only test failure after HDDS-3767 merge is it-hdds-om |
Thanks @elek for kicking off another 2 runs. I just pushed another empty commit for a new run. We might want to exclude (by rebasing) the empty commits from feature branch when we merge is to master? @elek git merge --no-ff HDDS-2665-ofs when on |
SonarCloud Quality Gate failed.
|
The last run (merge commit) is good. Will manually merge feature branch |
I'm going to force push to the feature branch to remove the empty commits. All 7 runs, for the record:
|
What changes were proposed in this pull request?
Implement a new scheme for Ozone Filesystem where all volumes (and buckets) can be accessed from a single root.
Also known as Rooted Ozone Filesystem.
This PR combines commits in feature branch
HDDS-2665-ofs
for review and discussion.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-2665
How was this patch tested?
Added FileSystem contract tests for ofs://.
Added new integration tests.