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

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

@InterfaceAudience.Private
public class OffPeakCompactions
extends Object

The class used to track off-peak hours and compactions. Off-peak compaction counter is global for the entire server, hours can be different per instance of this class, based on the configuration of the corresponding store.


Constructor Summary
OffPeakCompactions(org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
 void endOffPeakRequest()
          The current compaction finished, so reset the off peak compactions count if this was an off peak compaction.
 boolean tryStartOffPeakRequest()
          Tries making the compaction off-peak.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OffPeakCompactions

public OffPeakCompactions(org.apache.hadoop.conf.Configuration conf)
Method Detail

tryStartOffPeakRequest

public boolean tryStartOffPeakRequest()
Tries making the compaction off-peak.

Returns:
Whether the compaction can be made off-peak.

endOffPeakRequest

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



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