sreejasahithi commented on code in PR #8523:
URL: https://github.com/apache/ozone/pull/8523#discussion_r2234748763
##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/ListInfoSubcommand.java:
##########
@@ -155,7 +149,7 @@ private List<DatanodeWithAttributes> getAllNodes(ScmClient
scmClient)
long capacity = p.getCapacity();
long used = capacity - p.getRemaining();
double percentUsed = (capacity > 0) ? (used * 100.0) / capacity
: 0.0;
- return new DatanodeWithAttributes(
+ return new BasicDatanodeInfoJson(
Review Comment:
You're right, applying the limit directly on the server side would
definitely be more efficient. However, unlike `getDatanodeUsageInfo`, the
current API used for listing (when no sorting is enabled) i.e `queryNode` does
not support a limit parameter. Supporting this would require introducing a new
API in ScmClient and corresponding changes. Given the scope of that work, I
think it would be better if we could handle it in a follow up JIRA. is that
fine?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]