apurtell commented on a change in pull request #3244:
URL: https://github.com/apache/hbase/pull/3244#discussion_r628956456



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALCellCodec.java
##########
@@ -220,6 +223,8 @@ public ByteString compress(byte[] data, Enum dictIndex) {
     }
   }
 
+  static final int VALUE_COMPRESS_THRESHOLD = 100;

Review comment:
       As an arbitrary threshold this isn't a terrible choice. Did some 
research. [Antirez's smaz library readme](https://github.com/antirez/smaz) has 
this comment: _To compare this with other libraries, think that like zlib will 
usually not be able to compress text shorter than 100 bytes._ It's just one 
data point but someone who put thought into this space came to that conclusion, 
it's acceptable as a starting point. 
   
   Based on my experimentation, zlib will compress a buffer of 100 bytes filled 
with zeros to 14 bytes. If we go by powers of 10, 100 seems fine, 10 seems not. 




-- 
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:
us...@infra.apache.org


Reply via email to