Package org.apache.gravitino.stats
Interface SupportsStatistics
SupportsStatistics provides methods to list and update statistics. A table, a partition or a
fileset can implement this interface to manage its statistics.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
dropStatistics
(List<String> statistics) Drop statistics by their names.Lists all statistics.void
updateStatistics
(Map<String, StatisticValue<?>> statistics) Updates statistics with the provided values.
-
Method Details
-
listStatistics
Lists all statistics.- Returns:
- a list of statistics
-
updateStatistics
void updateStatistics(Map<String, StatisticValue<?>> statistics) throws UnmodifiableStatisticException, IllegalStatisticNameExceptionUpdates statistics with the provided values. If the statistic exists, it will be updated with the new value. If the statistic does not exist, it will be created. If the statistic is unmodifiable, it will throw an UnmodifiableStatisticException. If the statistic name is illegal, it will throw an IllegalStatisticNameException.- Parameters:
statistics
- a map of statistic names to their values- Throws:
UnmodifiableStatisticException
IllegalStatisticNameException
-
dropStatistics
Drop statistics by their names. If the statistic is unmodifiable, it will throw an UnmodifiableStatisticException.- Parameters:
statistics
- a list of statistic names to be dropped- Returns:
- true if the statistics were successfully dropped, false if no statistics were dropped
- Throws:
UnmodifiableStatisticException
- if any of the statistics to be dropped are unmodifiable
-