Package org.apache.gravitino.dto.stats
Class StatisticDTO
java.lang.Object
org.apache.gravitino.dto.stats.StatisticDTO
Data Transfer Object (DTO) for representing a statistic.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for constructing instances ofStatisticDTO. -
Field Summary
Fields inherited from interface org.apache.gravitino.stats.Statistic
CUSTOM_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StatisticDTO.Builderbuilder()Creates a new builder for constructing instances ofStatisticDTO.booleanWhether the statistic is modifiable.name()Get the name of the statistic.booleanreserved()The statistic is predefined by Gravitino if the value is true.voidvalidate()Validates the StatisticDTO.value()Get the value of the statistic.
-
Constructor Details
-
StatisticDTO
public StatisticDTO()
-
-
Method Details
-
name
Description copied from interface:StatisticGet the name of the statistic. -
value
Description copied from interface:StatisticGet the value of the statistic. The value is optional. If the statistic is not set, the value will be empty. -
reserved
public boolean reserved()Description copied from interface:StatisticThe 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. -
modifiable
public boolean modifiable()Description copied from interface:StatisticWhether the statistic is modifiable.- Specified by:
modifiablein interfaceStatistic- Returns:
- If the statistic is modifiable, return true, otherwise false.
-
validate
public void validate()Validates the StatisticDTO.- Throws:
IllegalArgumentException- if any of the required fields are invalid.
-
auditInfo
-
builder
Creates a new builder for constructing instances ofStatisticDTO.- Returns:
- a new instance of
StatisticDTO.Builder
-