diff --git a/src/main/asciidoc/_chapters/architecture.adoc b/src/main/asciidoc/_chapters/architecture.adoc index 5287801ec64..93426b7a42d 100644 --- a/src/main/asciidoc/_chapters/architecture.adoc +++ b/src/main/asciidoc/_chapters/architecture.adoc @@ -2121,6 +2121,60 @@ All the settings that apply to normal compactions (see < 0 +* Table/ColumnFamily has TTL = FOREVER (HColumnDescriptor.DEFAULT_TTL) + +[[ops.fifo.enable]] +====== Enabling FIFO Compaction + +For Table: + +[source,java] +---- +HTableDescriptor desc = new HTableDescriptor(tableName); + desc.setConfiguration(DefaultStoreEngine.DEFAULT_COMPACTION_POLICY_CLASS_KEY, + FIFOCompactionPolicy.class.getName()); +---- + +For Column Family: + +[source,java] +---- +HColumnDescriptor desc = new HColumnDescriptor(family); + desc.setConfiguration(DefaultStoreEngine.DEFAULT_COMPACTION_POLICY_CLASS_KEY, + FIFOCompactionPolicy.class.getName()); +---- + +From HBase Shell: + +[source,bash] +---- +create 'x',{NAME=>'y', TTL=>'30'}, {CONFIGURATION => {'hbase.hstore.defaultengine.compactionpolicy.class' => 'org.apache.hadoop.hbase.regionserver.compactions.FIFOCompactionPolicy', 'hbase.hstore.blockingStoreFiles' => 1000}} +---- + +Although region splitting is still supported, for optimal performance it should be disabled, either by setting explicitly `DisabledRegionSplitPolicy` or by setting `ConstantSizeRegionSplitPolicy` and very large max region size. +You will have to increase to a very large number store's blocking file (`hbase.hstore.blockingStoreFiles`) as well. +There is a sanity check on table/column family configuration in case of FIFO compaction and minimum value for number of blocking file is 1000. + [[arch.bulk.load]] == Bulk Loading