Package com.linkedin.davinci.utils
Class StoragePartitionDiskUsage
java.lang.Object
com.linkedin.davinci.utils.StoragePartitionDiskUsage
This class maintains in-memory partition usage.
Triggered by size and/or time by #getUsage(), it will sync up with real disk usage.
-
Constructor Summary
ConstructorDescriptionStoragePartitionDiskUsage
(int partition, AbstractStorageEngine storageEngine) -
Method Summary
-
Constructor Details
-
StoragePartitionDiskUsage
-
-
Method Details
-
add
public void add(long recordSize) Adds a usage size to the partition -
getUsage
public long getUsage()- Returns:
- the disk usage for this partition
-
syncWithDB
public final void syncWithDB()sync with real partition DB usage and reset in memory partition usage to be zero
-