Package org.apache.flink.runtime.blob
Class VoidBlobStore
- java.lang.Object
-
- org.apache.flink.runtime.blob.VoidBlobStore
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,BlobStore
,BlobStoreService
,BlobView
public class VoidBlobStore extends Object implements BlobStoreService
A blob store doing nothing.
-
-
Constructor Summary
Constructors Constructor Description VoidBlobStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanupAllData()
Cleans up the store.void
close()
boolean
delete(JobID jobId, BlobKey blobKey)
Tries to delete a blob from storage.boolean
deleteAll(JobID jobId)
Tries to delete all blobs for the given job from storage.boolean
get(JobID jobId, BlobKey blobKey, File localFile)
Copies a blob to a local file.boolean
put(File localFile, JobID jobId, BlobKey blobKey)
Copies the local file to the blob store.
-
-
-
Method Detail
-
put
public boolean put(File localFile, JobID jobId, BlobKey blobKey) throws IOException
Description copied from interface:BlobStore
Copies the local file to the blob store.- Specified by:
put
in interfaceBlobStore
- Parameters:
localFile
- 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 store- Returns:
- whether the file was copied (true) or not (false)
- Throws:
IOException
- If the copy fails
-
get
public boolean get(JobID jobId, BlobKey blobKey, File localFile) throws IOException
Description copied from interface:BlobView
Copies a blob to a local file.- Specified by:
get
in interfaceBlobView
- Parameters:
jobId
- ID of the job this blob belongs to (or null if job-unrelated)blobKey
- The blob IDlocalFile
- The local file to copy to- Returns:
- whether the file was copied (true) or not (false)
- Throws:
IOException
- If the copy fails
-
delete
public boolean delete(JobID jobId, BlobKey blobKey)
Description copied from interface:BlobStore
Tries to delete a blob from storage.NOTE: This also tries to delete any created directories if empty.
-
deleteAll
public boolean deleteAll(JobID jobId)
Description copied from interface:BlobStore
Tries to delete all blobs for the given job from storage.NOTE: This also tries to delete any created directories if empty.
-
cleanupAllData
public void cleanupAllData()
Description copied from interface:BlobStoreService
Cleans up the store. This entails the deletion of all blobs.- Specified by:
cleanupAllData
in interfaceBlobStoreService
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-