Class HttpFSServerWebApp

All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

@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..

  • Field Details

    • NAME

      public static final String NAME
      Server name and prefix for all configuration properties.
      See Also:
    • CONF_ADMIN_GROUP

      public static final String CONF_ADMIN_GROUP
      Configuration property that defines HttpFSServer admin group.
      See Also:
  • Constructor Details

    • 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 Details

    • 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.
    • getMetrics

      public static HttpFSServerMetrics getMetrics()
      gets the HttpFSServerMetrics instance.
      Returns:
      the HttpFSServerMetrics singleton.
    • getAdminGroup

      public String getAdminGroup()
      Returns HttpFSServer admin group.
      Returns:
      httpfs admin group.