-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-9079. Implement a lightweight listKeys API #5115
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
|
Could you please take a look @kerneltime, @sadanand48, @duongkame, thanks! |
|
There are a few Git CI/CD check failures - taking a look at the same. Edit: Resolved the Git CI/CD check failures. |
|
Just a thought, wouldn't it be easier if you just don't populate extra information when listing keys for the I see we have something similar already in listKeys API. |
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
We discussed this and felt it is simpler to keep separate lightweight APIs that behave in one way rather than APIs that are multi modal and have variable responses based on varying parameters. Keeping the APIs simple will also help in measuring runtime performance of the APIs for OM vs. not knowing the parameters involved. |
|
Unfortunately, we still need to deserialize the metadata to complete the request which is an additional load but we should be able to greatly reduce the payload and skip block information altogether. |
errose28
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 working on this @tanvipenumudy. Do we have follow up jiras to integrate this with the higher level Ozone interfaces that don't need block information:
- o3 CLI: (
ozone sh key list --lightor something like that) - S3
ListObjectrequests - ofs
-ls
If these are planned could you link the jiras together or group them as subtasks under a common parent?
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
...n/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataReader.java
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshot.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/BasicOmKeyInfo.java
Show resolved
Hide resolved
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/BasicOmKeyInfo.java
Show resolved
Hide resolved
Thanks @kerneltime. Based on your comment, I see why we are going with new API approach. @tanvipenumudy the motivation behind this change is not very clear from the PR's description or attached jira. If there is a feature jira or design doc where motivation is captured, it would be great if you attached to PR or jira. |
…ne/om/OmMetadataReader.java Co-authored-by: Hemant Kumar <[email protected]>
…doop/ozone/om/OmMetadataReader.java" This reverts commit 3d51405.
|
Thank you for the reviews @hemantk-12, @kerneltime and @errose28, I will be working on incorporating the changes as suggested. At the moment, we haven't created any follow-up Jiras for the integration part that was mentioned. However, I will make sure to create a parent Jira to group these tasks together/attach a design document that captures the motivation behind this change. Edit: Parent Jira HDDS-2328 |
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/BasicOmKeyInfo.java
Show resolved
Hide resolved
8f07453 to
b53e630
Compare
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
3b67747 to
fae6690
Compare
What changes were proposed in this pull request?
ListKeys currently reports all the blocks for each of the keys. There are multiple use-cases where this is not required:
The goal is to implement a listKeys API that can be skipped and does not need to include block information. The keys are only listed if the user has appropriate permissions.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9079
How was this patch tested?