public class VoidBlobStore extends Object implements BlobStoreService
Constructor and Description |
---|
VoidBlobStore() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closeAndCleanupAllData()
Closes and cleans up the store.
|
void |
delete(BlobKey blobKey)
Tries to delete a blob from storage.
|
void |
delete(JobID jobId,
String key)
Tries to delete a blob from storage.
|
void |
deleteAll(JobID jobId)
Tries to delete all blobs for the given job from storage.
|
void |
get(BlobKey blobKey,
File localFile)
Copies a blob to a local file.
|
void |
get(JobID jobId,
String key,
File localFile)
Copies a blob to a local file.
|
void |
put(File localFile,
BlobKey blobKey)
Copies the local file to the blob store.
|
void |
put(File localFile,
JobID jobId,
String key)
Copies a local file to the blob store.
|
public void put(File localFile, BlobKey blobKey) throws IOException
BlobStore
put
in interface BlobStore
localFile
- The file to copyblobKey
- The ID for the file in the blob storeIOException
- If the copy failspublic void put(File localFile, JobID jobId, String key) throws IOException
BlobStore
The job ID and key make up a composite key for the file.
put
in interface BlobStore
localFile
- The file to copyjobId
- The JobID part of ID for the file in the blob storekey
- The String part of ID for the file in the blob storeIOException
- If the copy failspublic void get(BlobKey blobKey, File localFile) throws IOException
BlobView
get
in interface BlobView
blobKey
- The blob IDlocalFile
- The local file to copy toIOException
- If the copy failspublic void get(JobID jobId, String key, File localFile) throws IOException
BlobView
get
in interface BlobView
jobId
- The JobID part of ID for the blobkey
- The String part of ID for the bloblocalFile
- The local file to copy toIOException
- If the copy failspublic void delete(BlobKey blobKey)
BlobStore
NOTE: This also tries to delete any created directories if empty.
public void delete(JobID jobId, String key)
BlobStore
NOTE: This also tries to delete any created directories if empty.
public void deleteAll(JobID jobId)
BlobStore
NOTE: This also tries to delete any created directories if empty.
public void closeAndCleanupAllData()
BlobStoreService
closeAndCleanupAllData
in interface BlobStoreService
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.