Package org.apache.gravitino.stats
Interface Statistic
- All Superinterfaces:
Auditable
- All Known Implementing Classes:
StatisticDTO
Statistic interface represents a statistic that can be associated with a metadata object. It can
be used to store various types of statistics, for example, table statistics, partition
statistics, fileset statistics, etc.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
CUSTOM_PREFIX
The prefix for custom statistics. Custom statistics are user-defined statistics.- See Also:
-
-
Method Details
-
name
String name()Get the name of the statistic.- Returns:
- The name of the statistic.
-
value
Optional<StatisticValue<?>> value()Get the value of the statistic. The value is optional. If the statistic is not set, the value will be empty.- Returns:
- An optional containing the value of the statistic if it is set, otherwise empty.
-
reserved
boolean reserved()The statistic is predefined by Gravitino if the value is true. The statistic is defined by users if the value is false. For example, the statistic "row_count" is a reserved statistic, A custom statistic name must start with "custom." prefix to avoid name conflict with reserved statistics. Because Gravitino may add more reserved statistics in the future.- Returns:
- The type of the statistic.
-
modifiable
boolean modifiable()Whether the statistic is modifiable.- Returns:
- If the statistic is modifiable, return true, otherwise false.
-