public final class WebMonitorUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WebMonitorUtils.LogFileLocation
Singleton to hold the log file, the stdout file, the log directory.
|
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
fromKeyValueJsonArray(String jsonString) |
static WebMonitorExtension |
loadWebSubmissionExtension(GatewayRetriever<? extends DispatcherGateway> leaderRetriever,
org.apache.flink.api.common.time.Time timeout,
Map<String,String> responseHeaders,
CompletableFuture<String> localAddressFuture,
Path uploadDir,
Executor executor,
org.apache.flink.configuration.Configuration configuration)
Loads the
WebMonitorExtension which enables web submission. |
static <T extends RestfulGateway> |
tryLoadWebContent(GatewayRetriever<? extends T> leaderRetriever,
org.apache.flink.api.common.time.Time timeout,
File tmpDir)
Checks whether the flink-runtime-web dependency is available and if so returns a
StaticFileServerHandler which can serve the static file contents.
|
public static <T extends RestfulGateway> Optional<StaticFileServerHandler<T>> tryLoadWebContent(GatewayRetriever<? extends T> leaderRetriever, org.apache.flink.api.common.time.Time timeout, File tmpDir) throws IOException
T - type of the gateway to retrieveleaderRetriever - to be used by the StaticFileServerHandlertimeout - for lookup requeststmpDir - to be used by the StaticFileServerHandler to store temporary filesIOException - if we cannot create the StaticFileServerHandlerpublic static WebMonitorExtension loadWebSubmissionExtension(GatewayRetriever<? extends DispatcherGateway> leaderRetriever, org.apache.flink.api.common.time.Time timeout, Map<String,String> responseHeaders, CompletableFuture<String> localAddressFuture, Path uploadDir, Executor executor, org.apache.flink.configuration.Configuration configuration) throws org.apache.flink.util.FlinkException
WebMonitorExtension which enables web submission.leaderRetriever - to retrieve the leadertimeout - for asynchronous requestsresponseHeaders - for the web submission handlerslocalAddressFuture - of the underlying REST server endpointuploadDir - where the web submission handler store uploaded jarsexecutor - to run asynchronous operationsconfiguration - used to instantiate the web submission extensionorg.apache.flink.util.FlinkException - if the web submission extension could not be loadedCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.