public final class BlobClient extends Object implements Closeable
Constructor and Description |
---|
BlobClient(InetSocketAddress serverAddress,
Configuration clientConfig)
Instantiates a new BLOB client.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isClosed() |
static List<PermanentBlobKey> |
uploadJarFiles(InetSocketAddress serverAddress,
Configuration clientConfig,
JobID jobId,
List<Path> jars)
Uploads the JAR files to the
PermanentBlobService of the BlobServer at the
given address with HA as configured. |
public BlobClient(InetSocketAddress serverAddress, 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 Closeable
close
in interface AutoCloseable
IOException
public boolean isClosed()
public static List<PermanentBlobKey> uploadJarFiles(InetSocketAddress serverAddress, Configuration clientConfig, JobID jobId, List<Path> jars) 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)jars
- List of JAR files to uploadIOException
- if the upload failsCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.