-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-7810. Support namespace summaries (du, dist & counts) for OBJECT_STORE buckets. #4245
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
|
aren't unit tests required? |
|
Hey @ArafatKhan2198 @smengcl @dombizita: Last year, when @xBis7 and I implemented this for legacy buckets, we were going to do object store buckets as well. We didn't because @avijayanhwx (the engineer who originally created this epic), told us it would be good to support "object store prefixes", (and we didn't have time to do the extra work.) It looks like this PR still doesn't support them. Instead it just assigns all object store keys to the corresponding bucket. I'm fine with that, but just want to be sure that everyone understands it wasn't the initial intention. FYI: this is how @avijayanhwx defined the prefixes, (from an email he sent me): "What I mean as object store prefix is not dissimilar to a directory in legacy FS buckets, but there is added complexity in Recon to track them since they will not be present in the OM metadata. For example, in a pure OS bucket, the rocksdb entry would be /vol1/bucket1/application1/instance1/file1. The prefixes ( /vol1/bucket1/application1 & /vol1/bucket1/application1/instance1) are not created as keys in RocksDB. We wanted to explore how to capture them and calculate summaries at prefix levels. Feel free to think about the need to do it as well as how we could design it. Thanks for taking this up." |
|
I agree with @GeorgeJahad, there are so many unit tests for all the other bucket types. Shouldn't there be unit tests for OBS as well? |
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTask.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTask.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskWithOBS.java
Outdated
Show resolved
Hide resolved
3d35678 to
a47e09f
Compare
|
@adoroszlai @devmadhuu @GeorgeJahad Could you please take a look! |
@GeorgeJahad @xBis7 Our primary objective at the moment is to ensure that our customers don't encounter any confusion when using Recon with various bucket types. Implementing prefix-based filtering will likely be a crucial improvement, and I'll be working on it soon. |
devmadhuu
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.
@ArafatKhan2198 thanks for working on this patch. Few comments, just to start with, Review is still in progress. Will continue to do.
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/EntityHandler.java
Outdated
Show resolved
Hide resolved
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/OBSBucketHandler.java
Outdated
Show resolved
Hide resolved
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/OBSBucketHandler.java
Show resolved
Hide resolved
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/OBSBucketHandler.java
Outdated
Show resolved
Hide resolved
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/OBSBucketHandler.java
Show resolved
Hide resolved
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/OBSBucketHandler.java
Outdated
Show resolved
Hide resolved
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/OBSBucketHandler.java
Outdated
Show resolved
Hide resolved
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/OBSBucketHandler.java
Outdated
Show resolved
Hide resolved
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/OBSBucketHandler.java
Outdated
Show resolved
Hide resolved
|
@ArafatKhan2198 Thanks for persisting with this.
Is the purpose of this patch to implement prefix-based support for OBS buckets? Or is this going to be in a following PR after the design is finalized? |
|
Thank you for your response, @xBis7 This patch will not implement prefix-based search; its primary purpose is to list the keys within an OBS bucket. The support for prefix-based searching in OBS buckets will be added later when I have the available bandwidth to complete the design doc. We received several support tickets from customers who reported issues with NSSummary not functioning correctly due to the lack of OBS support. Therefore, the goal of this patch is to provide the essential functionality to address this issue and eliminate any confusion for now. This patch offers a straightforward implementation of how we can generate NSSummary for an OBS layout bucket. The addition of prefix-based OBS filtering can be considered as an enhancement in subsequent updates and will be tracked by this JIRA :- https://issues.apache.org/jira/browse/HDDS-9535 |
I think simply providing the datasize of single OBS bucket key will not solve the purpose and pain point for users and without adding providing datasize at prefix level will create more confusion when users will have mix of buckets. |
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTask.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTask.java
Outdated
Show resolved
Hide resolved
|
@GeorgeJahad @xBis7 @devmadhuu @ArafatKhan2198 I have looked over discussion and current state of feature, few of suggestions for going ahead,
@ArafatKhan2198 IMO, we can break as above and handle this. |
|
@ArafatKhan2198 please merge |
dombizita
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.
Thank you for your continuous effort on this @ArafatKhan2198!! I went through the implementation, I only have a few small nits, overall it looks good to me. I didn't go through the TestNSSummaryTaskWithOBS and the TestNSSummaryEndpointWithOBS classes very throughly, I'll finish that today.
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskWithOBS.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskWithOBS.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskWithOBS.java
Outdated
Show resolved
Hide resolved
|
|
||
| NSSummary nonExistentSummary = | ||
| reconNamespaceSummaryManager.getNSSummary(BUCKET_ONE_OBJECT_ID); | ||
| Assertions.assertNull(nonExistentSummary); |
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 don't see that you changed the imports for the assertions, could you check it?
...zone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestNSSummaryEndpointWithOBS.java
Outdated
Show resolved
Hide resolved
...zone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestNSSummaryEndpointWithOBS.java
Outdated
Show resolved
Hide resolved
...zone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestNSSummaryEndpointWithOBS.java
Outdated
Show resolved
Hide resolved
...zone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestNSSummaryEndpointWithOBS.java
Outdated
Show resolved
Hide resolved
...zone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestNSSummaryEndpointWithOBS.java
Outdated
Show resolved
Hide resolved
...zone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestNSSummaryEndpointWithOBS.java
Outdated
Show resolved
Hide resolved
...zone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestNSSummaryEndpointWithOBS.java
Show resolved
Hide resolved
...zone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestNSSummaryEndpointWithOBS.java
Show resolved
Hide resolved
...-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/tasks/TestNSSummaryTaskWithOBS.java
Outdated
Show resolved
Hide resolved
sumitagrawl
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.
LGTM
devmadhuu
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 @ArafatKhan2198 for working and fixing all review comments. Just a minor check on my comment you can confirm. rest all LGTM +1
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskWithOBS.java
Show resolved
Hide resolved
dombizita
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 work @ArafatKhan2198, some of my comments are not addressed, can you check them?
Also I get that in the TestNSSummaryEndpointWithLegacy and the TestNSSummaryEndpointWithOBS classes we have both the key and the file constants, but I don't think it makes sense. You also have the same value in the constants, I can't find the explanation in the code why we need them and I think it makes the test classes hard to read later. Maybe @xBis7 can you help us as he worked on the previous test classes?
|
To explain it with an example KeyName: FileName: The issue in these tests is that there is no depth in the key structure. That's why all the key names and the file names are the same. Check FSO and Legacy Here is a definition reference regarding the fileName |
|
@dombizita Could you take a look now! |
dombizita
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.
Thank you so much for the tremendous effort on this @ArafatKhan2198! The changes are looking good to me!
Thanks @xBis7 for helping us out on the previous test class designs! I think it made sense to do that in those classes, as the values for key and file names were different and we needed both of them for testing. But here I'd go with only key names, as for OBS buckets that's the one that makes sense and the values would be the same, if we would have the file name constants.
…_STORE buckets. (apache#4245) (cherry picked from commit 0a5fc69) Change-Id: I80cdba64165c5f4786e9a50b22ccc395869879ed
… for OBJECT_STORE buckets. (apache#4245) (cherry picked from commit 0a5fc69) Change-Id: Icd9d4dcb4d0dbb7160bc3d5a2eb44d163a556fc9
…_STORE buckets. (apache#4245) (cherry picked from commit 0a5fc69)
…_STORE buckets. (apache#4245) (cherry picked from commit 0a5fc69)
…_STORE buckets. (apache#4245) (cherry picked from commit 0a5fc69)
…_STORE buckets. (apache#4245) (cherry picked from commit 0a5fc69)
…_STORE buckets. (apache#4245) (cherry picked from commit 0a5fc69)
What changes were proposed in this pull request?
Recon currently returns 500 when given a du request for an object store bucket, since there is no BucketHandler subclass for OBS buckets that can be returned from BucketHandler#getBucketHandler. This jira is to add an ObjectStoreBucketHandler for OBS buckets. Very similar to how the LegacyBucketHandler works.
Discussion Doc :- https://docs.google.com/document/d/1g2NCR-kgcSfLFQRBhZfYsMZmaZ6edlA_26Pq0-qfzT8/edit
How was this patch tested?
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7810?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
Tested it Manually on the UI, with the following commands :-