-
Notifications
You must be signed in to change notification settings - Fork 275
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
Add a new endpoint to return resource info #2676
Add a new endpoint to return resource info #2676
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2676 +/- ##
============================================
- Coverage 72.60% 72.43% -0.18%
- Complexity 11567 11572 +5
============================================
Files 809 811 +2
Lines 65755 65882 +127
Branches 8030 8041 +11
============================================
- Hits 47741 47720 -21
- Misses 15389 15543 +154
+ Partials 2625 2619 -6 ☔ View full report in Codecov by Sentry. |
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. And thanks for adding another tooling for the helix clustermap.
int numPartitions = getNumberOfPartitionsInResource(resourceName); | ||
int replicationFactor = 3; // by default it is 3; | ||
String numReplicaStr = getResourceConfig(resourceName, dcName).getNumReplica(); | ||
if (numReplicaStr != null) { |
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.
We may hit exception if the string is not a number.
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.
then we will get an exception and return 503 back to client
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 adding this endpoint to get resource information. Just had one comment for typo.
Summary
Adding a new endpoint and handler to return some resource information.
Test
Will add unit test