You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/07/26 08:30:43 UTC

[GitHub] [hbase] cbaenziger commented on a diff in pull request #4638: HBASE-27224 HFile tool statistic sampling produces misleading results

cbaenziger commented on code in PR #4638:
URL: https://github.com/apache/hbase/pull/4638#discussion_r929675636


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java:
##########
@@ -760,6 +830,37 @@ private void printHistogram(Histogram histogram) {
       output.printf(locale, "              99%% <= %2.2f%n", snapshot.get99thPercentile());
       output.printf(locale, "            99.9%% <= %2.2f%n", snapshot.get999thPercentile());
       output.printf(locale, "             count = %d%n", histogram.getCount());
+

Review Comment:
   The below block is really unobvious to me how it is (presumably) printing mins and maxes but it may just be late for me. I'll take another look tomorrow. Perhaps a comment of what the process being implemented is could be of assistance?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java:
##########
@@ -640,49 +722,39 @@ public String toString() {
       if (prevCell == null) return "no data available for statistics";
 
       // Dump the metrics to the output stream
-      simpleReporter.stop();

Review Comment:
   This was unexpected at first to me as I am not very CodaHale aware but I questioned why remove the `simpleReporter.stop()`? (It does seem odd to stop the reporter in a `toString()` implementation but I think this was a hack to clean the reporter up when emitting its metrics?)
   
   As I understand now `simpleReporter` is no longer based on a CodaHale metric class with any thread or other state to clean-up though so no need for a `stop()` method?



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org