Class FileStorageService
java.lang.Object
io.trino.plugin.raptor.legacy.storage.FileStorageService
- All Implemented Interfaces:
StorageService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateParents(File file) longstatic FilegetFileSystemPath(File base, UUID shardUuid) Generate a file system path for a shard UUID.getQuarantineFile(UUID shardUuid) getStagingFile(UUID shardUuid) getStorageFile(UUID shardUuid) voidstart()voidstop()
-
Constructor Details
-
FileStorageService
-
FileStorageService
-
-
Method Details
-
start
@PostConstruct public void start()- Specified by:
startin interfaceStorageService
-
getAvailableBytes
public long getAvailableBytes()- Specified by:
getAvailableBytesin interfaceStorageService
-
stop
- Throws:
IOException
-
getStorageFile
- Specified by:
getStorageFilein interfaceStorageService
-
getStagingFile
- Specified by:
getStagingFilein interfaceStorageService
-
getQuarantineFile
- Specified by:
getQuarantineFilein interfaceStorageService
-
getStorageShards
- Specified by:
getStorageShardsin interfaceStorageService
-
createParents
- Specified by:
createParentsin interfaceStorageService
-
getFileSystemPath
Generate a file system path for a shard UUID. This creates a three level deep directory structure where the first two levels each contain two hex digits (lowercase) of the UUID and the final level contains the full UUID. Example:UUID: 701e1a79-74f7-4f56-b438-b41e8e7d019d Path: /base/70/1e/701e1a79-74f7-4f56-b438-b41e8e7d019d.orc
This ensures that files are spread out evenly through the tree while a path can still be easily navigated by a human being.
-