saintstack commented on a change in pull request #1727:
URL: https://github.com/apache/hbase/pull/1727#discussion_r501400976



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java
##########
@@ -798,16 +809,15 @@ protected void finishFileInfo() throws IOException {
     }
 
     // Average key length.
-    int avgKeyLen =
-        entryCount == 0 ? 0 : (int) (totalKeyLength / entryCount);
+    int avgKeyLen = (int)this.keySizeSketch.getQuantile(0.5);

Review comment:
       No problem. There are AVG_ defines in HFileInfo that I haven't touched.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to