public final class BlobClient extends Object implements Closeable
| Constructor and Description |
|---|
BlobClient(InetSocketAddress serverAddress,
org.apache.flink.configuration.Configuration clientConfig)
Instantiates a new BLOB client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isClosed() |
boolean |
isConnected() |
PermanentBlobKey |
uploadFile(org.apache.flink.api.common.JobID jobId,
org.apache.flink.core.fs.Path file)
Uploads a single file to the
PermanentBlobService of the given BlobServer. |
static List<PermanentBlobKey> |
uploadFiles(InetSocketAddress serverAddress,
org.apache.flink.configuration.Configuration clientConfig,
org.apache.flink.api.common.JobID jobId,
List<org.apache.flink.core.fs.Path> files)
Uploads the JAR files to the
PermanentBlobService of the BlobServer at the
given address with HA as configured. |
public BlobClient(InetSocketAddress serverAddress, org.apache.flink.configuration.Configuration clientConfig) throws IOException
serverAddress - the network address of the BLOB serverclientConfig - additional configuration like SSL parameters required to connect to the
blob serverIOException - thrown if the connection to the BLOB server could not be establishedpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean isClosed()
public boolean isConnected()
public static List<PermanentBlobKey> uploadFiles(InetSocketAddress serverAddress, org.apache.flink.configuration.Configuration clientConfig, org.apache.flink.api.common.JobID jobId, List<org.apache.flink.core.fs.Path> files) throws IOException
PermanentBlobService of the BlobServer at the
given address with HA as configured.serverAddress - Server address of the BlobServerclientConfig - Any additional configuration for the blob clientjobId - ID of the job this blob belongs to (or null if job-unrelated)files - List of files to uploadIOException - if the upload failspublic PermanentBlobKey uploadFile(org.apache.flink.api.common.JobID jobId, org.apache.flink.core.fs.Path file) throws IOException
PermanentBlobService of the given BlobServer.jobId - ID of the job this blob belongs to (or null if job-unrelated)file - file to uploadIOException - if the upload failsCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.