Package org.apache.flink.runtime.blob
Class BlobCacheService
java.lang.Object
org.apache.flink.runtime.blob.BlobCacheService
- All Implemented Interfaces:
Closeable,AutoCloseable,BlobService,TaskExecutorBlobService
The BLOB cache provides access to BLOB services for permanent and transient BLOBs.
-
Constructor Summary
ConstructorsConstructorDescriptionBlobCacheService(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
Modifier and TypeMethodDescriptionvoidclose()Returns a BLOB service for accessing permanent BLOBs.intgetPort()Returns the port of the BLOB server that this BLOB service is working with.Returns a BLOB service for accessing transient BLOBs.voidsetBlobServerAddress(InetSocketAddress blobServerAddress) Sets the address of theBlobServer.
-
Constructor Details
-
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 IOException Instantiates 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 Details
-
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
Description copied from interface:BlobServiceReturns a BLOB service for accessing transient BLOBs.- Specified by:
getTransientBlobServicein interfaceBlobService- Returns:
- BLOB service
-
setBlobServerAddress
Sets the address of theBlobServer.- Specified by:
setBlobServerAddressin interfaceTaskExecutorBlobService- Parameters:
blobServerAddress- address of theBlobServer.
-
close
- 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.
-