-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-10781. Do not use OFSPath in O3FS BasicOzoneClientAdapterImpl #6614
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
jojochuang
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.
Looks correct to me. Can you add a small test here
Line 498 in 21068a3
| public void testLeaseRecoverable() throws Exception { |
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:
// verify that fs.isFileClosed(new Path("")) throws an exception
assertThrows(OMException.class, () -> fs.isFileClosed(new Path("")));
|
Thanks @chungen0126 for the fix. Why is this targeted at feature branch Also, can you please check if similar usage of Line 601 in fe1b5b6
Line 610 in fe1b5b6
Line 620 in fe1b5b6
Line 665 in fe1b5b6
|
Should I close this pr and create a new one for master?
I fixed those APIs make them create/rename snapshots for the root bucket and add test for them. I'm confused that should them have permission to access snapshots for other buckets. |
Not necessary. If you agree with the move to |
I put the source in the second layer folder to test for this bug. |
Sure. |
|
@chungen0126 sorry, looks like GitHub does not realize only 2 commits are targeted at Can you please rebase these onto |
Done. Am I doing the right thing? |
|
@adoroszlai Sorry, I might have done something wrong. Could you please tell me how to fix it? |
|
Start interactive rebase: Delete all commits from the editor except: Save and exit the editor. Verify the log: should be something like: |
…is an Utility class for OFS not O3FS
|
Should I force push or push a new branch for new pull request, thanks? |
|
@chungen0126 force push is better in this case than a new PR |
|
Thanks a lot @chungen0126 for updating the patch to cover snapshot-specific methods and rebasing for |
jojochuang
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 for the update! Almost ready to go. Just two more small nits
...e/integration-test/src/test/java/org/apache/hadoop/fs/ozone/AbstractOzoneFileSystemTest.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/OzoneClientUtils.java
Outdated
Show resolved
Hide resolved
|
Thanks @chungen0126 for the fix, @jojochuang for the review. |
…pache#6614) (cherry picked from commit a291682)
…pache#6614) (cherry picked from commit a291682)
…pache#6614) (cherry picked from commit a291682)
…pache#6614) (cherry picked from commit a291682)
…pache#6614) (cherry picked from commit a291682)
What changes were proposed in this pull request?
In BasicOzoneClientAdapterImpl#isFileClosed we use OFSPath to check if the path was a key, but it Utility class for OFS not O3FS. That is to say, the pathStr doen't include volume and bucket but the OFSPath still setting the first two levels of directories or key as volume and bucket. If the path was less than two level it comes out an error.
https://github.com/apache/ozone/blob/HDDS-7593/hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java#L774
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10781
How was this patch tested?
There are some existing lease recovery tests.