Class CompressionConfigurer

java.lang.Object
org.apache.accumulo.core.client.admin.compaction.CompressionConfigurer
All Implemented Interfaces:
CompactionConfigurer

public class CompressionConfigurer extends Object implements CompactionConfigurer
A compaction configurer that can adjust the compression configuration for a compaction when the sum of the input file sizes exceeds a threshold.

To use compression type CL for large files and CS for small files, set the following table properties.

  • Set table.compaction.configurer to the fully qualified name of this class.
  • Set table.compaction.configurer.opts.large.compress.threshold to a size in bytes. The suffixes K,M,and G can be used. When the inputs exceed this size, the following compression is used.
  • Set table.compaction.configurer.opts.large.compress.type to CL.
  • Set table.file.compress.type=CS

With the above config, minor compaction and small compaction will use CS for compression. Everything else will use CL. For example CS could be snappy and CL could be gzip. Using a faster compression for small files and slower compression for larger files can increase ingestion throughput without using a lot of extra space.

Since:
2.1.0