smiklosovic commented on code in PR #2919:
URL: https://github.com/apache/cassandra/pull/2919#discussion_r1404811241
##########
src/java/org/apache/cassandra/tools/nodetool/stats/TableStatsHolder.java:
##########
@@ -391,6 +391,15 @@ private void initializeKeyspaces(NodeProbe probe, boolean
ignore, List<String> t
}
}
+ private double toDouble(Object valueObj) {
Review Comment:
I am not too big fan of this method. Don't we know already that these
metrics are of type double looking where they are produced? Look at
"TableMetrics" class for e.g. "CompressionRatio" there. We know this is a
double already and we are not supposed to use nodetool of one version with
Cassandra node of another. We see that it was cast in StatsTableComparator to
Double because we know it was like that.
For exatra safety, once we cast it to Double, it might be `null`, there are
null checks in this class if you see around so I would apply same logic here
and remove this method.
You also need to fix `TableStatsPrinterTest` class.
--
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]