@InterfaceAudience.Private public class CompactionProgress extends Object
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.
Modifier and Type | Field and Description |
---|---|
long |
currentCompactedKVs
the completed count of key values in currently running compaction
|
long |
totalCompactedSize
the total size of data processed by the currently running compaction, in bytes
|
long |
totalCompactingKVs
the total compacting key values in currently running compaction
|
Constructor and Description |
---|
CompactionProgress(long totalCompactingKVs)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
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 |
getCurrentCompactedKvs() |
float |
getProgressPct()
getter for calculated percent complete
|
long |
getTotalCompactedSize() |
long |
getTotalCompactingKvs() |
String |
toString() |
public long totalCompactingKVs
public long currentCompactedKVs
public long totalCompactedSize
public CompactionProgress(long totalCompactingKVs)
totalCompactingKVs
- the total Key/Value pairs to be compactedpublic float getProgressPct()
public void cancel()
public void complete()
public long getTotalCompactingKvs()
public long getCurrentCompactedKvs()
public long getTotalCompactedSize()
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.