Package org.apache.gravitino.dto.stats
Class PartitionStatisticsUpdateDTO
java.lang.Object
org.apache.gravitino.dto.stats.PartitionStatisticsUpdateDTO
- All Implemented Interfaces:
PartitionStatisticsUpdate
PartitionStatisticsUpdateDTO is a Data Transfer Object (DTO) that represents the request to
update statistics for a specific partition in a data source.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Default constructor for Jackson. -
Method Summary
Modifier and TypeMethodDescriptionstatic PartitionStatisticsUpdateDTO
of
(String partitionName, Map<String, StatisticValue<?>> statistics) Creates a new instance of PartitionStatisticsUpdateDTO.Returns the name of the partition for which these statistics are applicable.Map<String,
StatisticValue<?>> Returns the statistics to be updated for the partition.void
validate()
Validates the PartitionStatisticsUpdateDTO instance.
-
Constructor Details
-
PartitionStatisticsUpdateDTO
protected PartitionStatisticsUpdateDTO()Default constructor for Jackson.
-
-
Method Details
-
partitionName
Description copied from interface:PartitionStatisticsUpdate
Returns the name of the partition for which these statistics are applicable.- Specified by:
partitionName
in interfacePartitionStatisticsUpdate
- Returns:
- the name of the partition.
-
statistics
Description copied from interface:PartitionStatisticsUpdate
Returns the statistics to be updated for the partition.- Specified by:
statistics
in interfacePartitionStatisticsUpdate
- Returns:
- a map where the key is the statistic name and the value is the statistic value.
-
validate
public void validate()Validates the PartitionStatisticsUpdateDTO instance. -
of
public static PartitionStatisticsUpdateDTO of(String partitionName, Map<String, StatisticValue<?>> statistics) Creates a new instance of PartitionStatisticsUpdateDTO.- Parameters:
partitionName
- the name of the partition for which these statistics are applicablestatistics
- the statistics applicable to the partition- Returns:
- a new instance of PartitionStatisticsUpdateDTO
-