Package com.github.ambry.store
Interface StoreStats
-
public interface StoreStats
Exposes important stats related to aStore
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EXPIRED_DELETE_TOMBSTONE
static java.lang.String
PERMANENT_DELETE_TOMBSTONE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.java.util.Map<StatsReportType,StatsSnapshot>
getStatsSnapshots(java.util.Set<StatsReportType> statsReportTypes, long referenceTimeInMs, java.util.List<java.lang.Short> accountIdToExclude)
Fetches specified types of stats for correspondingStore
as a map whose key isStatsReportType
and value isStatsSnapshot
.com.github.ambry.utils.Pair<java.lang.Long,java.lang.Long>
getValidSize(TimeRange timeRange)
Gets the size of valid data at a particular point in time.
-
-
-
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 aTimeRange
. 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 givenTimeRange
and t_exp_ref is the time when the API is called.- Parameters:
timeRange
- the referenceTimeRange
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
-
getStatsSnapshots
java.util.Map<StatsReportType,StatsSnapshot> getStatsSnapshots(java.util.Set<StatsReportType> statsReportTypes, long referenceTimeInMs, java.util.List<java.lang.Short> accountIdToExclude) throws StoreException
Fetches specified types of stats for correspondingStore
as a map whose key isStatsReportType
and value isStatsSnapshot
.- Parameters:
statsReportTypes
- the specifiedStatsReportType
to fetchreferenceTimeInMs
- the reference time in ms until which deletes and expiration are relevantaccountIdToExclude
- the list of account id to exclude from theStatsSnapshot
.- Returns:
- a map of
StatsReportType
toStatsSnapshot
- 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
-
-