public final class BlobCache extends Object implements BlobService
getURL(org.apache.flink.runtime.blob.BlobKey) methods, the BLOB cache will first attempt serve the file from its local cache. Only if the
local cache does not contain the desired BLOB, the BLOB cache will try to download it from the BLOB server.| Constructor and Description |
|---|
BlobCache(InetSocketAddress serverAddress,
org.apache.flink.configuration.Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
BlobClient |
createClient() |
void |
delete(BlobKey key)
Deletes the file associated with the given key from the BLOB cache.
|
void |
deleteGlobal(BlobKey key)
Deletes the file associated with the given key from the BLOB cache and BLOB server.
|
int |
getPort()
Returns the port of the blob service.
|
File |
getStorageDir() |
URL |
getURL(BlobKey requiredBlob)
Returns the URL for the BLOB with the given key.
|
void |
shutdown()
Shutdown method which is called to terminate the blob service.
|
public BlobCache(InetSocketAddress serverAddress, org.apache.flink.configuration.Configuration configuration)
public URL getURL(BlobKey requiredBlob) throws IOException
getURL in interface BlobServicerequiredBlob - The key of the desired BLOB.IOException - Thrown if an I/O error occurs while downloading the BLOBs from the BLOB server.public void delete(BlobKey key) throws IOException
delete in interface BlobServicekey - referring to the file to be deletedIOExceptionpublic void deleteGlobal(BlobKey key) throws IOException
key - referring to the file to be deletedIOExceptionpublic int getPort()
BlobServicegetPort in interface BlobServicepublic void shutdown()
BlobServiceshutdown in interface BlobServicepublic BlobClient createClient() throws IOException
createClient in interface BlobServiceIOExceptionpublic File getStorageDir()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.