TEOTEO520 opened a new pull request, #7828:
URL: https://github.com/apache/gravitino/pull/7828
What changes were proposed in this pull request?
This PR adds statistics HTTP client support for Gravitino Java client. The
changes include:
- Added MetadataObjectStatisticsOperations class that implements
SupportsStatistics interface to provide statistics operations for tables and
filesets
- Integrated statistics functionality into GenericFileset and
RelationalTable classes
- Added DTO classes for statistics: StatisticDTO, StatisticValueDTO with
type-safe value wrappers
- Added request/response classes: StatisticsUpdateRequest,
StatisticListResponse
- Enhanced DTOConverters with toStatisticValueDTO() method for converting
StatisticValue objects
- Extended ErrorHandlers with StatisticsErrorHandler to handle
statistics-specific exceptions
- Added comprehensive test coverage in TestSupportsStatistics
Why are the changes needed?
This feature enables Java client users to manage statistics for tables and
filesets through the Gravitino REST API. Statistics are essential metadata for
query optimization and data management. Without
this support, users would need to implement their own HTTP calls to
interact with the statistics API endpoints.
Fix: [#7274](https://github.com/apache/gravitino/issues/7274)
Does this PR introduce any user-facing change?
Yes, this PR introduces new user-facing APIs:
1. Tables and Filesets now implement SupportsStatistics interface with
methods:
- List<Statistic> listStatistics() - List all statistics
- List<Statistic> updateStatistics(Map<String, StatisticValue<?>>
statistics) - Update statistics
- boolean dropStatistics(List<String> statistics) - Drop statistics
2. New exceptions for statistics operations:
- IllegalStatisticNameException - For invalid statistic names
- UnmodifiableStatisticException - For read-only statistics
How was this patch tested?
- Added comprehensive unit tests in TestSupportsStatistics covering all
statistics operations
- Tests include scenarios for listing, updating, and dropping statistics
for both tables and filesets
- Error handling paths are tested for various exception scenarios
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]