zaaath commented on code in PR #2919:
URL: https://github.com/apache/cassandra/pull/2919#discussion_r1405202635
##########
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:
@smiklosovic done, removed `toDouble` and fixed `TableStatsPrinterTest`. Let
me know how it looks.
As you noted, it’s likely safe to assume that `CompressionRatio` is of the
`double` type because that’s how it’s defined in
`TableMetrics.compressionRatio`. `RecentBloomFilterFalseRatio` is of the
`double` type as well which is defined in
`BloomFilterMetrics.BloomFilterFalseRatio`.
If you get a chance, could you explain:
1. Why did you find the `toDouble` approach inappropriate? I thought it’s
more robust and better semantically.
2. How did you find out that `TableStatsPrinterTest` fails? Did you have to
run the full test suite? Or did the CI pipeline catch this?
##########
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:
@smiklosovic done, removed `toDouble` and fixed `TableStatsPrinterTest`. Let
me know how it looks.
As you noted, it’s likely safe to assume that `CompressionRatio` is of the
`double` type because that’s how it’s defined in
`TableMetrics.compressionRatio`. `RecentBloomFilterFalseRatio` is of the
`double` type as well which is defined in
`BloomFilterMetrics.BloomFilterFalseRatio`.
If you get a chance, could you explain:
1. Why did you find the `toDouble` approach inappropriate? I thought it’s
more robust and better semantically.
2. How did you find out that `TableStatsPrinterTest` fails? Did you have to
run the full test suite? Or did the CI pipeline catch this?
--
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]