Class CompactionRequestImpl
java.lang.Object
org.apache.hadoop.hbase.regionserver.compactions.CompactionRequestImpl
- All Implemented Interfaces:
CompactionRequest
- Direct Known Subclasses:
DateTieredCompactionRequest
This class holds all logical details necessary to run a compaction.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate Collection<HStoreFile>
private boolean
private boolean
private int
private String
private long
private String
private long
private CompactionLifeCycleTracker
private Consumer<org.apache.hadoop.fs.Path>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getFiles()
Returns unmodifiable collection of StoreFiles in compactionint
Gets the priority for the requestlong
Returns compaction request creation time in millisecondslong
getSize()
Gets the total size of all StoreFiles in compactionConsumer<org.apache.hadoop.fs.Path>
int
hashCode()
boolean
boolean
Returnstrue
if major compaction or all files are compactedboolean
isMajor()
Returnstrue
if major compactionboolean
Returnstrue
if compaction is Off-peakprivate void
Recalculate the size of the compaction based on current files.void
setAfterSplit
(boolean afterSplit) void
setDescription
(String regionName, String storeName) Sets the region/store name, for logging.void
setIsMajor
(boolean isMajor, boolean isAllFiles) Specify if this compaction should be a major compaction based on the state of the storevoid
setOffPeak
(boolean value) void
setPriority
(int p) Sets the priority for the requestvoid
setTracker
(CompactionLifeCycleTracker tracker) void
setWriterCreationTracker
(Consumer<org.apache.hadoop.fs.Path> writerCreationTracker) toString()
void
updateFiles
(Collection<HStoreFile> files)
-
Field Details
-
isOffPeak
-
isMajor
-
priority
-
filesToCompact
-
isAfterSplit
-
selectionTime
-
regionName
-
storeName
-
totalSize
-
tracker
-
writerCreationTracker
-
-
Constructor Details
-
CompactionRequestImpl
-
-
Method Details
-
updateFiles
-
getFiles
Description copied from interface:CompactionRequest
Returns unmodifiable collection of StoreFiles in compaction- Specified by:
getFiles
in interfaceCompactionRequest
-
setDescription
Sets the region/store name, for logging. -
getSize
Gets the total size of all StoreFiles in compaction- Specified by:
getSize
in interfaceCompactionRequest
-
isAllFiles
Description copied from interface:CompactionRequest
Returnstrue
if major compaction or all files are compacted- Specified by:
isAllFiles
in interfaceCompactionRequest
-
isMajor
Description copied from interface:CompactionRequest
Returnstrue
if major compaction- Specified by:
isMajor
in interfaceCompactionRequest
-
getPriority
Gets the priority for the request- Specified by:
getPriority
in interfaceCompactionRequest
-
setPriority
Sets the priority for the request -
isOffPeak
Description copied from interface:CompactionRequest
Returnstrue
if compaction is Off-peak- Specified by:
isOffPeak
in interfaceCompactionRequest
-
setOffPeak
-
getSelectionTime
Description copied from interface:CompactionRequest
Returns compaction request creation time in milliseconds- Specified by:
getSelectionTime
in interfaceCompactionRequest
-
setIsMajor
Specify if this compaction should be a major compaction based on the state of the store- Parameters:
isMajor
- true if the system determines that this compaction should be a major compaction
-
setTracker
-
getTracker
-
getWriterCreationTracker
-
setWriterCreationTracker
-
isAfterSplit
-
setAfterSplit
-
hashCode
-
equals
-
toString
-
recalculateSize
Recalculate the size of the compaction based on current files.
-