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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection<HStoreFile>private booleanprivate booleanprivate intprivate Stringprivate longprivate Stringprivate longprivate CompactionLifeCycleTrackerprivate Consumer<org.apache.hadoop.fs.Path> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetFiles()Returns unmodifiable collection of StoreFiles in compactionintGets the priority for the requestlongReturns compaction request creation time in millisecondslonggetSize()Gets the total size of all StoreFiles in compactionConsumer<org.apache.hadoop.fs.Path>inthashCode()booleanbooleanReturnstrueif major compaction or all files are compactedbooleanisMajor()Returnstrueif major compactionbooleanReturnstrueif compaction is Off-peakprivate voidRecalculate the size of the compaction based on current files.voidsetAfterSplit(boolean afterSplit) voidsetDescription(String regionName, String storeName) Sets the region/store name, for logging.voidsetIsMajor(boolean isMajor, boolean isAllFiles) Specify if this compaction should be a major compaction based on the state of the storevoidsetOffPeak(boolean value) voidsetPriority(int p) Sets the priority for the requestvoidsetTracker(CompactionLifeCycleTracker tracker) voidsetWriterCreationTracker(Consumer<org.apache.hadoop.fs.Path> writerCreationTracker) toString()voidupdateFiles(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:CompactionRequestReturns unmodifiable collection of StoreFiles in compaction- Specified by:
getFilesin interfaceCompactionRequest
-
setDescription
Sets the region/store name, for logging. -
getSize
Gets the total size of all StoreFiles in compaction- Specified by:
getSizein interfaceCompactionRequest
-
isAllFiles
Description copied from interface:CompactionRequestReturnstrueif major compaction or all files are compacted- Specified by:
isAllFilesin interfaceCompactionRequest
-
isMajor
Description copied from interface:CompactionRequestReturnstrueif major compaction- Specified by:
isMajorin interfaceCompactionRequest
-
getPriority
Gets the priority for the request- Specified by:
getPriorityin interfaceCompactionRequest
-
setPriority
Sets the priority for the request -
isOffPeak
Description copied from interface:CompactionRequestReturnstrueif compaction is Off-peak- Specified by:
isOffPeakin interfaceCompactionRequest
-
setOffPeak
-
getSelectionTime
Description copied from interface:CompactionRequestReturns compaction request creation time in milliseconds- Specified by:
getSelectionTimein 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.
-