public final class BlobClient extends Object implements Closeable
构造器和说明 |
---|
BlobClient(InetSocketAddress serverAddress,
org.apache.flink.configuration.Configuration clientConfig)
Instantiates a new BLOB client.
|
限定符和类型 | 方法和说明 |
---|---|
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
在接口中 Closeable
close
在接口中 AutoCloseable
IOException
public 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 BlobServer
clientConfig
- 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–2021 The Apache Software Foundation. All rights reserved.