Class CompactionProgress
java.lang.Object
org.apache.hadoop.hbase.regionserver.compactions.CompactionProgress
This class holds information relevant for tracking the progress of a compaction.
The metrics tracked allow one to calculate the percent completion of the compaction based on the number of Key/Value pairs already compacted vs. total amount scheduled to be compacted.
-
Field Summary
Modifier and TypeFieldDescriptionlong
the completed count of key values in currently running compactionprivate static final org.slf4j.Logger
long
the total size of data processed by the currently running compaction, in byteslong
the total compacting key values in currently running compaction -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Cancels the compaction progress, setting things to 0.void
complete()
Marks the compaction as complete by setting total to current KV count; Total KV count is an estimate, so there might be a discrepancy otherwise.long
Returns the completed count of key values in currently running compactionfloat
getter for calculated percent completelong
Returns the total data size processed by the currently running compaction, in byteslong
Returns the total compacting key values in currently running compactiontoString()
-
Field Details
-
LOG
-
totalCompactingKVs
the total compacting key values in currently running compaction -
currentCompactedKVs
the completed count of key values in currently running compaction -
totalCompactedSize
the total size of data processed by the currently running compaction, in bytes
-
-
Constructor Details
-
CompactionProgress
Constructor- Parameters:
totalCompactingKVs
- the total Key/Value pairs to be compacted
-
-
Method Details
-
getProgressPct
getter for calculated percent complete -
cancel
Cancels the compaction progress, setting things to 0. -
complete
Marks the compaction as complete by setting total to current KV count; Total KV count is an estimate, so there might be a discrepancy otherwise. -
getTotalCompactingKVs
Returns the total compacting key values in currently running compaction -
getCurrentCompactedKvs
Returns the completed count of key values in currently running compaction -
getTotalCompactedSize
Returns the total data size processed by the currently running compaction, in bytes -
toString
-