Interface Statistic

All Superinterfaces:
Auditable
All Known Implementing Classes:
StatisticDTO

@Evolving public interface Statistic extends Auditable
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
    Modifier and Type
    Field
    Description
    static final String
    The prefix for custom statistics.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether the statistic is modifiable.
    Get the name of the statistic.
    boolean
    The statistic is predefined by Gravitino if the value is true.
    Get the value of the statistic.

    Methods inherited from interface org.apache.gravitino.Auditable

    auditInfo
  • Field Details

    • CUSTOM_PREFIX

      static final String 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

      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.