public class WebRuntimeMonitor extends Object implements WebMonitor
The web runtime monitor is based in Netty HTTP. It uses the Netty-Router library to route HTTP requests of different paths to different response handlers. In addition, it serves the static files of the web frontend, such as HTML, CSS, or JS files.
Modifier and Type | Field and Description |
---|---|
static scala.concurrent.duration.FiniteDuration |
DEFAULT_REQUEST_TIMEOUT
By default, all requests to the JobManager have a timeout of 10 seconds
|
Constructor and Description |
---|
WebRuntimeMonitor(Configuration config,
LeaderRetrievalService leaderRetrievalService,
BlobView blobView,
akka.actor.ActorSystem actorSystem) |
Modifier and Type | Method and Description |
---|---|
static JsonArchivist[] |
getJsonArchivists()
Returns an array of all
JsonArchivist s that are relevant for the history server. |
int |
getServerPort()
Gets the port that the web server actually binds to.
|
void |
start(String jobManagerAkkaUrl)
Starts the web monitor.
|
void |
stop()
Stops the web server.
|
public static final scala.concurrent.duration.FiniteDuration DEFAULT_REQUEST_TIMEOUT
public WebRuntimeMonitor(Configuration config, LeaderRetrievalService leaderRetrievalService, BlobView blobView, akka.actor.ActorSystem actorSystem) throws IOException, InterruptedException
IOException
InterruptedException
public static JsonArchivist[] getJsonArchivists()
JsonArchivist
s that are relevant for the history server.
This method is static to allow easier access from the MemoryArchivist
. Requiring a reference
would imply that the WebRuntimeMonitor is always created before the archivist, which may not hold for all
deployment modes.
Similarly, no handler implements the JsonArchivist interface itself but instead contains a separate implementing
class; otherwise we would either instantiate several handlers even though their main functionality isn't
required, or yet again require that the WebRuntimeMonitor is started before the archivist.public void start(String jobManagerAkkaUrl) throws Exception
WebMonitor
start
in interface WebMonitor
Exception
- This method may forward exceptions, if it cannot bring up the web monitor.public void stop() throws Exception
WebMonitor
stop
in interface WebMonitor
Exception
- This method may forward exceptions, if it cannot properly stop the web monitor.public int getServerPort()
WebMonitor
getServerPort
in interface WebMonitor
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.