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 WebMonitor |
startWebRuntimeMonitor(Configuration config,
HighAvailabilityServices highAvailabilityServices,
LeaderGatewayRetriever<JobManagerGateway> jobManagerRetriever,
MetricQueryServiceRetriever queryServiceRetriever,
Time timeout,
ScheduledExecutor scheduledExecutor)
Starts the web runtime monitor.
|
static <T extends RestfulGateway> |
tryLoadWebContent(GatewayRetriever<T> leaderRetriever,
CompletableFuture<String> restAddressFuture,
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 Path |
validateAndNormalizeUri(URI archiveDirUri)
Checks and normalizes the given URI.
|
public static WebMonitor startWebRuntimeMonitor(Configuration config, HighAvailabilityServices highAvailabilityServices, LeaderGatewayRetriever<JobManagerGateway> jobManagerRetriever, MetricQueryServiceRetriever queryServiceRetriever, 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<T> leaderRetriever, CompletableFuture<String> restAddressFuture, 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 JsonArchivist[] getJsonArchivists()
public static JobDetails createDetailsForJob(AccessExecutionGraph job)
public static Path validateAndNormalizeUri(URI archiveDirUri)
archiveDirUri
- The URI to check and normalize.IllegalArgumentException
- Thrown, if the URI misses scheme or path.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.