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.
This class is thread-safe.
| Constructor and Description |
|---|
BlobCache(InetSocketAddress serverAddress) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(BlobKey key)
Deletes the file associated with the given key from the BLOB cache.
|
int |
getPort()
Returns the port of the blob service
|
URL |
getURL(BlobKey requiredBlob)
Returns the URL for the content-addressable BLOB with the given key.
|
void |
shutdown()
Shutdown method which is called to terminate the blob service.
|
public BlobCache(InetSocketAddress serverAddress)
public URL getURL(BlobKey requiredBlob) throws IOException
getURL in interface BlobServicerequiredBlob - the key of the desired content-addressable BLOBIOException - thrown if an I/O error occurs while downloading the BLOBs from the BLOB serverpublic void delete(BlobKey key) throws IOException
delete in interface BlobServicekey - referring to the file to be deletedIOExceptionpublic int getPort()
BlobServicegetPort in interface BlobServicepublic void shutdown()
throws IOException
BlobServiceshutdown in interface BlobServiceIOExceptionCopyright © 2015 The Apache Software Foundation. All rights reserved.