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

Sending compact request if necessary after flushing at server side

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Compaction
    • None

    Description

      By default, hbase would automatically compact periodically.
      However, In this period, what we flush frequently would cause many hfile genereated, and hbase does not compact until the next period.

      So in order to prevent the rapid growth of the number of hfile under some conditions, I think we can add a check if it needs to compact after flushing region at server side.

      Do you think it's a better way?  thanks!
       
      One of the codes in here:

      //FlushRegionCallable.java  doCall()
      try {
        HRegion.FlushResult res;
        if (columnFamilies == null) {
          res = region.flush(true);
        } else {
          res = region.flushcache(columnFamilies, false, FlushLifeCycleTracker.DUMMY);
        }
        if (res.getResult() == HRegion.FlushResult.Result.CANNOT_FLUSH) {
          throw new IOException("Unable to complete flush " + regionInfo);
        }
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            guluo guluo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: