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 class
Builder 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.Builder
builder()
Creates a new builder for constructing instances ofStatisticDTO
.boolean
Whether the statistic is modifiable.name()
Get the name of the statistic.boolean
reserved()
The statistic is predefined by Gravitino if the value is true.void
validate()
Validates the StatisticDTO.value()
Get the value of the statistic.
-
Constructor Details
-
StatisticDTO
public StatisticDTO()
-
-
Method Details
-
name
Description copied from interface:Statistic
Get the name of the statistic. -
value
Description copied from interface:Statistic
Get 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:Statistic
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. -
modifiable
public boolean modifiable()Description copied from interface:Statistic
Whether the statistic is modifiable.- Specified by:
modifiable
in 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
-