public class AmbariServer extends Object
Modifier and Type | Field and Description |
---|---|
static EnumSet<javax.servlet.DispatcherType> |
DISPATCHER_TYPES
Dispatcher types for webAppContext.addFilter.
|
boolean |
running |
protected static String |
VELOCITY_LOG_CATEGORY |
static String |
VIEWS_URL_PATTERN |
Constructor and Description |
---|
AmbariServer() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureHandlerCompression(org.eclipse.jetty.servlet.ServletContextHandler context)
Performs GZIP compression configuration of the context handler
with static values and values from configuration file
|
protected org.eclipse.jetty.server.Server |
configureJettyThreadPool(int acceptorThreads,
String threadPoolName,
int configuredThreadPoolSize)
The Jetty thread pool consists of three basic types of threads:
Acceptors
Selectors
Threads which can actually do stuff
The
SelectChannelConnector uses the
Runtime.availableProcessors() as a way to determine how many
acceptors and selectors to create. |
protected void |
configureRootHandler(org.eclipse.jetty.servlet.ServletContextHandler root)
Performs basic configuration of root handler with static values and values
from configuration file.
|
static void |
enableLog4jMonitor(Map<String,String> configsMap)
To change log level without restart.
|
static AmbariManagementController |
getController() |
String |
getServerOsType() |
protected void |
initDB()
Creates default users if in-memory database is used
|
void |
initViewRegistry()
Initialize the view registry singleton instance.
|
static void |
main(String[] args) |
void |
performStaticInjection()
Deprecated.
|
void |
run() |
protected void |
runDatabaseConsistencyCheck()
this method executes database consistency check if skip option was not added
|
static void |
setController(AmbariManagementController controller) |
static void |
setupProxyAuth()
Sets up proxy authentication.
|
void |
stop() |
public static final String VIEWS_URL_PATTERN
protected static final String VELOCITY_LOG_CATEGORY
public static final EnumSet<javax.servlet.DispatcherType> DISPATCHER_TYPES
public volatile boolean running
public String getServerOsType()
public static AmbariManagementController getController()
public static void setController(AmbariManagementController controller)
protected void runDatabaseConsistencyCheck() throws Exception
Exception
protected org.eclipse.jetty.server.Server configureJettyThreadPool(int acceptorThreads, String threadPoolName, int configuredThreadPoolSize)
SelectChannelConnector
uses the
Runtime.availableProcessors()
as a way to determine how many
acceptors and selectors to create. If the number of processors is too
great, then there will be no threads left to fullfil connection requests.
This method ensures that the pool size is configured correctly, taking into
account the number of available processors (sockets x core x
threads-per-core).
If the configured pool size is determined to be too small, then this will
log a warning and increase the pool size to ensure that there are at least
20 available threads for requests.acceptorThreads
- the number of Acceptor threads configured for the connector.threadPoolName
- the name of the thread pool being configured (not null
).configuredThreadPoolSize
- the size of the pool from Configuration
.protected void configureRootHandler(org.eclipse.jetty.servlet.ServletContextHandler root)
root
- root handlerprotected void configureHandlerCompression(org.eclipse.jetty.servlet.ServletContextHandler context)
context
- handlerprotected void initDB() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
@Deprecated public void performStaticInjection()
StaticallyInject
.
Static injection replacement to wait Persistence Service start.StaticallyInject
public void initViewRegistry()
public static void setupProxyAuth()
AmbariMetaInfo
requires potential URL
lookups that may need the proxy.public static void enableLog4jMonitor(Map<String,String> configsMap)
Copyright © 2022 Apache Software Foundation. All rights reserved.