-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-8701. Recon - Improve Mismatched container info API (containers/v1/mismatch). #4876
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
|
@ArafatKhan2198 there are checkstyle violations, please check https://github.com/ArafatKhan2198/ozone/actions/runs/5241259025/jobs/9463120676#step:6:529 |
|
@devmadhuu @sumitagrawl @dombizita Can you please look ! |
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestContainerEndpoint.java
Outdated
Show resolved
Hide resolved
|
@devmadhuu @sumitagrawl review changes have been made! |
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.
@ArafatKhan2198 thanks for working over this, given few comments.
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Outdated
Show resolved
Hide resolved
b11c8f1 to
cc6f7ba
Compare
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.
@ArafatKhan2198 Thanks for working, LGTM +1
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. LGTM +1
ashishkumar50
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, overall PR LGTM. Left two comments.
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
Show resolved
Hide resolved
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.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 working on this @ArafatKhan2198, overall it looks good to me, please address the comments by @ashishkumar50, those are good catches.
also I just saw you renamed the prevKey to lastKey, may I ask why? prevKey is used often in the Recon code, also in your patch still at several places. I'd go with prevKey, the constants are also named in that way.
Thank you for reviewing the code and providing your feedback. Regarding the renaming of prevKey to lastKey, I understand your concern. However, please note that the lastKey you mentioned is not used as a query parameter in the endpoint. It is used as part of the JSON response to implement pagination. When the getContainerMisMatchInsights method is called, the result is returned, and the last container ID is included in the JSON response as lastKey. This lastKey is not related to the query parameter used in the API endpoint. Subsequently, when the next set of results is fetched by calling |
…g the list of containers
ashishkumar50
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 updating patch, LGTM +1.
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.
@ArafatKhan2198 LGTM +1
|
thanks for working on this @ArafatKhan2198! thanks for the review @ashishkumar50, @devmadhuu and @sumitagrawl! |
What changes were proposed in this pull request?
In the modified code, the pagination and filtering logic is applied to :
getContainerMisMatchInsights()For the notSCMContainers list (OM containers not in SCM):
NOT_ACCEPTABLEFor the nonOMContainers list (SCM containers not in OM):
Filter Parameter:
missingInfilter parameter is used in thegetContainerMisMatchInsightsmethod to specify whether the returned container discrepancies should be based on containers missing in the Ozone Manager (OM) or the Storage Container Manager (SCM).Response Type:
prevKeyandmissingContainerList.Final Response
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8701
How was this patch tested?
Manual Testing and Unit Testing