Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-14409

Clarify use of hbase.hstore.compaction.max.size in ExploringCompactionPolicy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Incomplete
    • 1.0.2, 1.1.2
    • None
    • Compaction
    • None

    Description

      As discussed in https://issues.apache.org/jira/browse/HBASE-7842:

      Why is the ExploringCompactionPolicy overloading the hbase.hstore.compaction.max.size parameter, which is used in the original ratio-based policy just to exclude store files that are larger than this threshold. The ECP does the same, but later on uses the same threshold (if set) to drop a possible selection when the sum of all store files in the selection exceeds this limit. Why?

      Here the code:

              if (size > comConf.getMaxCompactSize()) {
                continue;
              }
      

      The ref guide says this:

      * Do size-based sanity checks against each StoreFile in this set of StoreFiles.
      ** If the size of this StoreFile is larger than `hbase.hstore.compaction.max.size`, take it out of consideration.
      ** If the size is greater than or equal to `hbase.hstore.compaction.min.size`, sanity-check it against the file-based ratio to see whether it is too large to be considered.
      

      This seems wrong, no? It does not do this by each store file, but by the current selection candidate. It still speaks of the max size key, but here in the traditional sense, i.e. eliminate single store files that exceed the limit. But that is not what the code does at this spot.

      We should either remove that check, since larger files are already removed in selectCompaction() of the base class, or we should see what was meant to happen here and clarify/fix the code and/or description.

      Attachments

        Activity

          People

            Unassigned Unassigned
            larsgeorge Lars George
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: