Class StorageManager
- All Implemented Interfaces:
Closeable,AutoCloseable
This class provides a high-level API for accessing storage objects without knowledge of specific file formats (Parquet, CSV, etc.). It routes requests to appropriate StorageProvider implementations based on the URI scheme:
s3://,s3a://,s3n://→ S3StorageProvidergs://→ GcsStorageProviderhttp://,https://→ HttpStorageProviderfile://→ LocalStorageProvider
The manager uses a StorageProviderRegistry for scheme-based provider lookup,
allowing pluggable provider discovery. When configuration is provided via
newStorageObject(String, Object), providers are created directly
with the specified configuration, bypassing the registry.
This design ensures format-agnostic storage access - the manager has no knowledge of Parquet, CSV, or any other file format. Format-specific logic is handled by FormatReader implementations that consume StorageObject instances.
Note: This class is not part of the SPI as it depends on specific provider implementations. It lives in the datasources package alongside the provider registry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()newStorageObject(String path) newStorageObject(String path, Object config) provider(StoragePath path) provider(StoragePath path, Object config) booleansupportsScheme(String scheme)
-
Constructor Details
-
StorageManager
-
-
Method Details
-
provider
-
provider
-
newStorageObject
-
newStorageObject
-
supportsScheme
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-