Package org.apache.hadoop.fs.http.server
Class HttpFSServerWebApp
java.lang.Object
org.apache.hadoop.lib.server.Server
org.apache.hadoop.lib.servlet.ServerWebApp
org.apache.hadoop.fs.http.server.HttpFSServerWebApp
- All Implemented Interfaces:
EventListener,javax.servlet.ServletContextListener
Bootstrap class that manages the initialization and destruction of the
HttpFSServer server, it is a
javax.servlet.ServletContextListener
implementation that is wired in HttpFSServer's WAR
WEB-INF/web.xml.
It provides acces to the server context via the singleton get().
All the configuration is loaded from configuration properties prefixed
with httpfs..
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.lib.server.Server
Server.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfiguration property that defines HttpFSServer admin group.static final StringServer name and prefix for all configuration properties.Fields inherited from class org.apache.hadoop.lib.servlet.ServerWebApp
SSL_ENABLEDFields inherited from class org.apache.hadoop.lib.server.Server
CONF_SERVICES, CONF_SERVICES_EXT, CONF_STARTUP_STATUS, DEFAULT_LOG4J_PROPERTIES -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.HttpFSServerWebApp(String homeDir, String configDir, String logDir, String tempDir, org.apache.hadoop.conf.Configuration config) Constructor used for testing purposes.HttpFSServerWebApp(String homeDir, org.apache.hadoop.conf.Configuration config) Constructor used for testing purposes. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Shutdowns all running services.static HttpFSServerWebAppget()Returns HttpFSServer server singleton, configuration and services are accessible through it.Returns HttpFSServer admin group.static HttpFSServerMetricsgets the HttpFSServerMetrics instance.voidinit()Initializes the HttpFSServer server, loads configuration and required services.Methods inherited from class org.apache.hadoop.lib.servlet.ServerWebApp
contextDestroyed, contextInitialized, getAuthority, isSslEnabled, resolveAuthority, setAuthority, setHomeDirForCurrentThreadMethods inherited from class org.apache.hadoop.lib.server.Server
checkServiceDependencies, destroyServices, ensureOperational, get, getConfig, getConfigDir, getHomeDir, getLogDir, getName, getPrefix, getPrefixedName, getStatus, getTempDir, initConfig, initLog, initServices, loadServices, setService, setStatus
-
Field Details
-
NAME
Server name and prefix for all configuration properties.- See Also:
-
CONF_ADMIN_GROUP
Configuration property that defines HttpFSServer admin group.- See Also:
-
-
Constructor Details
-
HttpFSServerWebApp
Default constructor.- Throws:
IOException- thrown if the home/conf/log/temp directory paths could not be resolved.
-
HttpFSServerWebApp
public HttpFSServerWebApp(String homeDir, String configDir, String logDir, String tempDir, org.apache.hadoop.conf.Configuration config) Constructor used for testing purposes. -
HttpFSServerWebApp
Constructor used for testing purposes.
-
-
Method Details
-
init
Initializes the HttpFSServer server, loads configuration and required services.- Overrides:
initin classServer- Throws:
ServerException- thrown if HttpFSServer server could not be initialized.
-
destroy
public void destroy()Shutdowns all running services. -
get
Returns HttpFSServer server singleton, configuration and services are accessible through it.- Returns:
- the HttpFSServer server singleton.
-
getMetrics
gets the HttpFSServerMetrics instance.- Returns:
- the HttpFSServerMetrics singleton.
-
getAdminGroup
Returns HttpFSServer admin group.- Returns:
- httpfs admin group.
-