public class MesosArtifactServer extends Object implements MesosArtifactResolver
More information: http://mesos.apache.org/documentation/latest/fetcher/ http://mesos.apache.org/documentation/latest/fetcher-cache-internals/
| Modifier and Type | Class and Description |
|---|---|
static class |
MesosArtifactServer.UnknownFileHandler
Handle a request for a non-existent file.
|
static class |
MesosArtifactServer.VirtualFileServerHandler
Handle HEAD and GET requests for a specific file.
|
| Constructor and Description |
|---|
MesosArtifactServer(String prefix,
String serverHostname,
int configuredPort,
org.apache.flink.configuration.Configuration config) |
| Modifier and Type | Method and Description |
|---|---|
URL |
addFile(File localFile,
String remoteFile)
Adds a file to the artifact server.
|
URL |
addPath(org.apache.flink.core.fs.Path path,
org.apache.flink.core.fs.Path remoteFile)
Adds a path to the artifact server.
|
URL |
baseURL() |
int |
getServerPort()
Get the server port on which the artifact server is listening.
|
void |
removePath(org.apache.flink.core.fs.Path remoteFile) |
scala.Option<URL> |
resolve(org.apache.flink.core.fs.Path remoteFile) |
void |
stop()
Stops the artifact server.
|
public URL baseURL()
public int getServerPort()
public URL addFile(File localFile, String remoteFile) throws IOException, MalformedURLException
localFile - the local file to serve.remoteFile - the remote path with which to locate the file.MalformedURLException - if the remote path is invalid.IOExceptionpublic URL addPath(org.apache.flink.core.fs.Path path, org.apache.flink.core.fs.Path remoteFile) throws IOException, MalformedURLException
path - the qualified FS path to serve (local, hdfs, etc).remoteFile - the remote path with which to locate the file.MalformedURLException - if the remote path is invalid.IOExceptionpublic void removePath(org.apache.flink.core.fs.Path remoteFile)
public scala.Option<URL> resolve(org.apache.flink.core.fs.Path remoteFile)
resolve in interface MesosArtifactResolverCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.