-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-3805. [OFS] Remove usage of OzoneClientAdapter interface #1088
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
Conversation
|
The META-INF change seems to be affecting the MR acceptance test: Looking into it. |
elek
left a comment
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 create this patch @smengcl
There are multiple changes in this patch:
-
start to use SPI / META-INF services --> I am +1
-
Change the defaultFs from
o3fstoofsin some tests --> I can accept it, I guess because we think theofsis a long term solution, but don't know the motivation to do it now. But I can accept it. -
Use
ClientProtocol(which supposed to be an internal implementation detail ofOzoneClientAdapterinstead of using theClientAdapterImpl.
I think it's a good step to remove the usage of implementation as the main goal with interfaces is to hide the implementation.
But it's not clear what is the long-term goal with this change.
A. We can either remove the usage of ClientAdapter from RootedOzoneFileSystem and use just the pure OzoneClient / ClientProtocol. In that case we don't need to leak the ClientProtocol from the ClientAdapter.
B. Or we can keep the OzoneClientAdapter if we need a good interface. Using interface means that we don't cast it and don't retrieve internal implementation, just call the methods without understanding what is under the hood. In this case the getVolumeDetails should be added to the OzoneClientAdapter instead of makeing it possible to get the ClientProtocol
I am fine with both approaches but I would like to understand the goal.
|
Thanks @elek for the review.
I'll revise the jira title to more accurately reflect my changes in a bit.
The defaultFS doesn't seem to affect any existing tests right now since I believe most are using full path (e.g. My idea here is to let docker dev experience use OFS by default. So you can do things like If some tests are using relative path and tried to create files directly under volume or bucket with OFS, some acceptance tests should fail and catch the problem.
I'm in favor of A. I'll attempt to remove the usage of |
(cherry picked from commit 70311f8e7eac5ab5032aa5b4b28ff3b89eb65787)
Should solely rely on META-INF to get the correct HCFS FileSystem class. Also sets all defaultFS in docker compose to ofs://.
2. Get rid of getClientProtocol(). 3. Add getVolumeDetails() and deleteVolume().
2. Fix TestRootedOzoneFileSystem. Change-Id: Ic829a3dd430b97f9136057142eb8a2d6124a5852
…pter. Change-Id: I52d6efaf300327cff32c6101390aa4eeea766bea
…mImpl. Change-Id: If78bf7a96afccaaf72a842c4acde174ff5b76679
Change-Id: I7da070079053f484b414435bcb0a6c7a1ffacb0f
Change-Id: I77701ec1a90ae772b9ada1e01289fcb4654377e8
Change-Id: I18fff3756562030dd417d85fb752713de0074095
Change-Id: If1347b3f71e787e8e6acee83381c1f4f32c9861e
Change-Id: Ic010c16fa12e69d1886514b5c250e999252115f9
|
The same test suite |
|
@elek I am considering merging/rearranging Now that all the existing tests have passed. Mind taking another look at this? |
|
Thanks the updated @smengcl. And sorry for the later answer. I was ooo.
Still, it contains 3 changes (META-INF changes, defaultFs=ofs change, code structure refactor). You can make the review easier (and faster) by separating them to different patches.
I am fine with that approach but let me add some comments to the latest patch. The naming of As a test: Can you please explain what are the differences between the two classes and the responsibilities? If not, we don't need two classes. Just remove the Wouldn't it be more simple? |
|
@elek Yeah I will spilt the change into more jiras. |
I have created one (HDDS-4074) for the introduction of |
|
/pending Yeah I will spilt the change into more jiras. |
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.
Marking this issue as un-mergeable as requested.
Please use /ready comment when it's resolved.
Yeah I will spilt the change into more jiras.
|
Folks - what is the benefit of splitting this into smaller Jiras? Is it just to make the code review easier? |
|
After a short discussion with @arp7 and @adoroszlai I think for this PR we won't merge the two classes ( |
As an example: changing o3fs to ofs in acceptance tests are independent of the Java interface changes. It may or may not introduce new problems on own. But it's easy to create a separated PR and check the build results and merge. After that it's easier to identify possible problems, if it appeared about o3fs -> ofs change, it can be related to tests. If it's appeared as a result of the interface changes, we know that the java code should be adjusted. |
I am fine with any approach as I wrote, but can you please share some motivations behind the decision? |
|
Can we defer the class merge to a separate PR? This PR has been open for over 2 months. In the interests of time, I propose to commit what we can and address the rest in a followup, or alternatively just abandon the PR. |
I totally agree, this is what I suggested: to merge different parts in different PRs to make it easier to follow the changes. As far as I see I see the following parts which are unrelated to the class hierarchy change:
So we have the remaining part which is mainly cleaning up the class hierarchy. I had a comment at [July of 16th] (#1088 (comment)) and suggested some changes. And would be interested about the discussion/decision/plan about the proposed changes. |
I am closing this PR and opening #1363. Let's continue the discussion there. |
What changes were proposed in this pull request?
Use ClientProtocol directly in Adapter and FS.
Refactor OFS. Part 1 of N.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3805
How was this patch tested?
Existing tests should pass.