busbey commented on a change in pull request #921: HBASE-22749: Distributed MOB compactions URL: https://github.com/apache/hbase/pull/921#discussion_r375603734
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobConstants.java ########## @@ -35,26 +35,88 @@ public static final String MOB_CACHE_BLOCKS = "hbase.mob.cache.blocks"; public static final String MOB_SCAN_REF_ONLY = "hbase.mob.scan.ref.only"; public static final String EMPTY_VALUE_ON_MOBCELL_MISS = "empty.value.on.mobcell.miss"; - public static final String MOB_FILE_CACHE_SIZE_KEY = "hbase.mob.file.cache.size"; public static final int DEFAULT_MOB_FILE_CACHE_SIZE = 1000; - public static final String MOB_DIR_NAME = "mobdir"; public static final String MOB_REGION_NAME = ".mob"; public static final byte[] MOB_REGION_NAME_BYTES = Bytes.toBytes(MOB_REGION_NAME); - - public static final String MOB_CLEANER_PERIOD = "hbase.master.mob.ttl.cleaner.period"; + public static final String MOB_CLEANER_PERIOD = "hbase.master.mob.cleaner.period"; + public static final String DEPRECATED_MOB_CLEANER_PERIOD = "hbase.master.mob.ttl.cleaner.period"; public static final int DEFAULT_MOB_CLEANER_PERIOD = 24 * 60 * 60; // one day - public static final String MOB_CACHE_EVICT_PERIOD = "hbase.mob.cache.evict.period"; public static final String MOB_CACHE_EVICT_REMAIN_RATIO = "hbase.mob.cache.evict.remain.ratio"; - public static final Tag MOB_REF_TAG = new ArrayBackedTag(TagType.MOB_REFERENCE_TAG_TYPE, - HConstants.EMPTY_BYTE_ARRAY); + public static final Tag MOB_REF_TAG = + new ArrayBackedTag(TagType.MOB_REFERENCE_TAG_TYPE, HConstants.EMPTY_BYTE_ARRAY); public static final float DEFAULT_EVICT_REMAIN_RATIO = 0.5f; public static final long DEFAULT_MOB_CACHE_EVICT_PERIOD = 3600L; public final static String TEMP_DIR_NAME = ".tmp"; + + /** + * The max number of a MOB table regions that is allowed in a batch of the mob compaction. By + * setting this number to a custom value, users can control the overall effect of a major + * compaction of a large MOB-enabled table. + */ + + public static final String MOB_MAJOR_COMPACTION_REGION_BATCH_SIZE = + "hbase.mob.major.compaction.region.batch.size"; + + /** + * Default is 0 - means no limit - all regions of a MOB table will be compacted at once + */ + + public static final int DEFAULT_MOB_MAJOR_COMPACTION_REGION_BATCH_SIZE = 0; + + /** + * The period that MobCompactionChore runs. The unit is second. The default value is one week. + */ + public static final String MOB_COMPACTION_CHORE_PERIOD = "hbase.mob.compaction.chore.period"; + public static final int DEFAULT_MOB_COMPACTION_CHORE_PERIOD = 24 * 60 * 60 * 7; // a week + public static final String MOB_COMPACTOR_CLASS_KEY = "hbase.mob.compactor.class"; + + /** + * Mob compaction type: "full", "optimized" "full" - run full major compaction (during migration) + * "optimized" - optimized version for use case with infrequent updates/deletes + */ + + public final static String OPTIMIZED_MOB_COMPACTION_TYPE = "optimized"; + + public final static String FULL_MOB_COMPACTION_TYPE = "full"; + + public final static String MOB_COMPACTION_TYPE_KEY = "hbase.mob.compaction.type"; + + public final static String DEFAULT_MOB_COMPACTION_TYPE = FULL_MOB_COMPACTION_TYPE; + + /** + * Maximum size of a MOB compaction selection + */ + public static final String MOB_COMPACTION_MAX_FILE_SIZE_KEY = + "hbase.mob.compactions.max.file.size"; Review comment: nit: Is there any particular reason we're not repurposing `hbase.mob.compaction.mergeable.threshold` here? ---------------------------------------------------------------- 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] With regards, Apache Git Services
