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
FieldsModifier and TypeFieldDescriptionlongthe completed count of key values in currently running compactionprivate static final org.slf4j.Loggerlongthe total size of data processed by the currently running compaction, in byteslongthe total compacting key values in currently running compaction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancels the compaction progress, setting things to 0.voidcomplete()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.longReturns the completed count of key values in currently running compactionfloatgetter for calculated percent completelongReturns the total data size processed by the currently running compaction, in byteslongReturns 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
-