Package org.apache.gravitino.stats
Interface SupportsPartitionStatistics
SupportsPartitionStatistics provides methods to list and update statistics for partitions.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
dropPartitionStatistics
(List<PartitionStatisticsDrop> statisticsToDrop) Drops statistics for the specified partitions.Lists statistics for partitions from one partition name to another partition name.void
updatePartitionStatistics
(List<PartitionStatisticsUpdate> statisticsToUpdate) Updates statistics with the provided values.
-
Method Details
-
listPartitionStatistics
Lists statistics for partitions from one partition name to another partition name.- Parameters:
range
- the range of partitions to list statistics for, which can be defined by.- Returns:
- a list of PartitionStatistics, where each PartitionStatistics contains the partition name and a list of statistics applicable to that partition.
-
updatePartitionStatistics
void updatePartitionStatistics(List<PartitionStatisticsUpdate> statisticsToUpdate) throws UnmodifiableStatisticException Updates 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.- Parameters:
statisticsToUpdate
- a list of PartitionUpdateStatistics, where each PartitionStatisticsUpdate contains the partition name and a map of statistic names to their values to be updated.- Throws:
UnmodifiableStatisticException
- if any of the statistics to be updated are unmodifiable
-
dropPartitionStatistics
boolean dropPartitionStatistics(List<PartitionStatisticsDrop> statisticsToDrop) throws UnmodifiableStatisticException Drops statistics for the specified partitions. If the statistic is unmodifiable, it will throw an UnmodifiableStatisticException.- Parameters:
statisticsToDrop
- a list of PartitionStatisticsDrop, where each PartitionStatisticsDrop- Returns:
- true if the statistics were successfully dropped.
- Throws:
UnmodifiableStatisticException
- if any of the statistics to be dropped are unmodifiable
-