org.apache.hadoop.hbase.util
Class InfoServer
java.lang.Object
org.apache.hadoop.http.HttpServer
org.apache.hadoop.hbase.util.InfoServer
- All Implemented Interfaces:
- org.apache.hadoop.http.FilterContainer
@InterfaceAudience.Private
public class InfoServer
- extends org.apache.hadoop.http.HttpServer
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:
"/stacks/" -> points to stack trace
"/static/" -> points to common static files (src/hbase-webapps/static)
"/" -> the jsp server code from (src/hbase-webapps/)
Nested classes/interfaces inherited from class org.apache.hadoop.http.HttpServer |
org.apache.hadoop.http.HttpServer.QuotingInputFilter, org.apache.hadoop.http.HttpServer.StackServlet |
Fields inherited from class org.apache.hadoop.http.HttpServer |
CONF_CONTEXT_ATTRIBUTE, defaultContexts, filterNames, findPort, KRB5_FILTER, listener, LOG, SPNEGO_FILTER, webAppContext, webServer |
Constructor Summary |
InfoServer(String name,
String bindAddress,
int port,
boolean findPort,
org.apache.hadoop.conf.Configuration c)
Create a status server on the given port. |
Methods inherited from class org.apache.hadoop.http.HttpServer |
addContext, addContext, addDefaultApps, addDefaultServlets, addFilter, addFilterPathMapping, addGlobalFilter, addInternalServlet, addInternalServlet, addJerseyResourcePackage, addServlet, addSslListener, addSslListener, addSslListener, createBaseListener, createDefaultChannelConnector, defineFilter, getAttribute, getPort, hasAdministratorAccess, isInstrumentationAccessAllowed, join, setAttribute, setAttribute, setThreads, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InfoServer
public InfoServer(String name,
String bindAddress,
int port,
boolean findPort,
org.apache.hadoop.conf.Configuration c)
throws IOException
- Create a status server on the given port.
The jsp scripts are taken from src/hbase-webapps/
name.
- Parameters:
name
- The name of the serverbindAddress
- address to bind toport
- 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.
- Throws:
IOException
- e
getWebAppsPath
protected String getWebAppsPath(String appName)
throws FileNotFoundException
- Get the pathname to the webapps files.
- Parameters:
appName
- eg "secondary" or "datanode"
- Returns:
- the pathname as a URL
- Throws:
FileNotFoundException
- if 'webapps' directory cannot be found on CLASSPATH.
getWebAppsPath
protected String getWebAppsPath()
throws IOException
- Get the pathname to the
path
files.
- Overrides:
getWebAppsPath
in class org.apache.hadoop.http.HttpServer
- Returns:
- the pathname as a URL
- Throws:
IOException
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.