Package org.apache.flink.runtime.blob
Class BlobCacheService
- java.lang.Object
-
- org.apache.flink.runtime.blob.BlobCacheService
-
- All Implemented Interfaces:
Closeable,AutoCloseable,BlobService,TaskExecutorBlobService
public class BlobCacheService extends Object implements TaskExecutorBlobService
The BLOB cache provides access to BLOB services for permanent and transient BLOBs.
-
-
Constructor Summary
Constructors Constructor Description BlobCacheService(org.apache.flink.configuration.Configuration blobClientConfig, File storageDir, BlobView blobView, InetSocketAddress serverAddress)BlobCacheService(org.apache.flink.configuration.Configuration blobClientConfig, org.apache.flink.util.Reference<File> storageDir, BlobView blobView, InetSocketAddress serverAddress)Instantiates a new BLOB cache.BlobCacheService(PermanentBlobCache permanentBlobCache, TransientBlobCache transientBlobCache)Instantiates a new BLOB cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()PermanentBlobCachegetPermanentBlobService()Returns a BLOB service for accessing permanent BLOBs.intgetPort()Returns the port of the BLOB server that this BLOB service is working with.TransientBlobCachegetTransientBlobService()Returns a BLOB service for accessing transient BLOBs.voidsetBlobServerAddress(InetSocketAddress blobServerAddress)Sets the address of theBlobServer.
-
-
-
Constructor Detail
-
BlobCacheService
public BlobCacheService(org.apache.flink.configuration.Configuration blobClientConfig, File storageDir, BlobView blobView, @Nullable InetSocketAddress serverAddress) throws IOException- Throws:
IOException
-
BlobCacheService
public BlobCacheService(org.apache.flink.configuration.Configuration blobClientConfig, org.apache.flink.util.Reference<File> storageDir, BlobView blobView, @Nullable InetSocketAddress serverAddress) throws IOExceptionInstantiates a new BLOB cache.- Parameters:
blobClientConfig- global configurationstorageDir- storage directory for the cached blobsblobView- (distributed) blob store file system to retrieve files from firstserverAddress- address of theBlobServerto use for fetching files from ornullif none yet- Throws:
IOException- thrown if the (local or distributed) file storage cannot be created or is not usable
-
BlobCacheService
public BlobCacheService(PermanentBlobCache permanentBlobCache, TransientBlobCache transientBlobCache)
Instantiates a new BLOB cache.- Parameters:
permanentBlobCache- BLOB cache to use for permanent BLOBstransientBlobCache- BLOB cache to use for transient BLOBs
-
-
Method Detail
-
getPermanentBlobService
public PermanentBlobCache getPermanentBlobService()
Description copied from interface:BlobServiceReturns a BLOB service for accessing permanent BLOBs.- Specified by:
getPermanentBlobServicein interfaceBlobService- Specified by:
getPermanentBlobServicein interfaceTaskExecutorBlobService- Returns:
- BLOB service
-
getTransientBlobService
public TransientBlobCache getTransientBlobService()
Description copied from interface:BlobServiceReturns a BLOB service for accessing transient BLOBs.- Specified by:
getTransientBlobServicein interfaceBlobService- Returns:
- BLOB service
-
setBlobServerAddress
public void setBlobServerAddress(InetSocketAddress blobServerAddress)
Sets the address of theBlobServer.- Specified by:
setBlobServerAddressin interfaceTaskExecutorBlobService- Parameters:
blobServerAddress- address of theBlobServer.
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getPort
public int getPort()
Description copied from interface:BlobServiceReturns the port of the BLOB server that this BLOB service is working with.- Specified by:
getPortin interfaceBlobService- Returns:
- the port of the blob server.
-
-