Interface StoreStats


  • public interface StoreStats
    Exposes important stats related to a Store.
    • Field Detail

      • EXPIRED_DELETE_TOMBSTONE

        static final java.lang.String EXPIRED_DELETE_TOMBSTONE
        See Also:
        Constant Field Values
      • PERMANENT_DELETE_TOMBSTONE

        static final java.lang.String PERMANENT_DELETE_TOMBSTONE
        See Also:
        Constant Field Values
    • Method Detail

      • getValidSize

        com.github.ambry.utils.Pair<java.lang.Long,​java.lang.Long> getValidSize​(TimeRange timeRange)
                                                                               throws StoreException
        Gets the size of valid data at a particular point in time. The caller specifies a reference time and acceptable resolution for the stats in the form of a TimeRange. The store will return valid data size for a point in time within the specified range. The following data are considered as valid data for this API: 1. PUT with no expiry and no corresponding DELETE 2. PUT expiring at t_exp but t_exp_ref < t_exp 3. PUT with corresponding DELETE at time t_delete but t_del_ref < t_delete 4. DELETE record For this API, t_del_ref is based on the given TimeRange and t_exp_ref is the time when the API is called.
        Parameters:
        timeRange - the reference TimeRange at which the data is requested. Defines both the reference time and the acceptable resolution
        Returns:
        a Pair whose first element is the time at which stats was collected (in ms) and whose second element is the valid data size
        Throws:
        StoreException
      • getDeleteTombstoneStats

        java.util.Map<java.lang.String,​com.github.ambry.utils.Pair<java.lang.Long,​java.lang.Long>> getDeleteTombstoneStats()
        Fetches delete tombstone stats grouped by different types, i.e. EXPIRED_DELETE_TOMBSTONE, PERMANENT_DELETE_TOMBSTONE.
        Returns:
        a map whose key specifies delete tombstone type and value is a Pair representing the delete tombstone count and total size