Class StoragePartitionDiskUsage

java.lang.Object
com.linkedin.davinci.utils.StoragePartitionDiskUsage

public class StoragePartitionDiskUsage extends Object
This class maintains in-memory partition usage. Triggered by size and/or time by #getUsage(), it will sync up with real disk usage.
  • Constructor Details

    • StoragePartitionDiskUsage

      public StoragePartitionDiskUsage(int partition, AbstractStorageEngine storageEngine)
  • 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