public class FileSystemBlobStore extends Object implements BlobStoreService
FileSystem.
This is used in addition to the local blob storage for high availability.
| Modifier and Type | Field and Description |
|---|---|
static String |
BLOB_PATH_NAME
The name of the blob path.
|
| Constructor and Description |
|---|
FileSystemBlobStore(org.apache.flink.core.fs.FileSystem fileSystem,
String storagePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupAllData()
Cleans up the store.
|
void |
close() |
boolean |
delete(org.apache.flink.api.common.JobID jobId,
BlobKey blobKey)
Tries to delete a blob from storage.
|
boolean |
deleteAll(org.apache.flink.api.common.JobID jobId)
Tries to delete all blobs for the given job from storage.
|
boolean |
get(org.apache.flink.api.common.JobID jobId,
BlobKey blobKey,
File localFile)
Copies a blob to a local file.
|
boolean |
put(File localFile,
org.apache.flink.api.common.JobID jobId,
BlobKey blobKey)
Copies the local file to the blob store.
|
public static final String BLOB_PATH_NAME
public FileSystemBlobStore(org.apache.flink.core.fs.FileSystem fileSystem,
String storagePath)
throws IOException
IOExceptionpublic boolean put(File localFile, org.apache.flink.api.common.JobID jobId, BlobKey blobKey) throws IOException
BlobStoreput in interface BlobStorelocalFile - The file to copyjobId - ID of the job this blob belongs to (or null if job-unrelated)blobKey - The ID for the file in the blob storeIOException - If the copy failspublic boolean get(org.apache.flink.api.common.JobID jobId,
BlobKey blobKey,
File localFile)
throws IOException
BlobViewget in interface BlobViewjobId - ID of the job this blob belongs to (or null if job-unrelated)blobKey - The blob IDlocalFile - The local file to copy toIOException - If the copy failspublic boolean delete(org.apache.flink.api.common.JobID jobId,
BlobKey blobKey)
BlobStoreNOTE: This also tries to delete any created directories if empty.
public boolean deleteAll(org.apache.flink.api.common.JobID jobId)
BlobStoreNOTE: This also tries to delete any created directories if empty.
public void cleanupAllData()
BlobStoreServicecleanupAllData in interface BlobStoreServicepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.