org.apache.hadoop.hbase.regionserver.compactions
Class CompactSelection

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.compactions.CompactSelection

public class CompactSelection
extends Object


Constructor Summary
CompactSelection(org.apache.hadoop.conf.Configuration conf, List<StoreFile> filesToCompact)
           
 
Method Summary
 void clearSubList(int start, int end)
           
 void emptyFileList()
          Removes all files from the current compaction list, and resets off peak compactions is set.
 void finishRequest()
          The current compaction finished, so reset the off peak compactions count if this was an off peak compaction.
 double getCompactSelectionRatio()
          If the current hour falls in the off peak times and there are no outstanding off peak compactions, the current compaction is promoted to an off peak compaction.
 List<StoreFile> getFilesToCompact()
           
 CompactSelection getSubList(int start, int end)
           
 boolean isOffPeakCompaction()
           
 CompactSelection selectExpiredStoreFilesToCompact(long maxExpiredTimeStamp)
          Select the expired store files to compact
 CompactSelection subList(int start, int end)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompactSelection

public CompactSelection(org.apache.hadoop.conf.Configuration conf,
                        List<StoreFile> filesToCompact)
Method Detail

selectExpiredStoreFilesToCompact

public CompactSelection selectExpiredStoreFilesToCompact(long maxExpiredTimeStamp)
Select the expired store files to compact

Parameters:
maxExpiredTimeStamp - The store file will be marked as expired if its max time stamp is less than this maxExpiredTimeStamp.
Returns:
A CompactSelection contains the expired store files as filesToCompact

getCompactSelectionRatio

public double getCompactSelectionRatio()
If the current hour falls in the off peak times and there are no outstanding off peak compactions, the current compaction is promoted to an off peak compaction. Currently only one off peak compaction is present in the compaction queue.

Parameters:
currentHour -
Returns:

finishRequest

public void finishRequest()
The current compaction finished, so reset the off peak compactions count if this was an off peak compaction.


getFilesToCompact

public List<StoreFile> getFilesToCompact()

emptyFileList

public void emptyFileList()
Removes all files from the current compaction list, and resets off peak compactions is set.


isOffPeakCompaction

public boolean isOffPeakCompaction()

subList

public CompactSelection subList(int start,
                                int end)

getSubList

public CompactSelection getSubList(int start,
                                   int end)

clearSubList

public void clearSubList(int start,
                         int end)


Copyright © 2015 The Apache Software Foundation. All Rights Reserved.