|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.regionserver.compactions.CompactionRequest
@InterfaceAudience.LimitedPrivate(value="coprocessor") @InterfaceStability.Evolving public class CompactionRequest
This class holds all logical details necessary to run a compaction.
Constructor Summary | |
---|---|
CompactionRequest()
This ctor should be used by coprocessors that want to subclass CompactionRequest. |
|
CompactionRequest(Collection<StoreFile> files)
|
Method Summary | |
---|---|
void |
afterExecute()
Called after compaction is executed by CompactSplitThread; for use by coproc subclasses. |
void |
beforeExecute()
Called before compaction is executed by CompactSplitThread; for use by coproc subclasses. |
CompactionRequest |
combineWith(CompactionRequest other)
Combines the request with other request. |
int |
compareTo(CompactionRequest request)
This function will define where in the priority queue the request will end up. |
boolean |
equals(Object obj)
|
Collection<StoreFile> |
getFiles()
|
int |
getPriority()
Gets the priority for the request |
long |
getSelectionTime()
|
long |
getSize()
Gets the total size of all StoreFiles in compaction |
boolean |
isMajor()
|
boolean |
isOffPeak()
|
void |
setDescription(String regionName,
String storeName)
Sets the region/store name, for logging. |
void |
setIsMajor(boolean isMajor)
Specify if this compaction should be a major compaction based on the state of the store |
void |
setOffPeak(boolean value)
|
void |
setPriority(int p)
Sets the priority for the request |
String |
toString()
|
void |
updateFiles(Collection<StoreFile> files)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CompactionRequest()
public CompactionRequest(Collection<StoreFile> files)
Method Detail |
---|
public void beforeExecute()
public void afterExecute()
public CompactionRequest combineWith(CompactionRequest other)
other
- Request to combine with.
public int compareTo(CompactionRequest request)
Note: The enqueue timestamp is accurate to the nanosecond. if two requests have same timestamp then this function will break the tie arbitrarily with hashCode() comparing.
compareTo
in interface Comparable<CompactionRequest>
public boolean equals(Object obj)
equals
in class Object
public Collection<StoreFile> getFiles()
public void setDescription(String regionName, String storeName)
public long getSize()
public boolean isMajor()
public int getPriority()
public void setPriority(int p)
public boolean isOffPeak()
public void setOffPeak(boolean value)
public long getSelectionTime()
public void setIsMajor(boolean isMajor)
isMajor
- true if the system determines that this compaction should be a major
compactionpublic String toString()
toString
in class Object
public void updateFiles(Collection<StoreFile> files)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |