|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapred.StatusHttpServer
public class StatusHttpServer
Create a Jetty embedded server to answer http requests. The primary goal
is to serve up status information for the server.
There are three contexts:
"/logs/" -> points to the log directory
"/static/" -> points to common static files (src/webapps/static)
"/" -> the jsp server code from (src/webapps/
Nested Class Summary | |
---|---|
static class |
StatusHttpServer.StackServlet
A very simple servlet to serve up a text representation of the current stack traces. |
static class |
StatusHttpServer.TaskGraphServlet
The servlet that outputs svg graphics for map / reduce task statuses |
Constructor Summary | |
---|---|
StatusHttpServer(String name,
String bindAddress,
int port,
boolean findPort)
Create a status server on the given port. |
Method Summary | ||
---|---|---|
|
addServlet(String name,
String pathSpec,
Class<T> servletClass)
Add a servlet in the server. |
|
void |
addSslListener(InetSocketAddress addr,
String keystore,
String storPass,
String keyPass)
Configure an ssl listener on the server. |
|
Object |
getAttribute(String name)
Get the value in the webapp context. |
|
int |
getPort()
Get the port that the server is on |
|
void |
setAttribute(String name,
Object value)
Set a value in the webapp context. |
|
void |
setThreads(int min,
int max)
|
|
void |
start()
Start the server. |
|
void |
stop()
stop the server |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatusHttpServer(String name, String bindAddress, int port, boolean findPort) throws IOException
name
- The name of the serverport
- The port to use on the serverfindPort
- whether the server should start at the given port and
increment by 1 until it finds a free port.
IOException
Method Detail |
---|
public void setAttribute(String name, Object value)
name
- The name of the attributevalue
- The value of the attributepublic <T extends javax.servlet.http.HttpServlet> void addServlet(String name, String pathSpec, Class<T> servletClass)
name
- The name of the servlet (can be passed as null)pathSpec
- The path spec for the servletservletClass
- The servlet classpublic Object getAttribute(String name)
name
- The name of the attribute
public int getPort()
public void setThreads(int min, int max)
public void addSslListener(InetSocketAddress addr, String keystore, String storPass, String keyPass) throws IOException
addr
- address to listen onkeystore
- location of the keystorestorPass
- password for the keystorekeyPass
- password for the key
IOException
public void start() throws IOException
IOException
public void stop() throws InterruptedException
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |