org.apache.hadoop.fs.http.server
Class HttpFSServerWebApp

java.lang.Object
  extended by org.apache.hadoop.lib.server.Server
      extended by org.apache.hadoop.lib.servlet.ServerWebApp
          extended by org.apache.hadoop.fs.http.server.HttpFSServerWebApp
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

@InterfaceAudience.Private
public class HttpFSServerWebApp
extends ServerWebApp

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
static String CONF_ADMIN_GROUP
          Configuration property that defines HttpFSServer admin group.
static String NAME
          Server name and prefix for all configuration properties.
 
Fields inherited from class org.apache.hadoop.lib.servlet.ServerWebApp
SSL_ENABLED
 
Fields inherited from class org.apache.hadoop.lib.server.Server
CONF_SERVICES, CONF_SERVICES_EXT, CONF_STARTUP_STATUS, DEFAULT_LOG4J_PROPERTIES
 
Constructor Summary
HttpFSServerWebApp()
          Default constructor.
HttpFSServerWebApp(String homeDir, org.apache.hadoop.conf.Configuration config)
          Constructor used for testing purposes.
HttpFSServerWebApp(String homeDir, String configDir, String logDir, String tempDir, org.apache.hadoop.conf.Configuration config)
          Constructor used for testing purposes.
 
Method Summary
 void destroy()
          Shutdowns all running services.
static HttpFSServerWebApp get()
          Returns HttpFSServer server singleton, configuration and services are accessible through it.
 String getAdminGroup()
          Returns HttpFSServer admin group.
 void init()
          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, setHomeDirForCurrentThread
 
Methods 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
Server name and prefix for all configuration properties.

See Also:
Constant Field Values

CONF_ADMIN_GROUP

public static final String CONF_ADMIN_GROUP
Configuration property that defines HttpFSServer admin group.

See Also:
Constant Field Values
Constructor Detail

HttpFSServerWebApp

public HttpFSServerWebApp()
                   throws IOException
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

public HttpFSServerWebApp(String homeDir,
                          org.apache.hadoop.conf.Configuration config)
Constructor used for testing purposes.

Method Detail

init

public void init()
          throws ServerException
Initializes the HttpFSServer server, loads configuration and required services.

Overrides:
init in class Server
Throws:
ServerException - thrown if HttpFSServer server could not be initialized.

destroy

public void destroy()
Shutdowns all running services.

Overrides:
destroy in class Server

get

public static HttpFSServerWebApp get()
Returns HttpFSServer server singleton, configuration and services are accessible through it.

Returns:
the HttpFSServer server singleton.

getAdminGroup

public String getAdminGroup()
Returns HttpFSServer admin group.

Returns:
httpfs admin group.


Copyright © 2014 Apache Software Foundation. All Rights Reserved.