manish-m-pillai commented on code in PR #3733:
URL: https://github.com/apache/cassandra/pull/3733#discussion_r1883700473
##########
src/java/org/apache/cassandra/tools/nodetool/Status.java:
##########
@@ -170,24 +215,134 @@ private void addNode(String endpoint, Float owns,
HostStatWithPort hostStat, int
strOwns = owns != null && hasEffectiveOwns ? new
DecimalFormat("##0.0%").format(owns) : "?";
hostID = hostIDMap.get(endpoint);
- try
- {
+ try {
rack = epSnitchInfo.getRack(endpoint);
- }
- catch (UnknownHostException e)
- {
+ } catch (UnknownHostException e) {
throw new RuntimeException(e);
}
- epDns = hostStat.ipOrDns(printPort);
if (isTokenPerNode)
- {
- tableBuilder.add(statusAndState, epDns, load, strOwns, hostID,
hostStat.token, rack);
- }
+ return List.of(addressAndPort, statusAndState, epDns, load,
strOwns, hostID, hostStat.token, rack);
else
- {
- tableBuilder.add(statusAndState, epDns, load,
String.valueOf(size), strOwns, hostID, rack);
+ return List.of(addressAndPort, statusAndState, epDns, load,
String.valueOf(size), strOwns, hostID, rack);
+ }
+
+ // To check for descending order
+ private Boolean desc() {
Review Comment:
I see that we need to follow this format. I will imporve the code with the
suggested codestyle
--
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]