public final class WebMonitorUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WebMonitorUtils.LogFileLocation
Singleton to hold the log and stdout file.
|
| Modifier and Type | Method and Description |
|---|---|
static JobDetails |
createDetailsForJob(AccessExecutionGraph job) |
static Map<String,String> |
fromKeyValueJsonArray(String jsonString) |
static JsonArchivist[] |
getJsonArchivists() |
static WebMonitorExtension |
loadWebSubmissionExtension(GatewayRetriever<? extends DispatcherGateway> leaderRetriever,
CompletableFuture<String> restAddressFuture,
org.apache.flink.api.common.time.Time timeout,
Map<String,String> responseHeaders,
Path uploadDir,
Executor executor,
org.apache.flink.configuration.Configuration configuration)
Loads the
WebMonitorExtension which enables web submission. |
static WebMonitor |
startWebRuntimeMonitor(org.apache.flink.configuration.Configuration config,
HighAvailabilityServices highAvailabilityServices,
LeaderGatewayRetriever<JobManagerGateway> jobManagerRetriever,
MetricQueryServiceRetriever queryServiceRetriever,
org.apache.flink.api.common.time.Time timeout,
ScheduledExecutor scheduledExecutor)
Starts the web runtime monitor.
|
static <T extends RestfulGateway> |
tryLoadWebContent(GatewayRetriever<? extends T> leaderRetriever,
CompletableFuture<String> restAddressFuture,
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.
|
static org.apache.flink.core.fs.Path |
validateAndNormalizeUri(URI archiveDirUri)
Checks and normalizes the given URI.
|
public static WebMonitor startWebRuntimeMonitor(org.apache.flink.configuration.Configuration config, HighAvailabilityServices highAvailabilityServices, LeaderGatewayRetriever<JobManagerGateway> jobManagerRetriever, MetricQueryServiceRetriever queryServiceRetriever, org.apache.flink.api.common.time.Time timeout, ScheduledExecutor scheduledExecutor)
Because failure to start the web runtime monitor is not considered fatal, this method does not throw any exceptions, but only logs them.
config - The configuration for the runtime monitor.highAvailabilityServices - HighAvailabilityServices used to start the WebRuntimeMonitorjobManagerRetriever - which retrieves the currently leading JobManagerqueryServiceRetriever - which retrieves the query servicetimeout - for asynchronous operationsscheduledExecutor - to run asynchronous operationspublic static <T extends RestfulGateway> Optional<StaticFileServerHandler<T>> tryLoadWebContent(GatewayRetriever<? extends T> leaderRetriever, CompletableFuture<String> restAddressFuture, org.apache.flink.api.common.time.Time timeout, File tmpDir) throws IOException
T - type of the gateway to retrieveleaderRetriever - to be used by the StaticFileServerHandlerrestAddressFuture - of the underlying REST server endpointtimeout - 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, CompletableFuture<String> restAddressFuture, org.apache.flink.api.common.time.Time timeout, Map<String,String> responseHeaders, 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 leaderrestAddressFuture - of the underlying REST server endpointtimeout - for asynchronous requestsresponseHeaders - for the web submission handlersuploadDir - 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 loadedpublic static JsonArchivist[] getJsonArchivists()
public static JobDetails createDetailsForJob(AccessExecutionGraph job)
public static org.apache.flink.core.fs.Path validateAndNormalizeUri(URI archiveDirUri)
archiveDirUri - The URI to check and normalize.IllegalArgumentException - Thrown, if the URI misses scheme or path.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.