discivigour opened a new pull request, #192: URL: https://github.com/apache/paimon-rust/pull/192
## Summary This PR introduces the `FileIOProvider` trait and implements token caching mechanism for REST catalog data access. ## Key Changes ### 1. FileIOProvider Trait (`file_io_provider.rs`) - New abstraction layer for file I/O operations - Enables dynamic FileIO implementation switching - Supports `Debug` trait for better observability ### 2. Token Cache Implementation - Global FileIO cache using `moka` (Caffeine-like) - Cache key: `RESTToken` (with custom Hash implementation) - TTL: 10 hours, max capacity: 1000 entries - Thread-safe via moka's internal synchronization ### 3. RESTTokenFileIO Enhancement - Implements `FileIOProvider` trait - Checks token validity before each operation - Automatic token refresh on expiration - FileIO instances cached per token ### 4. Architecture Updates - `FileSystemCatalog`: uses `Arc<dyn FileIOProvider>" - `RESTCatalog": supports dynamic FileIO with token refresh - All components migrated to use `FileIOProvider` trait ## Files Changed - 16 files modified - +318 lines, -141 lines - New file: `file_io_provider.rs` ## Testing - All existing tests updated to use async FileIOProvider methods - Clippy passes with no warnings -- 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]
