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,
Configuration blobClientConfig) |
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, Configuration blobClientConfig)
public URL getURL(BlobKey requiredBlob) throws IOException
getURL
in interface BlobService
requiredBlob
- 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 BlobService
key
- referring to the file to be deletedIOException
public void deleteGlobal(BlobKey key) throws IOException
key
- referring to the file to be deletedIOException
public int getPort()
BlobService
getPort
in interface BlobService
public void shutdown()
BlobService
shutdown
in interface BlobService
public BlobClient createClient() throws IOException
createClient
in interface BlobService
IOException
public File getStorageDir()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.