You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2016/09/09 21:22:49 UTC

[01/10] ambari git commit: AMBARI-18331 - JMX metric retrieval method may unnecessarily refresh metrics at a high rate (part2) (jonathanhurley)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 9d1e87bbc -> 94a3f90f4


AMBARI-18331 - JMX metric retrieval method may unnecessarily refresh metrics at a high rate (part2) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94a3f90f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94a3f90f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94a3f90f

Branch: refs/heads/branch-2.5
Commit: 94a3f90f4097ff3934591e22c5d63556b04fbf0f
Parents: 4ea3229
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Fri Sep 9 17:17:15 2016 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Fri Sep 9 17:20:40 2016 -0400

----------------------------------------------------------------------
 .../ambari/server/state/services/MetricsRetrievalService.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/94a3f90f/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java b/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java
index 629f6ab..79e0e25 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java
@@ -198,7 +198,7 @@ public class MetricsRetrievalService extends AbstractService {
         TimeUnit.MINUTES).build();
 
     // enable the TTL cache if configured; otherwise leave it as null
-    int ttlSeconds = m_configuration.getMetricCacheTTLSeconds();
+    int ttlSeconds = m_configuration.getMetricsServiceRequestTTL();
     boolean ttlCacheEnabled = m_configuration.isMetricsServiceRequestTTLCacheEnabled();
     if (ttlCacheEnabled) {
       m_ttlUrlCache = CacheBuilder.newBuilder().expireAfterWrite(ttlSeconds,


[04/10] ambari git commit: AMBARI-18089 - Create Documentation Around All Options In ambari.properties (jonathanhurley)

Posted by jo...@apache.org.
AMBARI-18089 - Create Documentation Around All Options In ambari.properties (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cc43870d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cc43870d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cc43870d

Branch: refs/heads/branch-2.5
Commit: cc43870d28f802cbe453221ff116618b58dfa20e
Parents: 5630b5e
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Mon Aug 15 23:57:51 2016 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Fri Sep 9 17:20:40 2016 -0400

----------------------------------------------------------------------
 .../server/orm/InMemoryDefaultTestModule.java   |   10 +-
 .../funtest/server/tests/ServerTestBase.java    |   56 +-
 ambari-server/docs/configuration/index.md       |  303 ++++
 .../org/apache/ambari/annotations/Markdown.java |   30 +-
 .../checks/DatabaseConsistencyCheckHelper.java  |    2 +-
 .../server/configuration/Configuration.java     | 1393 ++++++++++++++----
 .../server/configuration/index_template.md      |   63 +
 .../ambari/server/controller/AmbariServer.java  |    2 +-
 .../controller/utilities/DatabaseChecker.java   |    2 +-
 .../server/configuration/ConfigurationTest.java |   40 +-
 .../utilities/DatabaseCheckerTest.java          |    8 +-
 .../security/ldap/LdapPerformanceTest.java      |    2 +-
 12 files changed, 1573 insertions(+), 338 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
----------------------------------------------------------------------
diff --git a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
index 7b49611..ed78ded 100644
--- a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
+++ b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
@@ -69,11 +69,11 @@ public class InMemoryDefaultTestModule extends AbstractModule {
       sharedResourcesDir = ClassLoader.getSystemClassLoader().getResource("").getPath();
     }
 
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-    properties.setProperty(Configuration.METADATA_DIR_PATH, stacks);
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, version);
-    properties.setProperty(Configuration.OS_VERSION_KEY, "centos6");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, sharedResourcesDir);
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), stacks);
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), version);
+    properties.setProperty(Configuration.OS_VERSION.getKey(), "centos6");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), sharedResourcesDir);
 
     try {
       install(new BeanDefinitionsCachingTestControllerModule(properties));

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/ServerTestBase.java
----------------------------------------------------------------------
diff --git a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/ServerTestBase.java b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/ServerTestBase.java
index e7683cf..a1d672e 100644
--- a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/ServerTestBase.java
+++ b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/ServerTestBase.java
@@ -18,21 +18,6 @@
 
 package org.apache.ambari.funtest.server.tests;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.persist.PersistService;
-import org.apache.ambari.funtest.server.LocalAmbariServer;
-import org.apache.ambari.server.configuration.Configuration;
-import org.apache.ambari.server.controller.ControllerModule;
-import org.apache.ambari.server.orm.DBAccessor;
-import org.apache.commons.codec.binary.Base64;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-
 import java.io.File;
 import java.io.IOException;
 import java.sql.DriverManager;
@@ -40,13 +25,26 @@ import java.sql.SQLException;
 import java.sql.SQLNonTransientConnectionException;
 import java.util.Properties;
 
+import org.apache.ambari.funtest.server.LocalAmbariServer;
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.ControllerModule;
+import org.apache.ambari.server.orm.DBAccessor;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
-import org.apache.http.HttpStatus;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
 
 /**
  * Base test infrastructure.
@@ -99,19 +97,19 @@ public class ServerTestBase {
     public static void setupTest() throws Exception {
         if (!isInitialized) {
             Properties properties = new Properties();
-            properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "remote");
-            properties.setProperty(Configuration.SERVER_JDBC_URL_KEY, Configuration.JDBC_IN_MEMORY_URL);
-            properties.setProperty(Configuration.SERVER_JDBC_DRIVER_KEY, Configuration.JDBC_IN_MEMROY_DRIVER);
-            properties.setProperty(Configuration.METADATA_DIR_PATH, "src/test/resources/stacks");
-            properties.setProperty(Configuration.SERVER_VERSION_FILE, "src/test/resources/version");
-            properties.setProperty(Configuration.OS_VERSION_KEY, "centos6");
-            properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
-
-            properties.setProperty(Configuration.AGENT_USE_SSL, "false");
-            properties.setProperty(Configuration.CLIENT_API_PORT_KEY, Integer.toString(serverPort));
-            properties.setProperty(Configuration.SRVR_ONE_WAY_SSL_PORT_KEY, Integer.toString(serverAgentPort));
+            properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "remote");
+            properties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), Configuration.JDBC_IN_MEMORY_URL);
+            properties.setProperty(Configuration.SERVER_JDBC_DRIVER.getKey(), Configuration.JDBC_IN_MEMORY_DRIVER);
+            properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), "src/test/resources/stacks");
+            properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), "src/test/resources/version");
+            properties.setProperty(Configuration.OS_VERSION.getKey(), "centos6");
+            properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
+
+            properties.setProperty(Configuration.AGENT_USE_SSL.getKey(), "false");
+            properties.setProperty(Configuration.CLIENT_API_PORT.getKey(), Integer.toString(serverPort));
+            properties.setProperty(Configuration.SRVR_ONE_WAY_SSL_PORT.getKey(), Integer.toString(serverAgentPort));
             String tmpDir = System.getProperty("java.io.tmpdir");
-            properties.setProperty(Configuration.SRVR_KSTR_DIR_KEY, tmpDir);
+            properties.setProperty(Configuration.SRVR_KSTR_DIR.getKey(), tmpDir);
 
             ControllerModule testModule = new ControllerModule(properties);
 
@@ -159,7 +157,7 @@ public class ServerTestBase {
      */
     protected static void dropDatabase() throws ClassNotFoundException, SQLException {
         String DROP_DERBY_URL = "jdbc:derby:memory:myDB/ambari;drop=true";
-        Class.forName(Configuration.JDBC_IN_MEMROY_DRIVER);
+        Class.forName(Configuration.JDBC_IN_MEMORY_DRIVER);
         try {
             DriverManager.getConnection(DROP_DERBY_URL);
         } catch (SQLNonTransientConnectionException ignored) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/docs/configuration/index.md
----------------------------------------------------------------------
diff --git a/ambari-server/docs/configuration/index.md b/ambari-server/docs/configuration/index.md
new file mode 100644
index 0000000..311def5
--- /dev/null
+++ b/ambari-server/docs/configuration/index.md
@@ -0,0 +1,303 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Ambari Server Configuration
+---
+- [Introduction](#introduction)
+- [Configuration Properties](#configuration-properties)
+- [Baseline Values](#baseline-values)
+- [Database And Persistence](#db-persistence)
+
+<a name="introduction"></a>
+## Introduction
+Ambari Server is configured using a flat text properties file. The file is read once when starting Ambari. Any changes made to the properties file are only reflected after restarting Ambari. 
+
+```
+/etc/ambari-server/conf/ambari.properties
+```
+
+<a name="configuration-properties"></a>
+## Configuration Properties
+The following are the properties which can be used to configure Ambari. 
+
+| Property Name | Description | Default |
+| --- | --- | --- |
+| agent.api.gzip.compression.enabled | Determiens whether communication with the Ambari Agents should have the JSON payloads compressed with GZIP. |`true` | 
+| agent.auto.cache.update | Determines whether the agents will automatically attempt to download updates to stack resources from the Ambari Server. |`true` | 
+| agent.check.mounts.timeout | The timeout, used by the `timeout` command in linux, when checking mounts for free capacity. |`0` | 
+| agent.check.remote.mounts | Determines whether the Ambari Agents will use the `df` or `df -l` command when checking disk mounts for capacity issues. Auto-mounted remote directories can cause long delays. |`false` | 
+| agent.package.install.task.timeout | The time, in seconds, before package installation commands are killed. |`1800` | 
+| agent.package.parallel.commands.limit | The maximum number of tasks which can run within a single operational request. If there are more tasks, then they will be broken up between multiple operations. |`100` | 
+| agent.ssl | Determines whether SSL is used to communicate between Ambari Server and Ambari Agents. |`true` | 
+| agent.stack.retry.on_repo_unavailability | Determines whether agents should retrying installation commands when the repository is not available. This can prevent false installation errors with repositories that are sporadically inaccessible. |`false` | 
+| agent.stack.retry.tries | The number of times an Ambari Agent should retry package installation when it fails due to a repository error. <br/><br/> This property is related to `agent.stack.retry.on_repo_unavailability`. |`5` | 
+| agent.task.timeout | The time, in seconds, before agent commands are killed. This does not include package installation commands. |`900` | 
+| agent.threadpool.size.max | The size of the Jetty connection pool used for handling incoming Ambari Agent requests. |`25` | 
+| alerts.cache.enabled | Determines whether current alerts should be cached. Enabling this can increase performance on large cluster, but can also result in lost alert data if the cache is not flushed frequently. |`false` | 
+| alerts.cache.flush.interval | The time, in minutes, after which cached alert information is flushed to the database<br/><br/> This property is related to `alerts.cache.enabled`. |`10` | 
+| alerts.cache.size | The size of the alert cache.<br/><br/> This property is related to `alerts.cache.enabled`. |`50000` | 
+| alerts.execution.scheduler.maxThreads | The number of threads used to handle alerts received from the Ambari Agents. The value should be increased as the size of the cluster increases. |`2` | 
+| alerts.snmp.dispatcher.udp.port | The UDP port to use when binding the SNMP dispatcher on Ambari Server startup. If no port is specified, then a random port will be used. | | 
+| alerts.template.file | The full path to the XML file that describes the different alert templates. | | 
+| ambari.display.url | The URL to use when creating messages which should include the Ambari Server URL.<br/><br/>The following are examples of valid values:<ul><li>`http://ambari.apache.org:8080`</ul> | | 
+| ambari.ldap.isConfigured | An internal property used for unit testing and development purposes. |`false` | 
+| ambari.python.wrap | The name of the shell script used to wrap all invocations of Python by Ambari.  |`ambari-python-wrap` | 
+| anonymous.audit.name | The name of the user given to requests which are executed without any credentials. |`_anonymous` | 
+| api.authenticated.user | The username of the default user assumed to be executing API calls. When set, authentication is not required in order to login to Ambari or use the REST APIs.   | | 
+| api.csrfPrevention.enabled | Determines whether Cross-Site Request Forgery attacks are prevented by looking for the `X-Requested-By` header. |`true` | 
+| api.gzip.compression.enabled | Determines whether data sent to and from the Ambari service should be compressed. |`true` | 
+| api.gzip.compression.min.size | Used in conjunction with `api.gzip.compression.enabled`, determines the mininum size that an HTTP request must be before it should be compressed. This is measured in bytes. |`10240` | 
+| api.ssl | Determines whether SSL is used in for secure connections to Ambari. When enabled, ambari-server setup-https must be run in order to properly configure keystores. |`false` | 
+| auditlog.enabled | Determines whether audit logging is enabled. |`true` | 
+| auditlog.logger.capacity | The size of the worker queue for audit logger events.<br/><br/> This property is related to `auditlog.enabled`. |`10000` | 
+| authentication.jwt.audiences | A list of the JWT audiences expected. Leaving this blank will allow for any audience.<br/><br/> This property is related to `authentication.jwt.enabled`. | | 
+| authentication.jwt.cookieName | The name of the cookie which will be used to extract the JWT token from the request.<br/><br/> This property is related to `authentication.jwt.enabled`. |`hadoop-jwt` | 
+| authentication.jwt.enabled | Determines whether to use JWT authentication when connecting to remote Hadoop resources. |`false` | 
+| authentication.jwt.originalUrlParamName | The original URL to use when constructing the logic URL for JWT.<br/><br/> This property is related to `authentication.jwt.enabled`. |`originalUrl` | 
+| authentication.jwt.providerUrl | The URL for authentication of the user in the absence of a JWT token when handling a JWT request.<br/><br/> This property is related to `authentication.jwt.enabled`. | | 
+| authentication.jwt.publicKey | The public key to use when verifying the authenticity of a JWT token.<br/><br/> This property is related to `authentication.jwt.enabled`. | | 
+| authentication.ldap.alternateUserSearchEnabled | Determines whether a secondary (alternate) LDAP user search filer is used if the primary filter fails to find a user. |`false` | 
+| authentication.ldap.alternateUserSearchFilter | An alternate LDAP user search filter which can be used if `authentication.ldap.alternateUserSearchEnabled` is enabled and the primary filter fails to find a user. |`(&(userPrincipalName={0})(objectClass={userObjectClass}))` | 
+| authentication.ldap.baseDn | The base DN to use when filtering LDAP users and groups. This is only used when LDAP authentication is enabled. |`dc=ambari,dc=apache,dc=org` | 
+| authentication.ldap.bindAnonymously | Determines whether LDAP requests can connect anonymously or if a managed user is required to connect. |`true` | 
+| authentication.ldap.dnAttribute | The attribute used for determining what the distinguished name property is. |`dn` | 
+| authentication.ldap.groupBase | The filter used when searching for groups in LDAP. |`ou=groups,dc=ambari,dc=apache,dc=org` | 
+| authentication.ldap.groupMembershipAttr | The LDAP attribute which identifies group membership. |`member` | 
+| authentication.ldap.groupNamingAttr | The attribute used to determine the group name in LDAP. |`cn` | 
+| authentication.ldap.groupObjectClass | The class to which group objects in LDAP belong. |`group` | 
+| authentication.ldap.managerDn | The DN of the manager account to use when binding to LDAP if anonymous binding is disabled. | | 
+| authentication.ldap.managerPassword | The password for the manager account used to bind to LDAP if anonymous binding is disabled. | | 
+| authentication.ldap.pagination.enabled | Determines whether results from LDAP are paginated when requested. |`true` | 
+| authentication.ldap.primaryUrl | The LDAP URL used for connecting to an LDAP server when authenticating users. This should include both the host name and port. |`localhost:33389` | 
+| authentication.ldap.referral | Determines whether to follow LDAP referrals to other URLs when the LDAP controller doesn't have the requested object. |`follow` | 
+| authentication.ldap.secondaryUrl | A second LDAP URL to use as a backup when authenticating users. This should include both the host name and port. | | 
+| authentication.ldap.sync.groupMemberFilter | The default filter to use for syncing member from LDAP. | | 
+| authentication.ldap.sync.groupMemberReplacePattern | The default regex pattern to use when replacing the group member attribute ID value with a placeholder. This is used in cases where a UID of an LDAP member is not a full CN or unique ID<br/><br/>The following are examples of valid values:<ul><li>``${member}``</ul> | | 
+| authentication.ldap.sync.userMemberFilter | The default filter to use for syncing users from LDAP. | | 
+| authentication.ldap.sync.userMemberReplacePattern | The default regex pattern to use when replacing the user member attribute ID value with a placeholder. This is used in cases where a UID of an LDAP member is not a full CN or unique ID<br/><br/>The following are examples of valid values:<ul><li>``${member}``</ul> | | 
+| authentication.ldap.useSSL | Determines whether to use LDAP over SSL (LDAPS). |`false` | 
+| authentication.ldap.userBase | The filter used when searching for users in LDAP. |`ou=people,dc=ambari,dc=apache,dc=org` | 
+| authentication.ldap.userObjectClass | The class to which user objects in LDAP belong. |`person` | 
+| authentication.ldap.userSearchFilter | A filter used to lookup a user in LDAP based on the Ambari user name<br/><br/>The following are examples of valid values:<ul><li>`(&({usernameAttribute}={0})(objectClass={userObjectClass}))`</ul> |`(&({usernameAttribute}={0})(objectClass={userObjectClass}))` | 
+| authentication.ldap.usernameAttribute | The attribute used for determining the user name, such as `uid`. |`uid` | 
+| authorization.ldap.adminGroupMappingRules | A comma-separate list of groups which would give a user administrative access to Ambari when syncing from LDAP. This is only used when `authorization.ldap.groupSearchFilter` is blank.<br/><br/>The following are examples of valid values:<ul><li>`administrators`<li>`Hadoop Admins,Hadoop Admins.*,DC Admins,.*Hadoop Operators`</ul> |`Ambari Administrators` | 
+| authorization.ldap.groupSearchFilter | The DN to use when searching for LDAP groups. | | 
+| blueprint.skip_install_tasks | Determines if the request generated by a blueprint should include the package installation tasks. |`false` | 
+| bootstrap.dir | The directory on the Ambari Server file system used for storing Ambari Agent bootstrap information such as request responses. |`/var/run/ambari-server/bootstrap` | 
+| bootstrap.master_host_name | The host name of the Ambari Server which will be used by the Ambari Agents for communication. | | 
+| bootstrap.script | The location and name of the Python script used to bootstrap new Ambari Agent hosts. |`/usr/lib/python2.6/site-packages/ambari_server/bootstrap.py` | 
+| bootstrap.setup_agent.password | The password to set on the `AMBARI_PASSPHRASE` environment variable before invoking the bootstrap script. |`password` | 
+| bootstrap.setup_agent.script | The location and name of the Python script executed on the Ambari Agent host during the bootstrap process. |`/usr/lib/python2.6/site-packages/ambari_server/setupAgent.py` | 
+| client.api.port | The port that client connections will use with the REST API. The Ambari Web client runs on this port. |`8080` | 
+| client.api.ssl.cert_pass_file | The filename which contains the password for the keystores, truststores, and certificates for the REST API when it's protected by SSL. |`https.pass.txt` | 
+| client.api.ssl.crt_pass | The password for the keystores, truststores, and certificates for the REST API when it's protected by SSL. If not specified, then `client.api.ssl.cert_pass_file` should be used. | | 
+| client.api.ssl.keys_dir | The location on the Ambari server where the REST API keystore and password files are stored if using SSL. | | 
+| client.api.ssl.keystore_name | The name of the keystore used when the Ambari Server REST API is protected by SSL. |`https.keystore.p12` | 
+| client.api.ssl.keystore_type | The type of the keystore file specified in `client.api.ssl.keystore_name`. Self-signed certificates can be `PKCS12` while CA signed certificates are `JKS` |`PKCS12` | 
+| client.api.ssl.port | The port that client connections will use with the REST API when using SSL. The Ambari Web client runs on this port if SSL is enabled. |`8443` | 
+| client.api.ssl.truststore_name | The name of the truststore used when the Ambari Server REST API is protected by SSL. |`https.keystore.p12` | 
+| client.api.ssl.truststore_type | The type of the keystore file specified in `client.api.ssl.truststore_name`. Self-signed certificates can be `PKCS12` while CA signed certificates are `JKS` |`PKCS12` | 
+| client.security | The type of authentication mechanism used by Ambari.<br/><br/>The following are examples of valid values:<ul><li>`local`<li>`ldap`</ul> | | 
+| client.threadpool.size.max | The size of the Jetty connection pool used for handling incoming REST API requests. This should be large enough to handle requests from both web browsers and embedded Views. |`25` | 
+| common.services.path | The location on the Ambari Server where common service resources exist. Stack services share the common service files.<br/><br/>The following are examples of valid values:<ul><li>`/var/lib/ambari-server/resources/common-services`</ul> | | 
+| custom.action.definitions | The location on the Ambari Server where custom actions are defined. |`/var/lib/ambari-server/resources/custom_action_definitions` | 
+| db.mysql.jdbc.name | The name of the MySQL JDBC JAR connector. |`mysql-connector-java.jar` | 
+| db.oracle.jdbc.name | The name of the Oracle JDBC JAR connector. |`ojdbc6.jar` | 
+| default.kdcserver.port | The port used to communicate with the Kerberos Key Distribution Center. |`88` | 
+| extensions.path | The location on the Ambari Server where stack extensions exist.<br/><br/>The following are examples of valid values:<ul><li>`/var/lib/ambari-server/resources/extensions`</ul> | | 
+| http.strict-transport-security | When using SSL, this will be used to set the `Strict-Transport-Security` response header. |`max-age=31536000` | 
+| http.x-frame-options | The value that will be used to set the `X-Frame-Options` HTTP response header. |`DENY` | 
+| http.x-xss-protection | The value that will be used to set the `X-XSS-Protection` HTTP response header. |`1; mode=block` | 
+| java.home | The location of the JDK on the Ambari Agent hosts.<br/><br/>The following are examples of valid values:<ul><li>`/usr/jdk64/jdk1.7.0_45`</ul> | | 
+| jce.name | The name of the JCE policy ZIP file. <br/><br/>The following are examples of valid values:<ul><li>`UnlimitedJCEPolicyJDK7.zip`</ul> | | 
+| jdk.name | The name of the JDK installation binary.<br/><br/>The following are examples of valid values:<ul><li>`jdk-7u45-linux-x64.tar.gz`</ul> | | 
+| kdcserver.connection.check.timeout | The timeout, in milliseconds, to wait when communicating with a Kerberos Key Distribution Center. |`10000` | 
+| kerberos.check.jaas.configuration | Determines whether Kerberos-enabled Ambari deployments should use JAAS to validate login credentials. |`false` | 
+| kerberos.keytab.cache.dir | The location on the Ambari Server where Kerberos keytabs are cached. |`/var/lib/ambari-server/data/cache` | 
+| metadata.path | The location on the Ambari Server where the stack resources exist.<br/><br/>The following are examples of valid values:<ul><li>`/var/lib/ambari-server/resources/stacks`</ul> | | 
+| metrics.retrieval-service.cache.timeout | The amount of time, in minutes, that JMX and REST metrics retrieved directly can remain in the cache. |`30` | 
+| mpacks.staging.path | The Ambari Management Pack staging directory on the Ambari Server.<br/><br/>The following are examples of valid values:<ul><li>`/var/lib/ambari-server/resources/mpacks`</ul> | | 
+| packages.pre.installed | Determines whether Ambari Agent instances have already have the necessary stack software installed |`false` | 
+| proxy.allowed.hostports | A comma-separated whitelist of host and port values which Ambari Server can use to determine if a proxy value is valid. |`*:*` | 
+| recommendations.artifacts.lifetime | The amount of time that Recommendation API data is kept on the Ambari Server file system. This is specified using a `hdwmy` syntax for pairing the value with a time unit (hours, days, weeks, months, years)<br/><br/>The following are examples of valid values:<ul><li>`8h`<li>`2w`<li>`1m`</ul> |`1w` | 
+| recommendations.dir | The directory on the Ambari Server file system used for storing Recommendation API artifacts. |`/var/run/ambari-server/stack-recommendations` | 
+| recovery.disabled_components | A comma-separated list of component names which are not included in automatic recovery attempts.<br/><br/>The following are examples of valid values:<ul><li>`NAMENODE,ZOOKEEPER_SERVER`</ul> | | 
+| recovery.enabled_components | A comma-separated list of component names which are included in automatic recovery attempts.<br/><br/>The following are examples of valid values:<ul><li>`NAMENODE,ZOOKEEPER_SERVER`</ul> | | 
+| recovery.lifetime_max_count | The maximum number of recovery attempts of a failed component during the lifetime of an Ambari Agent instance. This is reset when the Ambari Agent is restarted. | | 
+| recovery.max_count | The maximum number of recovery attempts of a failed component during a specified recovery window. | | 
+| recovery.retry_interval | The delay, in minutes, between automatic retry windows. | | 
+| recovery.type | The type of automatic recovery of failed services and components to use.<br/><br/>The following are examples of valid values:<ul><li>`DEFAULT`<li>`AUTO_START`<li>`FULL`</ul> | | 
+| recovery.window_in_minutes | The length of a recovery window, in minutes, in which recovery attempts can be retried.<br/><br/> This property is related to `recovery.max_count`. | | 
+| repo.validation.suffixes.default | The suffixes to use when validating most types of repositories. |`/repodata/repomd.xml` | 
+| repo.validation.suffixes.ubuntu | The suffixes to use when validating Ubuntu repositories. |`/dists/%s/Release` | 
+| resources.dir | The location on the Ambari Server where all resources exist, including common services, stacks, and scripts. |`/var/lib/ambari-server/resources/` | 
+| rolling.upgrade.skip.packages.prefixes | A comma-separated list of packages which will be skipped during a stack upgrade. | | 
+| security.agent.hostname.validate | Determines whether the Ambari Agent host names should be validated against a regular expression to ensure that they are well-formed. |`true` | 
+| security.master.key.location | The location on the Ambari Server of the master key file. This is the key to the master keystore. | | 
+| security.master.keystore.location | The location on the Ambari Server of the master keystore file. | | 
+| security.server.cert_name | The name of the file located in the `security.server.keys_dir` directory where certificates will be generated when Ambari uses the `openssl ca` command. |`ca.crt` | 
+| security.server.crt_pass | The password for the keystores, truststores, and certificates. If not specified, then `security.server.crt_pass_file` should be used | | 
+| security.server.crt_pass.len | The length of the randomly generated password for keystores and truststores.  |`50` | 
+| security.server.crt_pass_file | The filename which contains the password for the keystores, truststores, and certificates. |`pass.txt` | 
+| security.server.csr_name | The name of the certificate request file used when generating certificates. |`ca.csr` | 
+| security.server.disabled.ciphers | A list of cipher suites which are not strong enough to use and will be excluded when creating SSL connections.<br/><br/>The following are examples of valid values:<ul><li>`SSL_RSA_WITH_RC4_128_MD5\|SSL_RSA_WITH_RC4_12\u200c\u200b8_MD5`</ul> | | 
+| security.server.disabled.protocols | The list of protocols which should not be used when creating SSL connections.<br/><br/>The following are examples of valid values:<ul><li>`TLSv1.1\|TLSv1.2`</ul> | | 
+| security.server.key_name | The name of the private key used to sign requests. |`ca.key` | 
+| security.server.keys_dir | The directory on the Ambari Server where keystores are kept. |`.` | 
+| security.server.keystore_name | The name of the keystore file, located in `security.server.keys_dir` |`keystore.p12` | 
+| security.server.keystore_type | The type of the keystore file specified in `security.server.key_name`. Self-signed certificates can be `PKCS12` while CA signed certificates are `JKS` |`PKCS12` | 
+| security.server.one_way_ssl.port | The port that the Ambari Agents will use to communicate with the Ambari Server over SSL. |`8440` | 
+| security.server.passphrase | The password to the Ambari Server to supply to new Ambari Agent hosts being bootstrapped. |`AMBARI_PASSPHRASE` | 
+| security.server.passphrase_env_var | An environment variable which can be used to supply the Ambari Server password when bootstrapping new Ambari Agents. |`AMBARI_PASSPHRASE` | 
+| security.server.truststore_name | The name of the truststore file ambari uses to store trusted certificates. Located in `security.server.keys_dir` |`keystore.p12` | 
+| security.server.truststore_type | The type of the truststore file specified in `security.server.truststore_name`. Self-signed certificates can be `PKCS12` while CA signed certificates are `JKS` |`PKCS12` | 
+| security.server.two_way_ssl | Determines whether two-way SSL should be used between Ambari Server and Ambari Agents so that the agents must also use SSL. |`false` | 
+| security.server.two_way_ssl.port | The port that the Ambari Server will use to communicate with the agents over SSL. |`8441` | 
+| security.temporary.keystore.actibely.purge | Determines whether the temporary keystore should have keys actively purged on a fixed internal. or only when requested after expiration. |`true` | 
+| security.temporary.keystore.retention.minutes | The time, in minutes, that the temporary, in-memory credential store retains values. |`90` | 
+| server.cache.isStale.enabled | Determines when the stale configuration cache is enabled. If disabled, then queries to determine if components need to be restarted will query the database directly. |`true` | 
+| server.cache.isStale.expiration | The expiration time, in {@link TimeUnit#MINUTES}, that stale configuration information is cached.<br/><br/> This property is related to `server.cache.isStale.enabled`. |`600` | 
+| server.connection.max.idle.millis | The time, in milliseconds, that Ambari Agent connections can remain open and idle. |`900000` | 
+| server.ecCacheSize | The size of the cache which is used to hold current operations in memory until they complete. |`10000` | 
+| server.execution.scheduler.isClustered | Determines whether Quartz will use a clustered job scheduled when performing scheduled actions like rolling restarts. |`false` | 
+| server.execution.scheduler.maxDbConnections | The number of concurrent database connections that the Quartz job scheduler can use. |`5` | 
+| server.execution.scheduler.maxThreads | The number of threads that the Quartz job scheduler will use when executing scheduled jobs. |`5` | 
+| server.execution.scheduler.misfire.toleration.minutes | The time, in minutes, that a scheduled job can be run after its missed scheduled execution time. |`480` | 
+| server.execution.scheduler.start.delay.seconds | The delay, in seconds, that a Quartz job must wait before it starts. |`120` | 
+| server.execution.scheduler.wait | The time, in seconds, that the Quartz execution scheduler will wait before checking for new commands to schedule, such as rolling restarts. |`1` | 
+| server.hosts.mapping | The location on the Ambari Server of the file which is used for mapping host names. | | 
+| server.hrcStatusSummary.cache.enabled | Determines whether an existing request's status is cached. This is enabled by default to prevent increases in database access when there are long running operations in progress. |`true` | 
+| server.hrcStatusSummary.cache.expiryDuration | The expiration time, in minutes, of the request status cache.<br/><br/> This property is related to `server.hrcStatusSummary.cache.enabled`. |`30` | 
+| server.hrcStatusSummary.cache.size | The size of the cache which is used to hold a status of every operation in a request.<br/><br/> This property is related to `server.hrcStatusSummary.cache.enabled`. |`10000` | 
+| server.http.request.header.size | The size of the buffer to use, in bytes, for REST API HTTP header requests. |`65536` | 
+| server.http.response.header.size | The size of the buffer to use, in bytes, for REST API HTTP header responses. |`65536` | 
+| server.http.session.inactive_timeout | The time, in seconds, that open HTTP sessions will remain valid while they are inactive. |`1800` | 
+| server.jdbc.connection-pool | The connection pool manager to use for database connections. If using MySQL, then `c3p0` is automatically chosen.<br/><br/>The following are examples of valid values:<ul><li>`internal`<li>`c3p0`</ul> |`internal` | 
+| server.jdbc.connection-pool.acquisition-retry-attempts | The number of times connections should be retried to be acquired from the database before giving up. Only used with c3p0.<br/><br/> This property is related to `server.jdbc.connection-pool`. |`30` | 
+| server.jdbc.connection-pool.acquisition-retry-delay | The delay, in milliseconds, between connection acquisition attempts. Only used with c3p0.<br/><br/> This property is related to `server.jdbc.connection-pool`. |`1000` | 
+| server.jdbc.connection-pool.acquisition-size | The number of connections that should be retrieved when the pool size must increase. This should be set higher than 1 since the assumption is that a pool that needs to grow should probably grow by more than 1. Only used with c3p0.<br/><br/> This property is related to `server.jdbc.connection-pool`. |`5` | 
+| server.jdbc.connection-pool.idle-test-interval | The number of seconds in between testing each idle connection in the connection pool for validity. Only used with c3p0.<br/><br/> This property is related to `server.jdbc.connection-pool`. |`7200` | 
+| server.jdbc.connection-pool.max-age |  The maximum amount of time, in seconds, any connection, whether its been idle or active, should remain in the pool. This will terminate the connection after the expiration age and force new connections to be opened. Only used with c3p0.<br/><br/> This property is related to `server.jdbc.connection-pool`. |`0` | 
+| server.jdbc.connection-pool.max-idle-time | The maximum amount of time, in seconds, that an idle connection can remain in the pool. This should always be greater than the value returned from `server.jdbc.connection-pool.max-idle-time-excess`. Only used with c3p0.<br/><br/> This property is related to `server.jdbc.connection-pool`. |`14400` | 
+| server.jdbc.connection-pool.max-idle-time-excess | The maximum amount of time, in seconds, that connections beyond the minimum pool size should remain in the pool. This should always be less than than the value returned from `server.jdbc.connection-pool.max-idle-time`. Only used with c3p0.<br/><br/> This property is related to `server.jdbc.connection-pool`. |`0` | 
+| server.jdbc.connection-pool.max-size | The maximum number of connections that should exist in the database connection pool. Only used with c3p0.<br/><br/> This property is related to `server.jdbc.connection-pool`. |`32` | 
+| server.jdbc.connection-pool.min-size | The minimum number of connections that should always exist in the database connection pool. Only used with c3p0.<br/><br/> This property is related to `server.jdbc.connection-pool`. |`5` | 
+| server.jdbc.database_name | The name of the database. |`ambari` | 
+| server.jdbc.driver | The name of the PostgresSQL JDBC JAR connector. |`org.postgresql.Driver` | 
+| server.jdbc.generateTables | The table generation strategy to use when initializing JPA. |`NONE` | 
+| server.jdbc.postgres.schema | The schema within a named PostgreSQL database where Ambari's tables, users, and constraints are stored.  | | 
+| server.jdbc.rca.driver | The PostgresSQL driver name for the RCA database. |`org.postgresql.Driver` | 
+| server.jdbc.rca.url | The full JDBC URL for connecting to the RCA database. |`jdbc:postgresql://{hostname}/ambarirca` | 
+| server.jdbc.rca.user.name | The user name for connecting to the database which stores RCA information. |`mapred` | 
+| server.jdbc.rca.user.passwd | The password for the user when connecting to the database which stores RCA information. |`mapred` | 
+| server.jdbc.user.name | The user name used to login to the database. |`ambari` | 
+| server.jdbc.user.passwd | The password for the user when logging into the database. |`bigdata` | 
+| server.metrics.retrieval-service.thread.priority | The priority of threads used by the service which retrieves JMX and REST metrics directly from their respective endpoints. |`5` | 
+| server.metrics.retrieval-service.threadpool.size.core | The core number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`16` | 
+| server.metrics.retrieval-service.threadpool.size.max | The maximum number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`32` | 
+| server.metrics.retrieval-service.threadpool.worker.size | The number of queued requests allowed for JMX and REST metrics before discarding old requests which have not been fullfilled. |`320` | 
+| server.operations.retry-attempts | The number of retry attempts for failed API and blueprint operations. |`0` | 
+| server.os_family | The operating system family for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.<br/><br/>The following are examples of valid values:<ul><li>`redhat`<li>`ubuntu`</ul> | | 
+| server.os_type | The operating system version for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.<br/><br/>The following are examples of valid values:<ul><li>`6`<li>`7`</ul> | | 
+| server.persistence.type | The type of database connection being used. Unless using an embedded PostgresSQL server, then this should be `remote`.<br/><br/>The following are examples of valid values:<ul><li>`local`<li>`remote`</ul> |`local` | 
+| server.property-provider.threadpool.completion.timeout | The maximum time, in milliseconds, that federated requests for data can execute before being terminated. Increasing this value could result in degraded performanc from the REST APIs. |`5000` | 
+| server.property-provider.threadpool.size.core | The core number of threads that will be used to retrieve data from federated datasources, such as remote JMX endpoints. |`16` | 
+| server.property-provider.threadpool.size.max | The maximum number of threads that will be used to retrieve data from federated datasources, such as remote JMX endpoints. |`32` | 
+| server.property-provider.threadpool.worker.size | The maximum size of pending federated datasource requests, such as those to JMX endpoints, which can be queued before rejecting new requests. |`2147483647` | 
+| server.script.timeout | The time, in milliseconds, until an external script is killed. |`5000` | 
+| server.stages.parallel | Determines whether operations in different execution requests can be run concurrently. |`true` | 
+| server.task.timeout | The time, in seconds, before a server-side operation is terminated. |`1200` | 
+| server.timeline.metrics.cache.catchup.interval | The time, in milliseconds, that Ambari Metrics intervals should use when extending the boundaries of the original request.<br/><br/> This property is related to `server.timeline.metrics.cache.disabled`. |`300000` | 
+| server.timeline.metrics.cache.connect.timeout.millis | The time, in milliseconds, to wait while attempting to connect to Ambari Metrics.<br/><br/> This property is related to `server.timeline.metrics.cache.disabled`. |`5000` | 
+| server.timeline.metrics.cache.disabled | Determines whether Ambari Metric data is cached. |`false` | 
+| server.timeline.metrics.cache.entry.idle.seconds | The time, in seconds, that Ambari Metric data can remain in the cache without being accessed.<br/><br/> This property is related to `server.timeline.metrics.cache.disabled`. |`1800` | 
+| server.timeline.metrics.cache.entry.ttl.seconds | The time, in seconds, that Ambari Metric timeline data is cached by Ambari Server.<br/><br/> This property is related to `server.timeline.metrics.cache.disabled`. |`3600` | 
+| server.timeline.metrics.cache.heap.percent | The amount of heap on the Ambari Server dedicated to the caching values from Ambari Metrics. Measured as part of the total heap of Ambari Server.<br/><br/> This property is related to `server.timeline.metrics.cache.disabled`. |`15%` | 
+| server.timeline.metrics.cache.interval.read.timeout.millis | The time, in milliseconds, that requests to update stale metric data will wait while reading from Ambari Metrics. This allows for greater control by allowing stale values to be returned instead of waiting for Ambari Metrics to always populate responses with the latest data.<br/><br/> This property is related to `server.timeline.metrics.cache.disabled`. |`10000` | 
+| server.timeline.metrics.cache.read.timeout.millis | The time, in milliseconds, that initial requests to populate metric data will wait while reading from Ambari Metrics.<br/><br/> This property is related to `server.timeline.metrics.cache.disabled`. |`10000` | 
+| server.timeline.metrics.cache.use.custom.sizing.engine | Determines if a custom engine should be used to increase performance of calculating the current size of the cache for Ambari Metric data.<br/><br/> This property is related to `server.timeline.metrics.cache.disabled`. |`true` | 
+| server.timeline.metrics.https.enabled | Determines whether to use to SSL to connect to Ambari Metrics when retrieving metric data. |`false` | 
+| server.tmp.dir | The location on the Ambari Server where temporary artifacts can be created. |`/var/lib/ambari-server/tmp` | 
+| server.version.file | The full path to the file which contains the Ambari Server version. This is used to ensure that there is not a version mismatch between Ambari Agents and Ambari Server.<br/><br/>The following are examples of valid values:<ul><li>`/var/lib/ambari-server/resources/version`</ul> | | 
+| server.version_definition.connect.timeout.millis | The time, in milliseconds, that requests to connect to a URL to retrieve Version Definition Files (VDF) will wait before being terminated. |`5000` | 
+| server.version_definition.read.timeout.millis | The time, in milliseconds, that requests to read from a connected URL to retrieve Version Definition Files (VDF) will wait before being terminated. |`5000` | 
+| shared.resources.dir | The location on the Ambari Server where resources are stored. This is exposed via HTTP in order for Ambari Agents to access them. |`/usr/lib/ambari-server/lib/ambari_commons/resources` | 
+| ssl.trustStore.password | The password to use when setting the `javax.net.ssl.trustStorePassword` property | | 
+| ssl.trustStore.path | The location of the truststore to use when setting the `javax.net.ssl.trustStore` property. | | 
+| ssl.trustStore.type | The type of truststore used by the `javax.net.ssl.trustStoreType` property. | | 
+| stack.upgrade.auto.retry.check.interval.secs | The amount of time to wait, in seconds, between checking for upgrade tasks to be retried. This value is only applicable if `stack.upgrade.auto.retry.timeout.mins` is positive.<br/><br/> This property is related to `stack.upgrade.auto.retry.timeout.mins`. |`20` | 
+| stack.upgrade.auto.retry.command.details.to.ignore | A comma-separate list of upgrade tasks details to skip when retrying failed commands automatically. |`"Execute HDFS Finalize"` | 
+| stack.upgrade.auto.retry.command.names.to.ignore | A comma-separate list of upgrade tasks names to skip when retrying failed commands automatically. |`"ComponentVersionCheckAction","FinalizeUpgradeAction"` | 
+| stack.upgrade.auto.retry.timeout.mins | The amount of time to wait in order to retry a command during a stack upgrade when an agent loses communication. This value must be greater than the `agent.task.timeout` value. |`0` | 
+| stack.upgrade.bypass.prechecks | Determines whether pre-upgrade checks will be skipped when performing a rolling or express stack upgrade. |`false` | 
+| stackadvisor.script | The location and name of the Python stack advisor script executed when configuring services. |`/var/lib/ambari-server/resources/scripts/stack_advisor.py` | 
+| task.query.parameterlist.size | The maximum number of tasks which can be queried by ID from the database. |`999` | 
+| view.extraction.threadpool.size.core | The number of threads used to extract Ambari Views when Ambari Server is starting up. |`10` | 
+| view.extraction.threadpool.size.max | The maximum number of threads used to extract Ambari Views when Ambari Server is starting up. |`20` | 
+| view.extraction.threadpool.timeout | The time, in milliseconds, that non-core threads will live when extraction views on Ambari Server startup. |`100000` | 
+| view.request.threadpool.size.max | The maximum number of threads which will be allocated to handling REST API requests from embedded views. This value should be smaller than `agent.threadpool.size.max`<br/><br/> This property is related to `agent.threadpool.size.max`. |`0` | 
+| view.request.threadpool.timeout | The time, milliseconds, that REST API requests from embedded views can wait if there are no threads available to service the view's request. Setting this too low can cause views to timeout. |`2000` | 
+| views.ambari.request.connect.timeout.millis | The amount of time, in milliseconds, that a view will wait when trying to connect on HTTP(S) operations to the Ambari REST API. |`30000` | 
+| views.ambari.request.read.timeout.millis | The amount of time, in milliseconds, that a view will wait before terminating an HTTP(S) read request to the Ambari REST API. |`45000` | 
+| views.dir | The directory on the Ambari Server file system used for expanding Views and storing webapp work. |`/var/lib/ambari-server/resources/views` | 
+| views.http.strict-transport-security | The value that will be used to set the `Strict-Transport-Security` HTTP response header for Ambari View requests. |`max-age=31536000` | 
+| views.http.x-frame-options | The value that will be used to set the `X-Frame-Options` HTTP response header for Ambari View requests. |`SAMEORIGIN` | 
+| views.http.x-xss-protection | The value that will be used to set the `X-XSS-Protection` HTTP response header for Ambari View requests. |`1; mode=block` | 
+| views.remove.undeployed | Determines whether remove undeployed views from the Ambari database. |`false` | 
+| views.request.connect.timeout.millis | The amount of time, in milliseconds, that a view will wait when trying to connect on HTTP(S) operations to a remote resource. |`5000` | 
+| views.request.read.timeout.millis | The amount of time, in milliseconds, that a view will wait before terminating an HTTP(S) read request. |`10000` | 
+| views.validate | Determines whether to validate a View's configuration XML file against an XSD. |`false` | 
+| webapp.dir | The Ambari Server webapp root directory. |`web` | 
+
+
+<a name="baseline-values"></a>
+## Baseline Values
+As the size of a cluster grows, some of the default property values may no longer be sufficient. The below tables offer recommendations on the values of some configuration properties based on the size and usage of the cluster.
+
+####Alerts & Notifications
+| Property Name | 10 Hosts | ~50 Hosts | ~100 Hosts | 500+ Hosts | 
+| --- | --- | --- | --- | --- |
+| alerts.execution.scheduler.maxThreads | 2 | 2 | 4 | 4 | 
+| alerts.cache.enabled | false | false | false | true | 
+| alerts.cache.flush.interval | 10 | 10 | 10 | 10 | 
+| alerts.cache.size | 50000 | 50000 | 100000 | 100000 | 
+####Jetty API & Agent Thread Pools
+| Property Name | 10 Hosts | ~50 Hosts | ~100 Hosts | 500+ Hosts | 
+| --- | --- | --- | --- | --- |
+| client.threadpool.size.max | 25 | 35 | 50 | 65 | 
+| agent.threadpool.size.max | 25 | 35 | 75 | 100 | 
+
+
+<a name="db-persistence"></a>
+## Database And Persistence
+In addition to the static database connection properties, it's possible to supply custom properties for both EclipseLink and the database driver through `ambari.properties`. 
+
+### Database Driver
+Using the `server.jdbc.properties.` prefix, it's possible to supply specific properties to the database driver being used by Ambari. These properties do not affect JPA or any of the persistence-unit operations. They are solely to govern the behavior of the database driver. 
+
+```
+server.jdbc.properties.lockTimeout=15000
+server.jdbc.properties.loginTimeout=15000
+```
+
+### Persistence Unit
+EclipseLink properties can also be configured using a prefix of `server.persistence.properties.`. The EclipseLink properties should be defined in their entirety with the prefix prepended in front of them.
+
+```
+server.persistence.properties.eclipselink.jdbc.batch-writing.size=25
+server.persistence.properties.eclipselink.profiler=QueryMonitor
+```
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/src/main/java/org/apache/ambari/annotations/Markdown.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/annotations/Markdown.java b/ambari-server/src/main/java/org/apache/ambari/annotations/Markdown.java
index 0f7748e..8bcfd0f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/annotations/Markdown.java
+++ b/ambari-server/src/main/java/org/apache/ambari/annotations/Markdown.java
@@ -17,20 +17,17 @@
  */
 package org.apache.ambari.annotations;
 
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
+import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
  * The {@link Markdown} annotation is used to add information when creating <a
  * href=https://en.wikipedia.org/wiki/Markdown>Markdown</a> content.
  */
-@Retention(RUNTIME)
-@Target({ TYPE, FIELD, METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
 public @interface Markdown {
   /**
    * A description to add for this element when generating Markdown.
@@ -38,4 +35,23 @@ public @interface Markdown {
    * @return
    */
   String description();
+
+  /**
+   * An optional list of example values.
+   *
+   * @return
+   */
+  String[] examples() default {};
+
+  /**
+   * A way of expressing a relationship.
+   */
+  String relatedTo() default "";
+
+  /**
+   * If {@code true}, indicates that the annotated content is for internal-use only.
+   *
+   * @return {@code true} for internal-only content.
+   */
+  boolean internal() default false;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
index d057f00..fa42e8a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
@@ -112,7 +112,7 @@ public class DatabaseConsistencyCheckHelper {
       metainfoDAO = injector.getInstance(MetainfoDAO.class);
     }
 
-    MetainfoEntity schemaVersionEntity = metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey());
+    MetainfoEntity schemaVersionEntity = metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY);
     String schemaVersion = null;
 
     if (schemaVersionEntity != null) {


[08/10] ambari git commit: AMBARI-18126 - Refactor Configuration To Allow For Generation Of Documentation (jonathanhurley)

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index a6d8d6a..46f6ce5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -19,16 +19,20 @@
 package org.apache.ambari.server.controller;
 
 
-import com.google.common.util.concurrent.ServiceManager;
-import com.google.gson.Gson;
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.Scopes;
-import com.google.inject.Singleton;
-import com.google.inject.name.Named;
-import com.google.inject.persist.Transactional;
-import com.sun.jersey.spi.container.servlet.ServletContainer;
+import java.io.File;
+import java.io.IOException;
+import java.net.Authenticator;
+import java.net.BindException;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.util.EnumSet;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.logging.LogManager;
+
+import javax.crypto.BadPaddingException;
+import javax.servlet.DispatcherType;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.StateRecoveryManager;
 import org.apache.ambari.server.StaticallyInject;
@@ -143,19 +147,16 @@ import org.springframework.web.context.request.RequestContextListener;
 import org.springframework.web.context.support.GenericWebApplicationContext;
 import org.springframework.web.filter.DelegatingFilterProxy;
 
-import javax.crypto.BadPaddingException;
-import javax.servlet.DispatcherType;
-import java.io.File;
-import java.io.IOException;
-import java.net.Authenticator;
-import java.net.BindException;
-import java.net.PasswordAuthentication;
-import java.net.URL;
-import java.util.EnumSet;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.LogManager;
+import com.google.common.util.concurrent.ServiceManager;
+import com.google.gson.Gson;
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Scopes;
+import com.google.inject.Singleton;
+import com.google.inject.name.Named;
+import com.google.inject.persist.Transactional;
+import com.sun.jersey.spi.container.servlet.ServletContainer;
 
 @Singleton
 public class AmbariServer {
@@ -414,21 +415,21 @@ public class AmbariServer {
         SslSelectChannelConnector sslConnectorTwoWay = new SslSelectChannelConnector(contextFactoryTwoWay);
         sslConnectorTwoWay.setPort(configs.getTwoWayAuthPort());
 
-        String keystore = configsMap.get(Configuration.SRVR_KSTR_DIR_KEY) + File.separator
-            + configsMap.get(Configuration.KSTR_NAME_KEY);
+        String keystore = configsMap.get(Configuration.SRVR_KSTR_DIR.getKey()) + File.separator
+            + configsMap.get(Configuration.KSTR_NAME.getKey());
 
-        String truststore = configsMap.get(Configuration.SRVR_KSTR_DIR_KEY) + File.separator
-            + configsMap.get(Configuration.TSTR_NAME_KEY);
+        String truststore = configsMap.get(Configuration.SRVR_KSTR_DIR.getKey()) + File.separator
+            + configsMap.get(Configuration.TSTR_NAME.getKey());
 
-        String srvrCrtPass = configsMap.get(Configuration.SRVR_CRT_PASS_KEY);
+        String srvrCrtPass = configsMap.get(Configuration.SRVR_CRT_PASS.getKey());
 
         sslConnectorTwoWay.setKeystore(keystore);
         sslConnectorTwoWay.setTruststore(truststore);
         sslConnectorTwoWay.setPassword(srvrCrtPass);
         sslConnectorTwoWay.setKeyPassword(srvrCrtPass);
         sslConnectorTwoWay.setTrustPassword(srvrCrtPass);
-        sslConnectorTwoWay.setKeystoreType(configsMap.get(Configuration.KSTR_TYPE_KEY));
-        sslConnectorTwoWay.setTruststoreType(configsMap.get(Configuration.TSTR_TYPE_KEY));
+        sslConnectorTwoWay.setKeystoreType(configsMap.get(Configuration.KSTR_TYPE.getKey()));
+        sslConnectorTwoWay.setTruststoreType(configsMap.get(Configuration.TSTR_TYPE.getKey()));
         sslConnectorTwoWay.setNeedClientAuth(configs.getTwoWaySsl());
         sslConnectorTwoWay.setRequestHeaderSize(configs.getHttpRequestHeaderSize());
         sslConnectorTwoWay.setResponseHeaderSize(configs.getHttpResponseHeaderSize());
@@ -440,8 +441,8 @@ public class AmbariServer {
         contextFactoryOneWay.setKeyStorePassword(srvrCrtPass);
         contextFactoryOneWay.setKeyManagerPassword(srvrCrtPass);
         contextFactoryOneWay.setTrustStorePassword(srvrCrtPass);
-        contextFactoryOneWay.setKeyStoreType(configsMap.get(Configuration.KSTR_TYPE_KEY));
-        contextFactoryOneWay.setTrustStoreType(configsMap.get(Configuration.TSTR_TYPE_KEY));
+        contextFactoryOneWay.setKeyStoreType(configsMap.get(Configuration.KSTR_TYPE.getKey()));
+        contextFactoryOneWay.setTrustStoreType(configsMap.get(Configuration.TSTR_TYPE.getKey()));
         contextFactoryOneWay.setNeedClientAuth(false);
         disableInsecureProtocols(contextFactoryOneWay);
 
@@ -536,13 +537,13 @@ public class AmbariServer {
       SelectChannelConnector apiConnector;
 
       if (configs.getApiSSLAuthentication()) {
-        String httpsKeystore = configsMap.get(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY) +
-            File.separator + configsMap.get(Configuration.CLIENT_API_SSL_KSTR_NAME_KEY);
-        String httpsTruststore = configsMap.get(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY) +
-            File.separator + configsMap.get(Configuration.CLIENT_API_SSL_TSTR_NAME_KEY);
+        String httpsKeystore = configsMap.get(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey()) +
+            File.separator + configsMap.get(Configuration.CLIENT_API_SSL_KSTR_NAME.getKey());
+        String httpsTruststore = configsMap.get(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey()) +
+            File.separator + configsMap.get(Configuration.CLIENT_API_SSL_TSTR_NAME.getKey());
         LOG.info("API SSL Authentication is turned on. Keystore - " + httpsKeystore);
 
-        String httpsCrtPass = configsMap.get(Configuration.CLIENT_API_SSL_CRT_PASS_KEY);
+        String httpsCrtPass = configsMap.get(Configuration.CLIENT_API_SSL_CRT_PASS.getKey());
 
         SslContextFactory contextFactoryApi = new SslContextFactory();
         disableInsecureProtocols(contextFactoryApi);
@@ -553,8 +554,8 @@ public class AmbariServer {
         sapiConnector.setPassword(httpsCrtPass);
         sapiConnector.setKeyPassword(httpsCrtPass);
         sapiConnector.setTrustPassword(httpsCrtPass);
-        sapiConnector.setKeystoreType(configsMap.get(Configuration.CLIENT_API_SSL_KSTR_TYPE_KEY));
-        sapiConnector.setTruststoreType(configsMap.get(Configuration.CLIENT_API_SSL_KSTR_TYPE_KEY));
+        sapiConnector.setKeystoreType(configsMap.get(Configuration.CLIENT_API_SSL_KSTR_TYPE.getKey()));
+        sapiConnector.setTruststoreType(configsMap.get(Configuration.CLIENT_API_SSL_KSTR_TYPE.getKey()));
         sapiConnector.setMaxIdleTime(configs.getConnectionMaxIdleTime());
         apiConnector = sapiConnector;
       } else  {
@@ -576,7 +577,7 @@ public class AmbariServer {
 
       String osType = getServerOsType();
       if (osType == null || osType.isEmpty()) {
-        throw new RuntimeException(Configuration.OS_VERSION_KEY + " is not "
+        throw new RuntimeException(Configuration.OS_VERSION.getKey() + " is not "
             + " set in the ambari.properties file");
       }
 
@@ -799,7 +800,7 @@ public class AmbariServer {
       users.createUser("user", "user");
 
       MetainfoEntity schemaVersion = new MetainfoEntity();
-      schemaVersion.setMetainfoName(Configuration.SERVER_VERSION_KEY);
+      schemaVersion.setMetainfoName(Configuration.SERVER_VERSION.getKey());
       schemaVersion.setMetainfoValue(VersionUtils.getVersionSubstring(ambariMetaInfo.getServerVersion()));
 
       metainfoDAO.create(schemaVersion);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
index 2bd7eff..256f0d1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
@@ -18,6 +18,21 @@
 
 package org.apache.ambari.server.controller;
 
+import static org.eclipse.persistence.config.PersistenceUnitProperties.CREATE_JDBC_DDL_FILE;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.CREATE_ONLY;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.CREATE_OR_EXTEND;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.DDL_BOTH_GENERATION;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.DDL_GENERATION;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.DDL_GENERATION_MODE;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.DROP_AND_CREATE;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.DROP_JDBC_DDL_FILE;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.JDBC_DRIVER;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.JDBC_PASSWORD;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.JDBC_URL;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.JDBC_USER;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.NON_JTA_DATASOURCE;
+import static org.eclipse.persistence.config.PersistenceUnitProperties.THROW_EXCEPTIONS;
+
 import java.beans.PropertyVetoException;
 import java.lang.annotation.Annotation;
 import java.security.SecureRandom;
@@ -142,21 +157,6 @@ import com.google.inject.persist.PersistModule;
 import com.google.inject.persist.jpa.AmbariJpaPersistModule;
 import com.mchange.v2.c3p0.ComboPooledDataSource;
 
-import static org.eclipse.persistence.config.PersistenceUnitProperties.CREATE_JDBC_DDL_FILE;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.CREATE_ONLY;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.CREATE_OR_EXTEND;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.DDL_BOTH_GENERATION;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.DDL_GENERATION;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.DDL_GENERATION_MODE;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.DROP_AND_CREATE;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.DROP_JDBC_DDL_FILE;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.JDBC_DRIVER;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.JDBC_PASSWORD;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.JDBC_URL;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.JDBC_USER;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.NON_JTA_DATASOURCE;
-import static org.eclipse.persistence.config.PersistenceUnitProperties.THROW_EXCEPTIONS;
-
 /**
  * Used for injection purposes.
  */
@@ -211,7 +211,7 @@ public class ControllerModule extends AbstractModule {
     switch (configuration.getPersistenceType()) {
       case IN_MEMORY:
         properties.setProperty(JDBC_URL, Configuration.JDBC_IN_MEMORY_URL);
-        properties.setProperty(JDBC_DRIVER, Configuration.JDBC_IN_MEMROY_DRIVER);
+        properties.setProperty(JDBC_DRIVER, Configuration.JDBC_IN_MEMORY_DRIVER);
         properties.setProperty(DDL_GENERATION, DROP_AND_CREATE);
         properties.setProperty(THROW_EXCEPTIONS, "true");
       case REMOTE:
@@ -220,7 +220,7 @@ public class ControllerModule extends AbstractModule {
         break;
       case LOCAL:
         properties.setProperty(JDBC_URL, configuration.getLocalDatabaseUrl());
-        properties.setProperty(JDBC_DRIVER, Configuration.JDBC_LOCAL_DRIVER);
+        properties.setProperty(JDBC_DRIVER, Configuration.SERVER_JDBC_DRIVER.getDefaultValue());
         break;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index 70b991a..f5d646a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -1999,7 +1999,7 @@ public class KerberosHelperImpl implements KerberosHelper {
    * @throws AmbariException if a new temporary directory cannot be created
    */
   private File createTemporaryDirectory() throws AmbariException {
-    String tempDirectoryPath = configuration.getProperty(Configuration.SERVER_TMP_DIR_KEY);
+    String tempDirectoryPath = configuration.getProperty(Configuration.SERVER_TMP_DIR.getKey());
 
     if ((tempDirectoryPath == null) || tempDirectoryPath.isEmpty()) {
       tempDirectoryPath = System.getProperty("java.io.tmpdir");

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
index c390c86..020a454 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
@@ -175,8 +175,8 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
 
     Configuration configs = new Configuration();
     Map<String, String> configMap = configs.getConfigsMap();
-    String TMP_PATH = configMap.get(Configuration.SERVER_TMP_DIR_KEY);
-    String pythonCmd = configMap.get(Configuration.AMBARI_PYTHON_WRAP_KEY);
+    String TMP_PATH = configMap.get(Configuration.SERVER_TMP_DIR.getKey());
+    String pythonCmd = configMap.get(Configuration.AMBARI_PYTHON_WRAP.getKey());
     AmbariManagementController managementController = getManagementController();
     ConfigHelper configHelper = managementController.getConfigHelper();
     Cluster cluster = null;
@@ -341,7 +341,7 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
       String userList = gson.toJson(userSet);
       hostLevelParams.put(USER_LIST, userList);
 
-      Set<String> groupSet = configHelper.getPropertyValuesWithPropertyType(stackId, PropertyType.GROUP, cluster, desiredClusterConfigs);      
+      Set<String> groupSet = configHelper.getPropertyValuesWithPropertyType(stackId, PropertyType.GROUP, cluster, desiredClusterConfigs);
       String groupList = gson.toJson(groupSet);
       hostLevelParams.put(GROUP_LIST, groupList);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
index d35fc1a..722e6f1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
@@ -269,7 +269,7 @@ public class DatabaseChecker {
       metainfoDAO = injector.getInstance(MetainfoDAO.class);
     }
 
-    MetainfoEntity schemaVersionEntity = metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY);
+    MetainfoEntity schemaVersionEntity = metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey());
     String schemaVersion = null;
 
     if (schemaVersionEntity != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceManager.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceManager.java b/ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceManager.java
index 9f4e708..950d1e1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceManager.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceManager.java
@@ -32,7 +32,7 @@ import com.google.inject.Singleton;
 @Singleton
 public class ResourceManager {
   private static Log LOG = LogFactory.getLog(ResourceManager.class);
-	
+
   @Inject Configuration configs;
   /**
   * Returns resource file.
@@ -40,7 +40,7 @@ public class ResourceManager {
   * @return resource file
   */
   public File getResource(String resourcePath) {
-    String resDir = configs.getConfigsMap().get(Configuration.RESOURCES_DIR_KEY);
+    String resDir = configs.getConfigsMap().get(Configuration.RESOURCES_DIR.getKey());
     String resourcePathIndep = resourcePath.replace("/", File.separator);
     File resourceFile = new File(resDir + File.separator + resourcePathIndep);
     if (LOG.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilter.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilter.java
index 10aa6ea..05c9ecb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilter.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilter.java
@@ -78,15 +78,15 @@ public abstract class AbstractSecurityHeaderFilter implements Filter {
   /**
    * The value for the Strict-Transport-Security HTTP response header.
    */
-  private String strictTransportSecurity = Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE_DEFAULT;
+  private String strictTransportSecurity = Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE.getDefaultValue();
   /**
    * The value for the X-Frame-Options HTTP response header.
    */
-  private String xFrameOptionsHeader = Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE_DEFAULT;
+  private String xFrameOptionsHeader = Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE.getDefaultValue();
   /**
    * The value for the X-XSS-Protection HTTP response header.
    */
-  private String xXSSProtectionHeader = Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE_DEFAULT;
+  private String xXSSProtectionHeader = Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE.getDefaultValue();
 
   @Override
   public void init(FilterConfig filterConfig) throws ServletException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/security/CertificateManager.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/CertificateManager.java b/ambari-server/src/main/java/org/apache/ambari/server/security/CertificateManager.java
index 9f70dc0..8d54acb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/CertificateManager.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/CertificateManager.java
@@ -17,8 +17,14 @@
  */
 package org.apache.ambari.server.security;
 
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+import java.text.MessageFormat;
+import java.util.Map;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.utils.HostUtils;
 import org.apache.ambari.server.utils.ShellCommandUtil;
@@ -27,13 +33,8 @@ import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-import java.text.MessageFormat;
-import java.util.Map;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
 
 /**
  * Ambari security.
@@ -82,8 +83,8 @@ public class CertificateManager {
   private boolean isCertExists() {
 
     Map<String, String> configsMap = configs.getConfigsMap();
-    String srvrKstrDir = configsMap.get(Configuration.SRVR_KSTR_DIR_KEY);
-    String srvrCrtName = configsMap.get(Configuration.SRVR_CRT_NAME_KEY);
+    String srvrKstrDir = configsMap.get(Configuration.SRVR_KSTR_DIR.getKey());
+    String srvrCrtName = configsMap.get(Configuration.SRVR_CRT_NAME.getKey());
     File certFile = new File(srvrKstrDir + File.separator + srvrCrtName);
     LOG.debug("srvrKstrDir = " + srvrKstrDir);
     LOG.debug("srvrCrtName = " + srvrCrtName);
@@ -138,12 +139,12 @@ public class CertificateManager {
     LOG.info("Generation of server certificate");
 
     Map<String, String> configsMap = configs.getConfigsMap();
-    String srvrKstrDir = configsMap.get(Configuration.SRVR_KSTR_DIR_KEY);
-    String srvrCrtName = configsMap.get(Configuration.SRVR_CRT_NAME_KEY);
-    String srvrCsrName = configsMap.get(Configuration.SRVR_CSR_NAME_KEY);;
-    String srvrKeyName = configsMap.get(Configuration.SRVR_KEY_NAME_KEY);
-    String kstrName = configsMap.get(Configuration.KSTR_NAME_KEY);
-    String srvrCrtPass = configsMap.get(Configuration.SRVR_CRT_PASS_KEY);
+    String srvrKstrDir = configsMap.get(Configuration.SRVR_KSTR_DIR.getKey());
+    String srvrCrtName = configsMap.get(Configuration.SRVR_CRT_NAME.getKey());
+    String srvrCsrName = configsMap.get(Configuration.SRVR_CSR_NAME.getKey());;
+    String srvrKeyName = configsMap.get(Configuration.SRVR_KEY_NAME.getKey());
+    String kstrName = configsMap.get(Configuration.KSTR_NAME.getKey());
+    String srvrCrtPass = configsMap.get(Configuration.SRVR_CRT_PASS.getKey());
 
     Object[] scriptArgs = {srvrCrtPass, srvrKstrDir, srvrKeyName,
         srvrCrtName, kstrName, srvrCsrName};
@@ -168,8 +169,8 @@ public class CertificateManager {
    */
   public String getServerCert() {
     Map<String, String> configsMap = configs.getConfigsMap();
-    File certFile = new File(configsMap.get(Configuration.SRVR_KSTR_DIR_KEY) +
-        File.separator + configsMap.get(Configuration.SRVR_CRT_NAME_KEY));
+    File certFile = new File(configsMap.get(Configuration.SRVR_KSTR_DIR.getKey()) +
+        File.separator + configsMap.get(Configuration.SRVR_CRT_NAME.getKey()));
     String srvrCrtContent = null;
     try {
       srvrCrtContent = FileUtils.readFileToString(certFile);
@@ -221,7 +222,7 @@ public class CertificateManager {
     LOG.info("Verifying passphrase");
 
     String passphraseSrvr = configs.getConfigsMap().get(Configuration.
-        PASSPHRASE_KEY).trim();
+        PASSPHRASE.getKey()).trim();
 
     if (!passphraseSrvr.equals(passphraseAgent.trim())) {
       LOG.warn("Incorrect passphrase from the agent");
@@ -231,10 +232,10 @@ public class CertificateManager {
     }
 
     Map<String, String> configsMap = configs.getConfigsMap();
-    String srvrKstrDir = configsMap.get(Configuration.SRVR_KSTR_DIR_KEY);
-    String srvrCrtPass = configsMap.get(Configuration.SRVR_CRT_PASS_KEY);
-    String srvrCrtName = configsMap.get(Configuration.SRVR_CRT_NAME_KEY);
-    String srvrKeyName = configsMap.get(Configuration.SRVR_KEY_NAME_KEY);
+    String srvrKstrDir = configsMap.get(Configuration.SRVR_KSTR_DIR.getKey());
+    String srvrCrtPass = configsMap.get(Configuration.SRVR_CRT_PASS.getKey());
+    String srvrCrtName = configsMap.get(Configuration.SRVR_CRT_NAME.getKey());
+    String srvrKeyName = configsMap.get(Configuration.SRVR_KEY_NAME.getKey());
     String agentCrtReqName = agentHostname + ".csr";
     String agentCrtName = agentHostname + ".crt";
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/security/encryption/MasterKeyServiceImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/encryption/MasterKeyServiceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/security/encryption/MasterKeyServiceImpl.java
index 6c52cf4..1dd0f85 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/encryption/MasterKeyServiceImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/encryption/MasterKeyServiceImpl.java
@@ -18,15 +18,6 @@
 
 package org.apache.ambari.server.security.encryption;
 
-import org.apache.ambari.server.AmbariException;
-import org.apache.ambari.server.configuration.Configuration;
-import org.apache.ambari.server.utils.AmbariPath;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.net.ntp.TimeStamp;
-
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
@@ -38,6 +29,15 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.utils.AmbariPath;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.net.ntp.TimeStamp;
+
 public class MasterKeyServiceImpl implements MasterKeyService {
   private static final Log LOG = LogFactory.getLog(MasterKeyServiceImpl.class);
   private static final String MASTER_PASSPHRASE = "masterpassphrase";
@@ -78,7 +78,7 @@ public class MasterKeyServiceImpl implements MasterKeyService {
    */
   public MasterKeyServiceImpl(String masterKey) {
     if (masterKey != null) {
-      this.master = masterKey.toCharArray();
+      master = masterKey.toCharArray();
     } else {
       throw new IllegalArgumentException("Master key cannot be null");
     }
@@ -90,17 +90,18 @@ public class MasterKeyServiceImpl implements MasterKeyService {
   public MasterKeyServiceImpl() {
     String key = readMasterKey();
     if (key != null) {
-      this.master = key.toCharArray();
+      master = key.toCharArray();
     }
   }
 
+  @Override
   public boolean isMasterKeyInitialized() {
-    return this.master != null;
+    return master != null;
   }
 
   @Override
   public char[] getMasterSecret() {
-    return this.master;
+    return master;
   }
 
   public static void main(String args[]) {
@@ -275,14 +276,14 @@ public class MasterKeyServiceImpl implements MasterKeyService {
     if (envVariables != null && !envVariables.isEmpty()) {
       key = envVariables.get(Configuration.MASTER_KEY_ENV_PROP);
       if (key == null || key.isEmpty()) {
-        String keyPath = envVariables.get(Configuration.MASTER_KEY_LOCATION);
+        String keyPath = envVariables.get(Configuration.MASTER_KEY_LOCATION.getKey());
         if (keyPath != null && !keyPath.isEmpty()) {
           File keyFile = new File(keyPath);
           if (keyFile.exists()) {
             try {
               initializeFromFile(keyFile);
-              if (this.master != null) {
-                key = new String(this.master);
+              if (master != null) {
+                key = new String(master);
               }
               FileUtils.deleteQuietly(keyFile);
             } catch (IOException e) {
@@ -306,7 +307,7 @@ public class MasterKeyServiceImpl implements MasterKeyService {
       LOG.info("Loading from persistent master: " + tag);
       String line = new String(Base64.decodeBase64(lines.get(1)));
       String[] parts = line.split("::");
-      this.master = new String(aes.decrypt(Base64.decodeBase64(parts[0]),
+      master = new String(aes.decrypt(Base64.decodeBase64(parts[0]),
           Base64.decodeBase64(parts[1]), Base64.decodeBase64(parts[2])),
           "UTF8").toCharArray();
     } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
index 6e8b2aa..a1b5a6e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
@@ -17,21 +17,20 @@
  */
 package org.apache.ambari.server.security.unsecured.rest;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 
 import org.apache.ambari.server.configuration.Configuration;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import com.google.inject.Inject;
 
-import java.util.HashMap;
-import java.util.Map;
-
 
 @Path("/connection_info")
 public class ConnectionInfo {
@@ -43,7 +42,7 @@ public class ConnectionInfo {
     @Inject
     public static void init(Configuration instance){
         conf = instance;
-        response.put(Configuration.SRVR_TWO_WAY_SSL_KEY,String.valueOf(conf.getTwoWaySsl()));
+        response.put(Configuration.SRVR_TWO_WAY_SSL.getKey(),String.valueOf(conf.getTwoWaySsl()));
     }
 
     @GET

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/state/services/RetryUpgradeActionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/services/RetryUpgradeActionService.java b/ambari-server/src/main/java/org/apache/ambari/server/state/services/RetryUpgradeActionService.java
index 7d81cc4..72b8ab7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/services/RetryUpgradeActionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/services/RetryUpgradeActionService.java
@@ -17,11 +17,15 @@
  */
 package org.apache.ambari.server.state.services;
 
-import com.google.common.util.concurrent.AbstractScheduledService;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.Provider;
-import com.google.inject.persist.Transactional;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.ambari.server.AmbariService;
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
 import org.apache.ambari.server.configuration.Configuration;
@@ -34,14 +38,11 @@ import org.apache.ambari.server.state.Clusters;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.TimeZone;
-import java.util.concurrent.TimeUnit;
+import com.google.common.util.concurrent.AbstractScheduledService;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Provider;
+import com.google.inject.persist.Transactional;
 
 /**
  * Monitors commands during Stack Upgrade that are in a HOLDING_* failed because they failed in order to retry them
@@ -90,10 +91,10 @@ public class RetryUpgradeActionService extends AbstractScheduledService {
 
 
   public RetryUpgradeActionService() {
-    this.m_fullDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+    m_fullDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     TimeZone tz = TimeZone.getTimeZone("UTC");
-    this.m_deltaDateFormat = new SimpleDateFormat("HH:mm:ss");
-    this.m_deltaDateFormat.setTimeZone(tz);
+    m_deltaDateFormat = new SimpleDateFormat("HH:mm:ss");
+    m_deltaDateFormat.setTimeZone(tz);
   }
 
   /**
@@ -113,26 +114,26 @@ public class RetryUpgradeActionService extends AbstractScheduledService {
    */
   @Override
   protected void startUp() throws Exception {
-    this.MAX_TIMEOUT_MINS = m_configuration.getStackUpgradeAutoRetryTimeoutMins();
-    this.MAX_TIMEOUT_MS = MAX_TIMEOUT_MINS * 60000L;
+    MAX_TIMEOUT_MINS = m_configuration.getStackUpgradeAutoRetryTimeoutMins();
+    MAX_TIMEOUT_MS = MAX_TIMEOUT_MINS * 60000L;
 
-    if (this.MAX_TIMEOUT_MINS < 1) {
+    if (MAX_TIMEOUT_MINS < 1) {
       LOG.info("Will not start service {} used to auto-retry failed actions during " +
           "Stack Upgrade since since the property {} is either invalid/missing or set to {}",
-          this.getClass().getSimpleName(), Configuration.STACK_UPGRADE_AUTO_RETRY_TIMEOUT_MINS_KEY, MAX_TIMEOUT_MINS);
+          this.getClass().getSimpleName(), Configuration.STACK_UPGRADE_AUTO_RETRY_TIMEOUT_MINS.getKey(), MAX_TIMEOUT_MINS);
       stopAsync();
     }
 
     // During Stack Upgrade, some tasks don't make since to auto-retry since they are either
     // running on the server, should only be ran multiple times with human intervention,
     // or are not going to succeed on repeat attempts because they involve DB queries and not necessarily down hosts.
-    this.CUSTOM_COMMAND_NAMES_TO_IGNORE = m_configuration.getStackUpgradeAutoRetryCustomCommandNamesToIgnore();
-    this.COMMAND_DETAILS_TO_IGNORE = m_configuration.getStackUpgradeAutoRetryCommandDetailsToIgnore();
+    CUSTOM_COMMAND_NAMES_TO_IGNORE = m_configuration.getStackUpgradeAutoRetryCustomCommandNamesToIgnore();
+    COMMAND_DETAILS_TO_IGNORE = m_configuration.getStackUpgradeAutoRetryCommandDetailsToIgnore();
   }
 
   public void setMaxTimeout(int mins) {
-    this.MAX_TIMEOUT_MINS = mins;
-    this.MAX_TIMEOUT_MS = MAX_TIMEOUT_MINS * 60000L;
+    MAX_TIMEOUT_MINS = mins;
+    MAX_TIMEOUT_MS = MAX_TIMEOUT_MINS * 60000L;
   }
 
   /**
@@ -212,8 +213,8 @@ public class RetryUpgradeActionService extends AbstractScheduledService {
           Long deltaMS = retryTimeWindow - now;
 
           if (deltaMS > 0) {
-            String originalStartTimeString = this.m_fullDateFormat.format(new Date(hrc.getOriginalStartTime()));
-            String deltaString = this.m_deltaDateFormat.format(new Date(deltaMS));
+            String originalStartTimeString = m_fullDateFormat.format(new Date(hrc.getOriginalStartTime()));
+            String deltaString = m_deltaDateFormat.format(new Date(deltaMS));
             LOG.info("Retrying task with id: {}, attempts: {}, original start time: {}, time til timeout: {}",
                 hrc.getTaskId(), hrc.getAttemptCount(), originalStartTimeString, deltaString);
             retryHostRoleCommand(hrc);
@@ -233,14 +234,14 @@ public class RetryUpgradeActionService extends AbstractScheduledService {
       // Important not to retry some steps during RU/EU like "Finalize Upgrade Pre-Check", "Execute HDFS Finalize", and "Save Cluster State".
       // These elements are expected to be in lowercase already
       if (null != hrc.getCustomCommandName()) {
-        for (String s : this.CUSTOM_COMMAND_NAMES_TO_IGNORE) {
+        for (String s : CUSTOM_COMMAND_NAMES_TO_IGNORE) {
           if (hrc.getCustomCommandName().toLowerCase().contains(s)){
             return false;
           }
         }
       }
       if (null != hrc.getCommandDetail()) {
-        for (String s : this.COMMAND_DETAILS_TO_IGNORE) {
+        for (String s : COMMAND_DETAILS_TO_IGNORE) {
           if (hrc.getCommandDetail().toLowerCase().contains(s)) {
             return false;
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
index 599696a..1300172 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
@@ -71,7 +71,7 @@ public class OsFamily {
    * @param properties list of properties
    */
     public OsFamily(Properties properties){
-      init(properties.getProperty(Configuration.SHARED_RESOURCES_DIR_KEY));
+      init(properties.getProperty(Configuration.SHARED_RESOURCES_DIR.getKey()));
     }
 
     private void init(String SharedResourcesPath){
@@ -127,7 +127,9 @@ public class OsFamily {
         JsonOsFamilyEntry fam = osMap.get(family);
         if (fam.getDistro().contains(pos.get(OS_DISTRO)) && fam.getVersions().contains(pos.get(OS_VERSION))){
           Set<String> data=new HashSet<String>();
-          for (String item: fam.getDistro()) data.add(item + pos.get(OS_VERSION));
+          for (String item: fam.getDistro()) {
+            data.add(item + pos.get(OS_VERSION));
+          }
             return Collections.unmodifiableSet(data);
         }
       }
@@ -176,7 +178,9 @@ public class OsFamily {
         JsonOsFamilyEntry fam = osMap.get(family);
         for (String version: fam.getVersions()){
           Set<String> data=new HashSet<String>();
-          for (String item: fam.getDistro()) data.add(item + version);
+          for (String item: fam.getDistro()) {
+            data.add(item + version);
+          }
           r.addAll(data);
         }
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
index 0e50f04..24d3527 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
@@ -18,17 +18,6 @@
 
 package org.apache.ambari.server.view;
 
-import org.apache.ambari.server.configuration.Configuration;
-import org.apache.ambari.server.controller.internal.URLStreamProvider;
-import org.apache.ambari.server.proxy.ProxyService;
-import org.apache.ambari.view.URLConnectionProvider;
-import org.apache.ambari.view.ViewContext;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.http.client.utils.URIBuilder;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.HttpURLConnection;
@@ -41,6 +30,17 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.internal.URLStreamProvider;
+import org.apache.ambari.server.proxy.ProxyService;
+import org.apache.ambari.view.URLConnectionProvider;
+import org.apache.ambari.view.ViewContext;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.http.client.utils.URIBuilder;
+
 /**
  * Wrapper around an internal URL stream provider.
  */
@@ -87,12 +87,12 @@ public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamPr
    * @return
    */
   private HostPortRestrictionHandler getHostPortRestrictionHandler() {
-    if (this.hostPortRestrictionHandler == null) {
+    if (hostPortRestrictionHandler == null) {
       HostPortRestrictionHandler hostPortRestrictionHandlerTmp =
-          new HostPortRestrictionHandler(this.viewContext.getAmbariProperty(Configuration.PROXY_ALLOWED_HOST_PORTS));
-      this.hostPortRestrictionHandler = hostPortRestrictionHandlerTmp;
+          new HostPortRestrictionHandler(viewContext.getAmbariProperty(Configuration.PROXY_ALLOWED_HOST_PORTS.getKey()));
+      hostPortRestrictionHandler = hostPortRestrictionHandlerTmp;
     }
-    return this.hostPortRestrictionHandler;
+    return hostPortRestrictionHandler;
   }
 
   // ----- URLStreamProvider -----------------------------------------------
@@ -245,10 +245,10 @@ public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamPr
    * @return
    */
   protected boolean isProxyCallAllowed(String spec) {
-    if (StringUtils.isNotBlank(spec) && this.getHostPortRestrictionHandler().proxyCallRestricted()) {
+    if (StringUtils.isNotBlank(spec) && getHostPortRestrictionHandler().proxyCallRestricted()) {
       try {
         URL url = new URL(spec);
-        return this.getHostPortRestrictionHandler().allowProxy(url.getHost(),
+        return getHostPortRestrictionHandler().allowProxy(url.getHost(),
                                                                Integer.toString(url.getPort() == -1
                                                                                     ? url.getDefaultPort()
                                                                                     : url.getPort()));
@@ -284,20 +284,20 @@ public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamPr
       LOG.debug("Checking host " + host + " port " + port + " against allowed list.");
       if (StringUtils.isNotBlank(host)) {
         String hostToCompare = host.trim().toLowerCase();
-        if (this.allowedHostPorts == null) {
+        if (allowedHostPorts == null) {
           initializeAllowedHostPorts();
         }
 
-        if (this.isProxyCallRestricted) {
-          if (this.allowedHostPorts.containsKey(hostToCompare)) {
-            if (this.allowedHostPorts.get(hostToCompare).contains("*")) {
+        if (isProxyCallRestricted) {
+          if (allowedHostPorts.containsKey(hostToCompare)) {
+            if (allowedHostPorts.get(hostToCompare).contains("*")) {
               return true;
             }
             String portToCompare = "";
             if (StringUtils.isNotBlank(port)) {
               portToCompare = port.trim();
             }
-            if (this.allowedHostPorts.get(hostToCompare).contains(portToCompare)) {
+            if (allowedHostPorts.get(hostToCompare).contains(portToCompare)) {
               return true;  // requested host port allowed
             }
             return false;
@@ -316,7 +316,7 @@ public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamPr
       Map<String, HashSet<String>> allowed = new HashMap<String, HashSet<String>>();
       if (StringUtils.isNotBlank(allowedHostPortsValue)) {
         String allowedStr = allowedHostPortsValue.toLowerCase();
-        if (!allowedStr.equals(Configuration.PROXY_ALLOWED_HOST_PORTS_DEFAULT)) {
+        if (!allowedStr.equals(Configuration.PROXY_ALLOWED_HOST_PORTS.getDefaultValue())) {
           proxyCallRestricted = true;
           String[] hostPorts = allowedStr.trim().split(",");
           for (String hostPortStr : hostPorts) {
@@ -337,8 +337,8 @@ public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamPr
           }
         }
       }
-      this.allowedHostPorts = allowed;
-      this.isProxyCallRestricted = proxyCallRestricted;
+      allowedHostPorts = allowed;
+      isProxyCallRestricted = proxyCallRestricted;
     }
 
     /**
@@ -346,10 +346,10 @@ public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamPr
      * @return
      */
     public Boolean proxyCallRestricted() {
-      if (this.allowedHostPorts == null) {
+      if (allowedHostPorts == null) {
         initializeAllowedHostPorts();
       }
-      return this.isProxyCallRestricted;
+      return isProxyCallRestricted;
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/annotations/TransactionalLockTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/annotations/TransactionalLockTest.java b/ambari-server/src/test/java/org/apache/ambari/annotations/TransactionalLockTest.java
index 2c4b445..d1f4fba 100644
--- a/ambari-server/src/test/java/org/apache/ambari/annotations/TransactionalLockTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/annotations/TransactionalLockTest.java
@@ -39,7 +39,7 @@ public class TransactionalLockTest {
   @Test
   public void testLockAreaEnabled() throws Exception {
     final Properties ambariProperties = new Properties();
-    ambariProperties.put(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED, "true");
+    ambariProperties.put(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED.getKey(), "true");
     Configuration configuration = new Configuration(ambariProperties);
 
     LockArea lockArea = LockArea.HRC_STATUS_CACHE;
@@ -54,7 +54,7 @@ public class TransactionalLockTest {
   @Test
   public void testLockAreaEnabledDisabled() throws Exception {
     final Properties ambariProperties = new Properties();
-    ambariProperties.put(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED, "false");
+    ambariProperties.put(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED.getKey(), "false");
     Configuration configuration = new Configuration(ambariProperties);
 
     LockArea lockArea = LockArea.HRC_STATUS_CACHE;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
index 9f12a94..2c39bda 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
@@ -727,7 +727,7 @@ public class TestActionScheduler {
     when(db.getStagesInProgress()).thenReturn(stages);
 
     Properties properties = new Properties();
-    properties.put(Configuration.PARALLEL_STAGE_EXECUTION_KEY, "true");
+    properties.put(Configuration.PARALLEL_STAGE_EXECUTION.getKey(), "true");
     Configuration conf = new Configuration(properties);
     ActionScheduler scheduler = new ActionScheduler(100, 50, db, aq, fsm, 3,
         new HostsMap((String) null),
@@ -1221,7 +1221,7 @@ public class TestActionScheduler {
     when(db.getStagesInProgress()).thenReturn(stages);
 
     Properties properties = new Properties();
-    properties.put(Configuration.PARALLEL_STAGE_EXECUTION_KEY, "false");
+    properties.put(Configuration.PARALLEL_STAGE_EXECUTION.getKey(), "false");
     Configuration conf = new Configuration(properties);
     ActionScheduler scheduler = spy(new ActionScheduler(100, 50, db, aq, fsm, 3,
             new HostsMap((String) null),
@@ -1296,7 +1296,7 @@ public class TestActionScheduler {
     when(db.getStagesInProgress()).thenReturn(stages);
 
     Properties properties = new Properties();
-    properties.put(Configuration.PARALLEL_STAGE_EXECUTION_KEY, "true");
+    properties.put(Configuration.PARALLEL_STAGE_EXECUTION.getKey(), "true");
     Configuration conf = new Configuration(properties);
     ActionScheduler scheduler = spy(new ActionScheduler(100, 50, db, aq, fsm, 3,
         new HostsMap((String) null),

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
index 525595a..aa7ef20 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
@@ -519,11 +519,11 @@ public class TestHeartbeatHandler {
     RegistrationResponse rr = handler.handleRegistration(reg);
     Map<String, String> config = rr.getAgentConfig();
     assertFalse(config.isEmpty());
-    assertTrue(config.containsKey(Configuration.CHECK_REMOTE_MOUNTS_KEY));
-    assertTrue("false".equals(config.get(Configuration.CHECK_REMOTE_MOUNTS_KEY)));
-    assertTrue(config.containsKey(Configuration.CHECK_MOUNTS_TIMEOUT_KEY));
-    assertTrue("0".equals(config.get(Configuration.CHECK_MOUNTS_TIMEOUT_KEY)));
-    assertTrue("true".equals(config.get(Configuration.ENABLE_AUTO_AGENT_CACHE_UPDATE_KEY)));
+    assertTrue(config.containsKey(Configuration.CHECK_REMOTE_MOUNTS.getKey()));
+    assertTrue("false".equals(config.get(Configuration.CHECK_REMOTE_MOUNTS.getKey())));
+    assertTrue(config.containsKey(Configuration.CHECK_MOUNTS_TIMEOUT.getKey()));
+    assertTrue("0".equals(config.get(Configuration.CHECK_MOUNTS_TIMEOUT.getKey())));
+    assertTrue("true".equals(config.get(Configuration.ENABLE_AUTO_AGENT_CACHE_UPDATE.getKey())));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/api/rest/KdcServerConnectionVerificationTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/rest/KdcServerConnectionVerificationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/rest/KdcServerConnectionVerificationTest.java
index 18a4c0a..551209c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/rest/KdcServerConnectionVerificationTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/rest/KdcServerConnectionVerificationTest.java
@@ -56,7 +56,7 @@ public class KdcServerConnectionVerificationTest  {
   @Before
   public void before() throws Exception {
     Properties configProps = new Properties();
-    configProps.setProperty(Configuration.KDC_PORT_KEY, Integer.toString(KDC_TEST_PORT));
+    configProps.setProperty(Configuration.KDC_PORT.getKey(), Integer.toString(KDC_TEST_PORT));
     configuration = new Configuration(configProps);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
index 538fa48..0f8ed9c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
@@ -18,8 +18,6 @@
 
 package org.apache.ambari.server.api.services;
 
-import javax.persistence.EntityManager;
-import junit.framework.Assert;
 import static org.easymock.EasyMock.createNiceMock;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.replay;
@@ -45,6 +43,8 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.UUID;
 
+import javax.persistence.EntityManager;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.StackAccessException;
 import org.apache.ambari.server.configuration.Configuration;
@@ -104,6 +104,8 @@ import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.util.Modules;
 
+import junit.framework.Assert;
+
 public class AmbariMetaInfoTest {
 
   private static final String STACK_NAME_HDP = "HDP";
@@ -927,9 +929,9 @@ public class AmbariMetaInfoTest {
     }
 
     Properties properties = new Properties();
-    properties.setProperty(Configuration.METADATA_DIR_PATH, stacks.getPath());
-    properties.setProperty(Configuration.COMMON_SERVICES_DIR_PATH, commonServicesRoot.getPath());
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, version.getPath());
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), stacks.getPath());
+    properties.setProperty(Configuration.COMMON_SERVICES_DIR_PATH.getKey(), commonServicesRoot.getPath());
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), version.getPath());
     Configuration configuration = new Configuration(properties);
 
     TestAmbariMetaInfo ambariMetaInfo = new TestAmbariMetaInfo(configuration);
@@ -2004,8 +2006,8 @@ public class AmbariMetaInfoTest {
     File versionFile) throws Exception {
 
     Properties properties = new Properties();
-    properties.setProperty(Configuration.METADATA_DIR_PATH, stackRoot.getPath());
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, versionFile.getPath());
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), stackRoot.getPath());
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), versionFile.getPath());
     Configuration configuration = new Configuration(properties);
 
     TestAmbariMetaInfo metaInfo = new TestAmbariMetaInfo(configuration);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/api/services/KerberosServiceMetaInfoTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/KerberosServiceMetaInfoTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/KerberosServiceMetaInfoTest.java
index befd594..4137ffb 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/KerberosServiceMetaInfoTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/KerberosServiceMetaInfoTest.java
@@ -32,8 +32,6 @@ import java.util.Properties;
 
 import javax.persistence.EntityManager;
 
-import junit.framework.Assert;
-
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.events.publishers.AmbariEventPublisher;
@@ -60,6 +58,8 @@ import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.util.Modules;
 
+import junit.framework.Assert;
+
 public class KerberosServiceMetaInfoTest {
   private final static Logger LOG = LoggerFactory.getLogger(KerberosServiceMetaInfoTest.class);
   private ServiceInfo serviceInfo = null;
@@ -198,9 +198,9 @@ public class KerberosServiceMetaInfoTest {
 
   private TestAmbariMetaInfo createAmbariMetaInfo(File stackRoot, File commonServicesRoot, File versionFile, boolean replayMocks) throws Exception {
     Properties properties = new Properties();
-    properties.setProperty(Configuration.METADATA_DIR_PATH, stackRoot.getPath());
-    properties.setProperty(Configuration.COMMON_SERVICES_DIR_PATH, commonServicesRoot.getPath());
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, versionFile.getPath());
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), stackRoot.getPath());
+    properties.setProperty(Configuration.COMMON_SERVICES_DIR_PATH.getKey(), commonServicesRoot.getPath());
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), versionFile.getPath());
     Configuration configuration = new Configuration(properties);
 
     TestAmbariMetaInfo metaInfo = new TestAmbariMetaInfo(configuration);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java b/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
index e4a385f..3299b63 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
@@ -18,8 +18,12 @@
 
 package org.apache.ambari.server.bootstrap;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.bootstrap.BootStrapStatus.BSStat;
 import org.apache.ambari.server.configuration.Configuration;
@@ -31,11 +35,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
+import junit.framework.Assert;
+import junit.framework.TestCase;
 
 /**
  * Test BootStrap Implementation.
@@ -44,11 +45,13 @@ public class BootStrapTest extends TestCase {
   private static Log LOG = LogFactory.getLog(BootStrapTest.class);
   public TemporaryFolder temp = new TemporaryFolder();
 
+  @Override
   @Before
   public void setUp() throws IOException {
     temp.create();
   }
 
+  @Override
   @After
   public void tearDown() throws IOException {
     temp.delete();
@@ -69,12 +72,12 @@ public class BootStrapTest extends TestCase {
       sharedResourcesDir = ClassLoader.getSystemClassLoader().getResource("").getPath();
     }
 
-    properties.setProperty(Configuration.BOOTSTRAP_DIR, bootdir);
-    properties.setProperty(Configuration.BOOTSTRAP_SCRIPT, prepareEchoCommand(bootdir));
-    properties.setProperty(Configuration.SRVR_KSTR_DIR_KEY, "target" + File.separator + "classes");
-    properties.setProperty(Configuration.METADATA_DIR_PATH, metadetadir);
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, serverVersionFilePath);
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, sharedResourcesDir);
+    properties.setProperty(Configuration.BOOTSTRAP_DIRECTORY.getKey(), bootdir);
+    properties.setProperty(Configuration.BOOTSTRAP_SCRIPT.getKey(), prepareEchoCommand(bootdir));
+    properties.setProperty(Configuration.SRVR_KSTR_DIR.getKey(), "target" + File.separator + "classes");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), metadetadir);
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), serverVersionFilePath);
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), sharedResourcesDir);
 
     Configuration conf = new Configuration(properties);
     AmbariMetaInfo ambariMetaInfo = new AmbariMetaInfo(conf);
@@ -146,12 +149,12 @@ public class BootStrapTest extends TestCase {
       serverKSTRDir = new File(new File(ClassLoader.getSystemClassLoader().getResource("").getPath()).getParent(), "classes").getPath();
     }
 
-    properties.setProperty(Configuration.BOOTSTRAP_DIR, bootdir);
-    properties.setProperty(Configuration.BOOTSTRAP_SCRIPT, prepareEchoCommand(bootdir));
-    properties.setProperty(Configuration.SRVR_KSTR_DIR_KEY, serverKSTRDir);
-    properties.setProperty(Configuration.METADATA_DIR_PATH, metadetadir);
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, serverVersionFilePath);
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, sharedResourcesDir);
+    properties.setProperty(Configuration.BOOTSTRAP_DIRECTORY.getKey(), bootdir);
+    properties.setProperty(Configuration.BOOTSTRAP_SCRIPT.getKey(), prepareEchoCommand(bootdir));
+    properties.setProperty(Configuration.SRVR_KSTR_DIR.getKey(), serverKSTRDir);
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), metadetadir);
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), serverVersionFilePath);
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), sharedResourcesDir);
     Configuration conf = new Configuration(properties);
     AmbariMetaInfo ambariMetaInfo = new AmbariMetaInfo(conf);
     BootStrapImpl impl = new BootStrapImpl(conf, ambariMetaInfo);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/checks/UpgradeCheckOrderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/checks/UpgradeCheckOrderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/checks/UpgradeCheckOrderTest.java
index 687d263..cb03613 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/checks/UpgradeCheckOrderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/checks/UpgradeCheckOrderTest.java
@@ -50,9 +50,9 @@ public class UpgradeCheckOrderTest {
     String sourceResourceDirectory = "src" + File.separator + "test" + File.separator + "resources";
 
     Properties properties = new Properties();
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-    properties.setProperty(Configuration.OS_VERSION_KEY, "centos6");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, sourceResourceDirectory);
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+    properties.setProperty(Configuration.OS_VERSION.getKey(), "centos6");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), sourceResourceDirectory);
 
     Injector injector = Guice.createInjector(new ControllerModule(properties), new AuditLoggerModule());
     UpgradeCheckRegistry registry = injector.getInstance(UpgradeCheckRegistry.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/cleanup/CleanupServiceFunctionalTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/cleanup/CleanupServiceFunctionalTest.java b/ambari-server/src/test/java/org/apache/ambari/server/cleanup/CleanupServiceFunctionalTest.java
index 33018bc..e04871d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/cleanup/CleanupServiceFunctionalTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/cleanup/CleanupServiceFunctionalTest.java
@@ -109,7 +109,7 @@ public class CleanupServiceFunctionalTest {
     properties.put("server.jdbc.user.name", "ambari");
     //properties.put("server.jdbc.user.passwd", "bigdata");
     properties.put("server.jdbc.url", "jdbc:postgresql://192.168.59.103:5432/ambari");
-    properties.put(Configuration.SHARED_RESOURCES_DIR_KEY, "/Users/lpuskas/prj/ambari/ambari-server/src/test/resources");
+    properties.put(Configuration.SHARED_RESOURCES_DIR.getKey(), "/Users/lpuskas/prj/ambari/ambari-server/src/test/resources");
 
     return properties;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/configuration/ComponentSSLConfigurationTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ComponentSSLConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ComponentSSLConfigurationTest.java
index 92a7ef5..ba08b70 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ComponentSSLConfigurationTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ComponentSSLConfigurationTest.java
@@ -31,10 +31,11 @@ public class ComponentSSLConfigurationTest {
   public static ComponentSSLConfiguration getConfiguration(String path,
       String pass, String type, boolean isSslEnabled) {
     Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PATH_KEY, path);
-    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD_KEY, pass);
-    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_TYPE_KEY, type);
-    ambariProperties.setProperty(Configuration.AMRABI_METRICS_HTTPS_ENABLED_KEY, Boolean.toString(isSslEnabled));
+    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PATH.getKey(), path);
+    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD.getKey(), pass);
+    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_TYPE.getKey(), type);
+    ambariProperties.setProperty(Configuration.AMBARI_METRICS_HTTPS_ENABLED.getKey(),
+        Boolean.toString(isSslEnabled));
 
     Configuration configuration =  new TestConfiguration(ambariProperties);
 


[03/10] ambari git commit: AMBARI-18089 - Create Documentation Around All Options In ambari.properties (jonathanhurley)

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 9c27e57..8ab9091 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -22,20 +22,23 @@ import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 import java.lang.reflect.Field;
 import java.security.cert.CertificateException;
 import java.security.interfaces.RSAPublicKey;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.EnumSet;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Set;
-import java.util.TreeSet;
+import java.util.SortedMap;
+import java.util.TreeMap;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
@@ -44,10 +47,13 @@ import org.apache.ambari.annotations.Experimental;
 import org.apache.ambari.annotations.ExperimentalFeature;
 import org.apache.ambari.annotations.Markdown;
 import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.actionmanager.HostRoleCommand;
 import org.apache.ambari.server.actionmanager.Stage;
+import org.apache.ambari.server.controller.spi.PropertyProvider;
 import org.apache.ambari.server.events.listeners.alerts.AlertReceivedListener;
 import org.apache.ambari.server.orm.JPATableGenerationStrategy;
 import org.apache.ambari.server.orm.PersistenceType;
+import org.apache.ambari.server.orm.dao.HostRoleCommandStatusSummaryDTO;
 import org.apache.ambari.server.orm.entities.StageEntity;
 import org.apache.ambari.server.security.ClientSecurityType;
 import org.apache.ambari.server.security.authorization.LdapServerProperties;
@@ -55,17 +61,27 @@ import org.apache.ambari.server.security.authorization.jwt.JwtAuthenticationProp
 import org.apache.ambari.server.security.encryption.CertificateUtils;
 import org.apache.ambari.server.security.encryption.CredentialProvider;
 import org.apache.ambari.server.state.services.MetricsRetrievalService;
+import org.apache.ambari.server.state.services.RetryUpgradeActionService;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.apache.ambari.server.utils.AmbariPath;
+import org.apache.ambari.server.utils.DateUtils;
+import org.apache.ambari.server.utils.HostUtils;
 import org.apache.ambari.server.utils.Parallel;
 import org.apache.ambari.server.utils.ShellCommandUtil;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.DefaultParser;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.Options;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.math.NumberUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.Sets;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
@@ -74,12 +90,50 @@ import com.google.inject.Singleton;
 
 
 /**
- * Ambari configuration.
- * Reads properties from ambari.properties
+ * The {@link Configuration} class is used to read from the
+ * {{ambari.properties}} file and manage/expose the configuration properties.
+ * Each property is wrapped in a {@link ConfigurationProperty} type, allowing
+ * the coupling of the key, default value, and type.
+ * <p/>
+ * The {@link Configuration#main(String[])} method can be invoked to produce <a
+ * href=https://en.wikipedia.org/wiki/Markdown>Markdown</a> of all of the
+ * properties, along with their default values and descriptions. This should be
+ * done for every release so that the documentation of the configuration
+ * properties can be kept current. The {@code index_template.md} file is used to generate
+ * the markdown.
  */
 @Singleton
 public class Configuration {
 
+  /**
+   * The file to generate the complete Markdown documentation.
+   */
+  private static final String MARKDOWN_TEMPLATE_FILE = "index_template.md";
+
+  /**
+   * The key to replace with the content of all of the properties.
+   */
+  private static final String MARKDOWN_CONFIGURATION_TABLE_KEY = "$configuration-properties";
+
+  /**
+   * The key to replace with the content of recomended baseline values.
+   */
+  private static final String MARKDOWN_BASELINE_VALUES_KEY = "$baseline-values";
+
+  /**
+   * The template to use when appending a related property in the description.
+   */
+  private static final String MARKDOWN_RELATED_TO_TEMPLATE = " This property is related to `%s`.";
+
+  /**
+   * The HTML {@code <br/>} tag.
+   */
+  private static final String HTML_BREAK_TAG = "<br/>";
+
+  /**
+   * Used to determine which repository validation strings should be used
+   * depending on the OS.
+   */
   @Inject
   private OsFamily osFamily;
 
@@ -102,84 +156,109 @@ public class Configuration {
   public static final float JDK_MIN_VERSION = 1.7f;
 
   /**
-   *
+   * The default regex pattern to use when replacing the member attribute ID
+   * value with a placeholder, such as {@code ${member}}. This is used in cases
+   * where a UID of an LDAP member is not a full CN or unique ID.
    */
   private static final String LDAP_SYNC_MEMBER_REPLACE_PATTERN_DEFAULT = "";
 
   /**
+   * The default LDAP filter to use when syncing user or group members. This
+   * default filter can include a {@code {member}} placeholder which allows
+   * substitution of a direct ID. For example:
    *
+   * <pre>
+   * (&(objectclass=posixaccount)(dn={member})) -> (&(objectclass=posixaccount)(dn=cn=mycn,dc=apache,dc=org))
+   * </pre>
    */
   private static final String LDAP_SYNC_MEMBER_FILTER_DEFAULT = "";
 
   /**
-   *
+   * The prefix for any configuration property which will be appended to
+   * {@code eclipselink.jdbc.property.} before being passed into EclipseLink.
+   * These properties are driver-specific properties only and do not affect
+   * EclipseLink.
    */
   public static final String SERVER_JDBC_PROPERTIES_PREFIX = "server.jdbc.properties.";
 
   /**
-   *
+   * A prefix for any EclipseLink-specifc properties which are passed into
+   * EclipseLink to alter its behavior. For example:
+   * {@code server.persistence.properties.eclipselink.jdbc.batch-writing.size=25 ->
+   * eclipselink.jdbc.batch-writing.size=25}
    */
   public static final String SERVER_PERSISTENCE_PROPERTIES_PREFIX = "server.persistence.properties.";
 
   /**
-   *
+   * A replacement string to use for the RCA JDBC URLs in order to supply the
+   * Ambari Server hostname.
    */
   public static final String HOSTNAME_MACRO = "{hostname}";
 
   /**
-   *
+   * The name of the persistence unit in {@code persistence.xml} for the Ambari
+   * Server.
    */
   public static final String JDBC_UNIT_NAME = "ambari-server";
 
   /**
-   *
+   * The JDBC URL to use for local {@link DatabaseType#POSTGRES} connections.
    */
   public static final String JDBC_LOCAL_URL = "jdbc:postgresql://localhost/";
 
   /**
-   *
+   * The schema to use when creating a {@link DatabaseType#DERBY} database for
+   * unit tests.
    */
   public static final String DEFAULT_DERBY_SCHEMA = "ambari";
 
   /**
-   *
+   * The JDBC URL to use when creating a {@link DatabaseType#DERBY} database for
+   * unit tests.
    */
   public static final String JDBC_IN_MEMORY_URL = String.format(
       "jdbc:derby:memory:myDB/%s;create=true", DEFAULT_DERBY_SCHEMA);
 
   /**
-   *
+   * The Derby driver to use when creating a {@link DatabaseType#DERBY} database
+   * for unit tests.
    */
   public static final String JDBC_IN_MEMORY_DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
 
   /**
-   *
+   * The JSSE property which governs the location of the keystore file
+   * containing the collection of CA certificates trusted by Ambari.
    */
   public static final String JAVAX_SSL_TRUSTSTORE = "javax.net.ssl.trustStore";
 
   /**
-   *
+   * The JSSE property which governs password to the keystore file containing
+   * the collection of CA certificates trusted by Ambari.
    */
   public static final String JAVAX_SSL_TRUSTSTORE_PASSWORD = "javax.net.ssl.trustStorePassword";
 
   /**
-   *
+   * The JSSE property which governs the type of the keystore file containing
+   * the collection of CA certificates trusted by Ambari.
    */
   public static final String JAVAX_SSL_TRUSTSTORE_TYPE = "javax.net.ssl.trustStoreType";
 
   /**
-   *
+   * The configuration tag used for "global" properties affecting the entire
+   * cluster or the Ambari server itself.
    */
+  @Deprecated
   public static final String GLOBAL_CONFIG_TAG = "global";
 
   /**
-   *
+   * The configuration tag for {@code mapreduce2-log4j}
    */
   public static final String MAPREDUCE2_LOG4J_CONFIG_TAG = "mapreduce2-log4j";
 
   /**
-   *
+   * The configuration property for determining whether RCA is enabled.
    */
+  @Deprecated
   public static final String RCA_ENABLED_PROPERTY = "rca_enabled";
 
   /**
@@ -197,581 +276,717 @@ public class Configuration {
       * Runtime.getRuntime().availableProcessors();
 
   /**
-   *
+   * A set of all of the custom database connector JAR property names.
    */
-  private static final Set<String> dbConnectorPropertyNames = new HashSet<String>(Arrays.asList(
+  private static final Set<String> dbConnectorPropertyNames = Sets.newHashSet(
       "custom.mysql.jdbc.name", "custom.oracle.jdbc.name", "custom.postgres.jdbc.name",
-      "custom.mssql.jdbc.name", "custom.hsqldb.jdbc.name", "custom.sqlanywhere.jdbc.name"));
-
+      "custom.mssql.jdbc.name", "custom.hsqldb.jdbc.name", "custom.sqlanywhere.jdbc.name");
 
   /**
-   *
+   * An environment property which can be used to specify the location of the
+   * Ambari key services's master key.
    */
   public static final String MASTER_KEY_ENV_PROP = "AMBARI_SECURITY_MASTER_KEY";
 
   /**
-   *
+   * The default name of the master key file.
    */
   public static final String MASTER_KEY_FILENAME_DEFAULT = "master";
 
   /**
-   *
+   * The default name of the JSSE keystore file used by Ambari.
    */
   public static final String MASTER_KEYSTORE_FILENAME_DEFAULT = "credentials.jceks";
 
   /**
-   * The directory on the ambari-server file system used for storing
-   * ambari-agent bootstrap information.
+   * The key in the {@code metainfo} table that represents the version of Ambari
+   * that the database is running.
+   */
+  public static final String SERVER_VERSION_KEY = "version";
+
+  /**
+   * The directory on the Ambari Server file system used for storing
+   * Ambari Agent bootstrap information such as request responses.
    */
+  @Markdown(description = "The directory on the Ambari Server file system used for storing Ambari Agent bootstrap information such as request responses.")
   public static final ConfigurationProperty<String> BOOTSTRAP_DIRECTORY = new ConfigurationProperty<>(
       "bootstrap.dir", AmbariPath.getPath("/var/run/ambari-server/bootstrap"));
 
   /**
-   * The directory on the ambari-server file system used for expanding Views and
+   * The directory on the Ambari Server file system used for expanding Views and
    * storing webapp work.
    */
+  @Markdown(description = "The directory on the Ambari Server file system used for expanding Views and storing webapp work.")
   public static final ConfigurationProperty<String> VIEWS_DIRECTORY = new ConfigurationProperty<>(
       "views.dir", AmbariPath.getPath("/var/lib/ambari-server/resources/views"));
 
   /**
-   *
+   * Determines whether to validate a View's configuration XML file against an XSD.
    */
+  @Markdown(description = "Determines whether to validate a View's configuration XML file against an XSD.")
   public static final ConfigurationProperty<String> VIEWS_VALIDATE = new ConfigurationProperty<>(
       "views.validate", "false");
 
   /**
-   *
+   * Determines whether remove undeployed views from the Ambari database.
    */
+  @Markdown(description = "Determines whether remove undeployed views from the Ambari database.")
   public static final ConfigurationProperty<String> VIEWS_REMOVE_UNDEPLOYED = new ConfigurationProperty<>(
       "views.remove.undeployed", "false");
 
   /**
-   *
+   * The Ambari Server webapp root directory.
    */
+  @Markdown(description = "The Ambari Server webapp root directory.")
   public static final ConfigurationProperty<String> WEBAPP_DIRECTORY = new ConfigurationProperty<>(
       "webapp.dir", "web");
 
   /**
-   *
+   * The location and name of the Python script used to bootstrap new Ambari Agent hosts.
    */
+  @Markdown(description = "The location and name of the Python script used to bootstrap new Ambari Agent hosts.")
   public static final ConfigurationProperty<String> BOOTSTRAP_SCRIPT = new ConfigurationProperty<>(
-      "bootstrap.script", AmbariPath.getPath("/usr/bin/ambari_bootstrap"));
+      "bootstrap.script", AmbariPath.getPath("/usr/lib/python2.6/site-packages/ambari_server/bootstrap.py"));
 
   /**
-   *
+   * The location and name of the Python script executed on the Ambari Agent
+   * host during the bootstrap process.
    */
+  @Markdown(description = "The location and name of the Python script executed on the Ambari Agent host during the bootstrap process.")
   public static final ConfigurationProperty<String> BOOTSTRAP_SETUP_AGENT_SCRIPT = new ConfigurationProperty<>(
       "bootstrap.setup_agent.script",
       AmbariPath.getPath("/usr/lib/python2.6/site-packages/ambari_server/setupAgent.py"));
 
   /**
-   *
+   * The password to set on the {@code AMBARI_PASSPHRASE} environment variable
+   * before invoking the bootstrap script.
    */
+  @Markdown(description = "The password to set on the `AMBARI_PASSPHRASE` environment variable before invoking the bootstrap script.")
   public static final ConfigurationProperty<String> BOOTSTRAP_SETUP_AGENT_PASSWORD = new ConfigurationProperty<>(
       "bootstrap.setup_agent.password", "password");
 
   /**
-   *
+   * The host name of the Ambari Server which will be used by the Ambari Agents
+   * for communication.
    */
+  @Markdown(description = "The host name of the Ambari Server which will be used by the Ambari Agents for communication.")
   public static final ConfigurationProperty<String> BOOTSTRAP_MASTER_HOSTNAME = new ConfigurationProperty<>(
       "bootstrap.master_host_name", null);
 
   /**
+   * The amount of time that recommendation API data is kept on the Ambari
+   * Server file system. This is specified using a {@code hdwmy} syntax for
+   * pairing the value with a time unit.
    *
+   * @see DateUtils#getDateSpecifiedTimeAgo(String)
    */
+  @Markdown(
+      description = "The amount of time that Recommendation API data is kept on the Ambari Server file system. This is specified using a `hdwmy` syntax for pairing the value with a time unit (hours, days, weeks, months, years)",
+      examples = { "8h", "2w", "1m" } )
   public static final ConfigurationProperty<String> RECOMMENDATIONS_ARTIFACTS_LIFETIME = new ConfigurationProperty<>(
       "recommendations.artifacts.lifetime", "1w");
 
   /**
-   *
+   * The directory on the Ambari Server file system used for storing
+   * Recommendation API artifacts.
    */
+  @Markdown(description = "The directory on the Ambari Server file system used for storing Recommendation API artifacts.")
   public static final ConfigurationProperty<String> RECOMMENDATIONS_DIR = new ConfigurationProperty<>(
       "recommendations.dir", AmbariPath.getPath("/var/run/ambari-server/stack-recommendations"));
 
   /**
-   *
+   * The location and name of the Python stack advisor script executed when
+   * configuring services.
    */
+  @Markdown(description = "The location and name of the Python stack advisor script executed when configuring services.")
   public static final ConfigurationProperty<String> STACK_ADVISOR_SCRIPT = new ConfigurationProperty<>(
       "stackadvisor.script",
       AmbariPath.getPath("/var/lib/ambari-server/resources/scripts/stack_advisor.py"));
 
   /**
-   *
+   * The name of the shell script used to wrap all invocations of Python by Ambari.
    */
+  @Markdown(description = "The name of the shell script used to wrap all invocations of Python by Ambari. ")
   public static final ConfigurationProperty<String> AMBARI_PYTHON_WRAP = new ConfigurationProperty<>(
       "ambari.python.wrap", "ambari-python-wrap");
 
   /**
-   *
+   * The username of the default user assumed to be executing API calls. When
+   * set, authentication is not required in order to login to Ambari or use the
+   * REST APIs.
    */
+  @Markdown(description = "The username of the default user assumed to be executing API calls. When set, authentication is not required in order to login to Ambari or use the REST APIs.  ")
   public static final ConfigurationProperty<String> API_AUTHENTICATED_USER = new ConfigurationProperty<>(
       "api.authenticated.user", null);
 
   /**
-   *
+   * Determines whether SSL is used in for secure connections to Ambari.
    */
+  @Markdown(description = "Determines whether SSL is used in for secure connections to Ambari. When enabled, ambari-server setup-https must be run in order to properly configure keystores.")
   public static final ConfigurationProperty<String> API_USE_SSL = new ConfigurationProperty<>(
       "api.ssl", "false");
 
   /**
-   *
+   * Determines whether
+   * {@code org.apache.ambari.server.api.AmbariCsrfProtectionFilter} is used to
+   * intercept requests and inspect the headers for an {@code X-Requested-By}
+   * value. This helps to prevent Cross-Site Request Forgery attacks.
    */
+  @Markdown(description = "Determines whether Cross-Site Request Forgery attacks are prevented by looking for the `X-Requested-By` header.")
   public static final ConfigurationProperty<String> API_CSRF_PREVENTION = new ConfigurationProperty<>(
       "api.csrfPrevention.enabled", "true");
 
   /**
-   *
+   * Determines whether HTTP body data is compressed with GZIP.
    */
+  @Markdown(description = "Determines whether data sent to and from the Ambari service should be compressed.")
   public static final ConfigurationProperty<String> API_GZIP_COMPRESSION_ENABLED = new ConfigurationProperty<>(
       "api.gzip.compression.enabled", "true");
 
   /**
-   *
+   * Used in conjunction with {@link #API_GZIP_COMPRESSION_ENABLED}, determines
+   * the mininum size (in bytes) that an HTTP request must be before it should be
+   * compressed.
    */
+  @Markdown(description = "Used in conjunction with `api.gzip.compression.enabled`, determines the mininum size that an HTTP request must be before it should be compressed. This is measured in bytes.")
   public static final ConfigurationProperty<String> API_GZIP_MIN_COMPRESSION_SIZE = new ConfigurationProperty<>(
       "api.gzip.compression.min.size", "10240");
 
   /**
-   *
+   * Determiens whether communication with the Ambari Agents should have the
+   * JSON payloads compressed with GZIP.
    */
+  @Markdown(description = "Determiens whether communication with the Ambari Agents should have the JSON payloads compressed with GZIP.")
   public static final ConfigurationProperty<String> AGENT_API_GZIP_COMPRESSION_ENABLED = new ConfigurationProperty<>(
       "agent.api.gzip.compression.enabled", "true");
 
   /**
-   *
+   * Determines whether SSL is used to communicate between Ambari Server and Ambari Agents.
    */
+  @Markdown(description = "Determines whether SSL is used to communicate between Ambari Server and Ambari Agents.")
   public static final ConfigurationProperty<String> AGENT_USE_SSL = new ConfigurationProperty<>(
       "agent.ssl", "true");
 
   /**
-   *
+   * Determines whether the Ambari Agent host names should be validated against
+   * a regular expression to ensure that they are well-formed.
    */
+  @Markdown(description = "Determines whether the Ambari Agent host names should be validated against a regular expression to ensure that they are well-formed.")
   public static final ConfigurationProperty<String> SRVR_AGENT_HOSTNAME_VALIDATE = new ConfigurationProperty<>(
       "security.agent.hostname.validate", "true");
 
   /**
+   * Determines whether two-way SSL should be used between Ambari Server and
+   * Ambari Agents so that the agents must also use SSL.
    *
+   * @see HostUtils#isValidHostname(String)
    */
+  @Markdown(description = "Determines whether two-way SSL should be used between Ambari Server and Ambari Agents so that the agents must also use SSL.")
   public static final ConfigurationProperty<String> SRVR_TWO_WAY_SSL = new ConfigurationProperty<>(
       "security.server.two_way_ssl", "false");
 
   /**
-   *
+   * The port that the Ambari Server will use to communicate with the agents over SSL.
    */
+  @Markdown(description = "The port that the Ambari Server will use to communicate with the agents over SSL.")
   public static final ConfigurationProperty<String> SRVR_TWO_WAY_SSL_PORT = new ConfigurationProperty<>(
       "security.server.two_way_ssl.port", "8441");
 
   /**
-   *
+   * The port that the Ambari Agents will use to communicate with the Ambari Server over SSL.
    */
+  @Markdown(description = "The port that the Ambari Agents will use to communicate with the Ambari Server over SSL.")
   public static final ConfigurationProperty<String> SRVR_ONE_WAY_SSL_PORT = new ConfigurationProperty<>(
       "security.server.one_way_ssl.port", "8440");
 
   /**
-   *
+   * The directory on the Ambari Server where keystores are kept.
    */
+  @Markdown(description = "The directory on the Ambari Server where keystores are kept.")
   public static final ConfigurationProperty<String> SRVR_KSTR_DIR = new ConfigurationProperty<>(
       "security.server.keys_dir", ".");
 
   /**
-   *
+   * The name of the file that certificates are written to when using {@code openssl ca}.
    */
+  @Markdown(description = "The name of the file located in the `security.server.keys_dir` directory where certificates will be generated when Ambari uses the `openssl ca` command.")
   public static final ConfigurationProperty<String> SRVR_CRT_NAME = new ConfigurationProperty<>(
       "security.server.cert_name", "ca.crt");
 
   /**
-   *
+   * The name of the certificate request file used when generating certificates.
    */
+  @Markdown(description = "The name of the certificate request file used when generating certificates.")
   public static final ConfigurationProperty<String> SRVR_CSR_NAME = new ConfigurationProperty<>(
       "security.server.csr_name", "ca.csr");
 
   /**
-   *
+   * The name of the private key used to sign requests.
    */
+  @Markdown(description = "The name of the private key used to sign requests.")
   public static final ConfigurationProperty<String> SRVR_KEY_NAME = new ConfigurationProperty<>(
       "security.server.key_name", "ca.key");
 
   /**
-   *
+   * The name of the keystore file, located in {@link SRVR_KSTR_DIR}.
    */
+  @Markdown(description = "The name of the keystore file, located in `security.server.keys_dir`")
   public static final ConfigurationProperty<String> KSTR_NAME = new ConfigurationProperty<>(
       "security.server.keystore_name", "keystore.p12");
 
   /**
-   * By default self-signed certificates are used and we can use keystore as
-   * truststore in PKCS12 format When CA signed certificates are used truststore
-   * should be created in JKS format (truststore.jks)
+   * The type of the keystore file specified in {@link #KSTR_NAME}. By default
+   * self-signed certificates are used and we can use keystore as truststore in
+   * PKCS12 format. When CA signed certificates are used truststore should be
+   * created in JKS format (truststore.jks)
    */
+  @Markdown(description = "The type of the keystore file specified in `security.server.key_name`. Self-signed certificates can be `PKCS12` while CA signed certificates are `JKS`")
   public static final ConfigurationProperty<String> KSTR_TYPE = new ConfigurationProperty<>(
       "security.server.keystore_type", "PKCS12");
 
   /**
-   *
+   * The name of the truststore file ambari uses to store trusted certificates.
+   * Located in {@link SRVR_KSTR_DIR}.
    */
+  @Markdown(description = "The name of the truststore file ambari uses to store trusted certificates. Located in `security.server.keys_dir`")
   public static final ConfigurationProperty<String> TSTR_NAME = new ConfigurationProperty<>(
       "security.server.truststore_name", "keystore.p12");
 
   /**
-   * By default self-signed certificates are used and we can use keystore as
-   * truststore in PKCS12 format When CA signed certificates are used truststore
-   * should be created in JKS format (truststore.jks)
+   * The type of the truststore file specified in {@link #TSTR_NAME}. By default
+   * self-signed certificates are used and we can use keystore as truststore in
+   * PKCS12 format. When CA signed certificates are used truststore should be
+   * created in JKS format (truststore.jks)
    */
+  @Markdown(description = "The type of the truststore file specified in `security.server.truststore_name`. Self-signed certificates can be `PKCS12` while CA signed certificates are `JKS`")
   public static final ConfigurationProperty<String> TSTR_TYPE = new ConfigurationProperty<>(
       "security.server.truststore_type", "PKCS12");
 
   /**
-   *
+   * The filename which contains the password for the keystores, truststores, and certificates.
    */
+  @Markdown(description = "The filename which contains the password for the keystores, truststores, and certificates.")
   public static final ConfigurationProperty<String> SRVR_CRT_PASS_FILE = new ConfigurationProperty<>(
       "security.server.crt_pass_file", "pass.txt");
 
   /**
-   *
+   * The password for the keystores, truststores, and certificates. If not specified, then {@link #SRVR_CRT_PASS_FILE} should be used.
    */
+  @Markdown(description = "The password for the keystores, truststores, and certificates. If not specified, then `security.server.crt_pass_file` should be used")
   public static final ConfigurationProperty<String> SRVR_CRT_PASS = new ConfigurationProperty<>(
       "security.server.crt_pass", null);
 
   /**
-   *
+   * The length of the randomly generated password for keystores and truststores.
    */
+  @Markdown(description = "The length of the randomly generated password for keystores and truststores. ")
   public static final ConfigurationProperty<String> SRVR_CRT_PASS_LEN = new ConfigurationProperty<>(
       "security.server.crt_pass.len", "50");
 
   /**
-   *
+   * An environment variable which can be used to supply the Ambari Server
+   * password when bootstrapping new Ambari Agents.
    */
+  @Markdown(description = "An environment variable which can be used to supply the Ambari Server password when bootstrapping new Ambari Agents.")
   public static final ConfigurationProperty<String> PASSPHRASE_ENV = new ConfigurationProperty<>(
       "security.server.passphrase_env_var", "AMBARI_PASSPHRASE");
 
   /**
-   *
+   * The password to the Ambari Server to supply to new Ambari Agent hosts being
+   * bootstrapped.
    */
+  @Markdown(description = "The password to the Ambari Server to supply to new Ambari Agent hosts being bootstrapped.")
   public static final ConfigurationProperty<String> PASSPHRASE = new ConfigurationProperty<>(
       "security.server.passphrase", "AMBARI_PASSPHRASE");
 
   /**
-   *
+   * A list of cipher suites which are not strong enough to use and will be excluded when creating SSL connections.
    */
+  @Markdown(
+      description = "A list of cipher suites which are not strong enough to use and will be excluded when creating SSL connections.",
+      examples = {"SSL_RSA_WITH_RC4_128_MD5\\|SSL_RSA_WITH_RC4_12\u200c\u200b8_MD5"})
   public static final ConfigurationProperty<String> SRVR_DISABLED_CIPHERS = new ConfigurationProperty<>(
       "security.server.disabled.ciphers", "");
 
   /**
-   *
+   * The list of protocols which should not be used when creating SSL connections.
    */
+  @Markdown(
+      description = "The list of protocols which should not be used when creating SSL connections.",
+      examples = { "TLSv1.1\\|TLSv1.2" })
   public static final ConfigurationProperty<String> SRVR_DISABLED_PROTOCOLS = new ConfigurationProperty<>(
       "security.server.disabled.protocols", "");
 
   /**
-   *
+   * The location on the Ambari Server where all resources exist, including common services, stacks, and scripts.
    */
+  @Markdown(description = "The location on the Ambari Server where all resources exist, including common services, stacks, and scripts.")
   public static final ConfigurationProperty<String> RESOURCES_DIR = new ConfigurationProperty<>(
       "resources.dir", AmbariPath.getPath("/var/lib/ambari-server/resources/"));
 
   /**
-   *
+   * The location on the Ambari Server where the stack resources exist.
    */
+  @Markdown(
+      description = "The location on the Ambari Server where the stack resources exist.",
+      examples = { "/var/lib/ambari-server/resources/stacks" })
   public static final ConfigurationProperty<String> METADATA_DIR_PATH = new ConfigurationProperty<>(
       "metadata.path", null);
 
   /**
-   *
+   * The location on the Ambari Server where common service resources exist.
+   * Stack services share the common service files.
    */
+  @Markdown(
+      description = "The location on the Ambari Server where common service resources exist. Stack services share the common service files.",
+      examples = { "/var/lib/ambari-server/resources/common-services" })
   public static final ConfigurationProperty<String> COMMON_SERVICES_DIR_PATH = new ConfigurationProperty<>(
       "common.services.path", null);
 
   /**
-   *
+   * The location on the Ambari Server where stack extensions exist.
    */
+  @Markdown(
+      description = "The location on the Ambari Server where stack extensions exist.",
+      examples = { "/var/lib/ambari-server/resources/extensions" })
   public static final ConfigurationProperty<String> EXTENSIONS_DIR_PATH = new ConfigurationProperty<>(
       "extensions.path", null);
 
   /**
-   *
+   * The Ambari Management Pack staging directory on the Ambari Server.
    */
+  @Markdown(
+      description = "The Ambari Management Pack staging directory on the Ambari Server.",
+      examples = { "/var/lib/ambari-server/resources/mpacks" })
   public static final ConfigurationProperty<String> MPACKS_STAGING_DIR_PATH = new ConfigurationProperty<>(
       "mpacks.staging.path", null);
 
   /**
-   *
+   * The full path to the file which contains the Ambari Server version.
    */
+  @Markdown(
+      description = "The full path to the file which contains the Ambari Server version. This is used to ensure that there is not a version mismatch between Ambari Agents and Ambari Server.",
+      examples = { "/var/lib/ambari-server/resources/version" })
   public static final ConfigurationProperty<String> SERVER_VERSION_FILE = new ConfigurationProperty<>(
       "server.version.file", null);
 
   /**
-   *
-   */
-  public static final ConfigurationProperty<String> SERVER_VERSION = new ConfigurationProperty<>(
-      "version", null);
-
-  /**
-   *
+   * The location of the JDK on the Ambari Agent hosts.
    */
+  @Markdown(
+      description = "The location of the JDK on the Ambari Agent hosts.",
+      examples = { "/usr/jdk64/jdk1.7.0_45" })
   public static final ConfigurationProperty<String> JAVA_HOME = new ConfigurationProperty<>(
       "java.home", null);
 
   /**
-   *
+   * The name of the JDK installation binary.
    */
+  @Markdown(
+      description = "The name of the JDK installation binary.",
+      examples = { "jdk-7u45-linux-x64.tar.gz" })
   public static final ConfigurationProperty<String> JDK_NAME = new ConfigurationProperty<>(
       "jdk.name", null);
 
   /**
-   *
+   * The name of the JCE policy ZIP file.
    */
+  @Markdown(
+      description = "The name of the JCE policy ZIP file. ",
+      examples = {"UnlimitedJCEPolicyJDK7.zip"})
   public static final ConfigurationProperty<String> JCE_NAME = new ConfigurationProperty<>(
       "jce.name", null);
 
   /**
+   * The type of authentication mechanism used by Ambari.
    *
+   * @see ClientSecurityType
    */
+  @Markdown(
+      examples = { "local", "ldap" },
+      description = "The type of authentication mechanism used by Ambari.")
   public static final ConfigurationProperty<String> CLIENT_SECURITY = new ConfigurationProperty<>(
       "client.security", null);
 
   /**
-   *
+   * The port that client connections will use with the REST API.
    */
+  @Markdown(description = "The port that client connections will use with the REST API. The Ambari Web client runs on this port.")
   public static final ConfigurationProperty<String> CLIENT_API_PORT = new ConfigurationProperty<>(
       "client.api.port", "8080");
 
   /**
-   *
+   * The port that client connections will use with the REST API when using SSL.
    */
+  @Markdown(description = "The port that client connections will use with the REST API when using SSL. The Ambari Web client runs on this port if SSL is enabled.")
   public static final ConfigurationProperty<String> CLIENT_API_SSL_PORT = new ConfigurationProperty<>(
       "client.api.ssl.port", "8443");
 
   /**
-   *
+   * The location on the Ambari server where the REST API keystore and password files are stored if using SSL.
    */
+  @Markdown(description = "The location on the Ambari server where the REST API keystore and password files are stored if using SSL.")
   public static final ConfigurationProperty<String> CLIENT_API_SSL_KSTR_DIR_NAME = new ConfigurationProperty<>(
       "client.api.ssl.keys_dir", null);
 
   /**
-   *
+   * The name of the keystore used when the Ambari Server REST API is protected by SSL.
    */
+  @Markdown(description = "The name of the keystore used when the Ambari Server REST API is protected by SSL.")
   public static final ConfigurationProperty<String> CLIENT_API_SSL_KSTR_NAME = new ConfigurationProperty<>(
       "client.api.ssl.keystore_name", "https.keystore.p12");
 
   /**
-   * By default self-signed certificates are used and we can use keystore as
-   * truststore in PKCS12 format When CA signed certificates are used truststore
-   * should be created in JKS format (truststore.jks)
+   * The type of the keystore file specified in {@link #CLIENT_API_SSL_KSTR_NAME}. By default
+   * self-signed certificates are used and we can use keystore as truststore in
+   * PKCS12 format. When CA signed certificates are used truststore should be
+   * created in JKS format (truststore.jks)
    */
+  @Markdown(description = "The type of the keystore file specified in `client.api.ssl.keystore_name`. Self-signed certificates can be `PKCS12` while CA signed certificates are `JKS`")
   public static final ConfigurationProperty<String> CLIENT_API_SSL_KSTR_TYPE = new ConfigurationProperty<>(
       "client.api.ssl.keystore_type", "PKCS12");
 
   /**
-   *
+   * The name of the truststore used when the Ambari Server REST API is protected by SSL.
    */
+  @Markdown(description = "The name of the truststore used when the Ambari Server REST API is protected by SSL.")
   public static final ConfigurationProperty<String> CLIENT_API_SSL_TSTR_NAME = new ConfigurationProperty<>(
       "client.api.ssl.truststore_name", "https.keystore.p12");
 
   /**
-   * By default self-signed certificates are used and we can use keystore as
-   * truststore in PKCS12 format When CA signed certificates are used truststore
-   * should be created in JKS format (truststore.jks)
+   * The type of the keystore file specified in {@link #CLIENT_API_SSL_KSTR_NAME}. By default
+   * self-signed certificates are used and we can use keystore as truststore in
+   * PKCS12 format. When CA signed certificates are used truststore should be
+   * created in JKS format (truststore.jks)
    */
+  @Markdown(description = "The type of the keystore file specified in `client.api.ssl.truststore_name`. Self-signed certificates can be `PKCS12` while CA signed certificates are `JKS`")
   public static final ConfigurationProperty<String> CLIENT_API_SSL_TSTR_TYPE = new ConfigurationProperty<>(
       "client.api.ssl.truststore_type", "PKCS12");
 
   /**
-   *
-   */
-  public static final ConfigurationProperty<String> CLIENT_API_SSL_CRT_NAME = new ConfigurationProperty<>(
-      "client.api.ssl.cert_name", "https.crt");
-
-  /**
-   *
+   * The filename which contains the password for the keystores, truststores,
+   * and certificates for the REST API when it's protected by SSL.
    */
+  @Markdown(description = "The filename which contains the password for the keystores, truststores, and certificates for the REST API when it's protected by SSL.")
   public static final ConfigurationProperty<String> CLIENT_API_SSL_CRT_PASS_FILE_NAME = new ConfigurationProperty<>(
       "client.api.ssl.cert_pass_file", "https.pass.txt");
 
   /**
-   *
+   * The password for the keystores, truststores, and certificates for the REST
+   * API when it's protected by SSL. If not specified, then
+   * {@link #SRVR_CRT_PASS_FILE} should be used.
    */
+  @Markdown(description = "The password for the keystores, truststores, and certificates for the REST API when it's protected by SSL. If not specified, then `client.api.ssl.cert_pass_file` should be used.")
   public static final ConfigurationProperty<String> CLIENT_API_SSL_CRT_PASS = new ConfigurationProperty<>(
       "client.api.ssl.crt_pass", null);
 
   /**
-   *
-   */
-  public static final ConfigurationProperty<String> CLIENT_API_SSL_KEY_NAME = new ConfigurationProperty<>(
-      "client.api.ssl.key_name", "https.key");
-
-  /**
-   *
+   * Determines whether the agents will automatically attempt to download updates to stack resources from the Ambari Server.
    */
+  @Markdown(description = "Determines whether the agents will automatically attempt to download updates to stack resources from the Ambari Server.")
   public static final ConfigurationProperty<String> ENABLE_AUTO_AGENT_CACHE_UPDATE = new ConfigurationProperty<>(
       "agent.auto.cache.update", "true");
 
   /**
-   *
+   * Determines whether the Ambari Agents will use the {@code df} or {@code df -l} command when checking disk mounts for capacity issues.
    */
+  @Markdown(description = "Determines whether the Ambari Agents will use the `df` or `df -l` command when checking disk mounts for capacity issues. Auto-mounted remote directories can cause long delays.")
   public static final ConfigurationProperty<String> CHECK_REMOTE_MOUNTS = new ConfigurationProperty<>(
       "agent.check.remote.mounts", "false");
 
   /**
-   *
+   * The timeout, used by the {@code timeout} command in linux, when checking mounts for free capacity.
    */
+  @Markdown(description = "The timeout, used by the `timeout` command in linux, when checking mounts for free capacity.")
   public static final ConfigurationProperty<String> CHECK_MOUNTS_TIMEOUT = new ConfigurationProperty<>(
       "agent.check.mounts.timeout", "0");
 
   /**
-   *
+   * The name of the database.
    */
+  @Markdown(description = "The name of the database.")
   public static final ConfigurationProperty<String> SERVER_DB_NAME = new ConfigurationProperty<>(
       "server.jdbc.database_name", "ambari");
 
   /**
-   *
+   * The amount of time, in {@link TimeUnit#MILLISECONDS}, that views will wait
+   * before timing out on HTTP(S) read operations.
    */
+  @Markdown(description = "The amount of time, in milliseconds, that a view will wait before terminating an HTTP(S) read request.")
   public static final ConfigurationProperty<String> REQUEST_READ_TIMEOUT = new ConfigurationProperty<>(
       "views.request.read.timeout.millis", "10000");
 
   /**
-   *
+   * The amount of time, in {@link TimeUnit#MILLISECONDS}, that views will wait
+   * when trying to connect on HTTP(S) operations to a remote resource.
    */
+  @Markdown(description = "The amount of time, in milliseconds, that a view will wait when trying to connect on HTTP(S) operations to a remote resource.")
   public static final ConfigurationProperty<String> REQUEST_CONNECT_TIMEOUT = new ConfigurationProperty<>(
       "views.request.connect.timeout.millis", "5000");
 
   /**
-   *
+   * The amount of time, in {@link TimeUnit#MILLISECONDS}, that views will wait
+   * before timing out on HTTP(S) read operations to the Ambari REST API.
    */
+  @Markdown(description = "The amount of time, in milliseconds, that a view will wait before terminating an HTTP(S) read request to the Ambari REST API.")
   public static final ConfigurationProperty<String> AMBARI_REQUEST_READ_TIMEOUT = new ConfigurationProperty<>(
       "views.ambari.request.read.timeout.millis", "45000");
 
   /**
-   *
+   * The amount of time, in {@link TimeUnit#MILLISECONDS}, that views will wait
+   * when trying to connect on HTTP(S) operations to a remote resource.
    */
+  @Markdown(description = "The amount of time, in milliseconds, that a view will wait when trying to connect on HTTP(S) operations to the Ambari REST API.")
   public static final ConfigurationProperty<String> AMBARI_REQUEST_CONNECT_TIMEOUT = new ConfigurationProperty<>(
       "views.ambari.request.connect.timeout.millis", "30000");
 
   /**
-   *
+   * The schema within a named PostgreSQL database where Ambari's tables, users,
+   * and constraints are stored.
    */
+  @Markdown(description = "The schema within a named PostgreSQL database where Ambari's tables, users, and constraints are stored. ")
   public static final ConfigurationProperty<String> SERVER_JDBC_POSTGRES_SCHEMA_NAME = new ConfigurationProperty<>(
       "server.jdbc.postgres.schema", "");
 
   /**
-   *
+   * The name of the Oracle JDBC JAR connector.
    */
+  @Markdown(description = "The name of the Oracle JDBC JAR connector.")
   public static final ConfigurationProperty<String> OJDBC_JAR_NAME = new ConfigurationProperty<>(
       "db.oracle.jdbc.name", "ojdbc6.jar");
 
   /**
-   *
+   * The name of the MySQL JDBC JAR connector.
    */
+  @Markdown(description = "The name of the MySQL JDBC JAR connector.")
   public static final ConfigurationProperty<String> MYSQL_JAR_NAME = new ConfigurationProperty<>(
       "db.mysql.jdbc.name", "mysql-connector-java.jar");
 
   /**
    * For development purposes only, should be changed to 'false'
    */
+  @Markdown(description = "An internal property used for unit testing and development purposes.")
   public static final ConfigurationProperty<String> IS_LDAP_CONFIGURED = new ConfigurationProperty<>(
       "ambari.ldap.isConfigured", "false");
 
   /**
-   *
+   * Determines whether to use LDAP over SSL (LDAPS).
    */
+  @Markdown(description = "Determines whether to use LDAP over SSL (LDAPS).")
   public static final ConfigurationProperty<String> LDAP_USE_SSL = new ConfigurationProperty<>(
       "authentication.ldap.useSSL", "false");
 
   /**
    * The default value is used for embedded purposes only.
    */
+  @Markdown(description = "The LDAP URL used for connecting to an LDAP server when authenticating users. This should include both the host name and port.")
   public static final ConfigurationProperty<String> LDAP_PRIMARY_URL = new ConfigurationProperty<>(
       "authentication.ldap.primaryUrl", "localhost:33389");
 
   /**
-   *
+   * A second LDAP URL to use as a backup when authenticating users.
    */
+  @Markdown(description = "A second LDAP URL to use as a backup when authenticating users. This should include both the host name and port.")
   public static final ConfigurationProperty<String> LDAP_SECONDARY_URL = new ConfigurationProperty<>(
       "authentication.ldap.secondaryUrl", null);
 
   /**
-   *
+   * The base DN to use when filtering LDAP users and groups.
    */
+  @Markdown(description = "The base DN to use when filtering LDAP users and groups. This is only used when LDAP authentication is enabled.")
   public static final ConfigurationProperty<String> LDAP_BASE_DN = new ConfigurationProperty<>(
       "authentication.ldap.baseDn", "dc=ambari,dc=apache,dc=org");
 
   /**
-   *
+   * Determines whether LDAP requests can connect anonymously or if a managed
+   * user is required to connect.
    */
+  @Markdown(description = "Determines whether LDAP requests can connect anonymously or if a managed user is required to connect.")
   public static final ConfigurationProperty<String> LDAP_BIND_ANONYMOUSLY = new ConfigurationProperty<>(
       "authentication.ldap.bindAnonymously", "true");
 
   /**
-   *
+   * The DN of the manager account to use when binding to LDAP if
+   * {@link #LDAP_BIND_ANONYMOUSLY} is turned off.
    */
+  @Markdown(description = "The DN of the manager account to use when binding to LDAP if anonymous binding is disabled.")
   public static final ConfigurationProperty<String> LDAP_MANAGER_DN = new ConfigurationProperty<>(
       "authentication.ldap.managerDn", null);
 
   /**
-   *
+   * The password for the account used to bind to LDAP if
+   * {@link #LDAP_BIND_ANONYMOUSLY} is turned off.
    */
+  @Markdown(description = "The password for the manager account used to bind to LDAP if anonymous binding is disabled.")
   public static final ConfigurationProperty<String> LDAP_MANAGER_PASSWORD = new ConfigurationProperty<>(
       "authentication.ldap.managerPassword", null);
 
   /**
-   *
+   * The attribute used for determining what the distinguished name property is.
    */
+  @Markdown(description = "The attribute used for determining what the distinguished name property is.")
   public static final ConfigurationProperty<String> LDAP_DN_ATTRIBUTE = new ConfigurationProperty<>(
       "authentication.ldap.dnAttribute", "dn");
 
   /**
-   *
+   * The attribute used for determining the user name.
    */
+  @Markdown(description = "The attribute used for determining the user name, such as `uid`.")
   public static final ConfigurationProperty<String> LDAP_USERNAME_ATTRIBUTE = new ConfigurationProperty<>(
       "authentication.ldap.usernameAttribute", "uid");
 
   /**
-   *
+   * The filter used when searching for users in LDAP.
    */
+  @Markdown(description = "The filter used when searching for users in LDAP.")
   public static final ConfigurationProperty<String> LDAP_USER_BASE = new ConfigurationProperty<>(
       "authentication.ldap.userBase", "ou=people,dc=ambari,dc=apache,dc=org");
 
   /**
-   *
+   * The class to which user objects in LDAP belong.
    */
+  @Markdown(description = "The class to which user objects in LDAP belong.")
   public static final ConfigurationProperty<String> LDAP_USER_OBJECT_CLASS = new ConfigurationProperty<>(
       "authentication.ldap.userObjectClass", "person");
 
   /**
-   *
+   * The filter used when searching for groups in LDAP.
    */
+  @Markdown(description = "The filter used when searching for groups in LDAP.")
   public static final ConfigurationProperty<String> LDAP_GROUP_BASE = new ConfigurationProperty<>(
       "authentication.ldap.groupBase", "ou=groups,dc=ambari,dc=apache,dc=org");
 
   /**
-   *
+   * The class to which group objects in LDAP belong.
    */
+  @Markdown(description = "The class to which group objects in LDAP belong.")
   public static final ConfigurationProperty<String> LDAP_GROUP_OBJECT_CLASS = new ConfigurationProperty<>(
       "authentication.ldap.groupObjectClass", "group");
 
   /**
-   *
+   * The attribute used to determine the group name.
    */
+  @Markdown(description = "The attribute used to determine the group name in LDAP.")
   public static final ConfigurationProperty<String> LDAP_GROUP_NAMING_ATTR = new ConfigurationProperty<>(
       "authentication.ldap.groupNamingAttr", "cn");
 
   /**
-   *
+   * The LDAP attribute which identifies group membership.
    */
-  public static final ConfigurationProperty<String> LDAP_GROUP_MEMEBERSHIP_ATTR = new ConfigurationProperty<>(
+  @Markdown(description = "The LDAP attribute which identifies group membership.")
+  public static final ConfigurationProperty<String> LDAP_GROUP_MEMBERSHIP_ATTR = new ConfigurationProperty<>(
       "authentication.ldap.groupMembershipAttr", "member");
 
   /**
-   *
+   * A comma-separate list of groups which would give a user administrative access to Ambari.
    */
+  @Markdown(
+      description = "A comma-separate list of groups which would give a user administrative access to Ambari when syncing from LDAP. This is only used when `authorization.ldap.groupSearchFilter` is blank.",
+      examples = { "administrators", "Hadoop Admins,Hadoop Admins.*,DC Admins,.*Hadoop Operators" })
   public static final ConfigurationProperty<String> LDAP_ADMIN_GROUP_MAPPING_RULES = new ConfigurationProperty<>(
       "authorization.ldap.adminGroupMappingRules", "Ambari Administrators");
 
   /**
-   *
-   */
-  public static final ConfigurationProperty<String> LDAP_ADMIN_GROUP_MAPPING_MEMBER_ATTR = new ConfigurationProperty<>(
-      "authorization.ldap.adminGroupMappingMemberAttr", "Ambari Administrators");
-
-  /**
    * When authentication through LDAP is enabled then Ambari Server uses this
    * filter to lookup the user in LDAP based on the provided ambari user name.
    *
@@ -779,6 +994,9 @@ public class Configuration {
    * {@code (&({usernameAttribute}={0})(objectClass={userObjectClass}))} is
    * used.
    */
+  @Markdown(
+      description = "A filter used to lookup a user in LDAP based on the Ambari user name",
+      examples = { "(&({usernameAttribute}={0})(objectClass={userObjectClass}))" })
   public static final ConfigurationProperty<String> LDAP_USER_SEARCH_FILTER = new ConfigurationProperty<>(
       "authentication.ldap.userSearchFilter",
       "(&({usernameAttribute}={0})(objectClass={userObjectClass}))");
@@ -791,6 +1009,7 @@ public class Configuration {
    *
    * If it is not set then the default
    */
+  @Markdown(description = "Determines whether a secondary (alternate) LDAP user search filer is used if the primary filter fails to find a user.")
   public static final ConfigurationProperty<String> LDAP_ALT_USER_SEARCH_ENABLED = new ConfigurationProperty<>(
       "authentication.ldap.alternateUserSearchEnabled", "false");
 
@@ -809,158 +1028,213 @@ public class Configuration {
    * user1@x.y.com) which is the userPrincipalName format used in AD.
    * </p>
    */
+  @Markdown(description = "An alternate LDAP user search filter which can be used if `authentication.ldap.alternateUserSearchEnabled` is enabled and the primary filter fails to find a user.")
   public static final ConfigurationProperty<String> LDAP_ALT_USER_SEARCH_FILTER = new ConfigurationProperty<>(
       "authentication.ldap.alternateUserSearchFilter",
       "(&(userPrincipalName={0})(objectClass={userObjectClass}))");
 
   /**
-   *
+   * The DN to use when searching for LDAP groups.
    */
+  @Markdown(description = "The DN to use when searching for LDAP groups.")
   public static final ConfigurationProperty<String> LDAP_GROUP_SEARCH_FILTER = new ConfigurationProperty<>(
       "authorization.ldap.groupSearchFilter", "");
 
   /**
-   *
+   * Determines whether to follow LDAP referrals when the LDAP controller doesn't have the requested object.
    */
+  @Markdown(description = "Determines whether to follow LDAP referrals to other URLs when the LDAP controller doesn't have the requested object.")
   public static final ConfigurationProperty<String> LDAP_REFERRAL = new ConfigurationProperty<>(
       "authentication.ldap.referral", "follow");
 
   /**
-   *
+   * Determines whether results from LDAP are paginated when requested.
    */
+  @Markdown(description = "Determines whether results from LDAP are paginated when requested.")
   public static final ConfigurationProperty<String> LDAP_PAGINATION_ENABLED = new ConfigurationProperty<>(
       "authentication.ldap.pagination.enabled", "true");
 
   /**
-   *
+   * The default regex pattern to use when replacing the user member attribute
+   * ID value with a placeholder. This is used in cases where a UID of an LDAP
+   * member is not a full CN or unique ID.
    */
-  public static final ConfigurationProperty<String> LDAP_SYCN_USER_MEMBER_REPLACE_PATTERN = new ConfigurationProperty<>(
+  @Markdown(
+      description = "The default regex pattern to use when replacing the user member attribute ID value with a placeholder. This is used in cases where a UID of an LDAP member is not a full CN or unique ID",
+      examples = { "`${member}`" })
+  public static final ConfigurationProperty<String> LDAP_SYNC_USER_MEMBER_REPLACE_PATTERN = new ConfigurationProperty<>(
       "authentication.ldap.sync.userMemberReplacePattern",
       LDAP_SYNC_MEMBER_REPLACE_PATTERN_DEFAULT);
 
   /**
-   *
+   * The default regex pattern to use when replacing the group member attribute
+   * ID value with a placeholder. This is used in cases where a UID of an LDAP
+   * member is not a full CN or unique ID.
    */
+  @Markdown(
+      description = "The default regex pattern to use when replacing the group member attribute ID value with a placeholder. This is used in cases where a UID of an LDAP member is not a full CN or unique ID",
+      examples = { "`${member}`" })
   public static final ConfigurationProperty<String> LDAP_SYCN_GROUP_MEMBER_REPLACE_PATTERN = new ConfigurationProperty<>(
       "authentication.ldap.sync.groupMemberReplacePattern",
       LDAP_SYNC_MEMBER_REPLACE_PATTERN_DEFAULT);
 
   /**
-   *
+   * The default filter to use for syncing users from LDAP.
    */
-  public static final ConfigurationProperty<String> LDAP_SYCN_USER_MEMBER_FILTER = new ConfigurationProperty<>(
+  @Markdown(description = "The default filter to use for syncing users from LDAP.")
+  public static final ConfigurationProperty<String> LDAP_SYNC_USER_MEMBER_FILTER = new ConfigurationProperty<>(
       "authentication.ldap.sync.userMemberFilter",
       LDAP_SYNC_MEMBER_FILTER_DEFAULT);
 
   /**
-   *
+   * The default filter to use for syncing member from LDAP.
    */
-  public static final ConfigurationProperty<String> LDAP_SYCN_GROUP_MEMBER_FILTER = new ConfigurationProperty<>(
+  @Markdown(description = "The default filter to use for syncing member from LDAP.")
+  public static final ConfigurationProperty<String> LDAP_SYNC_GROUP_MEMBER_FILTER = new ConfigurationProperty<>(
       "authentication.ldap.sync.groupMemberFilter",
       LDAP_SYNC_MEMBER_FILTER_DEFAULT);
 
 
+  /**
+   * The size of the cache used to hold {@link HostRoleCommand} instances in-memory.
+   */
+  @Markdown(description = "The size of the cache which is used to hold current operations in memory until they complete.")
   public static final ConfigurationProperty<Long> SERVER_EC_CACHE_SIZE = new ConfigurationProperty<>(
       "server.ecCacheSize", 10000L);
 
   /**
-   *
+   * Determines whether caching a requests's
+   * {@link HostRoleCommandStatusSummaryDTO} is enabled.
    */
+  @Markdown(description = "Determines whether an existing request's status is cached. This is enabled by default to prevent increases in database access when there are long running operations in progress.")
   public static final ConfigurationProperty<Boolean> SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED = new ConfigurationProperty<>(
       "server.hrcStatusSummary.cache.enabled", Boolean.TRUE);
 
   /**
-   *
+   * The size of the cache which is used to hold a status of every operation in a request.
    */
+  @Markdown(
+      relatedTo = "server.hrcStatusSummary.cache.enabled",
+      description = "The size of the cache which is used to hold a status of every operation in a request.")
   public static final ConfigurationProperty<Long> SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE = new ConfigurationProperty<>(
       "server.hrcStatusSummary.cache.size", 10000L);
 
   /**
    * The value is specified in {@link TimeUnit#MINUTES}.
    */
+  @Markdown(
+      relatedTo = "server.hrcStatusSummary.cache.enabled",
+      description = "The expiration time, in minutes, of the request status cache.")
   public static final ConfigurationProperty<Long> SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION = new ConfigurationProperty<>(
       "server.hrcStatusSummary.cache.expiryDuration", 30L);
 
   /**
-   *
+   * Determines when the stale configuration cache is enabled. If disabled, then
+   * queries to determine if components need to be restarted will query the
+   * database directly.
    */
+  @Markdown(description = "Determines when the stale configuration cache is enabled. If disabled, then queries to determine if components need to be restarted will query the database directly.")
   public static final ConfigurationProperty<Boolean> SERVER_STALE_CONFIG_CACHE_ENABLED = new ConfigurationProperty<>(
       "server.cache.isStale.enabled", Boolean.TRUE);
 
   /**
+   * The expiration time, in {@link TimeUnit#MINUTES}, that stale configuration information is
+   * cached.
    *
+   * @see #SERVER_STALE_CONFIG_CACHE_ENABLED
    */
+  @Markdown(
+      relatedTo = "server.cache.isStale.enabled",
+      description = "The expiration time, in {@link TimeUnit#MINUTES}, that stale configuration information is cached.")
   public static final ConfigurationProperty<Integer> SERVER_STALE_CONFIG_CACHE_EXPIRATION = new ConfigurationProperty<>(
       "server.cache.isStale.expiration", 600);
 
   /**
-   *
+   * The {@link PersistenceType} of the database.
    */
+  @Markdown(
+      examples = { "local", "remote" },
+      description = "The type of database connection being used. Unless using an embedded PostgresSQL server, then this should be `remote`.")
   public static final ConfigurationProperty<String> SERVER_PERSISTENCE_TYPE = new ConfigurationProperty<>(
       "server.persistence.type", "local");
 
   /**
-   *
+   * The user name used to login to the database.
    */
+  @Markdown(description = "The user name used to login to the database.")
   public static final ConfigurationProperty<String> SERVER_JDBC_USER_NAME = new ConfigurationProperty<>(
       "server.jdbc.user.name", "ambari");
 
   /**
-   *
+   * The password for the user when logging into the database.
    */
+  @Markdown(description = "The password for the user when logging into the database.")
   public static final ConfigurationProperty<String> SERVER_JDBC_USER_PASSWD = new ConfigurationProperty<>(
       "server.jdbc.user.passwd", "bigdata");
 
   /**
-   *
+   * The name of the PostgresSQL JDBC JAR connector.
    */
+  @Markdown(description = "The name of the PostgresSQL JDBC JAR connector.")
   public static final ConfigurationProperty<String> SERVER_JDBC_DRIVER = new ConfigurationProperty<>(
       "server.jdbc.driver", "org.postgresql.Driver");
 
   /**
-   *
+   * The full JDBC url used for in-memory database creation.
    */
+  @Markdown(
+      internal = true,
+      description = "The full JDBC url used for in-memory database creation.")
   public static final ConfigurationProperty<String> SERVER_JDBC_URL = new ConfigurationProperty<>(
       "server.jdbc.url", null);
 
   /**
-   *
+   * The size of the buffer to use, in bytes, for REST API HTTP header requests.
    */
+  @Markdown(description = "The size of the buffer to use, in bytes, for REST API HTTP header requests.")
   public static final ConfigurationProperty<Integer> SERVER_HTTP_REQUEST_HEADER_SIZE = new ConfigurationProperty<>(
       "server.http.request.header.size", 64 * 1024);
 
   /**
-   *
+   * The size of the buffer to use, in bytes, for REST API HTTP header responses.
    */
+  @Markdown(description = "The size of the buffer to use, in bytes, for REST API HTTP header responses.")
   public static final ConfigurationProperty<Integer> SERVER_HTTP_RESPONSE_HEADER_SIZE = new ConfigurationProperty<>(
       "server.http.response.header.size", 64 * 1024);
 
   /**
-   *
+   * A comma-separated list of packages which will be skipped during a stack upgrade.
    */
+  @Markdown(description = "A comma-separated list of packages which will be skipped during a stack upgrade.")
   public static final ConfigurationProperty<String> ROLLING_UPGRADE_SKIP_PACKAGES_PREFIXES = new ConfigurationProperty<>(
       "rolling.upgrade.skip.packages.prefixes", "");
 
   /**
-   *
+   * Determines whether pre-upgrade checks will be skipped when performing a stack upgrade.
    */
+  @Markdown(description = "Determines whether pre-upgrade checks will be skipped when performing a rolling or express stack upgrade.")
   public static final ConfigurationProperty<Boolean> STACK_UPGRADE_BYPASS_PRECHECKS = new ConfigurationProperty<>(
       "stack.upgrade.bypass.prechecks", Boolean.FALSE);
 
   /**
-   * If a host is shutdown or ambari-agent is stopped, then Ambari Server will still keep waiting til the task timesout,
-   * say 10-20 mins. If the host comes back online and ambari-agent is started, then need this retry property
-   * to be greater; ideally, it should be greater than 2 * command_timeout in order to retry at least
-   * 3 times in that amount of mins.
-   * Suggested value is 15-30 mins.
+   * If a host is shutdown or ambari-agent is stopped, then Ambari Server will
+   * still keep waiting til the task timesout, say 10-20 mins. If the host comes
+   * back online and ambari-agent is started, then need this retry property to
+   * be greater; ideally, it should be greater than 2 * command_timeout in order
+   * to retry at least 3 times in that amount of mins. Suggested value is 15-30
+   * mins.
    */
+  @Markdown(description = "The amount of time to wait in order to retry a command during a stack upgrade when an agent loses communication. This value must be greater than the `agent.task.timeout` value.")
   public static final ConfigurationProperty<Integer> STACK_UPGRADE_AUTO_RETRY_TIMEOUT_MINS = new ConfigurationProperty<>(
       "stack.upgrade.auto.retry.timeout.mins", 0);
 
   /**
-   * If the stack.upgrade.auto.retry.timeout.mins property is positive, then run RetryUpgradeActionService every x
-   * seconds.
+   * If the stack.upgrade.auto.retry.timeout.mins property is positive, then run
+   * {@link RetryUpgradeActionService} every x seconds.
    */
+  @Markdown(
+      relatedTo = "stack.upgrade.auto.retry.timeout.mins",
+      description = "The amount of time to wait, in seconds, between checking for upgrade tasks to be retried. This value is only applicable if `stack.upgrade.auto.retry.timeout.mins` is positive.")
   public static final ConfigurationProperty<Integer> STACK_UPGRADE_AUTO_RETRY_CHECK_INTERVAL_SECS = new ConfigurationProperty<>(
       "stack.upgrade.auto.retry.check.interval.secs", 20);
 
@@ -968,6 +1242,7 @@ public class Configuration {
    * If auto-retry during stack upgrade is enabled, skip any tasks whose custom command name contains at least one
    * of the strings in the following CSV property. Note that values have to be enclosed in quotes and separated by commas.
    */
+  @Markdown(description = "A comma-separate list of upgrade tasks names to skip when retrying failed commands automatically.")
   public static final ConfigurationProperty<String> STACK_UPGRADE_AUTO_RETRY_CUSTOM_COMMAND_NAMES_TO_IGNORE = new ConfigurationProperty<>(
       "stack.upgrade.auto.retry.command.names.to.ignore",
       "\"ComponentVersionCheckAction\",\"FinalizeUpgradeAction\"");
@@ -976,198 +1251,297 @@ public class Configuration {
    * If auto-retry during stack upgrade is enabled, skip any tasks whose command details contains at least one
    * of the strings in the following CSV property. Note that values have to be enclosed in quotes and separated by commas.
    */
+  @Markdown(description = "A comma-separate list of upgrade tasks details to skip when retrying failed commands automatically.")
   public static final ConfigurationProperty<String> STACK_UPGRADE_AUTO_RETRY_COMMAND_DETAILS_TO_IGNORE = new ConfigurationProperty<>(
       "stack.upgrade.auto.retry.command.details.to.ignore", "\"Execute HDFS Finalize\"");
 
   /**
-   *
+   * Determines whether to use JWT authentication when connecting to remote Hadoop resources.
    */
+  @Markdown(description = "Determines whether to use JWT authentication when connecting to remote Hadoop resources.")
   public static final ConfigurationProperty<Boolean> JWT_AUTH_ENABLED = new ConfigurationProperty<>(
       "authentication.jwt.enabled", Boolean.FALSE);
 
   /**
-   *
+   * The URL for authentication of the user in the absence of a JWT token when
+   * handling a JWT request.
    */
+  @Markdown(
+      relatedTo = "authentication.jwt.enabled",
+      description = "The URL for authentication of the user in the absence of a JWT token when handling a JWT request.")
   public static final ConfigurationProperty<String> JWT_AUTH_PROVIDER_URL = new ConfigurationProperty<>(
       "authentication.jwt.providerUrl", null);
 
   /**
-   *
+   * The public key to use when verifying the authenticity of a JWT token.
    */
+  @Markdown(
+      relatedTo = "authentication.jwt.enabled",
+      description = "The public key to use when verifying the authenticity of a JWT token.")
   public static final ConfigurationProperty<String> JWT_PUBLIC = new ConfigurationProperty<>(
       "authentication.jwt.publicKey", null);
 
   /**
-   *
+   * A list of the JWT audiences expected. Leaving this blank will allow for any audience.
    */
+  @Markdown(
+      relatedTo = "authentication.jwt.enabled",
+      description = "A list of the JWT audiences expected. Leaving this blank will allow for any audience.")
   public static final ConfigurationProperty<String> JWT_AUDIENCES = new ConfigurationProperty<>(
       "authentication.jwt.audiences", null);
 
   /**
-   *
+   * The name of the cookie which will be used to extract the JWT token from the request.
    */
+  @Markdown(
+      relatedTo = "authentication.jwt.enabled",
+      description = "The name of the cookie which will be used to extract the JWT token from the request.")
   public static final ConfigurationProperty<String> JWT_COOKIE_NAME = new ConfigurationProperty<>(
       "authentication.jwt.cookieName", "hadoop-jwt");
 
   /**
-   *
+   * The original URL to use when constructing the logic URL for JWT.
    */
+  @Markdown(
+      relatedTo = "authentication.jwt.enabled",
+      description = "The original URL to use when constructing the logic URL for JWT.")
   public static final ConfigurationProperty<String> JWT_ORIGINAL_URL_QUERY_PARAM = new ConfigurationProperty<>(
       "authentication.jwt.originalUrlParamName", "originalUrl");
 
   /**
-   *
+   * The type of connection pool to use with JDBC connections to the database.
    */
+  @Markdown(
+      examples = {"internal", "c3p0"},
+      description = "The connection pool manager to use for database connections. If using MySQL, then `c3p0` is automatically chosen.")
   public static final ConfigurationProperty<String> SERVER_JDBC_CONNECTION_POOL = new ConfigurationProperty<>(
       "server.jdbc.connection-pool", ConnectionPoolType.INTERNAL.getName());
 
   /**
-   *
+   * The minimum number of connections that should always exist in the
+   * database connection pool. Only used with {@link ConnectionPoolType#C3P0}.
    */
+  @Markdown(
+      relatedTo = "server.jdbc.connection-pool",
+      description = "The minimum number of connections that should always exist in the database connection pool. Only used with c3p0.")
   public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MIN_SIZE = new ConfigurationProperty<>(
       "server.jdbc.connection-pool.min-size", 5);
 
   /**
-   *
+   * The maximum number of connections that should exist in the
+   * database connection pool. Only used with {@link ConnectionPoolType#C3P0}.
    */
+  @Markdown(
+      relatedTo = "server.jdbc.connection-pool",
+      description = "The maximum number of connections that should exist in the database connection pool. Only used with c3p0.")
   public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MAX_SIZE = new ConfigurationProperty<>(
       "server.jdbc.connection-pool.max-size", 32);
 
   /**
-   *
+   * The number of connections that should be retrieved when the pool size must
+   * increase. It's wise to set this higher than 1 since the assumption is that
+   * a pool that needs to grow should probably grow by more than 1. Only used
+   * with {@link ConnectionPoolType#C3P0}.
    */
+  @Markdown(
+      relatedTo = "server.jdbc.connection-pool",
+      description = "The number of connections that should be retrieved when the pool size must increase. "
+          + "This should be set higher than 1 since the assumption is that a pool that needs to grow should probably grow by more than 1. Only used with c3p0.")
   public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_AQUISITION_SIZE = new ConfigurationProperty<>(
       "server.jdbc.connection-pool.acquisition-size", 5);
 
   /**
-   *
+   * The maximum amount of time in {@link TimeUnit#SECONDS} any connection,
+   * whether its been idle or active, should even be in the pool. This will
+   * terminate the connection after the expiration age and force new connections
+   * to be opened. Only used with {@link ConnectionPoolType#C3P0}.
    */
+  @Markdown(
+      relatedTo = "server.jdbc.connection-pool",
+      description = " The maximum amount of time, in seconds, any connection, whether its been idle or active, should remain in the pool. "
+          + "This will terminate the connection after the expiration age and force new connections to be opened. Only used with c3p0.")
   public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MAX_AGE = new ConfigurationProperty<>(
       "server.jdbc.connection-pool.max-age", 0);
 
   /**
-   *
+   * The maximum amount of time in {@link TimeUnit#SECONDS} that an idle
+   * connection can remain in the pool. This should always be greater than the
+   * value returned from {@link #getConnectionPoolMaximumExcessIdle()}. Only used
+   * with {@link ConnectionPoolType#C3P0}.
    */
+  @Markdown(
+      relatedTo = "server.jdbc.connection-pool",
+      description = "The maximum amount of time, in seconds, that an idle connection can remain in the pool. "
+          + "This should always be greater than the value returned from `server.jdbc.connection-pool.max-idle-time-excess`. Only used with c3p0.")
   public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME = new ConfigurationProperty<>(
       "server.jdbc.connection-pool.max-idle-time", 14400);
 
   /**
-   *
+   * The maximum amount of time in {@link TimeUnit#SECONDS} that connections
+   * beyond the minimum pool size should remain in the pool. This should always
+   * be less than than the value returned from
+   * {@link #getConnectionPoolMaximumIdle()}. Only used with
+   * {@link ConnectionPoolType#C3P0}.
    */
+  @Markdown(
+      relatedTo = "server.jdbc.connection-pool",
+      description = "The maximum amount of time, in seconds, that connections beyond the minimum pool size should remain in the pool. "
+          + "This should always be less than than the value returned from `server.jdbc.connection-pool.max-idle-time`. Only used with c3p0.")
   public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME_EXCESS = new ConfigurationProperty<>(
       "server.jdbc.connection-pool.max-idle-time-excess", 0);
 
   /**
-   *
+   * The number of {@link TimeUnit#SECONDS} in between testing each idle
+   * connection in the connection pool for validity. Only used with
+   * {@link ConnectionPoolType#C3P0}.
    */
+  @Markdown(
+      relatedTo = "server.jdbc.connection-pool",
+      description = "The number of seconds in between testing each idle connection in the connection pool for validity. Only used with c3p0.")
   public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_IDLE_TEST_INTERVAL = new ConfigurationProperty<>(
       "server.jdbc.connection-pool.idle-test-interval", 7200);
 
   /**
-   *
+   * The number of times connections should be retried to be acquired from
+   * the database before giving up. Only used with {@link ConnectionPoolType#C3P0}.
    */
+  @Markdown(
+      relatedTo = "server.jdbc.connection-pool",
+      description = "The number of times connections should be retried to be acquired from the database before giving up. Only used with c3p0.")
   public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_ATTEMPTS = new ConfigurationProperty<>(
       "server.jdbc.connection-pool.acquisition-retry-attempts", 30);
 
   /**
-   *
+   * The delay in {@link TimeUnit#MILLISECONDS} between connection acquisition
+   * attempts. Only used with {@link ConnectionPoolType#C3P0}.
    */
+  @Markdown(
+      relatedTo = "server.jdbc.connection-pool",
+      description = "The delay, in milliseconds, between connection acquisition attempts. Only used with c3p0.")
   public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_DELAY = new ConfigurationProperty<>(
       "server.jdbc.connection-pool.acquisition-retry-delay", 1000);
 
   /**
-   *
+   * The number of retry attempts for failed API and blueprint operations.
    */
+  @Markdown(description = "The number of retry attempts for failed API and blueprint operations.")
   public static final ConfigurationProperty<Integer> OPERATIONS_RETRY_ATTEMPTS = new ConfigurationProperty<>(
       "server.operations.retry-attempts", 0);
 
   /**
-   *
+   * The user name for connecting to the database which stores RCA information.
    */
+  @Deprecated
+  @Markdown(description = "The user name for connecting to the database which stores RCA information.")
   public static final ConfigurationProperty<String> SERVER_JDBC_RCA_USER_NAME = new ConfigurationProperty<>(
       "server.jdbc.rca.user.name", "mapred");
 
   /**
-   *
+   * The password for the user when connecting to the database which stores RCA information.
    */
+  @Deprecated
+  @Markdown(description = "The password for the user when connecting to the database which stores RCA information.")
   public static final ConfigurationProperty<String> SERVER_JDBC_RCA_USER_PASSWD = new ConfigurationProperty<>(
       "server.jdbc.rca.user.passwd", "mapred");
 
   /**
-   *
+   * The PostgresSQL driver name for the RCA database.
    */
+  @Deprecated
+  @Markdown(description = "The PostgresSQL driver name for the RCA database.")
   public static final ConfigurationProperty<String> SERVER_JDBC_RCA_DRIVER = new ConfigurationProperty<>(
       "server.jdbc.rca.driver", "org.postgresql.Driver");
 
   /**
-   *
+   * The full JDBC URL for connecting to the RCA database.
    */
+  @Deprecated
+  @Markdown(description = "The full JDBC URL for connecting to the RCA database.")
   public static final ConfigurationProperty<String> SERVER_JDBC_RCA_URL = new ConfigurationProperty<>(
       "server.jdbc.rca.url", "jdbc:postgresql://" + HOSTNAME_MACRO + "/ambarirca");
 
   /**
-   *
+   * The table generation strategy to use when initializing JPA.
    */
+  @Markdown(description = "The table generation strategy to use when initializing JPA.")
   public static final ConfigurationProperty<JPATableGenerationStrategy> SERVER_JDBC_GENERATE_TABLES = new ConfigurationProperty<>(
       "server.jdbc.generateTables", JPATableGenerationStrategy.NONE);
 
   /**
-   *
+   * The OS family for the cluster.
    */
+  @Markdown(
+      examples = { "redhat", "ubuntu" },
+      description = "The operating system family for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.")
   public static final ConfigurationProperty<String> OS_FAMILY = new ConfigurationProperty<>(
       "server.os_family", "");
 
   /**
-   *
+   * The OS version for the cluster.
    */
+  @Markdown(
+      examples = { "6", "7" },
+      description = "The operating system version for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.")
   public static final ConfigurationProperty<String> OS_VERSION = new ConfigurationProperty<>(
       "server.os_type", "");
 
   /**
-   *
+   * The location on the Ambari Server of the file which is used for mapping host names.
    */
+  @Markdown(description = "The location on the Ambari Server of the file which is used for mapping host names.")
   public static final ConfigurationProperty<String> SRVR_HOSTS_MAPPING = new ConfigurationProperty<>(
       "server.hosts.mapping", null);
 
   /**
-   *
+   * The location of the truststore to use when setting the
+   * {@link #JAVAX_SSL_TRUSTSTORE} property.
    */
+  @Markdown(description = "The location of the truststore to use when setting the `javax.net.ssl.trustStore` property.")
   public static final ConfigurationProperty<String> SSL_TRUSTSTORE_PATH = new ConfigurationProperty<>(
       "ssl.trustStore.path", null);
 
   /**
-   *
+   * The password to use when setting the {@link #JAVAX_SSL_TRUSTSTORE_PASSWORD}
+   * property.
    */
+  @Markdown(description = "The password to use when setting the `javax.net.ssl.trustStorePassword` property")
   public static final ConfigurationProperty<String> SSL_TRUSTSTORE_PASSWORD = new ConfigurationProperty<>(
       "ssl.trustStore.password", null);
 
   /**
-   *
+   * The type of truststore used by the {@link JAVAX_SSL_TRUSTSTORE_TYPE} property.
    */
+  @Markdown(description = "The type of truststore used by the `javax.net.ssl.trustStoreType` property.")
   public static final ConfigurationProperty<String> SSL_TRUSTSTORE_TYPE = new ConfigurationProperty<>(
       "ssl.trustStore.type", null);
 
   /**
-   *
+   * The location on the Ambari Server of the master key file.
    */
+  @Markdown(description = "The location on the Ambari Server of the master key file. This is the key to the master keystore.")
   public static final ConfigurationProperty<String> MASTER_KEY_LOCATION = new ConfigurationProperty<>(
       "security.master.key.location", null);
 
   /**
-   *
+   * The location on the Ambari Server of the master keystore file.
    */
+  @Markdown(description = "The location on the Ambari Server of the master keystore file.")
   public static final ConfigurationProperty<String> MASTER_KEYSTORE_LOCATION = new ConfigurationProperty<>(
       "security.master.keystore.location", null);
 
   /**
-   *
+   * The time, in {@link TimeUnit#MINUTES}, that the temporary, in-memory
+   * credential store retains values.
    */
+  @Markdown(description = "The time, in minutes, that the temporary, in-memory credential store retains values.")
   public static final ConfigurationProperty<Long> TEMPORARYSTORE_RETENTION_MINUTES = new ConfigurationProperty<>(
       "security.temporary.keystore.retention.minutes", 90L);
 
   /**
-   *
+   * Determines whether the temporary keystore should have keys actively purged
+   * on a fixed internal, or only when requested after expiration.
    */
+  @Markdown(description = "Determines whether the temporary keystore should have keys actively purged on a fixed internal. or only when requested after expiration.")
   public static final ConfigurationProperty<Boolean> TEMPORARYSTORE_ACTIVELY_PURGE = new ConfigurationProperty<>(
       "security.temporary.keystore.actibely.purge", Boolean.TRUE);
 
@@ -1175,48 +1549,58 @@ public class Configuration {
    * The URL to use when creating messages which should include the Ambari
    * Server URL.
    */
+  @Markdown(
+      examples = {"http://ambari.apache.org:8080"},
+      description = "The URL to use when creating messages which should include the Ambari Server URL.")
   public static final ConfigurationProperty<String> AMBARI_DISPLAY_URL = new ConfigurationProperty<>(
       "ambari.display.url", null);
 
   /**
    * Key for repo validation suffixes.
    */
+  @Markdown(description = "The suffixes to use when validating Ubuntu repositories.")
   public static final ConfigurationProperty<String> REPO_SUFFIX_KEY_UBUNTU = new ConfigurationProperty<>(
       "repo.validation.suffixes.ubuntu", "/dists/%s/Release");
 
   /**
-   *
+   * The key for validating non-Ubuntu repository.
    */
+  @Markdown(description = "The suffixes to use when validating most types of repositories.")
   public static final ConfigurationProperty<String> REPO_SUFFIX_KEY_DEFAULT = new ConfigurationProperty<>(
       "repo.validation.suffixes.default", "/repodata/repomd.xml");
 
   /**
-   *
+   * Determines whether the Quartz rolling restart jobstore is clustered.
    */
+  @Markdown(description = "Determines whether Quartz will use a clustered job scheduled when performing scheduled actions like rolling restarts.")
   public static final ConfigurationProperty<String> EXECUTION_SCHEDULER_CLUSTERED = new ConfigurationProperty<>(
       "server.execution.scheduler.isClustered", "false");
 
   /**
-   *
+   * The number of threads that the Quartz job scheduler will use.
    */
+  @Markdown(description = "The number of threads that the Quartz job scheduler will use when executing scheduled jobs.")
   public static final ConfigurationProperty<String> EXECUTION_SCHEDULER_THREADS = new ConfigurationProperty<>(
       "server.execution.scheduler.maxThreads", "5");
 
   /**
-   *
+   * The number of concurrent database connections that the Quartz job scheduler can use.
    */
+  @Markdown(description = "The number of concurrent database connections that the Quartz job scheduler can use.")
   public static final ConfigurationProperty<String> EXECUTION_SCHEDULER_CONNECTIONS = new ConfigurationProperty<>(
       "server.execution.scheduler.maxDbConnections", "5");
 
   /**
-   *
+   * The tolerance, in {@link TimeUnit#MINUTES}, that Quartz will allow a misfired job to run.
    */
+  @Markdown(description = "The time, in minutes, that a scheduled job can be run after its missed scheduled execution time.")
   public static final ConfigurationProperty<Long> EXECUTION_SCHEDULER_MISFIRE_TOLERATION = new ConfigurationProperty<>(
       "server.execution.scheduler.misfire.toleration.minutes", 480L);
 
   /**
-   *
+   * The delay, in {@link TimeUnit#SECONDS}, that a Quartz job must wait before it starts.
    */
+  @Markdown(description = "The delay, in seconds, that a Quartz job must wait before it starts.")
   public static final ConfigurationProperty<Integer> EXECUTION_SCHEDULER_START_DELAY = new ConfigurationProperty<>(
       "server.execution.scheduler.start.delay.seconds", 120);
 
@@ -1224,18 +1608,21 @@ public class Configuration {
    * The time that the executions schduler will wait before checking for new
    * commands to schedule. Measure in {@link TimeUnit#SECONDS}.
    */
+  @Markdown(description = "The time, in seconds, that the Quartz execution scheduler will wait before checking for new commands to schedule, such as rolling restarts.")
   public static final ConfigurationProperty<Long> EXECUTION_SCHEDULER_WAIT = new ConfigurationProperty<>(
       "server.execution.scheduler.wait", 1L);
 
   /**
-   *
+   * The location on the Ambari Server where temporary artifacts can be created.
    */
+  @Markdown(description = "The location on the Ambari Server where temporary artifacts can be created.")
   public static final ConfigurationProperty<String> SERVER_TMP_DIR = new ConfigurationProperty<>(
       "server.tmp.dir", AmbariPath.getPath("/var/lib/ambari-server/tmp"));
 
   /**
-   *
+   * The time, in {@link TimeUnit#MILLISECONDS}, until an external script is killed.
    */
+  @Markdown(description = "The time, in milliseconds, until an external script is killed.")
   public static final ConfigurationProperty<Integer> EXTERNAL_SCRIPT_TIMEOUT = new ConfigurationProperty<>(
       "server.script.timeout", 5000);
 
@@ -1243,59 +1630,103 @@ public class Configuration {
   public static final String DEF_ARCHIVE_CONTENT_TYPE;
 
   /**
-   *
+   * The port used to communicate with the Kerberos Key Distribution Center.
    */
+  @Markdown(description = "The port used to communicate with the Kerberos Key Distribution Center.")
   public static final ConfigurationProperty<String> KDC_PORT = new ConfigurationProperty<>(
       "default.kdcserver.port", "88");
 
   /**
-   *
+   * The timeout, in {@link TimeUnit#MILLISECONDS}, to wait when communicating
+   * with a Kerberos Key Distribution Center.
    */
+  @Markdown(description = "The timeout, in milliseconds, to wait when communicating with a Kerberos Key Distribution Center.")
   public static final ConfigurationProperty<Integer> KDC_CONNECTION_CHECK_TIMEOUT = new ConfigurationProperty<>(
       "kdcserver.connection.check.timeout", 10000);
 
   /**
-   *
+   * The location on the Ambari Server where kerberos keytabs are cached.
    */
+  @Markdown(description = "The location on the Ambari Server where Kerberos keytabs are cached.")
   public static final ConfigurationProperty<String> KERBEROSTAB_CACHE_DIR = new ConfigurationProperty<>(
       "kerberos.keytab.cache.dir", AmbariPath.getPath("/var/lib/ambari-server/data/cache"));
 
   /**
-   *
+   * Determines whether Kerberos-enabled Ambari deployments should use JAAS to
+   * validate login credentials.
    */
+  @Markdown(description = "Determines whether Kerberos-enabled Ambari deployments should use JAAS to validate login credentials.")
   public static final ConfigurationProperty<Boolean> KERBEROS_CHECK_JAAS_CONFIGURATION = new ConfigurationProperty<>(
       "kerberos.check.jaas.configuration", Boolean.FALSE);
 
   /**
-   *
+   * The type of automatic recovery of failed services and components to use.
    */
+  @Markdown(
+      examples = {"DEFAULT", "AUTO_START", "FULL"},
+      description = "The type of automatic recovery of failed services and components to use.")
   public static final ConfigurationProperty<String> RECOVERY_TYPE = new ConfigurationProperty<>(
       "recovery.type", null);
 
   /**
-   *
+   * The maximum number of recovery attempts of a failed component during the lifetime
+   * of an Ambari Agent instance. This is reset when the Ambari Agent is
+   * restarted.
    */
+  @Markdown(
+      description = "The maximum number of recovery attempts of a failed component during the lifetime of an Ambari Agent instance. "
+      + "This is reset when the Ambari Agent is restarted.")
   public static final ConfigurationProperty<String> RECOVERY_LIFETIME_MAX_COUNT = new ConfigurationProperty<>(
       "recovery.lifetime_max_count", null);
 
+  /**
+   * The maximum number of recovery attempts of a failed component during a
+   * specified recovery window.
+   */
+  @Markdown(description = "The maximum number of recovery attempts of a failed component during a specified recovery window.")
   public static final ConfigurationProperty<String> RECOVERY_MAX_COUNT = new ConfigurationProperty<>(
       "recovery.max_count", null);
 
+  /**
+   * The length of a recovery window, in {@link TimeUnit#MINUTES}, in which
+   * recovery attempts can be retried.
+   */
+  @Markdown(
+      relatedTo = "recovery.max_count",
+      description = "The length of a recovery window, in minutes, in which recovery attempts can be retried.")
   public static final ConfigurationProperty<String> RECOVERY_WINDOW_IN_MIN = new ConfigurationProperty<>(
       "recovery.window_in_minutes", null);
 
+  /**
+   * The delay, in {@link TimeUnit#MINUTES}, between automatic retry windows.
+   */
+  @Markdown(description = "The delay, in minutes, between automatic retry windows.")
   public static final ConfigurationProperty<String> RECOVERY_RETRY_GAP = new ConfigurationProperty<>(
       "recovery.retry_interval", null);
 
+  /**
+   * A comma-separated list of component names which are not included in automatic recovery attempts.
+   */
+  @Markdown(
+      examples = {"NAMENODE,ZOOKEEPER_SERVER"},
+      description = "A comma-separated list of component names which are not included in automatic recovery attempts.")
   public static final ConfigurationProperty<String> RECOVERY_DISABLED_COMPONENTS = new ConfigurationProperty<>(
       "recovery.disabled_components", null);
 
+  /**
+   * A comma-separated list of component names which are included in automatic
+   * recovery attempts.
+   */
+  @Markdown(
+    examples = {"NAMENODE,ZOOKEEPER_SERVER"},
+    description = "A comma-separated list of component names which are included in automatic recovery attempts.")
   public static final ConfigurationProperty<String> RECOVERY_ENABLED_COMPONENTS = new ConfigurationProperty<>(
       "recovery.enabled_components", null);
 
   /**
    * Allow proxy calls to these hosts and ports only
    */
+  @Markdown(description = "A comma-separated whitelist of host and port values which Ambari Server can use to determine if a pro

<TRUNCATED>

[09/10] ambari git commit: AMBARI-18126 - Refactor Configuration To Allow For Generation Of Documentation (jonathanhurley)

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index fae9378..9c27e57 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -22,6 +22,7 @@ import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
+import java.lang.reflect.Field;
 import java.security.cert.CertificateException;
 import java.security.interfaces.RSAPublicKey;
 import java.util.ArrayList;
@@ -34,11 +35,14 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Set;
+import java.util.TreeSet;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.ambari.annotations.Experimental;
 import org.apache.ambari.annotations.ExperimentalFeature;
+import org.apache.ambari.annotations.Markdown;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.Stage;
 import org.apache.ambari.server.events.listeners.alerts.AlertReceivedListener;
@@ -79,697 +83,1564 @@ public class Configuration {
   @Inject
   private OsFamily osFamily;
 
-  public static final String CONFIG_FILE = "ambari.properties";
-  public static final String BOOTSTRAP_DIR = "bootstrap.dir";
+  /**
+   * The filename of the {@link Properties} file which contains all of the
+   * configurations for Ambari.
+   */
+  private static final String CONFIG_FILE = "ambari.properties";
+
+  /**
+   * PREFIX_DIR is shared in ambari-agent.ini and should only be called by unit
+   * tests. For all server-side processing, it should be retrieved from
+   * <code>HostImpl.getPrefix()</code>
+   */
+  public static final String PREFIX_DIR = "/var/lib/ambari-agent/data";
+
+  /**
+   * The minimum JDK version supported by Ambari.
+   */
+  public static final float JDK_MIN_VERSION = 1.7f;
+
+  /**
+   *
+   */
+  private static final String LDAP_SYNC_MEMBER_REPLACE_PATTERN_DEFAULT = "";
+
+  /**
+   *
+   */
+  private static final String LDAP_SYNC_MEMBER_FILTER_DEFAULT = "";
+
+  /**
+   *
+   */
+  public static final String SERVER_JDBC_PROPERTIES_PREFIX = "server.jdbc.properties.";
+
+  /**
+   *
+   */
+  public static final String SERVER_PERSISTENCE_PROPERTIES_PREFIX = "server.persistence.properties.";
+
+  /**
+   *
+   */
+  public static final String HOSTNAME_MACRO = "{hostname}";
+
+  /**
+   *
+   */
+  public static final String JDBC_UNIT_NAME = "ambari-server";
+
+  /**
+   *
+   */
+  public static final String JDBC_LOCAL_URL = "jdbc:postgresql://localhost/";
+
+  /**
+   *
+   */
+  public static final String DEFAULT_DERBY_SCHEMA = "ambari";
+
+  /**
+   *
+   */
+  public static final String JDBC_IN_MEMORY_URL = String.format(
+      "jdbc:derby:memory:myDB/%s;create=true", DEFAULT_DERBY_SCHEMA);
+
+  /**
+   *
+   */
+  public static final String JDBC_IN_MEMORY_DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
+
+  /**
+   *
+   */
+  public static final String JAVAX_SSL_TRUSTSTORE = "javax.net.ssl.trustStore";
+
+  /**
+   *
+   */
+  public static final String JAVAX_SSL_TRUSTSTORE_PASSWORD = "javax.net.ssl.trustStorePassword";
+
+  /**
+   *
+   */
+  public static final String JAVAX_SSL_TRUSTSTORE_TYPE = "javax.net.ssl.trustStoreType";
+
+  /**
+   *
+   */
+  public static final String GLOBAL_CONFIG_TAG = "global";
+
+  /**
+   *
+   */
+  public static final String MAPREDUCE2_LOG4J_CONFIG_TAG = "mapreduce2-log4j";
+
+  /**
+   *
+   */
+  public static final String RCA_ENABLED_PROPERTY = "rca_enabled";
+
+  /**
+   * Threadpool sizing based on the number of available processors multiplied by
+   * 2.
+   */
+  public static final int PROCESSOR_BASED_THREADPOOL_CORE_SIZE_DEFAULT = 2
+      * Runtime.getRuntime().availableProcessors();
+
+  /**
+   * Threadpool sizing based on the number of available processors multiplied by
+   * 4.
+   */
+  public static final int PROCESSOR_BASED_THREADPOOL_MAX_SIZE_DEFAULT = 4
+      * Runtime.getRuntime().availableProcessors();
+
+  /**
+   *
+   */
+  private static final Set<String> dbConnectorPropertyNames = new HashSet<String>(Arrays.asList(
+      "custom.mysql.jdbc.name", "custom.oracle.jdbc.name", "custom.postgres.jdbc.name",
+      "custom.mssql.jdbc.name", "custom.hsqldb.jdbc.name", "custom.sqlanywhere.jdbc.name"));
+
+
+  /**
+   *
+   */
+  public static final String MASTER_KEY_ENV_PROP = "AMBARI_SECURITY_MASTER_KEY";
+
+  /**
+   *
+   */
+  public static final String MASTER_KEY_FILENAME_DEFAULT = "master";
+
+  /**
+   *
+   */
+  public static final String MASTER_KEYSTORE_FILENAME_DEFAULT = "credentials.jceks";
+
+  /**
+   * The directory on the ambari-server file system used for storing
+   * ambari-agent bootstrap information.
+   */
+  public static final ConfigurationProperty<String> BOOTSTRAP_DIRECTORY = new ConfigurationProperty<>(
+      "bootstrap.dir", AmbariPath.getPath("/var/run/ambari-server/bootstrap"));
+
+  /**
+   * The directory on the ambari-server file system used for expanding Views and
+   * storing webapp work.
+   */
+  public static final ConfigurationProperty<String> VIEWS_DIRECTORY = new ConfigurationProperty<>(
+      "views.dir", AmbariPath.getPath("/var/lib/ambari-server/resources/views"));
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> VIEWS_VALIDATE = new ConfigurationProperty<>(
+      "views.validate", "false");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> VIEWS_REMOVE_UNDEPLOYED = new ConfigurationProperty<>(
+      "views.remove.undeployed", "false");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> WEBAPP_DIRECTORY = new ConfigurationProperty<>(
+      "webapp.dir", "web");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> BOOTSTRAP_SCRIPT = new ConfigurationProperty<>(
+      "bootstrap.script", AmbariPath.getPath("/usr/bin/ambari_bootstrap"));
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> BOOTSTRAP_SETUP_AGENT_SCRIPT = new ConfigurationProperty<>(
+      "bootstrap.setup_agent.script",
+      AmbariPath.getPath("/usr/lib/python2.6/site-packages/ambari_server/setupAgent.py"));
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> BOOTSTRAP_SETUP_AGENT_PASSWORD = new ConfigurationProperty<>(
+      "bootstrap.setup_agent.password", "password");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> BOOTSTRAP_MASTER_HOSTNAME = new ConfigurationProperty<>(
+      "bootstrap.master_host_name", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> RECOMMENDATIONS_ARTIFACTS_LIFETIME = new ConfigurationProperty<>(
+      "recommendations.artifacts.lifetime", "1w");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> RECOMMENDATIONS_DIR = new ConfigurationProperty<>(
+      "recommendations.dir", AmbariPath.getPath("/var/run/ambari-server/stack-recommendations"));
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> STACK_ADVISOR_SCRIPT = new ConfigurationProperty<>(
+      "stackadvisor.script",
+      AmbariPath.getPath("/var/lib/ambari-server/resources/scripts/stack_advisor.py"));
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> AMBARI_PYTHON_WRAP = new ConfigurationProperty<>(
+      "ambari.python.wrap", "ambari-python-wrap");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> API_AUTHENTICATED_USER = new ConfigurationProperty<>(
+      "api.authenticated.user", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> API_USE_SSL = new ConfigurationProperty<>(
+      "api.ssl", "false");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> API_CSRF_PREVENTION = new ConfigurationProperty<>(
+      "api.csrfPrevention.enabled", "true");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> API_GZIP_COMPRESSION_ENABLED = new ConfigurationProperty<>(
+      "api.gzip.compression.enabled", "true");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> API_GZIP_MIN_COMPRESSION_SIZE = new ConfigurationProperty<>(
+      "api.gzip.compression.min.size", "10240");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> AGENT_API_GZIP_COMPRESSION_ENABLED = new ConfigurationProperty<>(
+      "agent.api.gzip.compression.enabled", "true");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> AGENT_USE_SSL = new ConfigurationProperty<>(
+      "agent.ssl", "true");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_AGENT_HOSTNAME_VALIDATE = new ConfigurationProperty<>(
+      "security.agent.hostname.validate", "true");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_TWO_WAY_SSL = new ConfigurationProperty<>(
+      "security.server.two_way_ssl", "false");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_TWO_WAY_SSL_PORT = new ConfigurationProperty<>(
+      "security.server.two_way_ssl.port", "8441");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_ONE_WAY_SSL_PORT = new ConfigurationProperty<>(
+      "security.server.one_way_ssl.port", "8440");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_KSTR_DIR = new ConfigurationProperty<>(
+      "security.server.keys_dir", ".");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_CRT_NAME = new ConfigurationProperty<>(
+      "security.server.cert_name", "ca.crt");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_CSR_NAME = new ConfigurationProperty<>(
+      "security.server.csr_name", "ca.csr");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_KEY_NAME = new ConfigurationProperty<>(
+      "security.server.key_name", "ca.key");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> KSTR_NAME = new ConfigurationProperty<>(
+      "security.server.keystore_name", "keystore.p12");
+
+  /**
+   * By default self-signed certificates are used and we can use keystore as
+   * truststore in PKCS12 format When CA signed certificates are used truststore
+   * should be created in JKS format (truststore.jks)
+   */
+  public static final ConfigurationProperty<String> KSTR_TYPE = new ConfigurationProperty<>(
+      "security.server.keystore_type", "PKCS12");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> TSTR_NAME = new ConfigurationProperty<>(
+      "security.server.truststore_name", "keystore.p12");
+
+  /**
+   * By default self-signed certificates are used and we can use keystore as
+   * truststore in PKCS12 format When CA signed certificates are used truststore
+   * should be created in JKS format (truststore.jks)
+   */
+  public static final ConfigurationProperty<String> TSTR_TYPE = new ConfigurationProperty<>(
+      "security.server.truststore_type", "PKCS12");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_CRT_PASS_FILE = new ConfigurationProperty<>(
+      "security.server.crt_pass_file", "pass.txt");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_CRT_PASS = new ConfigurationProperty<>(
+      "security.server.crt_pass", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_CRT_PASS_LEN = new ConfigurationProperty<>(
+      "security.server.crt_pass.len", "50");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> PASSPHRASE_ENV = new ConfigurationProperty<>(
+      "security.server.passphrase_env_var", "AMBARI_PASSPHRASE");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> PASSPHRASE = new ConfigurationProperty<>(
+      "security.server.passphrase", "AMBARI_PASSPHRASE");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_DISABLED_CIPHERS = new ConfigurationProperty<>(
+      "security.server.disabled.ciphers", "");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_DISABLED_PROTOCOLS = new ConfigurationProperty<>(
+      "security.server.disabled.protocols", "");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> RESOURCES_DIR = new ConfigurationProperty<>(
+      "resources.dir", AmbariPath.getPath("/var/lib/ambari-server/resources/"));
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> METADATA_DIR_PATH = new ConfigurationProperty<>(
+      "metadata.path", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> COMMON_SERVICES_DIR_PATH = new ConfigurationProperty<>(
+      "common.services.path", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> EXTENSIONS_DIR_PATH = new ConfigurationProperty<>(
+      "extensions.path", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> MPACKS_STAGING_DIR_PATH = new ConfigurationProperty<>(
+      "mpacks.staging.path", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_VERSION_FILE = new ConfigurationProperty<>(
+      "server.version.file", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_VERSION = new ConfigurationProperty<>(
+      "version", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> JAVA_HOME = new ConfigurationProperty<>(
+      "java.home", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> JDK_NAME = new ConfigurationProperty<>(
+      "jdk.name", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> JCE_NAME = new ConfigurationProperty<>(
+      "jce.name", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_SECURITY = new ConfigurationProperty<>(
+      "client.security", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_PORT = new ConfigurationProperty<>(
+      "client.api.port", "8080");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_PORT = new ConfigurationProperty<>(
+      "client.api.ssl.port", "8443");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_KSTR_DIR_NAME = new ConfigurationProperty<>(
+      "client.api.ssl.keys_dir", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_KSTR_NAME = new ConfigurationProperty<>(
+      "client.api.ssl.keystore_name", "https.keystore.p12");
+
+  /**
+   * By default self-signed certificates are used and we can use keystore as
+   * truststore in PKCS12 format When CA signed certificates are used truststore
+   * should be created in JKS format (truststore.jks)
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_KSTR_TYPE = new ConfigurationProperty<>(
+      "client.api.ssl.keystore_type", "PKCS12");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_TSTR_NAME = new ConfigurationProperty<>(
+      "client.api.ssl.truststore_name", "https.keystore.p12");
+
+  /**
+   * By default self-signed certificates are used and we can use keystore as
+   * truststore in PKCS12 format When CA signed certificates are used truststore
+   * should be created in JKS format (truststore.jks)
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_TSTR_TYPE = new ConfigurationProperty<>(
+      "client.api.ssl.truststore_type", "PKCS12");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_CRT_NAME = new ConfigurationProperty<>(
+      "client.api.ssl.cert_name", "https.crt");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_CRT_PASS_FILE_NAME = new ConfigurationProperty<>(
+      "client.api.ssl.cert_pass_file", "https.pass.txt");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_CRT_PASS = new ConfigurationProperty<>(
+      "client.api.ssl.crt_pass", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CLIENT_API_SSL_KEY_NAME = new ConfigurationProperty<>(
+      "client.api.ssl.key_name", "https.key");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> ENABLE_AUTO_AGENT_CACHE_UPDATE = new ConfigurationProperty<>(
+      "agent.auto.cache.update", "true");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CHECK_REMOTE_MOUNTS = new ConfigurationProperty<>(
+      "agent.check.remote.mounts", "false");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> CHECK_MOUNTS_TIMEOUT = new ConfigurationProperty<>(
+      "agent.check.mounts.timeout", "0");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_DB_NAME = new ConfigurationProperty<>(
+      "server.jdbc.database_name", "ambari");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> REQUEST_READ_TIMEOUT = new ConfigurationProperty<>(
+      "views.request.read.timeout.millis", "10000");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> REQUEST_CONNECT_TIMEOUT = new ConfigurationProperty<>(
+      "views.request.connect.timeout.millis", "5000");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> AMBARI_REQUEST_READ_TIMEOUT = new ConfigurationProperty<>(
+      "views.ambari.request.read.timeout.millis", "45000");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> AMBARI_REQUEST_CONNECT_TIMEOUT = new ConfigurationProperty<>(
+      "views.ambari.request.connect.timeout.millis", "30000");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_POSTGRES_SCHEMA_NAME = new ConfigurationProperty<>(
+      "server.jdbc.postgres.schema", "");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> OJDBC_JAR_NAME = new ConfigurationProperty<>(
+      "db.oracle.jdbc.name", "ojdbc6.jar");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> MYSQL_JAR_NAME = new ConfigurationProperty<>(
+      "db.mysql.jdbc.name", "mysql-connector-java.jar");
+
+  /**
+   * For development purposes only, should be changed to 'false'
+   */
+  public static final ConfigurationProperty<String> IS_LDAP_CONFIGURED = new ConfigurationProperty<>(
+      "ambari.ldap.isConfigured", "false");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_USE_SSL = new ConfigurationProperty<>(
+      "authentication.ldap.useSSL", "false");
+
+  /**
+   * The default value is used for embedded purposes only.
+   */
+  public static final ConfigurationProperty<String> LDAP_PRIMARY_URL = new ConfigurationProperty<>(
+      "authentication.ldap.primaryUrl", "localhost:33389");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_SECONDARY_URL = new ConfigurationProperty<>(
+      "authentication.ldap.secondaryUrl", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_BASE_DN = new ConfigurationProperty<>(
+      "authentication.ldap.baseDn", "dc=ambari,dc=apache,dc=org");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_BIND_ANONYMOUSLY = new ConfigurationProperty<>(
+      "authentication.ldap.bindAnonymously", "true");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_MANAGER_DN = new ConfigurationProperty<>(
+      "authentication.ldap.managerDn", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_MANAGER_PASSWORD = new ConfigurationProperty<>(
+      "authentication.ldap.managerPassword", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_DN_ATTRIBUTE = new ConfigurationProperty<>(
+      "authentication.ldap.dnAttribute", "dn");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_USERNAME_ATTRIBUTE = new ConfigurationProperty<>(
+      "authentication.ldap.usernameAttribute", "uid");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_USER_BASE = new ConfigurationProperty<>(
+      "authentication.ldap.userBase", "ou=people,dc=ambari,dc=apache,dc=org");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_USER_OBJECT_CLASS = new ConfigurationProperty<>(
+      "authentication.ldap.userObjectClass", "person");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_GROUP_BASE = new ConfigurationProperty<>(
+      "authentication.ldap.groupBase", "ou=groups,dc=ambari,dc=apache,dc=org");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_GROUP_OBJECT_CLASS = new ConfigurationProperty<>(
+      "authentication.ldap.groupObjectClass", "group");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_GROUP_NAMING_ATTR = new ConfigurationProperty<>(
+      "authentication.ldap.groupNamingAttr", "cn");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_GROUP_MEMEBERSHIP_ATTR = new ConfigurationProperty<>(
+      "authentication.ldap.groupMembershipAttr", "member");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_ADMIN_GROUP_MAPPING_RULES = new ConfigurationProperty<>(
+      "authorization.ldap.adminGroupMappingRules", "Ambari Administrators");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_ADMIN_GROUP_MAPPING_MEMBER_ATTR = new ConfigurationProperty<>(
+      "authorization.ldap.adminGroupMappingMemberAttr", "Ambari Administrators");
+
+  /**
+   * When authentication through LDAP is enabled then Ambari Server uses this
+   * filter to lookup the user in LDAP based on the provided ambari user name.
+   *
+   * If it is not set then
+   * {@code (&({usernameAttribute}={0})(objectClass={userObjectClass}))} is
+   * used.
+   */
+  public static final ConfigurationProperty<String> LDAP_USER_SEARCH_FILTER = new ConfigurationProperty<>(
+      "authentication.ldap.userSearchFilter",
+      "(&({usernameAttribute}={0})(objectClass={userObjectClass}))");
+
+  /**
+   * This configuration controls whether the use of alternate user search filter
+   * is enabled. If the default LDAP user search filter is not able to find the
+   * authenticating user in LDAP than Ambari can fall back an alternative user
+   * search filter if this functionality is enabled.
+   *
+   * If it is not set then the default
+   */
+  public static final ConfigurationProperty<String> LDAP_ALT_USER_SEARCH_ENABLED = new ConfigurationProperty<>(
+      "authentication.ldap.alternateUserSearchEnabled", "false");
+
+  /**
+   * When authentication through LDAP is enabled Ambari Server uses this filter
+   * by default to lookup the user in LDAP when the user provides beside user
+   * name additional information. There might be cases when
+   * {@link #LDAP_USER_SEARCH_FILTER} may match multiple users in LDAP. In such
+   * cases the user is prompted to provide additional info, e.g. the domain he
+   * or she wants ot log in upon login beside the username. This filter will be
+   * used by Ambari Server to lookup users in LDAP if the login name the user
+   * logs in contains additional information beside ambari user name.
+   * <p>
+   * Note: Currently the use of alternate user search filter is triggered only
+   * if the user login name is in the username@domain format (e.g.
+   * user1@x.y.com) which is the userPrincipalName format used in AD.
+   * </p>
+   */
+  public static final ConfigurationProperty<String> LDAP_ALT_USER_SEARCH_FILTER = new ConfigurationProperty<>(
+      "authentication.ldap.alternateUserSearchFilter",
+      "(&(userPrincipalName={0})(objectClass={userObjectClass}))");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_GROUP_SEARCH_FILTER = new ConfigurationProperty<>(
+      "authorization.ldap.groupSearchFilter", "");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_REFERRAL = new ConfigurationProperty<>(
+      "authentication.ldap.referral", "follow");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_PAGINATION_ENABLED = new ConfigurationProperty<>(
+      "authentication.ldap.pagination.enabled", "true");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_SYCN_USER_MEMBER_REPLACE_PATTERN = new ConfigurationProperty<>(
+      "authentication.ldap.sync.userMemberReplacePattern",
+      LDAP_SYNC_MEMBER_REPLACE_PATTERN_DEFAULT);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_SYCN_GROUP_MEMBER_REPLACE_PATTERN = new ConfigurationProperty<>(
+      "authentication.ldap.sync.groupMemberReplacePattern",
+      LDAP_SYNC_MEMBER_REPLACE_PATTERN_DEFAULT);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_SYCN_USER_MEMBER_FILTER = new ConfigurationProperty<>(
+      "authentication.ldap.sync.userMemberFilter",
+      LDAP_SYNC_MEMBER_FILTER_DEFAULT);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> LDAP_SYCN_GROUP_MEMBER_FILTER = new ConfigurationProperty<>(
+      "authentication.ldap.sync.groupMemberFilter",
+      LDAP_SYNC_MEMBER_FILTER_DEFAULT);
+
+
+  public static final ConfigurationProperty<Long> SERVER_EC_CACHE_SIZE = new ConfigurationProperty<>(
+      "server.ecCacheSize", 10000L);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Boolean> SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED = new ConfigurationProperty<>(
+      "server.hrcStatusSummary.cache.enabled", Boolean.TRUE);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Long> SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE = new ConfigurationProperty<>(
+      "server.hrcStatusSummary.cache.size", 10000L);
+
+  /**
+   * The value is specified in {@link TimeUnit#MINUTES}.
+   */
+  public static final ConfigurationProperty<Long> SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION = new ConfigurationProperty<>(
+      "server.hrcStatusSummary.cache.expiryDuration", 30L);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Boolean> SERVER_STALE_CONFIG_CACHE_ENABLED = new ConfigurationProperty<>(
+      "server.cache.isStale.enabled", Boolean.TRUE);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_STALE_CONFIG_CACHE_EXPIRATION = new ConfigurationProperty<>(
+      "server.cache.isStale.expiration", 600);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_PERSISTENCE_TYPE = new ConfigurationProperty<>(
+      "server.persistence.type", "local");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_USER_NAME = new ConfigurationProperty<>(
+      "server.jdbc.user.name", "ambari");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_USER_PASSWD = new ConfigurationProperty<>(
+      "server.jdbc.user.passwd", "bigdata");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_DRIVER = new ConfigurationProperty<>(
+      "server.jdbc.driver", "org.postgresql.Driver");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_URL = new ConfigurationProperty<>(
+      "server.jdbc.url", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_HTTP_REQUEST_HEADER_SIZE = new ConfigurationProperty<>(
+      "server.http.request.header.size", 64 * 1024);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_HTTP_RESPONSE_HEADER_SIZE = new ConfigurationProperty<>(
+      "server.http.response.header.size", 64 * 1024);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> ROLLING_UPGRADE_SKIP_PACKAGES_PREFIXES = new ConfigurationProperty<>(
+      "rolling.upgrade.skip.packages.prefixes", "");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Boolean> STACK_UPGRADE_BYPASS_PRECHECKS = new ConfigurationProperty<>(
+      "stack.upgrade.bypass.prechecks", Boolean.FALSE);
+
+  /**
+   * If a host is shutdown or ambari-agent is stopped, then Ambari Server will still keep waiting til the task timesout,
+   * say 10-20 mins. If the host comes back online and ambari-agent is started, then need this retry property
+   * to be greater; ideally, it should be greater than 2 * command_timeout in order to retry at least
+   * 3 times in that amount of mins.
+   * Suggested value is 15-30 mins.
+   */
+  public static final ConfigurationProperty<Integer> STACK_UPGRADE_AUTO_RETRY_TIMEOUT_MINS = new ConfigurationProperty<>(
+      "stack.upgrade.auto.retry.timeout.mins", 0);
+
+  /**
+   * If the stack.upgrade.auto.retry.timeout.mins property is positive, then run RetryUpgradeActionService every x
+   * seconds.
+   */
+  public static final ConfigurationProperty<Integer> STACK_UPGRADE_AUTO_RETRY_CHECK_INTERVAL_SECS = new ConfigurationProperty<>(
+      "stack.upgrade.auto.retry.check.interval.secs", 20);
+
+  /**
+   * If auto-retry during stack upgrade is enabled, skip any tasks whose custom command name contains at least one
+   * of the strings in the following CSV property. Note that values have to be enclosed in quotes and separated by commas.
+   */
+  public static final ConfigurationProperty<String> STACK_UPGRADE_AUTO_RETRY_CUSTOM_COMMAND_NAMES_TO_IGNORE = new ConfigurationProperty<>(
+      "stack.upgrade.auto.retry.command.names.to.ignore",
+      "\"ComponentVersionCheckAction\",\"FinalizeUpgradeAction\"");
+
+  /**
+   * If auto-retry during stack upgrade is enabled, skip any tasks whose command details contains at least one
+   * of the strings in the following CSV property. Note that values have to be enclosed in quotes and separated by commas.
+   */
+  public static final ConfigurationProperty<String> STACK_UPGRADE_AUTO_RETRY_COMMAND_DETAILS_TO_IGNORE = new ConfigurationProperty<>(
+      "stack.upgrade.auto.retry.command.details.to.ignore", "\"Execute HDFS Finalize\"");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Boolean> JWT_AUTH_ENABLED = new ConfigurationProperty<>(
+      "authentication.jwt.enabled", Boolean.FALSE);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> JWT_AUTH_PROVIDER_URL = new ConfigurationProperty<>(
+      "authentication.jwt.providerUrl", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> JWT_PUBLIC = new ConfigurationProperty<>(
+      "authentication.jwt.publicKey", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> JWT_AUDIENCES = new ConfigurationProperty<>(
+      "authentication.jwt.audiences", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> JWT_COOKIE_NAME = new ConfigurationProperty<>(
+      "authentication.jwt.cookieName", "hadoop-jwt");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> JWT_ORIGINAL_URL_QUERY_PARAM = new ConfigurationProperty<>(
+      "authentication.jwt.originalUrlParamName", "originalUrl");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_CONNECTION_POOL = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool", ConnectionPoolType.INTERNAL.getName());
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MIN_SIZE = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool.min-size", 5);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MAX_SIZE = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool.max-size", 32);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_AQUISITION_SIZE = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool.acquisition-size", 5);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MAX_AGE = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool.max-age", 0);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool.max-idle-time", 14400);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME_EXCESS = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool.max-idle-time-excess", 0);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_IDLE_TEST_INTERVAL = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool.idle-test-interval", 7200);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_ATTEMPTS = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool.acquisition-retry-attempts", 30);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_DELAY = new ConfigurationProperty<>(
+      "server.jdbc.connection-pool.acquisition-retry-delay", 1000);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> OPERATIONS_RETRY_ATTEMPTS = new ConfigurationProperty<>(
+      "server.operations.retry-attempts", 0);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_RCA_USER_NAME = new ConfigurationProperty<>(
+      "server.jdbc.rca.user.name", "mapred");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_RCA_USER_PASSWD = new ConfigurationProperty<>(
+      "server.jdbc.rca.user.passwd", "mapred");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_RCA_DRIVER = new ConfigurationProperty<>(
+      "server.jdbc.rca.driver", "org.postgresql.Driver");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_JDBC_RCA_URL = new ConfigurationProperty<>(
+      "server.jdbc.rca.url", "jdbc:postgresql://" + HOSTNAME_MACRO + "/ambarirca");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<JPATableGenerationStrategy> SERVER_JDBC_GENERATE_TABLES = new ConfigurationProperty<>(
+      "server.jdbc.generateTables", JPATableGenerationStrategy.NONE);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> OS_FAMILY = new ConfigurationProperty<>(
+      "server.os_family", "");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> OS_VERSION = new ConfigurationProperty<>(
+      "server.os_type", "");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SRVR_HOSTS_MAPPING = new ConfigurationProperty<>(
+      "server.hosts.mapping", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SSL_TRUSTSTORE_PATH = new ConfigurationProperty<>(
+      "ssl.trustStore.path", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SSL_TRUSTSTORE_PASSWORD = new ConfigurationProperty<>(
+      "ssl.trustStore.password", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SSL_TRUSTSTORE_TYPE = new ConfigurationProperty<>(
+      "ssl.trustStore.type", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> MASTER_KEY_LOCATION = new ConfigurationProperty<>(
+      "security.master.key.location", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> MASTER_KEYSTORE_LOCATION = new ConfigurationProperty<>(
+      "security.master.keystore.location", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Long> TEMPORARYSTORE_RETENTION_MINUTES = new ConfigurationProperty<>(
+      "security.temporary.keystore.retention.minutes", 90L);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Boolean> TEMPORARYSTORE_ACTIVELY_PURGE = new ConfigurationProperty<>(
+      "security.temporary.keystore.actibely.purge", Boolean.TRUE);
+
+  /**
+   * The URL to use when creating messages which should include the Ambari
+   * Server URL.
+   */
+  public static final ConfigurationProperty<String> AMBARI_DISPLAY_URL = new ConfigurationProperty<>(
+      "ambari.display.url", null);
+
+  /**
+   * Key for repo validation suffixes.
+   */
+  public static final ConfigurationProperty<String> REPO_SUFFIX_KEY_UBUNTU = new ConfigurationProperty<>(
+      "repo.validation.suffixes.ubuntu", "/dists/%s/Release");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> REPO_SUFFIX_KEY_DEFAULT = new ConfigurationProperty<>(
+      "repo.validation.suffixes.default", "/repodata/repomd.xml");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> EXECUTION_SCHEDULER_CLUSTERED = new ConfigurationProperty<>(
+      "server.execution.scheduler.isClustered", "false");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> EXECUTION_SCHEDULER_THREADS = new ConfigurationProperty<>(
+      "server.execution.scheduler.maxThreads", "5");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> EXECUTION_SCHEDULER_CONNECTIONS = new ConfigurationProperty<>(
+      "server.execution.scheduler.maxDbConnections", "5");
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Long> EXECUTION_SCHEDULER_MISFIRE_TOLERATION = new ConfigurationProperty<>(
+      "server.execution.scheduler.misfire.toleration.minutes", 480L);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> EXECUTION_SCHEDULER_START_DELAY = new ConfigurationProperty<>(
+      "server.execution.scheduler.start.delay.seconds", 120);
+
+  /**
+   * The time that the executions schduler will wait before checking for new
+   * commands to schedule. Measure in {@link TimeUnit#SECONDS}.
+   */
+  public static final ConfigurationProperty<Long> EXECUTION_SCHEDULER_WAIT = new ConfigurationProperty<>(
+      "server.execution.scheduler.wait", 1L);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> SERVER_TMP_DIR = new ConfigurationProperty<>(
+      "server.tmp.dir", AmbariPath.getPath("/var/lib/ambari-server/tmp"));
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> EXTERNAL_SCRIPT_TIMEOUT = new ConfigurationProperty<>(
+      "server.script.timeout", 5000);
+
+  public static final String DEF_ARCHIVE_EXTENSION;
+  public static final String DEF_ARCHIVE_CONTENT_TYPE;
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> KDC_PORT = new ConfigurationProperty<>(
+      "default.kdcserver.port", "88");
 
   /**
-   *  PREFIX_DIR is shared in ambari-agent.ini and should only be called by unit tests.
-   *  For all server-side processing, it should be retrieved from <code>HostImpl.getPrefix()</code>
+   *
    */
-  public static final String PREFIX_DIR = "/var/lib/ambari-agent/data";
+  public static final ConfigurationProperty<Integer> KDC_CONNECTION_CHECK_TIMEOUT = new ConfigurationProperty<>(
+      "kdcserver.connection.check.timeout", 10000);
 
-  public static final String BOOTSTRAP_DIR_DEFAULT = AmbariPath.getPath("/var/run/ambari-server/bootstrap");
-  public static final String VIEWS_DIR = "views.dir";
-  public static final String VIEWS_DIR_DEFAULT = AmbariPath.getPath("/var/lib/ambari-server/resources/views");
-  public static final String VIEWS_VALIDATE = "views.validate";
-  public static final String VIEWS_VALIDATE_DEFAULT = "false";
-  public static final String VIEWS_REMOVE_UNDEPLOYED = "views.remove.undeployed";
-  public static final String VIEWS_REMOVE_UNDEPLOYED_DEFAULT = "false";
-  public static final String WEBAPP_DIR = "webapp.dir";
-  public static final String BOOTSTRAP_SCRIPT = "bootstrap.script";
-  public static final String BOOTSTRAP_SCRIPT_DEFAULT = AmbariPath.getPath("/usr/bin/ambari_bootstrap");
-  public static final String BOOTSTRAP_SETUP_AGENT_SCRIPT = "bootstrap.setup_agent.script";
-  public static final String BOOTSTRAP_SETUP_AGENT_PASSWORD = "bootstrap.setup_agent.password";
-  public static final String BOOTSTRAP_MASTER_HOSTNAME = "bootstrap.master_host_name";
-  public static final String RECOMMENDATIONS_ARTIFACTS_LIFETIME = "recommendations.artifacts.lifetime";
-  public static final String RECOMMENDATIONS_ARTIFACTS_LIFETIME_DEFAULT = "1w";
-  public static final String RECOMMENDATIONS_DIR = "recommendations.dir";
-  public static final String RECOMMENDATIONS_DIR_DEFAULT = AmbariPath.getPath("/var/run/ambari-server/stack-recommendations");
-  public static final String STACK_ADVISOR_SCRIPT = "stackadvisor.script";
-  public static final String STACK_ADVISOR_SCRIPT_DEFAULT = AmbariPath.getPath("/var/lib/ambari-server/resources/scripts/stack_advisor.py");
-  public static final String AMBARI_PYTHON_WRAP_KEY = "ambari.python.wrap";
-  public static final String AMBARI_PYTHON_WRAP_DEFAULT = "ambari-python-wrap";
-  public static final String API_AUTHENTICATED_USER = "api.authenticated.user";
-  public static final String API_USE_SSL = "api.ssl";
-  public static final String API_CSRF_PREVENTION_KEY = "api.csrfPrevention.enabled";
-  public static final String API_GZIP_COMPRESSION_ENABLED_KEY = "api.gzip.compression.enabled";
-  public static final String API_GZIP_MIN_COMPRESSION_SIZE_KEY = "api.gzip.compression.min.size";
-  public static final String AGENT_API_GZIP_COMPRESSION_ENABLED_KEY = "agent.api.gzip.compression.enabled";
-  public static final String AGENT_USE_SSL = "agent.ssl";
-  public static final String SRVR_AGENT_HOSTNAME_VALIDATE_KEY = "security.agent.hostname.validate";
-  public static final String SRVR_TWO_WAY_SSL_KEY = "security.server.two_way_ssl";
-  public static final String SRVR_TWO_WAY_SSL_PORT_KEY = "security.server.two_way_ssl.port";
-  public static final String SRVR_ONE_WAY_SSL_PORT_KEY = "security.server.one_way_ssl.port";
-  public static final String SRVR_KSTR_DIR_KEY = "security.server.keys_dir";
-  public static final String SRVR_CRT_NAME_KEY = "security.server.cert_name";
-  public static final String SRVR_CSR_NAME_KEY = "security.server.csr_name";
-  public static final String SRVR_KEY_NAME_KEY = "security.server.key_name";
-  public static final String KSTR_NAME_KEY = "security.server.keystore_name";
-  public static final String KSTR_TYPE_KEY = "security.server.keystore_type";
-  public static final String TSTR_NAME_KEY = "security.server.truststore_name";
-  public static final String TSTR_TYPE_KEY = "security.server.truststore_type";
-  public static final String SRVR_CRT_PASS_FILE_KEY = "security.server.crt_pass_file";
-  public static final String SRVR_CRT_PASS_KEY = "security.server.crt_pass";
-  public static final String SRVR_CRT_PASS_LEN_KEY = "security.server.crt_pass.len";
-  public static final String PASSPHRASE_ENV_KEY = "security.server.passphrase_env_var";
-  public static final String PASSPHRASE_KEY = "security.server.passphrase";
-  public static final String SRVR_DISABLED_CIPHERS = "security.server.disabled.ciphers";
-  public static final String SRVR_DISABLED_PROTOCOLS = "security.server.disabled.protocols";
-  public static final String RESOURCES_DIR_KEY = "resources.dir";
-  public static final String METADATA_DIR_PATH = "metadata.path";
-  public static final String COMMON_SERVICES_DIR_PATH = "common.services.path";
-  public static final String EXTENSIONS_DIR_PATH = "extensions.path";
-  public static final String MPACKS_STAGING_DIR_PATH = "mpacks.staging.path";
-  public static final String SERVER_VERSION_FILE = "server.version.file";
-  public static final String SERVER_VERSION_KEY = "version";
-  public static final String JAVA_HOME_KEY = "java.home";
-  public static final String JDK_NAME_KEY = "jdk.name";
-  public static final String JCE_NAME_KEY = "jce.name";
-  public static final float  JDK_MIN_VERSION = 1.7f;
-  public static final String CLIENT_SECURITY_KEY = "client.security";
-  public static final String CLIENT_API_PORT_KEY = "client.api.port";
-  public static final String CLIENT_API_SSL_PORT_KEY = "client.api.ssl.port";
-  public static final String CLIENT_API_SSL_KSTR_DIR_NAME_KEY = "client.api.ssl.keys_dir";
-  public static final String CLIENT_API_SSL_KSTR_NAME_KEY = "client.api.ssl.keystore_name";
-  public static final String CLIENT_API_SSL_KSTR_TYPE_KEY = "client.api.ssl.keystore_type";
-  public static final String CLIENT_API_SSL_TSTR_NAME_KEY = "client.api.ssl.truststore_name";
-  public static final String CLIENT_API_SSL_TSTR_TYPE_KEY = "client.api.ssl.truststore_type";
-  public static final String CLIENT_API_SSL_CRT_NAME_KEY = "client.api.ssl.cert_name";
-  public static final String CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY = "client.api.ssl.cert_pass_file";
-  public static final String CLIENT_API_SSL_CRT_PASS_KEY = "client.api.ssl.crt_pass";
-  public static final String CLIENT_API_SSL_KEY_NAME_KEY = "client.api.ssl.key_name";
-  public static final String ENABLE_AUTO_AGENT_CACHE_UPDATE_KEY = "agent.auto.cache.update";
-  public static final String ENABLE_AUTO_AGENT_CACHE_UPDATE_DEFAULT = "true";
-  public static final String CHECK_REMOTE_MOUNTS_KEY = "agent.check.remote.mounts";
-  public static final String CHECK_REMOTE_MOUNTS_DEFAULT = "false";
-  public static final String CHECK_MOUNTS_TIMEOUT_KEY = "agent.check.mounts.timeout";
-  public static final String CHECK_MOUNTS_TIMEOUT_DEFAULT = "0";
-  public static final String SERVER_DB_NAME_KEY = "server.jdbc.database_name";
-  public static final String SERVER_DB_NAME_DEFAULT = "ambari";
-  public static final String REQUEST_READ_TIMEOUT = "views.request.read.timeout.millis";
-  public static final String REQUEST_READ_TIMEOUT_DEFAULT= "10000";
-  public static final String REQUEST_CONNECT_TIMEOUT = "views.request.connect.timeout.millis";
-  public static final String REQUEST_CONNECT_TIMEOUT_DEFAULT = "5000";
-  public static final String AMBARI_REQUEST_READ_TIMEOUT = "views.ambari.request.read.timeout.millis";
-  public static final String AMBARI_REQUEST_READ_TIMEOUT_DEFAULT= "45000";
-  public static final String AMBARI_REQUEST_CONNECT_TIMEOUT = "views.ambari.request.connect.timeout.millis";
-  public static final String AMBARI_REQUEST_CONNECT_TIMEOUT_DEFAULT = "30000";
-  public static final String SERVER_JDBC_POSTGRES_SCHEMA_NAME = "server.jdbc.postgres.schema";
-  public static final String OJDBC_JAR_NAME_KEY = "db.oracle.jdbc.name";
-  public static final String OJDBC_JAR_NAME_DEFAULT = "ojdbc6.jar";
-  public static final String MYSQL_JAR_NAME_KEY = "db.mysql.jdbc.name";
-  public static final String MYSQL_JAR_NAME_DEFAULT = "mysql-connector-java.jar";
-  public static final String IS_LDAP_CONFIGURED = "ambari.ldap.isConfigured";
-  public static final String LDAP_USE_SSL_KEY = "authentication.ldap.useSSL";
-  public static final String LDAP_PRIMARY_URL_KEY = "authentication.ldap.primaryUrl";
-  public static final String LDAP_SECONDARY_URL_KEY = "authentication.ldap.secondaryUrl";
-  public static final String LDAP_BASE_DN_KEY = "authentication.ldap.baseDn";
-  public static final String LDAP_BIND_ANONYMOUSLY_KEY = "authentication.ldap.bindAnonymously";
-  public static final String LDAP_MANAGER_DN_KEY = "authentication.ldap.managerDn";
-  public static final String LDAP_MANAGER_PASSWORD_KEY = "authentication.ldap.managerPassword";
-  public static final String LDAP_DN_ATTRIBUTE_KEY = "authentication.ldap.dnAttribute";
-  public static final String LDAP_USERNAME_ATTRIBUTE_KEY = "authentication.ldap.usernameAttribute";
-  public static final String LDAP_USER_BASE_KEY = "authentication.ldap.userBase";
-  public static final String LDAP_USER_OBJECT_CLASS_KEY = "authentication.ldap.userObjectClass";
-  public static final String LDAP_GROUP_BASE_KEY = "authentication.ldap.groupBase";
-  public static final String LDAP_GROUP_OBJECT_CLASS_KEY = "authentication.ldap.groupObjectClass";
-  public static final String LDAP_GROUP_NAMING_ATTR_KEY = "authentication.ldap.groupNamingAttr";
-  public static final String LDAP_GROUP_MEMEBERSHIP_ATTR_KEY = "authentication.ldap.groupMembershipAttr";
-  public static final String LDAP_ADMIN_GROUP_MAPPING_RULES_KEY = "authorization.ldap.adminGroupMappingRules";
-  public static final String LDAP_ADMIN_GROUP_MAPPING_MEMBER_ATTR_KEY = "authorization.ldap.adminGroupMappingMemberAttr";
-  /**
-   * When authentication through LDAP is enabled then Ambari Server uses this filter to lookup
-   * the user in LDAP based on the provided ambari user name.
-   *
-   * If it is not set then the default {@link #LDAP_USER_SEARCH_FILTER_DEFAULT} is used.
-   */
-  public static final String LDAP_USER_SEARCH_FILTER_KEY = "authentication.ldap.userSearchFilter";
-
-  /**
-   * This configuration controls whether the use of alternate user search filter is enabled.
+  /**
    *
-   * If it is not set then the default
    */
-  public static final String LDAP_ALT_USER_SEARCH_ENABLED_KEY = "authentication.ldap.alternateUserSearchEnabled";
+  public static final ConfigurationProperty<String> KERBEROSTAB_CACHE_DIR = new ConfigurationProperty<>(
+      "kerberos.keytab.cache.dir", AmbariPath.getPath("/var/lib/ambari-server/data/cache"));
 
   /**
-   * When authentication through LDAP is enabled there might be cases when {@link #LDAP_USER_SEARCH_FILTER_KEY}
-   * may match multiple users in LDAP. In such cases the user is prompted to provide additional info, e.g. the domain
-   * he or she wants ot log in upon login beside the username. This filter will be used by Ambari Server to lookup
-   * users in LDAP if the login name the user logs in contains additional information beside ambari user name.
    *
-   * If it is not not set then the default {@link #LDAP_ALT_USER_SEARCH_FILTER_DEFAULT} is used.
+   */
+  public static final ConfigurationProperty<Boolean> KERBEROS_CHECK_JAAS_CONFIGURATION = new ConfigurationProperty<>(
+      "kerberos.check.jaas.configuration", Boolean.FALSE);
+
+  /**
    *
-   * <p>
-   *   Note: Currently this filter will only be used by Ambari Server if the user login name
-   *   is in the username@domain format (e.g. user1@x.y.com) which is the userPrincipalName
-   *   format used in AD.
-   * </p>
    */
-  public static final String LDAP_ALT_USER_SEARCH_FILTER_KEY = "authentication.ldap.alternateUserSearchFilter"; //TODO: we'll need a more generic solution to support any login name format
-
-  public static final String LDAP_GROUP_SEARCH_FILTER_KEY = "authorization.ldap.groupSearchFilter";
-  public static final String LDAP_REFERRAL_KEY = "authentication.ldap.referral";
-  public static final String LDAP_PAGINATION_ENABLED_KEY = "authentication.ldap.pagination.enabled";
-  public static final String LDAP_SYCN_USER_MEMBER_REPLACE_PATTERN = "authentication.ldap.sync.userMemberReplacePattern";
-  public static final String LDAP_SYCN_GROUP_MEMBER_REPLACE_PATTERN = "authentication.ldap.sync.groupMemberReplacePattern";
-  public static final String LDAP_SYCN_USER_MEMBER_FILTER = "authentication.ldap.sync.userMemberFilter";
-  public static final String LDAP_SYCN_GROUP_MEMBER_FILTER = "authentication.ldap.sync.groupMemberFilter";
-  public static final String SERVER_EC_CACHE_SIZE = "server.ecCacheSize";
-  public static final String SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED = "server.hrcStatusSummary.cache.enabled";
-  public static final String SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE = "server.hrcStatusSummary.cache.size";
-  public static final String SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION = "server.hrcStatusSummary.cache.expiryDuration";
-  public static final String SERVER_STALE_CONFIG_CACHE_ENABLED_KEY = "server.cache.isStale.enabled";
-  public static final String SERVER_STALE_CONFIG_CACHE_EXPIRATION_KEY = "server.cache.isStale.expiration";
-  public static final String SERVER_PERSISTENCE_TYPE_KEY = "server.persistence.type";
-  public static final String SERVER_JDBC_USER_NAME_KEY = "server.jdbc.user.name";
-  public static final String SERVER_JDBC_USER_PASSWD_KEY = "server.jdbc.user.passwd";
-  public static final String SERVER_JDBC_DRIVER_KEY = "server.jdbc.driver";
-  public static final String SERVER_JDBC_URL_KEY = "server.jdbc.url";
-  public static final String SERVER_JDBC_PROPERTIES_PREFIX = "server.jdbc.properties.";
-  public static final String SERVER_PERSISTENCE_PROPERTIES_PREFIX = "server.persistence.properties.";
+  public static final ConfigurationProperty<String> RECOVERY_TYPE = new ConfigurationProperty<>(
+      "recovery.type", null);
+
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> RECOVERY_LIFETIME_MAX_COUNT = new ConfigurationProperty<>(
+      "recovery.lifetime_max_count", null);
+
+  public static final ConfigurationProperty<String> RECOVERY_MAX_COUNT = new ConfigurationProperty<>(
+      "recovery.max_count", null);
 
-  public static final String SERVER_HTTP_REQUEST_HEADER_SIZE = "server.http.request.header.size";
-  public static final String SERVER_HTTP_RESPONSE_HEADER_SIZE = "server.http.response.header.size";
-  public static final int SERVER_HTTP_REQUEST_HEADER_SIZE_DEFAULT = 64*1024;
-  public static final int SERVER_HTTP_RESPONSE_HEADER_SIZE_DEFAULT = 64*1024;
+  public static final ConfigurationProperty<String> RECOVERY_WINDOW_IN_MIN = new ConfigurationProperty<>(
+      "recovery.window_in_minutes", null);
 
-  // Properties for stack upgrade (Rolling, Express)
-  public static final String ROLLING_UPGRADE_SKIP_PACKAGES_PREFIXES_KEY = "rolling.upgrade.skip.packages.prefixes";
-  public static final String ROLLING_UPGRADE_SKIP_PACKAGES_PREFIXES_DEFAULT = "";
+  public static final ConfigurationProperty<String> RECOVERY_RETRY_GAP = new ConfigurationProperty<>(
+      "recovery.retry_interval", null);
 
-  public static final String STACK_UPGRADE_BYPASS_PRECHECKS_KEY = "stack.upgrade.bypass.prechecks";
-  public static final String STACK_UPGRADE_BYPASS_PRECHECKS_DEFAULT = "false";
+  public static final ConfigurationProperty<String> RECOVERY_DISABLED_COMPONENTS = new ConfigurationProperty<>(
+      "recovery.disabled_components", null);
+
+  public static final ConfigurationProperty<String> RECOVERY_ENABLED_COMPONENTS = new ConfigurationProperty<>(
+      "recovery.enabled_components", null);
 
   /**
-   * If a host is shutdown or ambari-agent is stopped, then Ambari Server will still keep waiting til the task timesout,
-   * say 10-20 mins. If the host comes back online and ambari-agent is started, then need this retry property
-   * to be greater; ideally, it should be greater than 2 * command_timeout in order to retry at least
-   * 3 times in that amount of mins.
-   * Suggested value is 15-30 mins.
+   * Allow proxy calls to these hosts and ports only
    */
-  public static final String STACK_UPGRADE_AUTO_RETRY_TIMEOUT_MINS_KEY = "stack.upgrade.auto.retry.timeout.mins";
-  public static final String STACK_UPGRADE_AUTO_RETRY_TIMEOUT_MINS_DEFAULT = "0";
+  public static final ConfigurationProperty<String> PROXY_ALLOWED_HOST_PORTS = new ConfigurationProperty<>(
+      "proxy.allowed.hostports", "*:*");
 
   /**
-   * If the stack.upgrade.auto.retry.timeout.mins property is positive, then run RetryUpgradeActionService every x
-   * seconds.
+   * This key defines whether stages of parallel requests are executed in
+   * parallel or sequentally. Only stages from different requests
+   * running on not interfering host sets may be executed in parallel.
    */
-  public static final String STACK_UPGRADE_AUTO_RETRY_CHECK_INTERVAL_SECS_KEY = "stack.upgrade.auto.retry.check.interval.secs";
-  public static final String STACK_UPGRADE_AUTO_RETRY_CHECK_INTERVAL_SECS_DEFAULT = "20";
+  public static final ConfigurationProperty<Boolean> PARALLEL_STAGE_EXECUTION = new ConfigurationProperty<>(
+      "server.stages.parallel", Boolean.TRUE);
 
   /**
-   * If auto-retry during stack upgrade is enabled, skip any tasks whose custom command name contains at least one
-   * of the strings in the following CSV property. Note that values have to be enclosed in quotes and separated by commas.
+   *
    */
-  public static final String STACK_UPGRADE_AUTO_RETRY_CUSTOM_COMMAND_NAMES_TO_IGNORE_KEY = "stack.upgrade.auto.retry.command.names.to.ignore";
-  public static final String STACK_UPGRADE_AUTO_RETRY_CUSTOM_COMMAND_NAMES_TO_IGNORE_DEFAULT = "\"ComponentVersionCheckAction\",\"FinalizeUpgradeAction\"";
+  public static final ConfigurationProperty<Long> AGENT_TASK_TIMEOUT = new ConfigurationProperty<>(
+      "agent.task.timeout", 900L);
 
   /**
-   * If auto-retry during stack upgrade is enabled, skip any tasks whose command details contains at least one
-   * of the strings in the following CSV property. Note that values have to be enclosed in quotes and separated by commas.
+   *
    */
-  public static final String STACK_UPGRADE_AUTO_RETRY_COMMAND_DETAILS_TO_IGNORE_KEY = "stack.upgrade.auto.retry.command.details.to.ignore";
-  public static final String STACK_UPGRADE_AUTO_RETRY_COMMAND_DETAILS_TO_IGNORE_DEFAULT = "\"Execute HDFS Finalize\"";
-
-  public static final String JWT_AUTH_ENBABLED = "authentication.jwt.enabled";
-  public static final String JWT_AUTH_PROVIDER_URL = "authentication.jwt.providerUrl";
-  public static final String JWT_PUBLIC_KEY = "authentication.jwt.publicKey";
-  public static final String JWT_AUDIENCES = "authentication.jwt.audiences";
-  public static final String JWT_COOKIE_NAME = "authentication.jwt.cookieName";
-  public static final String JWT_ORIGINAL_URL_QUERY_PARAM = "authentication.jwt.originalUrlParamName";
-  public static final String JWT_COOKIE_NAME_DEFAULT = "hadoop-jwt";
-  public static final String JWT_ORIGINAL_URL_QUERY_PARAM_DEFAULT = "originalUrl";
-
-  public static final String SERVER_JDBC_CONNECTION_POOL = "server.jdbc.connection-pool";
-  public static final String SERVER_JDBC_CONNECTION_POOL_MIN_SIZE = "server.jdbc.connection-pool.min-size";
-  public static final String SERVER_JDBC_CONNECTION_POOL_MAX_SIZE = "server.jdbc.connection-pool.max-size";
-  public static final String SERVER_JDBC_CONNECTION_POOL_AQUISITION_SIZE = "server.jdbc.connection-pool.acquisition-size";
-  public static final String SERVER_JDBC_CONNECTION_POOL_MAX_AGE = "server.jdbc.connection-pool.max-age";
-  public static final String SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME = "server.jdbc.connection-pool.max-idle-time";
-  public static final String SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME_EXCESS = "server.jdbc.connection-pool.max-idle-time-excess";
-  public static final String SERVER_JDBC_CONNECTION_POOL_IDLE_TEST_INTERVAL = "server.jdbc.connection-pool.idle-test-interval";
-  public static final String SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_ATTEMPTS = "server.jdbc.connection-pool.acquisition-retry-attempts";
-  public static final String SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_DELAY = "server.jdbc.connection-pool.acquisition-retry-delay";
-
-  public static final String OPERATIONS_RETRY_ATTEMPTS_KEY = "server.operations.retry-attempts";
-  public static final String OPERATIONS_RETRY_ATTEMPTS_DEFAULT = "0";
-  public static final int RETRY_ATTEMPTS_LIMIT = 10;
-
-  public static final String AMBARI_SERVER_USER = "ambari-server.user";
-
-  public static final String SERVER_JDBC_RCA_USER_NAME_KEY = "server.jdbc.rca.user.name";
-  public static final String SERVER_JDBC_RCA_USER_PASSWD_KEY = "server.jdbc.rca.user.passwd";
-  public static final String SERVER_JDBC_RCA_DRIVER_KEY = "server.jdbc.rca.driver";
-  public static final String SERVER_JDBC_RCA_URL_KEY = "server.jdbc.rca.url";
-  public static final String SERVER_JDBC_GENERATE_TABLES_KEY = "server.jdbc.generateTables";
-  public static final String JDBC_UNIT_NAME = "ambari-server";
-  public static final String JDBC_LOCAL_URL = "jdbc:postgresql://localhost/";
-  public static final String JDBC_LOCAL_DRIVER = "org.postgresql.Driver";
-  public static final String DEFAULT_DERBY_SCHEMA = "ambari";
-  public static final String JDBC_IN_MEMORY_URL = String.format("jdbc:derby:memory:myDB/%s;create=true", DEFAULT_DERBY_SCHEMA);
-  public static final String JDBC_IN_MEMROY_DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
-  public static final String HOSTNAME_MACRO = "{hostname}";
-  public static final String JDBC_RCA_LOCAL_URL = "jdbc:postgresql://" + HOSTNAME_MACRO + "/ambarirca";
-  public static final String JDBC_RCA_LOCAL_DRIVER = "org.postgresql.Driver";
-  public static final String OS_FAMILY_KEY = "server.os_family";
-  public static final String OS_VERSION_KEY = "server.os_type";
-  public static final String SRVR_HOSTS_MAPPING = "server.hosts.mapping";
-  // Command parameter names
-  public static final String UPGRADE_FROM_STACK = "source_stack_version";
-  public static final String UPGRADE_TO_STACK = "target_stack_version";
-  public static final String SSL_TRUSTSTORE_PATH_KEY = "ssl.trustStore.path";
-  public static final String SSL_TRUSTSTORE_PASSWORD_KEY = "ssl.trustStore.password";
-  public static final String SSL_TRUSTSTORE_TYPE_KEY = "ssl.trustStore.type";
-  public static final String JAVAX_SSL_TRUSTSTORE = "javax.net.ssl.trustStore";
-  public static final String JAVAX_SSL_TRUSTSTORE_PASSWORD = "javax.net.ssl.trustStorePassword";
-  public static final String JAVAX_SSL_TRUSTSTORE_TYPE = "javax.net.ssl.trustStoreType";
-  public static final String SRVR_TWO_WAY_SSL_PORT_DEFAULT = "8441";
-  public static final String SRVR_ONE_WAY_SSL_PORT_DEFAULT = "8440";
-  public static final String SRVR_CRT_NAME_DEFAULT = "ca.crt";
-  public static final String SRVR_KEY_NAME_DEFAULT = "ca.key";
-  public static final String SRVR_CSR_NAME_DEFAULT = "ca.csr";
-  public static final String KSTR_NAME_DEFAULT = "keystore.p12";
-  public static final String KSTR_TYPE_DEFAULT = "PKCS12";
-  // By default self-signed certificates are used and we can use keystore as truststore in PKCS12 format
-  // When CA signed certificates are used truststore should be created in JKS format (truststore.jks)
-  public static final String TSTR_NAME_DEFAULT = "keystore.p12";
-  public static final String TSTR_TYPE_DEFAULT = "PKCS12";
-  public static final String CLIENT_API_SSL_KSTR_NAME_DEFAULT = "https.keystore.p12";
-  public static final String CLIENT_API_SSL_KSTR_TYPE_DEFAULT = "PKCS12";
-  // By default self-signed certificates are used and we can use keystore as truststore in PKCS12 format
-  // When CA signed certificates are used truststore should be created in JKS format (truststore.jks)
-  public static final String CLIENT_API_SSL_TSTR_NAME_DEFAULT = "https.keystore.p12";
-  public static final String CLIENT_API_SSL_TSTR_TYPE_DEFAULT = "PKCS12";
-  public static final String CLIENT_API_SSL_CRT_PASS_FILE_NAME_DEFAULT = "https.pass.txt";
-  public static final String CLIENT_API_SSL_KEY_NAME_DEFAULT = "https.key";
-  public static final String CLIENT_API_SSL_CRT_NAME_DEFAULT = "https.crt";
-  public static final String GLOBAL_CONFIG_TAG = "global";
-  public static final String MAPREDUCE2_LOG4J_CONFIG_TAG = "mapreduce2-log4j";
-  public static final String RCA_ENABLED_PROPERTY = "rca_enabled";
-  public static final String HIVE_CONFIG_TAG = "hive-site";
-  public static final String HIVE_METASTORE_PASSWORD_PROPERTY = "javax.jdo.option.ConnectionPassword";
-  public static final String MASTER_KEY_PERSISTED = "security.master.key.ispersisted";
-  public static final String MASTER_KEY_LOCATION = "security.master.key.location";
-  public static final String MASTER_KEYSTORE_LOCATION = "security.master.keystore.location";
-  public static final String MASTER_KEY_ENV_PROP = "AMBARI_SECURITY_MASTER_KEY";
-  public static final String MASTER_KEY_FILENAME_DEFAULT = "master";
-  public static final String MASTER_KEYSTORE_FILENAME_DEFAULT = "credentials.jceks";
-  public static final String TEMPORARY_KEYSTORE_RETENTION_MINUTES = "security.temporary.keystore.retention.minutes";
-  public static final long TEMPORARY_KEYSTORE_RETENTION_MINUTES_DEFAULT = 90;
-  public static final String TEMPORARY_KEYSTORE_ACTIVELY_PURGE = "security.temporary.keystore.actibely.purge";
-  public static final boolean TEMPORARY_KEYSTORE_ACTIVELY_PURGE_DEFAULT = true;
-
-  // Alerts notifications properties
-  public static final String AMBARI_DISPLAY_URL = "ambari.display.url";
+  public static final ConfigurationProperty<Long> AGENT_PACKAGE_INSTALL_TASK_TIMEOUT = new ConfigurationProperty<>(
+      "agent.package.install.task.timeout", 1800L);
 
   /**
-   * Key for repo validation suffixes.
+   * Max number of tasks that may be executed within a single stage.
+   * This limitation is used for tasks that when executed in a 1000+ node cluster,
+   * may DDOS servers providing downloadable resources
    */
-  public static final String REPO_SUFFIX_KEY_UBUNTU = "repo.validation.suffixes.ubuntu";
-  public static final String REPO_SUFFIX_KEY_DEFAULT = "repo.validation.suffixes.default";
-
-  public static final String EXECUTION_SCHEDULER_CLUSTERED_KEY = "server.execution.scheduler.isClustered";
-  public static final String EXECUTION_SCHEDULER_THREADS_KEY = "server.execution.scheduler.maxThreads";
-  public static final String EXECUTION_SCHEDULER_CONNECTIONS_KEY = "server.execution.scheduler.maxDbConnections";
-  public static final String EXECUTION_SCHEDULER_MISFIRE_TOLERATION_KEY = "server.execution.scheduler.misfire.toleration.minutes";
-  public static final String EXECUTION_SCHEDULER_START_DELAY_KEY = "server.execution.scheduler.start.delay.seconds";
-  public static final String EXECUTION_SCHEDULER_WAIT_KEY = "server.execution.scheduler.wait";
-  public static final String DEFAULT_SCHEDULER_THREAD_COUNT = "5";
-  public static final String DEFAULT_SCHEDULER_MAX_CONNECTIONS = "5";
-  public static final String DEFAULT_EXECUTION_SCHEDULER_MISFIRE_TOLERATION = "480";
-  public static final String DEFAULT_SCHEDULER_START_DELAY_SECONDS = "120";
-  public static final String DEFAULT_EXECUTION_SCHEDULER_WAIT_SECONDS = "1";
-  public static final String SERVER_TMP_DIR_KEY = "server.tmp.dir";
-  public static final String SERVER_TMP_DIR_DEFAULT = AmbariPath.getPath("/var/lib/ambari-server/tmp");
-  public static final String EXTERNAL_SCRIPT_TIMEOUT_KEY = "server.script.timeout";
-  public static final String EXTERNAL_SCRIPT_TIMEOUT_DEFAULT = "5000";
-  public static final String DEF_ARCHIVE_EXTENSION;
-  public static final String DEF_ARCHIVE_CONTENT_TYPE;
+  public static final ConfigurationProperty<Integer> AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT = new ConfigurationProperty<>(
+      "agent.package.parallel.commands.limit", 100);
 
   /**
-   * Kerberos related configuration options
+   * Server side task (default) timeout value
    */
-  public static final String KDC_PORT_KEY = "default.kdcserver.port";
-  public static final String KDC_PORT_KEY_DEFAULT = "88";
-  public static final String KDC_CONNECTION_CHECK_TIMEOUT_KEY = "kdcserver.connection.check.timeout";
-  public static final String KDC_CONNECTION_CHECK_TIMEOUT_DEFAULT = "10000";
-  public static final String KERBEROS_KEYTAB_CACHE_DIR_KEY = "kerberos.keytab.cache.dir";
-  public static final String KERBEROS_KEYTAB_CACHE_DIR_DEFAULT = AmbariPath.getPath("/var/lib/ambari-server/data/cache");
-  public static final String KERBEROS_CHECK_JAAS_CONFIGURATION_KEY = "kerberos.check.jaas.configuration";
-  public static final String KERBEROS_CHECK_JAAS_CONFIGURATION_DEFAULT = "false";
+  public static final ConfigurationProperty<Integer> SERVER_TASK_TIMEOUT = new ConfigurationProperty<>(
+      "server.task.timeout", 1200);
 
   /**
-   * Recovery related configuration
+   *
    */
-  public static final String RECOVERY_TYPE_KEY = "recovery.type";
-  public static final String RECOVERY_LIFETIME_MAX_COUNT_KEY = "recovery.lifetime_max_count";
-  public static final String RECOVERY_MAX_COUNT_KEY = "recovery.max_count";
-  public static final String RECOVERY_WINDOW_IN_MIN_KEY = "recovery.window_in_minutes";
-  public static final String RECOVERY_RETRY_GAP_KEY = "recovery.retry_interval";
-  public static final String RECOVERY_DISABLED_COMPONENTS_KEY = "recovery.disabled_components";
-  public static final String RECOVERY_ENABLED_COMPONENTS_KEY = "recovery.enabled_components";
+  public static final ConfigurationProperty<String> CUSTOM_ACTION_DEFINITION = new ConfigurationProperty<>(
+      "custom.action.definitions",
+      AmbariPath.getPath("/var/lib/ambari-server/resources/custom_action_definitions"));
 
   /**
-   * Allow proxy calls to these hosts and ports only
+   *
    */
-  public static final String PROXY_ALLOWED_HOST_PORTS = "proxy.allowed.hostports";
-  public static final String PROXY_ALLOWED_HOST_PORTS_DEFAULT = "*:*";
+  public static final ConfigurationProperty<String> SHARED_RESOURCES_DIR = new ConfigurationProperty<>(
+      "shared.resources.dir",
+      AmbariPath.getPath("/usr/lib/ambari-server/lib/ambari_commons/resources"));
 
   /**
-   * This key defines whether stages of parallel requests are executed in
-   * parallel or sequentally. Only stages from different requests
-   * running on not interfering host sets may be executed in parallel.
+   *
    */
-  public static final String PARALLEL_STAGE_EXECUTION_KEY = "server.stages.parallel";
-  public static final String AGENT_TASK_TIMEOUT_KEY = "agent.task.timeout";
-  public static final String AGENT_PACKAGE_INSTALL_TASK_TIMEOUT_KEY = "agent.package.install.task.timeout";
+  public static final ConfigurationProperty<String> ANONYMOUS_AUDIT_NAME = new ConfigurationProperty<>(
+      "anonymous.audit.name", "_anonymous");
 
   /**
-   * Max number of tasks that may be executed within a single stage.
-   * This limitation is used for tasks that when executed in a 1000+ node cluster,
-   * may DDOS servers providing downloadable resources
+   * Indicator for sys prepped host
+   * It is possible the some nodes are sys prepped and some are not. This can be enabled later
+   * by agent over-writing global indicator from ambari-server
    */
-  public static final String AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT_KEY = "agent.package.parallel.commands.limit";
-  public static final String AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT_DEFAULT = "100";
+  public static final ConfigurationProperty<String> SYS_PREPPED_HOSTS = new ConfigurationProperty<>(
+      "packages.pre.installed", "false");
 
-  public static final String AGENT_TASK_TIMEOUT_DEFAULT = "900";
-  public static final String AGENT_PACKAGE_INSTALL_TASK_TIMEOUT_DEFAULT = "1800";
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Boolean> BLUEPRINT_SKIP_INSTALL_TASKS = new ConfigurationProperty<>(
+      "blueprint.skip_install_tasks", Boolean.FALSE);
 
   /**
-   * Server side task (default) timeout value
+   *
    */
-  public static final String SERVER_TASK_TIMEOUT_KEY = "server.task.timeout";
-  public static final String SERVER_TASK_TIMEOUT_DEFAULT = "1200";
-
-  public static final String CUSTOM_ACTION_DEFINITION_KEY = "custom.action.definitions";
-  public static final String SHARED_RESOURCES_DIR_KEY = "shared.resources.dir";
-
-  protected static final boolean SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED_DEFAULT = true;
-  protected static final long SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE_DEFAULT = 10000L;
-  protected static final long SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION_DEFAULT = 30; //minutes
-
-  private static final String CUSTOM_ACTION_DEFINITION_DEF_VALUE = AmbariPath.getPath("/var/lib/ambari-server/resources/custom_action_definitions");
-
-  private static final long SERVER_EC_CACHE_SIZE_DEFAULT = 10000L;
-  private static final String SERVER_STALE_CONFIG_CACHE_ENABLED_DEFAULT = "true";
-  private static final String SERVER_STALE_CONFIG_CACHE_EXPIRATION_DEFAULT = "600";
-  private static final String SERVER_JDBC_USER_NAME_DEFAULT = "ambari";
-  private static final String SERVER_JDBC_USER_PASSWD_DEFAULT = "bigdata";
-  private static final String SERVER_JDBC_RCA_USER_NAME_DEFAULT = "mapred";
-  private static final String SERVER_JDBC_RCA_USER_PASSWD_DEFAULT = "mapred";
-  private static final String SRVR_AGENT_HOSTNAME_VALIDATE_DEFAULT = "true";
-  private static final String SRVR_TWO_WAY_SSL_DEFAULT = "false";
-  private static final String SRVR_KSTR_DIR_DEFAULT = ".";
-  private static final String API_CSRF_PREVENTION_DEFAULT = "true";
-  private static final String API_GZIP_COMPRESSION_ENABLED_DEFAULT = "true";
-  private static final String API_GZIP_MIN_COMPRESSION_SIZE_DEFAULT = "10240";
-  private static final String SRVR_CRT_PASS_FILE_DEFAULT = "pass.txt";
-  private static final String SRVR_CRT_PASS_LEN_DEFAULT = "50";
-  private static final String SRVR_DISABLED_CIPHERS_DEFAULT = "";
-  private static final String SRVR_DISABLED_PROTOCOLS_DEFAULT = "";
-  private static final String PASSPHRASE_ENV_DEFAULT = "AMBARI_PASSPHRASE";
-  private static final String RESOURCES_DIR_DEFAULT = AmbariPath.getPath("/var/lib/ambari-server/resources/");
-  private static final String SHARED_RESOURCES_DIR_DEFAULT = AmbariPath.getPath("/usr/lib/ambari-server/lib/ambari_commons/resources");
-  private static final String ANONYMOUS_AUDIT_NAME_KEY = "anonymous.audit.name";
-
-  private static final int CLIENT_API_PORT_DEFAULT = 8080;
-  private static final int CLIENT_API_SSL_PORT_DEFAULT = 8443;
-  private static final String LDAP_BIND_ANONYMOUSLY_DEFAULT = "true";
-  private static final String LDAP_PAGINATION_ENABLED_DEFAULT = "true";
+  private static final String LDAP_ADMIN_GROUP_MAPPING_MEMBER_ATTR_DEFAULT = "";
 
   /**
-   * Indicator for sys prepped host
-   * It is possible the some nodes are sys prepped and some are not. This can be enabled later
-   * by agent over-writing global indicator from ambari-server
+   *
    */
-  public static final String SYS_PREPPED_HOSTS_KEY = "packages.pre.installed";
-  public static final String SYS_PREPPED_HOSTS_DEFAULT = "false";
+  public static final ConfigurationProperty<Integer> SERVER_CONNECTION_MAX_IDLE_TIME = new ConfigurationProperty<>(
+      "server.connection.max.idle.millis", 900000);
 
-  public static final String BLUEPRINT_SKIP_INSTALL_TASKS_KEY = "blueprint.skip_install_tasks";
-  public static final String BLUEPRINT_SKIP_INSTALL_TASKS_DEFAULT = "false";
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> CLIENT_THREADPOOL_SIZE = new ConfigurationProperty<>(
+      "client.threadpool.size.max", 25);
 
   /**
-   * !!! TODO: For embedded server only - should be removed later
+   *
    */
-  private static final String LDAP_PRIMARY_URL_DEFAULT = "localhost:33389";
-  private static final String LDAP_BASE_DN_DEFAULT = "dc=ambari,dc=apache,dc=org";
-  private static final String LDAP_USERNAME_ATTRIBUTE_DEFAULT = "uid";
-  private static final String LDAP_DN_ATTRIBUTE_DEFAULT = "dn";
-  private static final String LDAP_USER_BASE_DEFAULT = "ou=people,dc=ambari,dc=apache,dc=org";
-  private static final String LDAP_USER_OBJECT_CLASS_DEFAULT = "person";
-  private static final String LDAP_GROUP_BASE_DEFAULT = "ou=groups,dc=ambari,dc=apache,dc=org";
-  private static final String LDAP_GROUP_OBJECT_CLASS_DEFAULT = "group";
-  private static final String LDAP_GROUP_NAMING_ATTR_DEFAULT = "cn";
-  private static final String LDAP_GROUP_MEMBERSHIP_ATTR_DEFAULT = "member";
-  private static final String LDAP_ADMIN_GROUP_MAPPING_RULES_DEFAULT = "Ambari Administrators";
-  private static final String LDAP_ADMIN_GROUP_MAPPING_MEMBER_ATTR_DEFAULT = "";
+  public static final ConfigurationProperty<Integer> AGENT_THREADPOOL_SIZE = new ConfigurationProperty<>(
+      "agent.threadpool.size.max", 25);
+
   /**
-   * If the default LDAP user search filter is not able to find the authenticating user
-   * in LDAP than Ambari can fall back an alternative user search filter if this
-   * functionality is enabled. Whether this functionality is enabled or disabled
-   * can be controlled via {@link #LDAP_ALT_USER_SEARCH_ENABLED_KEY}.
    *
-   * If {@link #LDAP_ALT_USER_SEARCH_ENABLED_KEY} not provided in ambari properties
-   * than the functionality is disabled by default.
+   */
+  public static final ConfigurationProperty<Integer> VIEW_EXTRACTION_THREADPOOL_MAX_SIZE = new ConfigurationProperty<>(
+      "view.extraction.threadpool.size.max", 20);
+
+  /**
    *
    */
-  protected static final String LDAP_ALT_USER_SEARCH_ENABLED_DEFAULT = "false";
+  public static final ConfigurationProperty<Integer> VIEW_EXTRACTION_THREADPOOL_CORE_SIZE = new ConfigurationProperty<>(
+      "view.extraction.threadpool.size.core", 10);
 
   /**
-   * When authentication through LDAP is enabled then Ambari Server uses this filter by default to lookup
-   * the user in LDAP if one not provided in the config via {@link #LDAP_USER_SEARCH_FILTER_KEY}.
+   *
    */
-  protected static final String LDAP_USER_SEARCH_FILTER_DEFAULT = "(&({usernameAttribute}={0})(objectClass={userObjectClass}))";
+  public static final ConfigurationProperty<Long> VIEW_EXTRACTION_THREADPOOL_TIMEOUT = new ConfigurationProperty<>(
+      "view.extraction.threadpool.timeout", 100000L);
 
   /**
-   * When authentication through LDAP is enabled Ambari Server uses this filter by default to lookup
-   * the user in LDAP when the user provides beside user name additional information.
-   * This filter can be overridden through {@link #LDAP_ALT_USER_SEARCH_FILTER_KEY}.
    *
-   * <p>
-   *   Note: Currently the use of alternate user search filter is triggered only if the user login name
-   *   is in the username@domain format (e.g. user1@x.y.com) which is the userPrincipalName
-   *   format used in AD.
-   * </p>
    */
-  protected static final String LDAP_ALT_USER_SEARCH_FILTER_DEFAULT = "(&(userPrincipalName={0})(objectClass={userObjectClass}))"; //TODO: we'll need a more generic solution to support any login name format
+  public static final ConfigurationProperty<Integer> VIEW_REQUEST_THREADPOOL_MAX_SIZE = new ConfigurationProperty<>(
+      "view.request.threadpool.size.max", 0);
 
-  private static final String LDAP_GROUP_SEARCH_FILTER_DEFAULT = "";
-  private static final String LDAP_REFERRAL_DEFAULT = "follow";
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> VIEW_REQUEST_THREADPOOL_TIMEOUT = new ConfigurationProperty<>(
+      "view.request.threadpool.timeout", 2000);
 
-  private static final String LDAP_SYNC_MEMBER_REPLACE_PATTERN_DEFAULT = "";
-  private static final String LDAP_SYNC_MEMBER_FILTER_DEFAULT = "";
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> PROPERTY_PROVIDER_THREADPOOL_MAX_SIZE = new ConfigurationProperty<>(
+      "server.property-provider.threadpool.size.max", PROCESSOR_BASED_THREADPOOL_MAX_SIZE_DEFAULT);
 
   /**
-   * !!! TODO: for development purposes only, should be changed to 'false'
+   *
    */
-  private static final String IS_LDAP_CONFIGURED_DEFAULT = "false";
+  public static final ConfigurationProperty<Integer> PROPERTY_PROVIDER_THREADPOOL_CORE_SIZE = new ConfigurationProperty<>(
+      "server.property-provider.threadpool.size.core",
+      PROCESSOR_BASED_THREADPOOL_CORE_SIZE_DEFAULT);
 
-  private static final String SERVER_PERSISTENCE_TYPE_DEFAULT = "local";
-  private static final String SERVER_CONNECTION_MAX_IDLE_TIME = "server.connection.max.idle.millis";
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> PROPERTY_PROVIDER_THREADPOOL_WORKER_QUEUE_SIZE = new ConfigurationProperty<>(
+      "server.property-provider.threadpool.worker.size", Integer.MAX_VALUE);
 
   /**
-   * Default for repo validation suffixes.
+   *
    */
-  private static final String REPO_SUFFIX_DEFAULT = "/repodata/repomd.xml";
-  private static final String REPO_SUFFIX_UBUNTU = "/dists/%s/Release";
+  public static final ConfigurationProperty<Long> PROPERTY_PROVIDER_THREADPOOL_COMPLETION_TIMEOUT = new ConfigurationProperty<>(
+      "server.property-provider.threadpool.completion.timeout", 5000L);
 
-  private static final String PARALLEL_STAGE_EXECUTION_DEFAULT = "true";
+  /**
+   * The time, in {@link TimeUnit#SECONDS}, that HTTP requests remain valid when
+   * inactive.
+   */
+  public static final ConfigurationProperty<Integer> SERVER_HTTP_SESSION_INACTIVE_TIMEOUT = new ConfigurationProperty<>(
+      "server.http.session.inactive_timeout", 1800);
 
-  private static final String CLIENT_THREADPOOL_SIZE_KEY = "client.threadpool.size.max";
-  private static final int CLIENT_THREADPOOL_SIZE_DEFAULT = 25;
-  private static final String AGENT_THREADPOOL_SIZE_KEY = "agent.threadpool.size.max";
-  private static final int AGENT_THREADPOOL_SIZE_DEFAULT = 25;
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Boolean> TIMELINE_METRICS_CACHE_DISABLE = new ConfigurationProperty<>(
+      "server.timeline.metrics.cache.disabled", Boolean.FALSE);
 
-  private static final String VIEW_EXTRACTION_THREADPOOL_MAX_SIZE_KEY = "view.extraction.threadpool.size.max";
-  private static final int VIEW_EXTRACTION_THREADPOOL_MAX_SIZE_DEFAULT = 20;
-  private static final String VIEW_EXTRACTION_THREADPOOL_CORE_SIZE_KEY = "view.extraction.threadpool.size.core";
-  private static final int VIEW_EXTRACTION_THREADPOOL_CORE_SIZE_DEFAULT = 10;
-  private static final String VIEW_EXTRACTION_THREADPOOL_TIMEOUT_KEY = "view.extraction.threadpool.timeout";
-  private static final long VIEW_EXTRACTION_THREADPOOL_TIMEOUT_DEFAULT = 100000L;
-  private static final String VIEW_REQUEST_THREADPOOL_MAX_SIZE_KEY = "view.request.threadpool.size.max";
-  private static final int VIEW_REQUEST_THREADPOOL_MAX_SIZE_DEFAULT = 0;
-  private static final String VIEW_REQUEST_THREADPOOL_TIMEOUT_KEY = "view.request.threadpool.timeout";
-  private static final int VIEW_REQUEST_THREADPOOL_TIMEOUT_DEFAULT = 2000;
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> TIMELINE_METRICS_CACHE_TTL = new ConfigurationProperty<>(
+      "server.timeline.metrics.cache.entry.ttl.seconds", 3600);
 
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> TIMELINE_METRICS_CACHE_IDLE_TIME = new ConfigurationProperty<>(
+      "server.timeline.metrics.cache.entry.idle.seconds", 1800);
 
   /**
-   * Threadpool sizing based on the number of available processors multiplied by 2.
+   *
    */
-  public static final int PROCESSOR_BASED_THREADPOOL_CORE_SIZE_DEFAULT = 2 * Runtime.getRuntime().availableProcessors();
+  public static final ConfigurationProperty<Integer> TIMELINE_METRICS_REQUEST_READ_TIMEOUT = new ConfigurationProperty<>(
+      "server.timeline.metrics.cache.read.timeout.millis", 10000);
 
   /**
-   * Threadpool sizing based on the number of available processors multiplied by 4.
+   *
    */
-  public static final int PROCESSOR_BASED_THREADPOOL_MAX_SIZE_DEFAULT = 4 * Runtime.getRuntime().availableProcessors();
+  public static final ConfigurationProperty<Integer> TIMELINE_METRICS_REQUEST_INTERVAL_READ_TIMEOUT = new ConfigurationProperty<>(
+      "server.timeline.metrics.cache.interval.read.timeout.millis", 10000);
 
-  public static final String PROPERTY_PROVIDER_THREADPOOL_MAX_SIZE_KEY = "server.property-provider.threadpool.size.max";
-  public static final String PROPERTY_PROVIDER_THREADPOOL_CORE_SIZE_KEY = "server.property-provider.threadpool.size.core";
-  public static final String PROPERTY_PROVIDER_THREADPOOL_WORKER_QUEUE_SIZE = "server.property-provider.threadpool.worker.size";
-  public static final String PROPERTY_PROVIDER_THREADPOOL_COMPLETION_TIMEOUT = "server.property-provider.threadpool.completion.timeout";
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Integer> TIMELINE_METRICS_REQUEST_CONNECT_TIMEOUT = new ConfigurationProperty<>(
+      "server.timeline.metrics.cache.connect.timeout.millis", 5000);
 
-  private static final String SERVER_HTTP_SESSION_INACTIVE_TIMEOUT = "server.http.session.inactive_timeout";
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Long> TIMELINE_METRICS_REQUEST_CATCHUP_INTERVAL = new ConfigurationProperty<>(
+      "server.timeline.metrics.cache.catchup.interval", 300000L);
 
-  // database pooling defaults
-  private static final String DEFAULT_JDBC_POOL_MIN_CONNECTIONS = "5";
-  private static final String DEFAULT_JDBC_POOL_MAX_CONNECTIONS = "32";
-  private static final String DEFAULT_JDBC_POOL_ACQUISITION_SIZE = "5";
-  private static final String DEFAULT_JDBC_POOL_MAX_IDLE_TIME_SECONDS = "14400";
-  private static final String DEFAULT_JDBC_POOL_EXCESS_MAX_IDLE_TIME_SECONDS = "0";
-  private static final String DEFAULT_JDBC_POOL_MAX_AGE_SECONDS = "0";
-  private static final String DEFAULT_JDBC_POOL_IDLE_TEST_INTERVAL = "7200";
-  private static final String DEFAULT_JDBC_POOL_ACQUISITION_RETRY_ATTEMPTS = "30";
-  private static final String DEFAULT_JDBC_POOL_ACQUISITION_RETRY_DELAY = "1000";
+  /**
+   *
+   */
+  public static final ConfigurationProperty<String> TIMELINE_METRICS_CACHE_HEAP_PERCENT = new ConfigurationProperty<>(
+      "server.timeline.metrics.cache.heap.percent", "15%");
 
-  // Timeline Metrics Cache settings
-  private static final String TIMELINE_METRICS_CACHE_DISABLE = "server.timeline.metrics.cache.disabled";
-  private static final String TIMELINE_METRICS_CACHE_MAX_ENTRIES = "server.timeline.metrics.cache.max.entries";
-  private static final String DEFAULT_TIMELINE_METRICS_CACHE_MAX_ENTRIES = "50";
-  private static final String TIMELINE_METRICS_CACHE_TTL = "server.timeline.metrics.cache.entry.ttl.seconds";
-  private static final String DEFAULT_TIMELINE_METRICS_CACHE_TTL = "3600";
-  private static final String TIMELINE_METRICS_CACHE_IDLE_TIME = "server.timeline.metrics.cache.entry.idle.seconds";
-  private static final String DEFAULT_TIMELINE_METRICS_CACHE_IDLE_TIME = "1800";
-  private static final String TIMELINE_METRICS_REQUEST_READ_TIMEOUT = "server.timeline.metrics.cache.read.timeout.millis";
-  private static final String DEFAULT_TIMELINE_METRICS_REQUEST_READ_TIMEOUT = "10000";
-  private static final String TIMELINE_METRICS_REQUEST_INTERVAL_READ_TIMEOUT = "server.timeline.metrics.cache.interval.read.timeout.millis";
-  private static final String DEFAULT_TIMELINE_METRICS_REQUEST_INTERVAL_READ_TIMEOUT = "10000";
-  private static final String TIMELINE_METRICS_REQUEST_CONNECT_TIMEOUT = "server.timeline.metrics.cache.connect.timeout.millis";
-  private static final String DEFAULT_TIMELINE_METRICS_REQUEST_CONNECT_TIMEOUT = "5000";
-  private static final String TIMELINE_METRICS_REQUEST_CATCHUP_INTERVAL = "server.timeline.metrics.cache.catchup.interval";
-  private static final String DEFAULT_TIMELINE_METRICS_REQUEST_CATCHUP_INTERVAL = "300000";
-  private static final String TIMELINE_METRICS_CACHE_HEAP_PERCENT = "server.timeline.metrics.cache.heap.percent";
-  private static final String DEFAULT_TIMELINE_METRICS_CACHE_HEAP_PERCENT = "15%";
-  private static final String TIMELINE_METRICS_CACHE_USE_CUSTOM_SIZING_ENGINE = "server.timeline.metrics.cache.use.custom.sizing.engine";
+  /**
+   *
+   */
+  public static final ConfigurationProperty<Boolean> TIMELINE_METRICS_CACHE_USE_CUSTOM_SIZING_ENGINE = new ConfigurationProperty<>(
+      "server.timeline.metrics.cache.use.custom.sizing.engine", Boolean.TRUE);
 
-  // Timeline Metrics SSL settings
-  public static final String AMRABI_METRICS_HTTPS_ENABLED_KEY = "server.timeline.metrics.https.enabled";
+  /**
+   * Timeline Metrics SSL settings
+   */
+  public static final ConfigurationProperty<Boolean> AMBARI_METRICS_HTTPS_ENABLED = new ConfigurationProperty<>(
+      "server.timeline.metrics.https.enabled", Boolean.FALSE);
 
   /**
    * Governs the use of {@link Parallel} to process {@link StageEntity}
    * instances into {@link Stage}.
    */
-  protected static final String EXPERIMENTAL_CONCURRENCY_STAGE_PROCESSING_ENABLED = "experimental.concurrency.stage_processing.enabled";
+  public static final ConfigurationProperty<Boolean> EXPERIMENTAL_CONCURRENCY_STAGE_PROCESSING_ENABLED = new ConfigurationProperty<>(
+      "experimental.concurrency.stage_processing.enabled", Boolean.FALSE);
 
   /**
    * The full path to the XML file that describes the different alert templates.
    */
-  private static final String ALERT_TEMPLATE_FILE = "alerts.template.file";
+  @Markdown(description="The full path to the XML file that describes the different alert templates.")
+  public static final ConfigurationProperty<String> ALERT_TEMPLATE_FILE = new ConfigurationProperty<>(
+      "alerts.template.file", null);
 
   /**
    * The maximum number of threads which will handle published alert events.
    */
-  public static final String ALERTS_EXECUTION_SCHEDULER_THREADS_KEY = "alerts.execution.scheduler.maxThreads";
-
-  /**
-   * The default core threads for handling published ale

<TRUNCATED>

[06/10] ambari git commit: AMBARI-18126 - Refactor Configuration To Allow For Generation Of Documentation (jonathanhurley)

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
index 9fa8c58..860372b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
@@ -18,14 +18,17 @@
 
 package org.apache.ambari.server.security;
 
-import java.io.*;
+import static org.easymock.EasyMock.createNiceMock;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Random;
 
-import com.google.common.io.Files;
-
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.apache.ambari.server.utils.ShellCommandUtil;
@@ -34,7 +37,11 @@ import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.junit.*;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 import com.google.inject.AbstractModule;
@@ -42,7 +49,6 @@ import com.google.inject.Guice;
 import com.google.inject.Inject;
 import com.google.inject.Injector;
 
-import static org.easymock.EasyMock.createNiceMock;
 import junit.framework.TestCase;
 
 public class CertGenerationTest {
@@ -74,7 +80,7 @@ public class CertGenerationTest {
       requestStaticInjection(CertGenerationTest.class);
     }
   }
-  
+
   protected static Properties buildTestProperties() {
     try {
       temp.create();
@@ -82,19 +88,19 @@ public class CertGenerationTest {
       e.printStackTrace();
     }
 	  Properties properties = new Properties();
-	  properties.setProperty(Configuration.SRVR_KSTR_DIR_KEY,
+	  properties.setProperty(Configuration.SRVR_KSTR_DIR.getKey(),
       temp.getRoot().getAbsolutePath());
     passLen = (int) Math.abs((new Random().nextFloat() * MAX_PASS_LEN));
 
-    properties.setProperty(Configuration.SRVR_CRT_PASS_LEN_KEY,
+    properties.setProperty(Configuration.SRVR_CRT_PASS_LEN.getKey(),
       String.valueOf(passLen));
 
     passFileName = RandomStringUtils.randomAlphabetic(PASS_FILE_NAME_LEN);
-    properties.setProperty(Configuration.SRVR_CRT_PASS_FILE_KEY, passFileName);
-	
+    properties.setProperty(Configuration.SRVR_CRT_PASS_FILE.getKey(), passFileName);
+
 	  return properties;
   }
- 
+
   protected static Constructor<Configuration> getConfigurationConstructor() {
     try {
       return Configuration.class.getConstructor(Properties.class);
@@ -102,7 +108,7 @@ public class CertGenerationTest {
 	    throw new RuntimeException("Expected constructor not found in Configuration.java", e);
 	   }
 	}
-	
+
   @BeforeClass
   public static void setUpBeforeClass() throws IOException {
 
@@ -142,24 +148,24 @@ public class CertGenerationTest {
   public static void tearDownAfterClass() throws IOException {
     temp.delete();
   }
-	
+
   @Ignore // randomly fails on BAO (e.g. https://builds.apache.org/job/Ambari-branch-2.2/155/console)
   @Test
   public void testServerCertGen() throws Exception {
-    File serverCrt = new File(temp.getRoot().getAbsoluteFile() + File.separator + Configuration.SRVR_CRT_NAME_DEFAULT);
+    File serverCrt = new File(temp.getRoot().getAbsoluteFile() + File.separator + Configuration.SRVR_CRT_NAME.getDefaultValue());
     Assert.assertTrue(serverCrt.exists());
   }
 
   @Test
   public void testServerKeyGen() throws Exception {
-    File serverKey = new File(temp.getRoot().getAbsoluteFile() + File.separator + Configuration.SRVR_KEY_NAME_DEFAULT);
+    File serverKey = new File(temp.getRoot().getAbsoluteFile() + File.separator + Configuration.SRVR_KEY_NAME.getDefaultValue());
     Assert.assertTrue(serverKey.exists());
   }
 
   @Ignore // randomly fails on BAO (e.g. https://builds.apache.org/job/Ambari-branch-2.2/155/console)
   @Test
   public void testServerKeystoreGen() throws Exception {
-    File serverKeyStrore = new File(temp.getRoot().getAbsoluteFile() + File.separator + Configuration.KSTR_NAME_DEFAULT);
+    File serverKeyStrore = new File(temp.getRoot().getAbsoluteFile() + File.separator + Configuration.KSTR_NAME.getDefaultValue());
     Assert.assertTrue(serverKeyStrore.exists());
   }
 
@@ -168,7 +174,7 @@ public class CertGenerationTest {
   public void testRevokeExistingAgentCert() throws Exception {
 
     Map<String,String> config = certMan.configs.getConfigsMap();
-    config.put(Configuration.PASSPHRASE_KEY,"passphrase");
+    config.put(Configuration.PASSPHRASE.getKey(),"passphrase");
 
     String agentHostname = "agent_hostname";
     SignCertResponse scr = certMan.signAgentCrt(agentHostname,

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/CertificateManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/CertificateManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/CertificateManagerTest.java
index f28f234..ca10c9d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/CertificateManagerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/CertificateManagerTest.java
@@ -18,10 +18,14 @@
 
 package org.apache.ambari.server.security;
 
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import junit.framework.Assert;
+import static org.easymock.EasyMock.expect;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.easymock.EasyMockSupport;
@@ -30,13 +34,11 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
-import java.io.File;
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
 
-import static org.easymock.EasyMock.expect;
+import junit.framework.Assert;
 
 public class CertificateManagerTest extends EasyMockSupport {
   @Rule
@@ -51,11 +53,11 @@ public class CertificateManagerTest extends EasyMockSupport {
     String hostname = "host1.example.com";
 
     Map<String, String> configurationMap = new HashMap<String, String>();
-    configurationMap.put(Configuration.SRVR_KSTR_DIR_KEY, directory.getAbsolutePath());
-    configurationMap.put(Configuration.SRVR_CRT_PASS_KEY, "server_cert_pass");
-    configurationMap.put(Configuration.SRVR_CRT_NAME_KEY, "server_cert_name");
-    configurationMap.put(Configuration.SRVR_KEY_NAME_KEY, "server_key_name");
-    configurationMap.put(Configuration.PASSPHRASE_KEY, "passphrase");
+    configurationMap.put(Configuration.SRVR_KSTR_DIR.getKey(), directory.getAbsolutePath());
+    configurationMap.put(Configuration.SRVR_CRT_PASS.getKey(), "server_cert_pass");
+    configurationMap.put(Configuration.SRVR_CRT_NAME.getKey(), "server_cert_name");
+    configurationMap.put(Configuration.SRVR_KEY_NAME.getKey(), "server_key_name");
+    configurationMap.put(Configuration.PASSPHRASE.getKey(), "passphrase");
 
     Configuration configuration = injector.getInstance(Configuration.class);
     expect(configuration.validateAgentHostnames()).andReturn(true).once();
@@ -70,11 +72,11 @@ public class CertificateManagerTest extends EasyMockSupport {
         directory.getAbsolutePath(),
         hostname,
         agentCrtFile.getAbsolutePath(),
-        configurationMap.get(Configuration.SRVR_CRT_PASS_KEY),
+        configurationMap.get(Configuration.SRVR_CRT_PASS.getKey()),
         directory.getAbsolutePath(),
-        configurationMap.get(Configuration.SRVR_KEY_NAME_KEY),
+        configurationMap.get(Configuration.SRVR_KEY_NAME.getKey()),
         directory.getAbsolutePath(),
-        configurationMap.get(Configuration.SRVR_CRT_NAME_KEY));
+        configurationMap.get(Configuration.SRVR_CRT_NAME.getKey()));
 
     CertificateManager certificateManager = createMockBuilder(CertificateManager.class)
         .addMockedMethod(runCommand)
@@ -125,7 +127,7 @@ public class CertificateManagerTest extends EasyMockSupport {
 
     Configuration configuration = injector.getInstance(Configuration.class);
     expect(configuration.validateAgentHostnames()).andReturn(true).once();
-    expect(configuration.getConfigsMap()).andReturn(Collections.singletonMap(Configuration.PASSPHRASE_KEY, "some_passphrase")).once();
+    expect(configuration.getConfigsMap()).andReturn(Collections.singletonMap(Configuration.PASSPHRASE.getKey(), "some_passphrase")).once();
 
     replayAll();
 
@@ -146,7 +148,7 @@ public class CertificateManagerTest extends EasyMockSupport {
 
     Configuration configuration = injector.getInstance(Configuration.class);
     expect(configuration.validateAgentHostnames()).andReturn(false).once();
-    expect(configuration.getConfigsMap()).andReturn(Collections.singletonMap(Configuration.PASSPHRASE_KEY, "some_passphrase")).once();
+    expect(configuration.getConfigsMap()).andReturn(Collections.singletonMap(Configuration.PASSPHRASE.getKey(), "some_passphrase")).once();
 
     replayAll();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java
index 95a3f0a..783c937 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java
@@ -17,26 +17,26 @@
  */
 package org.apache.ambari.server.security;
 
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.Properties;
 
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.junit.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
-import static org.easymock.EasyMock.createNiceMock;
-import static org.junit.Assert.assertTrue;
-
-import java.io.*;
-import java.lang.reflect.Constructor;
-import java.util.Properties;
-
-import static org.easymock.EasyMock.createNiceMock;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
 
 public class SslExecutionTest {
 
@@ -70,7 +70,7 @@ public class SslExecutionTest {
       e.printStackTrace();
     }
     Properties properties = new Properties();
-    properties.setProperty(Configuration.SRVR_KSTR_DIR_KEY, temp.getRoot().getAbsolutePath());
+    properties.setProperty(Configuration.SRVR_KSTR_DIR.getKey(), temp.getRoot().getAbsolutePath());
 
     return properties;
   }
@@ -102,9 +102,9 @@ public class SslExecutionTest {
   public void testSslLogging() throws Exception {
     LOG.info("Testing sign");
 
-    certMan.configs.getConfigsMap().put(Configuration.PASSPHRASE_KEY, "123123");
+    certMan.configs.getConfigsMap().put(Configuration.PASSPHRASE.getKey(), "123123");
 
-    LOG.info("key dir = " + certMan.configs.getConfigsMap().get(Configuration.SRVR_KSTR_DIR_KEY));
+    LOG.info("key dir = " + certMan.configs.getConfigsMap().get(Configuration.SRVR_KSTR_DIR.getKey()));
 
     SignCertResponse signAgentCrt = certMan.signAgentCrt("somehost", "gdfgdfg", "123123");
     LOG.info("-------------RESPONCE-------------");

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDuplicateUserTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDuplicateUserTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDuplicateUserTest.java
index 02e4021..c0086d6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDuplicateUserTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDuplicateUserTest.java
@@ -39,8 +39,6 @@ import org.junit.runner.RunWith;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
 
-import com.google.inject.Inject;
-
 @RunWith(FrameworkRunner.class)
 @CreateDS(allowAnonAccess = true,
   name = "Test",
@@ -80,13 +78,13 @@ public class AmbariLdapAuthenticationProviderForDuplicateUserTest extends Ambari
   @Before
   public void setUp() {
     Properties properties = new Properties();
-    properties.setProperty(Configuration.CLIENT_SECURITY_KEY, "ldap");
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-    properties.setProperty(Configuration.METADATA_DIR_PATH,"src/test/resources/stacks");
-    properties.setProperty(Configuration.SERVER_VERSION_FILE,"src/test/resources/version");
-    properties.setProperty(Configuration.OS_VERSION_KEY,"centos5");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
-    properties.setProperty(Configuration.LDAP_BASE_DN_KEY, "dc=apache,dc=org");
+    properties.setProperty(Configuration.CLIENT_SECURITY.getKey(), "ldap");
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(),"src/test/resources/stacks");
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(),"src/test/resources/version");
+    properties.setProperty(Configuration.OS_VERSION.getKey(),"centos5");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
+    properties.setProperty(Configuration.LDAP_BASE_DN.getKey(), "dc=apache,dc=org");
 
     Configuration configuration = new Configuration(properties);
 
@@ -97,7 +95,7 @@ public class AmbariLdapAuthenticationProviderForDuplicateUserTest extends Ambari
   public void testAuthenticateDuplicateUserAltUserSearchDisabled() throws Exception {
     // Given
     Authentication authentication = new UsernamePasswordAuthenticationToken("user_dup", "password");
-    authenticationProvider.configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "false");
+    authenticationProvider.configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "false");
 
     expectedException.expect(DuplicateLdapUserFoundAuthenticationException.class);
     expectedException.expectMessage("Login Failed: More than one user with that username found, please work with your Ambari Administrator to adjust your LDAP configuration");
@@ -115,7 +113,7 @@ public class AmbariLdapAuthenticationProviderForDuplicateUserTest extends Ambari
   public void testAuthenticateDuplicateUserAltUserSearchEnabled() throws Exception {
     // Given
     Authentication authentication = new UsernamePasswordAuthenticationToken("user_dup", "password");
-    authenticationProvider.configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "true");
+    authenticationProvider.configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "true");
 
     expectedException.expect(DuplicateLdapUserFoundAuthenticationException.class);
     expectedException.expectMessage("Login Failed: Please append your domain to your username and try again.  Example: user_dup@domain");

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderTest.java
index c011fc8..779b0a2 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderTest.java
@@ -17,12 +17,14 @@
  */
 package org.apache.ambari.server.security.authorization;
 
-import com.google.inject.persist.PersistService;
-import junit.framework.Assert;
-
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.find;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import org.apache.ambari.server.audit.AuditLoggerModule;
 import org.apache.ambari.server.configuration.Configuration;
@@ -46,9 +48,12 @@ import org.slf4j.Logger;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
 
-import static org.easymock.EasyMock.*;
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
 
-import static org.junit.Assert.*;
+import junit.framework.Assert;
 
 @RunWith(FrameworkRunner.class)
 @CreateDS(allowAnonAccess = true,
@@ -89,8 +94,8 @@ public class AmbariLdapAuthenticationProviderTest extends AmbariLdapAuthenticati
     injector.injectMembers(this);
     injector.getInstance(GuiceJpaInitializer.class);
     configuration.setClientSecurityType(ClientSecurityType.LDAP);
-    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_FILTER_KEY, "(&(mail={0})(objectClass={userObjectClass}))");
-    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "false");
+    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_FILTER.getKey(), "(&(mail={0})(objectClass={userObjectClass}))");
+    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "false");
   }
 
   @After
@@ -179,7 +184,7 @@ public class AmbariLdapAuthenticationProviderTest extends AmbariLdapAuthenticati
     users.createUser("allowedUser", "password", UserType.LDAP, true, false);
     UserEntity ldapUser = userDAO.findLdapUserByName("allowedUser");
     Authentication authentication = new UsernamePasswordAuthenticationToken("allowedUser", "password");
-    
+
     AmbariAuthentication result = (AmbariAuthentication) authenticationProvider.authenticate(authentication);
     assertTrue(result.isAuthenticated());
     assertEquals(ldapUser.getUserId(), result.getUserId());
@@ -203,7 +208,7 @@ public class AmbariLdapAuthenticationProviderTest extends AmbariLdapAuthenticati
     assertNull("User already exists in DB", userDAO.findLdapUserByName("allowedUser@ambari.apache.org"));
     users.createUser("allowedUser@ambari.apache.org", "password", UserType.LDAP, true, false);
     Authentication authentication = new UsernamePasswordAuthenticationToken("allowedUser@ambari.apache.org", "password");
-    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "true");
+    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "true");
 
     // When
     Authentication result = authenticationProvider.authenticate(authentication);
@@ -217,7 +222,7 @@ public class AmbariLdapAuthenticationProviderTest extends AmbariLdapAuthenticati
     // Given
     assertNull("User already exists in DB", userDAO.findLdapUserByName("allowedUser"));
     Authentication authentication = new UsernamePasswordAuthenticationToken("missingloginalias@ambari.apache.org", "password");
-    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "true");
+    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "true");
 
 
     // When
@@ -233,7 +238,7 @@ public class AmbariLdapAuthenticationProviderTest extends AmbariLdapAuthenticati
     // Given
     assertNull("User already exists in DB", userDAO.findLdapUserByName("allowedUser"));
     Authentication authentication = new UsernamePasswordAuthenticationToken("allowedUser@ambari.apache.org", "bad_password");
-    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "true");
+    configuration.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "true");
 
 
     // When

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
index 27e62e2..1716c97 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
@@ -18,6 +18,10 @@
  */
 package org.apache.ambari.server.security.authorization;
 
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.junit.Assert.assertEquals;
+
 import java.util.Properties;
 
 import org.apache.ambari.server.configuration.Configuration;
@@ -45,10 +49,6 @@ import org.springframework.web.context.request.RequestAttributes;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertEquals;
-
 
 @RunWith(FrameworkRunner.class)
 @CreateDS(allowAnonAccess = true,
@@ -93,13 +93,13 @@ public class AmbariLdapBindAuthenticatorTest extends AmbariLdapAuthenticationPro
     ldapCtxSource.afterPropertiesSet();
 
     Properties properties = new Properties();
-    properties.setProperty(Configuration.CLIENT_SECURITY_KEY, "ldap");
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-    properties.setProperty(Configuration.METADATA_DIR_PATH,"src/test/resources/stacks");
-    properties.setProperty(Configuration.SERVER_VERSION_FILE,"src/test/resources/version");
-    properties.setProperty(Configuration.OS_VERSION_KEY,"centos5");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
-    properties.setProperty(Configuration.LDAP_BASE_DN_KEY, "dc=ambari,dc=apache,dc=org");
+    properties.setProperty(Configuration.CLIENT_SECURITY.getKey(), "ldap");
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(),"src/test/resources/stacks");
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(),"src/test/resources/version");
+    properties.setProperty(Configuration.OS_VERSION.getKey(),"centos5");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
+    properties.setProperty(Configuration.LDAP_BASE_DN.getKey(), "dc=ambari,dc=apache,dc=org");
 
     Configuration configuration = new Configuration(properties);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModule.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModule.java
index ce4d25b..e87b1aa 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModule.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModule.java
@@ -28,14 +28,14 @@ public class AuthorizationTestModule extends AbstractModule {
   @Override
   protected void configure() {
     Properties properties = new Properties();
-    properties.setProperty(Configuration.CLIENT_SECURITY_KEY, "ldap");
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-    properties.setProperty(Configuration.METADATA_DIR_PATH,"src/test/resources/stacks");
-    properties.setProperty(Configuration.SERVER_VERSION_FILE,"src/test/resources/version");
-    properties.setProperty(Configuration.OS_VERSION_KEY,"centos5");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
+    properties.setProperty(Configuration.CLIENT_SECURITY.getKey(), "ldap");
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(),"src/test/resources/stacks");
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(),"src/test/resources/version");
+    properties.setProperty(Configuration.OS_VERSION.getKey(),"centos5");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
     //make ambari detect active configuration
-    properties.setProperty(Configuration.LDAP_GROUP_BASE_KEY, "ou=groups,dc=ambari,dc=apache,dc=org");
+    properties.setProperty(Configuration.LDAP_GROUP_BASE.getKey(), "ou=groups,dc=ambari,dc=apache,dc=org");
 
     try {
       install(new ControllerModule(properties));

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModuleForLdapDNWithSpace.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModuleForLdapDNWithSpace.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModuleForLdapDNWithSpace.java
index 0e36930..a205399 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModuleForLdapDNWithSpace.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationTestModuleForLdapDNWithSpace.java
@@ -28,15 +28,15 @@ public class AuthorizationTestModuleForLdapDNWithSpace extends AbstractModule {
   @Override
   protected void configure() {
     Properties properties = new Properties();
-    properties.setProperty(Configuration.CLIENT_SECURITY_KEY, "ldap");
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-    properties.setProperty(Configuration.METADATA_DIR_PATH,"src/test/resources/stacks");
-    properties.setProperty(Configuration.SERVER_VERSION_FILE,"src/test/resources/version");
-    properties.setProperty(Configuration.OS_VERSION_KEY,"centos5");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
+    properties.setProperty(Configuration.CLIENT_SECURITY.getKey(), "ldap");
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(),"src/test/resources/stacks");
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(),"src/test/resources/version");
+    properties.setProperty(Configuration.OS_VERSION.getKey(),"centos5");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
     //make ambari detect active configuration
-    properties.setProperty(Configuration.LDAP_BASE_DN_KEY, "dc=ambari,dc=the apache,dc=org");
-    properties.setProperty(Configuration.LDAP_GROUP_BASE_KEY, "ou=the groups,dc=ambari,dc=the apache,dc=org");
+    properties.setProperty(Configuration.LDAP_BASE_DN.getKey(), "dc=ambari,dc=the apache,dc=org");
+    properties.setProperty(Configuration.LDAP_GROUP_BASE.getKey(), "ou=the groups,dc=ambari,dc=the apache,dc=org");
 
     try {
       install(new ControllerModule(properties));

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
index aa70be2..4571c86 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
@@ -24,12 +24,9 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.util.List;
-import java.util.Properties;
 
 import javax.persistence.EntityManager;
 
-import junit.framework.Assert;
-
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -63,6 +60,8 @@ import com.google.inject.Injector;
 import com.google.inject.Provider;
 import com.google.inject.persist.PersistService;
 
+import junit.framework.Assert;
+
 public class TestUsers {
   private Injector injector;
 
@@ -88,12 +87,10 @@ public class TestUsers {
   protected PasswordEncoder passwordEncoder;
   @Inject
   Provider<EntityManager> entityManagerProvider;
-  private Properties properties;
 
   @Before
   public void setup() throws AmbariException {
     InMemoryDefaultTestModule module = new InMemoryDefaultTestModule();
-    properties = module.getProperties();
     injector = Guice.createInjector(module);
     injector.getInstance(GuiceJpaInitializer.class);
     injector.injectMembers(this);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialProviderTest.java
index 884cffa..3bb9e27 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialProviderTest.java
@@ -17,7 +17,9 @@
  */
 package org.apache.ambari.server.security.encryption;
 
-import junit.framework.Assert;
+import java.io.File;
+import java.io.IOException;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.junit.After;
 import org.junit.Before;
@@ -25,8 +27,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
-import java.io.File;
-import java.io.IOException;
+import junit.framework.Assert;
 
 public class CredentialProviderTest {
   @Rule

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialStoreServiceImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialStoreServiceImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialStoreServiceImplTest.java
index daea963..7f9f3fd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialStoreServiceImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/CredentialStoreServiceImplTest.java
@@ -18,10 +18,13 @@
 
 package org.apache.ambari.server.security.encryption;
 
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import junit.framework.Assert;
+import static org.easymock.EasyMock.createNiceMock;
+
+import java.io.File;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.security.SecurePasswordHelper;
@@ -33,12 +36,11 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
-import java.io.File;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
 
-import static org.easymock.EasyMock.createNiceMock;
+import junit.framework.Assert;
 
 public class CredentialStoreServiceImplTest {
 
@@ -60,8 +62,8 @@ public class CredentialStoreServiceImplTest {
       protected void configure() {
         Properties properties = new Properties();
 
-        properties.setProperty(Configuration.MASTER_KEY_LOCATION, tmpFolder.getRoot().getAbsolutePath());
-        properties.setProperty(Configuration.MASTER_KEYSTORE_LOCATION, tmpFolder.getRoot().getAbsolutePath());
+        properties.setProperty(Configuration.MASTER_KEY_LOCATION.getKey(), tmpFolder.getRoot().getAbsolutePath());
+        properties.setProperty(Configuration.MASTER_KEYSTORE_LOCATION.getKey(), tmpFolder.getRoot().getAbsolutePath());
 
         bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class));
         bind(SecurePasswordHelper.class).toInstance(new SecurePasswordHelper());

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java
index b597e0a..e362e03 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java
@@ -17,8 +17,19 @@
  */
 package org.apache.ambari.server.security.encryption;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import static org.easymock.EasyMock.expect;
+import static org.powermock.api.easymock.PowerMock.mockStatic;
+import static org.powermock.api.easymock.PowerMock.replayAll;
+import static org.powermock.api.easymock.PowerMock.verifyAll;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.nio.file.attribute.PosixFilePermission;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -30,18 +41,8 @@ import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 
-import java.io.File;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.nio.file.attribute.PosixFilePermission;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import static org.easymock.EasyMock.expect;
-import static org.powermock.api.easymock.PowerMock.mockStatic;
-import static org.powermock.api.easymock.PowerMock.replayAll;
-import static org.powermock.api.easymock.PowerMock.verifyAll;
+import junit.framework.Assert;
+import junit.framework.TestCase;
 
 @RunWith(PowerMockRunner.class)
 @PowerMockIgnore({"javax.crypto.*", "org.apache.log4j.*"})
@@ -95,7 +96,7 @@ public class MasterKeyServiceTest extends TestCase {
   @Test
   public void testReadFromEnvAsKey() throws Exception {
     Map<String, String> mapRet = new HashMap<String, String>();
-    mapRet.put(Configuration.MASTER_KEY_ENV_PROP, "ThisisSomePassPhrase");
+    mapRet.put("AMBARI_SECURITY_MASTER_KEY", "ThisisSomePassPhrase");
     mockStatic(System.class);
     expect(System.getenv()).andReturn(mapRet);
     replayAll();
@@ -118,7 +119,7 @@ public class MasterKeyServiceTest extends TestCase {
     Assert.assertTrue(masterKeyFile.exists());
 
     Map<String, String> mapRet = new HashMap<String, String>();
-    mapRet.put(Configuration.MASTER_KEY_LOCATION, masterKeyFile.getAbsolutePath());
+    mapRet.put(Configuration.MASTER_KEY_LOCATION.getKey(), masterKeyFile.getAbsolutePath());
     mockStatic(System.class);
     expect(System.getenv()).andReturn(mapRet);
     replayAll();

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java
index a816da6..dbf28be 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java
@@ -61,9 +61,17 @@ public class LdapPerformanceTest {
     injector.injectMembers(this);
     injector.getInstance(GuiceJpaInitializer.class);
     configuration.setClientSecurityType(ClientSecurityType.LDAP);
-    configuration.setLdap("c6402.ambari.apache.org:389", "posixAccount", "uid",
-        "posixGroup", "cn", "memberUid", "dc=apache,dc=org", false,
-        "uid=hdfs,ou=people,ou=dev,dc=apache,dc=org", "hdfs");
+
+    configuration.setProperty(Configuration.LDAP_PRIMARY_URL.getKey(), "c6402.ambari.apache.org:389");
+    configuration.setProperty(Configuration.LDAP_USER_OBJECT_CLASS.getKey(), "posixAccount");
+    configuration.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE.getKey(), "uid");
+    configuration.setProperty(Configuration.LDAP_GROUP_OBJECT_CLASS.getKey(), "posixGroup");
+    configuration.setProperty(Configuration.LDAP_GROUP_NAMING_ATTR.getKey(), "cn");
+    configuration.setProperty(Configuration.LDAP_GROUP_MEMEBERSHIP_ATTR.getKey(), "memberUid");
+    configuration.setProperty(Configuration.LDAP_BASE_DN.getKey(), "dc=apache,dc=org");
+    configuration.setProperty(Configuration.LDAP_BIND_ANONYMOUSLY.getKey(), String.valueOf(false));
+    configuration.setProperty(Configuration.LDAP_MANAGER_DN.getKey(), "uid=hdfs,ou=people,ou=dev,dc=apache,dc=org");
+    configuration.setProperty(Configuration.LDAP_MANAGER_PASSWORD.getKey(), "hdfs");
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
index 0c45347..bf716b7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
@@ -67,7 +67,8 @@ public class ConfigUpgradeValidityTest {
 
     // ensure that we use the real stacks
     InMemoryDefaultTestModule testModule = new InMemoryDefaultTestModule();
-    testModule.getProperties().put(Configuration.METADATA_DIR_PATH, "src/main/resources/stacks");
+    testModule.getProperties().put(Configuration.METADATA_DIR_PATH.getKey(),
+        "src/main/resources/stacks");
 
     injector = Guice.createInjector(testModule);
     injector.getInstance(GuiceJpaInitializer.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java
index a1fd32d..ff556b1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java
@@ -18,6 +18,8 @@
 
 package org.apache.ambari.server.upgrade;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.IOException;
 import java.sql.DriverManager;
 import java.sql.SQLException;
@@ -74,8 +76,6 @@ import com.google.inject.Key;
 import com.google.inject.TypeLiteral;
 import com.google.inject.persist.PersistService;
 
-import static org.junit.Assert.assertTrue;
-
 @RunWith(Parameterized.class)
 public class UpgradeTest {
   private static final Logger LOG = LoggerFactory.getLogger(UpgradeTest.class);
@@ -93,13 +93,13 @@ public class UpgradeTest {
 
   public UpgradeTest(String sourceVersion) {
     this.sourceVersion = sourceVersion;
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "remote");
-    properties.setProperty(Configuration.SERVER_JDBC_URL_KEY, Configuration.JDBC_IN_MEMORY_URL);
-    properties.setProperty(Configuration.SERVER_JDBC_DRIVER_KEY, Configuration.JDBC_IN_MEMROY_DRIVER);
-    properties.setProperty(Configuration.METADATA_DIR_PATH, "src/test/resources/stacks");
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, "src/test/resources/version");
-    properties.setProperty(Configuration.OS_VERSION_KEY, "centos5");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "remote");
+    properties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), Configuration.JDBC_IN_MEMORY_URL);
+    properties.setProperty(Configuration.SERVER_JDBC_DRIVER.getKey(), Configuration.JDBC_IN_MEMORY_DRIVER);
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), "src/test/resources/stacks");
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), "src/test/resources/version");
+    properties.setProperty(Configuration.OS_VERSION.getKey(), "centos5");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
   }
 
   @Test
@@ -125,7 +125,7 @@ public class UpgradeTest {
   }
 
   private void dropDatabase() throws ClassNotFoundException, SQLException {
-    Class.forName(Configuration.JDBC_IN_MEMROY_DRIVER);
+    Class.forName(Configuration.JDBC_IN_MEMORY_DRIVER);
     try {
       DriverManager.getConnection(DROP_DERBY_URL);
     } catch (SQLNonTransientConnectionException ignored) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/view/ViewURLStreamProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewURLStreamProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewURLStreamProviderTest.java
index 89df7fb..19c3ca6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewURLStreamProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewURLStreamProviderTest.java
@@ -18,11 +18,13 @@
 
 package org.apache.ambari.server.view;
 
-import org.apache.ambari.server.configuration.Configuration;
-import org.apache.ambari.server.controller.internal.URLStreamProvider;
-import org.apache.ambari.view.ViewContext;
-import org.junit.Assert;
-import org.junit.Test;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.aryEq;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
@@ -33,13 +35,11 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.aryEq;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.internal.URLStreamProvider;
+import org.apache.ambari.view.ViewContext;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class ViewURLStreamProviderTest {
 
@@ -348,11 +348,11 @@ public class ViewURLStreamProviderTest {
     Properties ambariProperties = new Properties();
     Configuration configuration = new Configuration(ambariProperties);
     Assert.assertEquals(
-        Configuration.PROXY_ALLOWED_HOST_PORTS_DEFAULT,
-        configuration.getConfigsMap().get(Configuration.PROXY_ALLOWED_HOST_PORTS));
+        Configuration.PROXY_ALLOWED_HOST_PORTS.getDefaultValue(),
+        configuration.getProxyHostAndPorts());
     ViewURLStreamProvider.HostPortRestrictionHandler hprh =
         viewURLStreamProvider.new HostPortRestrictionHandler(
-            configuration.getProperty(Configuration.PROXY_ALLOWED_HOST_PORTS));
+            configuration.getProxyHostAndPorts());
     Assert.assertFalse(hprh.proxyCallRestricted());
     Assert.assertTrue(hprh.allowProxy("host1.com", null));
     Assert.assertTrue(hprh.allowProxy(null, null));
@@ -361,11 +361,11 @@ public class ViewURLStreamProviderTest {
     Assert.assertTrue(hprh.allowProxy(" host1.com ", "8080"));
 
     ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.PROXY_ALLOWED_HOST_PORTS, "");
+    ambariProperties.setProperty(Configuration.PROXY_ALLOWED_HOST_PORTS.getKey(), "");
     configuration = new Configuration(ambariProperties);
     hprh =
         viewURLStreamProvider.new HostPortRestrictionHandler(
-            configuration.getProperty(Configuration.PROXY_ALLOWED_HOST_PORTS));
+            configuration.getProxyHostAndPorts());
     Assert.assertFalse(hprh.proxyCallRestricted());
     Assert.assertTrue(hprh.allowProxy("host1.com", null));
     Assert.assertTrue(hprh.allowProxy(null, null));
@@ -374,11 +374,11 @@ public class ViewURLStreamProviderTest {
     Assert.assertTrue(hprh.allowProxy(" host1.com ", "8080"));
 
     ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.PROXY_ALLOWED_HOST_PORTS, "host1.com:*");
+    ambariProperties.setProperty(Configuration.PROXY_ALLOWED_HOST_PORTS.getKey(), "host1.com:*");
     configuration = new Configuration(ambariProperties);
     hprh =
         viewURLStreamProvider.new HostPortRestrictionHandler(
-            configuration.getProperty(Configuration.PROXY_ALLOWED_HOST_PORTS));
+            configuration.getProxyHostAndPorts());
     Assert.assertTrue(hprh.proxyCallRestricted());
     Assert.assertTrue(hprh.allowProxy("host1.com", null));
     Assert.assertTrue(hprh.allowProxy(null, null));
@@ -387,11 +387,11 @@ public class ViewURLStreamProviderTest {
     Assert.assertFalse(hprh.allowProxy(" host2.com ", "8080"));
 
     ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.PROXY_ALLOWED_HOST_PORTS, " host1.com:80 ,host2.org:443, host2.org:22");
+    ambariProperties.setProperty(Configuration.PROXY_ALLOWED_HOST_PORTS.getKey(), " host1.com:80 ,host2.org:443, host2.org:22");
     configuration = new Configuration(ambariProperties);
     hprh =
         viewURLStreamProvider.new HostPortRestrictionHandler(
-            configuration.getProperty(Configuration.PROXY_ALLOWED_HOST_PORTS));
+            configuration.getProxyHostAndPorts());
     Assert.assertTrue(hprh.proxyCallRestricted());
     Assert.assertTrue(hprh.allowProxy("host1.com", "80"));
     Assert.assertFalse(hprh.allowProxy("host1.com", "20"));


[10/10] ambari git commit: AMBARI-18126 - Refactor Configuration To Allow For Generation Of Documentation (jonathanhurley)

Posted by jo...@apache.org.
AMBARI-18126 - Refactor Configuration To Allow For Generation Of Documentation (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5630b5e7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5630b5e7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5630b5e7

Branch: refs/heads/branch-2.5
Commit: 5630b5e75661e437fb5a214f8a5a729eadbc3634
Parents: 9d1e87b
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Thu Aug 11 15:40:14 2016 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Fri Sep 9 17:20:40 2016 -0400

----------------------------------------------------------------------
 .../org/apache/ambari/annotations/Markdown.java |   41 +
 .../ambari/annotations/TransactionalLock.java   |    2 +-
 .../server/api/services/ComponentService.java   |   30 +-
 .../api/services/HostComponentService.java      |   15 +-
 .../checks/DatabaseConsistencyCheckHelper.java  |    2 +-
 .../ComponentSSLConfiguration.java              |    8 +-
 .../server/configuration/Configuration.java     | 2994 +++++++++++-------
 .../ambari/server/controller/AmbariServer.java  |   83 +-
 .../server/controller/ControllerModule.java     |   34 +-
 .../server/controller/KerberosHelperImpl.java   |    2 +-
 .../internal/ClientConfigResourceProvider.java  |    6 +-
 .../controller/utilities/DatabaseChecker.java   |    2 +-
 .../server/resources/ResourceManager.java       |    4 +-
 .../security/AbstractSecurityHeaderFilter.java  |    6 +-
 .../server/security/CertificateManager.java     |   49 +-
 .../encryption/MasterKeyServiceImpl.java        |   35 +-
 .../security/unsecured/rest/ConnectionInfo.java |    9 +-
 .../services/RetryUpgradeActionService.java     |   57 +-
 .../ambari/server/state/stack/OsFamily.java     |   10 +-
 .../server/view/ViewURLStreamProvider.java      |   54 +-
 .../annotations/TransactionalLockTest.java      |    4 +-
 .../actionmanager/TestActionScheduler.java      |    6 +-
 .../server/agent/TestHeartbeatHandler.java      |   10 +-
 .../KdcServerConnectionVerificationTest.java    |    2 +-
 .../server/api/services/AmbariMetaInfoTest.java |   16 +-
 .../services/KerberosServiceMetaInfoTest.java   |   10 +-
 .../ambari/server/bootstrap/BootStrapTest.java  |   41 +-
 .../server/checks/UpgradeCheckOrderTest.java    |    6 +-
 .../cleanup/CleanupServiceFunctionalTest.java   |    2 +-
 .../ComponentSSLConfigurationTest.java          |    9 +-
 .../server/configuration/ConfigurationTest.java |  188 +-
 .../AmbariManagementControllerTest.java         |   26 +-
 .../BackgroundCustomCommandExecutionTest.java   |   54 +-
 .../internal/AlertResourceProviderTest.java     |    6 +-
 .../ClientConfigResourceProviderTest.java       |   27 +-
 ...ClusterStackVersionResourceProviderTest.java |    6 +-
 .../CredentialResourceProviderTest.java         |   45 +-
 .../utilities/DatabaseCheckerTest.java          |    8 +-
 .../notifications/DispatchFactoryTest.java      |    8 +-
 .../server/orm/InMemoryDefaultTestModule.java   |   20 +-
 .../ambari/server/orm/JdbcPropertyTest.java     |   13 +-
 .../ambari/server/resources/TestResources.java  |   26 +-
 .../scheduler/ExecutionScheduleManagerTest.java |   61 +-
 .../scheduler/ExecutionSchedulerTest.java       |   26 +-
 .../AbstractSecurityHeaderFilterTest.java       |   32 +-
 .../AmbariServerSecurityHeaderFilterTest.java   |   16 +-
 .../AmbariViewsSecurityHeaderFilterTest.java    |   16 +-
 .../server/security/CertGenerationTest.java     |   40 +-
 .../server/security/CertificateManagerTest.java |   42 +-
 .../server/security/SslExecutionTest.java       |   32 +-
 ...henticationProviderForDuplicateUserTest.java |   20 +-
 .../AmbariLdapAuthenticationProviderTest.java   |   33 +-
 .../AmbariLdapBindAuthenticatorTest.java        |   22 +-
 .../authorization/AuthorizationTestModule.java  |   14 +-
 ...thorizationTestModuleForLdapDNWithSpace.java |   16 +-
 .../security/authorization/TestUsers.java       |    7 +-
 .../encryption/CredentialProviderTest.java      |    7 +-
 .../CredentialStoreServiceImplTest.java         |   24 +-
 .../encryption/MasterKeyServiceTest.java        |   33 +-
 .../security/ldap/LdapPerformanceTest.java      |   14 +-
 .../state/stack/ConfigUpgradeValidityTest.java  |    3 +-
 .../ambari/server/upgrade/UpgradeTest.java      |   20 +-
 .../server/view/ViewURLStreamProviderTest.java  |   42 +-
 63 files changed, 2725 insertions(+), 1771 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/annotations/Markdown.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/annotations/Markdown.java b/ambari-server/src/main/java/org/apache/ambari/annotations/Markdown.java
new file mode 100644
index 0000000..0f7748e
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/annotations/Markdown.java
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * The {@link Markdown} annotation is used to add information when creating <a
+ * href=https://en.wikipedia.org/wiki/Markdown>Markdown</a> content.
+ */
+@Retention(RUNTIME)
+@Target({ TYPE, FIELD, METHOD })
+public @interface Markdown {
+  /**
+   * A description to add for this element when generating Markdown.
+   *
+   * @return
+   */
+  String description();
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/annotations/TransactionalLock.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/annotations/TransactionalLock.java b/ambari-server/src/main/java/org/apache/ambari/annotations/TransactionalLock.java
index cd961ba..a8b89a9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/annotations/TransactionalLock.java
+++ b/ambari-server/src/main/java/org/apache/ambari/annotations/TransactionalLock.java
@@ -65,7 +65,7 @@ public @interface TransactionalLock {
      * Joinpoint lock around work performed on caching the host role command
      * status in a given stage and request.
      */
-    HRC_STATUS_CACHE(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED);
+    HRC_STATUS_CACHE(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED.getKey());
 
     /**
      * Logger.

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java
index e7e0029..ded2596 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java
@@ -18,17 +18,6 @@
 
 package org.apache.ambari.server.api.services;
 
-import com.google.inject.Inject;
-import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.configuration.Configuration;
-import org.apache.ambari.server.controller.spi.ClusterController;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.ambari.server.controller.utilities.ClusterControllerHelper;
-import org.apache.ambari.server.orm.GuiceJpaInitializer;
-import org.apache.ambari.server.state.ConfigHelper;
-
-import javax.ws.rs.*;
-import javax.ws.rs.core.*;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -36,6 +25,23 @@ import java.io.InputStream;
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.spi.Resource;
+
 /**
  * Service responsible for components resource requests.
  */
@@ -233,7 +239,7 @@ public class ComponentService extends BaseService {
 
     Response.ResponseBuilder rb = Response.status(Response.Status.OK);
     Configuration configs = new Configuration();
-    String tmpDir = configs.getProperty(Configuration.SERVER_TMP_DIR_KEY);
+    String tmpDir = configs.getProperty(Configuration.SERVER_TMP_DIR.getKey());
     File file = new File(tmpDir + File.separator + componentName + "-configs" + Configuration.DEF_ARCHIVE_EXTENSION);
     InputStream resultInputStream = null;
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java
index 4990ad7..4722223 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java
@@ -25,7 +25,14 @@ import java.io.InputStream;
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.ws.rs.*;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Response;
@@ -203,7 +210,7 @@ public class HostComponentService extends BaseService {
     return handleRequest(headers, null, ui, Request.Type.DELETE,
         createHostComponentResource(m_clusterName, m_hostName, hostComponentName));
   }
-  
+
   /**
    * Handles DELETE /clusters/{clusterID}/hosts/{hostID}/host_components
    * Deletes multiple host_component resources.
@@ -235,7 +242,7 @@ public class HostComponentService extends BaseService {
 
     return handleRequest(headers, null, ui, Request.Type.GET, ri);
   }
-  
+
   /**
    * Create a host_component resource instance.
    *
@@ -272,7 +279,7 @@ public class HostComponentService extends BaseService {
 
     Response.ResponseBuilder rb = Response.status(Response.Status.OK);
     Configuration configs = new Configuration();
-    String tmpDir = configs.getProperty(Configuration.SERVER_TMP_DIR_KEY);
+    String tmpDir = configs.getProperty(Configuration.SERVER_TMP_DIR.getKey());
     File file = new File(tmpDir+File.separator+hostComponentName+"-configs.tar.gz");
     InputStream resultInputStream = null;
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
index fa42e8a..d057f00 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
@@ -112,7 +112,7 @@ public class DatabaseConsistencyCheckHelper {
       metainfoDAO = injector.getInstance(MetainfoDAO.class);
     }
 
-    MetainfoEntity schemaVersionEntity = metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY);
+    MetainfoEntity schemaVersionEntity = metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey());
     String schemaVersion = null;
 
     if (schemaVersionEntity != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/main/java/org/apache/ambari/server/configuration/ComponentSSLConfiguration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/ComponentSSLConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/ComponentSSLConfiguration.java
index cb9651e..c68efa6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/ComponentSSLConfiguration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/ComponentSSLConfiguration.java
@@ -57,10 +57,10 @@ public class ComponentSSLConfiguration {
    * @param configuration  the configuration
    */
   public void init(Configuration configuration) {
-    truststorePath     = configuration.getProperty(Configuration.SSL_TRUSTSTORE_PATH_KEY);
+    truststorePath     = configuration.getProperty(Configuration.SSL_TRUSTSTORE_PATH.getKey());
     truststorePassword = getPassword(configuration);
-    truststoreType     = configuration.getProperty(Configuration.SSL_TRUSTSTORE_TYPE_KEY);
-    httpsEnabled = Boolean.parseBoolean(configuration.getProperty(Configuration.AMRABI_METRICS_HTTPS_ENABLED_KEY));
+    truststoreType     = configuration.getProperty(Configuration.SSL_TRUSTSTORE_TYPE.getKey());
+    httpsEnabled = Boolean.parseBoolean(configuration.getProperty(Configuration.AMBARI_METRICS_HTTPS_ENABLED.getKey()));
   }
 
 
@@ -115,7 +115,7 @@ public class ComponentSSLConfiguration {
   // -----helper methods -----------------------------------------------------
 
   private String getPassword(Configuration configuration) {
-    String rawPassword = configuration.getProperty(Configuration.SSL_TRUSTSTORE_PASSWORD_KEY);
+    String rawPassword = configuration.getProperty(Configuration.SSL_TRUSTSTORE_PASSWORD.getKey());
     String password    = configuration.readPasswordFromStore(rawPassword);
 
     return password == null ? rawPassword : password;


[05/10] ambari git commit: AMBARI-18331 - JMX metric retrieval method may unnecessarily refresh metrics at a high rate (jonathanhurley)

Posted by jo...@apache.org.
AMBARI-18331 - JMX metric retrieval method may unnecessarily refresh metrics at a high rate (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4ea3229d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4ea3229d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4ea3229d

Branch: refs/heads/branch-2.5
Commit: 4ea3229df1c16c47ad42aa5eb298698787c33ab4
Parents: cc43870
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Wed Sep 7 09:02:25 2016 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Fri Sep 9 17:20:40 2016 -0400

----------------------------------------------------------------------
 ambari-server/docs/configuration/index.md       |   3 +-
 .../server/configuration/Configuration.java     |  54 ++++-
 .../controller/jmx/JMXPropertyProvider.java     |   5 +-
 .../metrics/RestMetricsPropertyProvider.java    |   3 +-
 .../state/services/MetricsRetrievalService.java | 193 +++++++++++-------
 .../metrics/JMXPropertyProviderTest.java        |   8 +-
 .../RestMetricsPropertyProviderTest.java        |   8 +-
 .../services/MetricsRetrievalServiceTest.java   | 195 +++++++++++++++++++
 8 files changed, 396 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4ea3229d/ambari-server/docs/configuration/index.md
----------------------------------------------------------------------
diff --git a/ambari-server/docs/configuration/index.md b/ambari-server/docs/configuration/index.md
index 311def5..9cdfc4d 100644
--- a/ambari-server/docs/configuration/index.md
+++ b/ambari-server/docs/configuration/index.md
@@ -96,7 +96,6 @@ The following are the properties which can be used to configure Ambari.
 | authentication.ldap.usernameAttribute | The attribute used for determining the user name, such as `uid`. |`uid` | 
 | authorization.ldap.adminGroupMappingRules | A comma-separate list of groups which would give a user administrative access to Ambari when syncing from LDAP. This is only used when `authorization.ldap.groupSearchFilter` is blank.<br/><br/>The following are examples of valid values:<ul><li>`administrators`<li>`Hadoop Admins,Hadoop Admins.*,DC Admins,.*Hadoop Operators`</ul> |`Ambari Administrators` | 
 | authorization.ldap.groupSearchFilter | The DN to use when searching for LDAP groups. | | 
-| blueprint.skip_install_tasks | Determines if the request generated by a blueprint should include the package installation tasks. |`false` | 
 | bootstrap.dir | The directory on the Ambari Server file system used for storing Ambari Agent bootstrap information such as request responses. |`/var/run/ambari-server/bootstrap` | 
 | bootstrap.master_host_name | The host name of the Ambari Server which will be used by the Ambari Agents for communication. | | 
 | bootstrap.script | The location and name of the Python script used to bootstrap new Ambari Agent hosts. |`/usr/lib/python2.6/site-packages/ambari_server/bootstrap.py` | 
@@ -130,6 +129,8 @@ The following are the properties which can be used to configure Ambari.
 | kerberos.keytab.cache.dir | The location on the Ambari Server where Kerberos keytabs are cached. |`/var/lib/ambari-server/data/cache` | 
 | metadata.path | The location on the Ambari Server where the stack resources exist.<br/><br/>The following are examples of valid values:<ul><li>`/var/lib/ambari-server/resources/stacks`</ul> | | 
 | metrics.retrieval-service.cache.timeout | The amount of time, in minutes, that JMX and REST metrics retrieved directly can remain in the cache. |`30` | 
+| metrics.retrieval-service.request.ttl | The number of seconds to wait between issuing JMX or REST metric requests to the same endpoint. This property is used to throttle requests to the same URL being made too close together<br/><br/> This property is related to `metrics.retrieval-service.request.ttl.enabled`. |`5` | 
+| metrics.retrieval-service.request.ttl.enabled | Enables throttling requests to the same endpoint within a fixed amount of time. This property will prevent Ambari from making new metric requests to update the cache for URLs which have been recently retrieved.<br/><br/> This property is related to `metrics.retrieval-service.request.ttl`. |`true` | 
 | mpacks.staging.path | The Ambari Management Pack staging directory on the Ambari Server.<br/><br/>The following are examples of valid values:<ul><li>`/var/lib/ambari-server/resources/mpacks`</ul> | | 
 | packages.pre.installed | Determines whether Ambari Agent instances have already have the necessary stack software installed |`false` | 
 | proxy.allowed.hostports | A comma-separated whitelist of host and port values which Ambari Server can use to determine if a proxy value is valid. |`*:*` | 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ea3229d/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 8ab9091..500809f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -2260,8 +2260,36 @@ public class Configuration {
       10 * METRIC_RETRIEVAL_SERVICE_THREADPOOL_MAX_SIZE.getDefaultValue());
 
   /**
-   * The number of tasks that can be queried from the database at once
-   * In the case of more tasks, multiple queries are issued
+   * {@code true} to enable a TTL per request made by the
+   * {@link MetricsRetrievalService}. Enabling this property will prevent
+   * requests to the same URL endpoint within a fixed amount of time allowing
+   * requests to be throttled.
+   */
+  @Markdown(
+      relatedTo = "metrics.retrieval-service.request.ttl",
+      description = "Enables throttling requests to the same endpoint within a fixed amount of time. "
+          + "This property will prevent Ambari from making new metric requests to update the cache for URLs which have been recently retrieved.")
+  public static final ConfigurationProperty<Boolean> METRIC_RETRIEVAL_SERVICE_REQUEST_TTL_ENABLED = new ConfigurationProperty<>(
+      "metrics.retrieval-service.request.ttl.enabled", Boolean.TRUE);
+
+  /**
+   * The amount of time, in {@link TimeUnit#SECONDS}, that requests to the same
+   * URL by the {@link MetricsRetrievalService} must be separated. Requests to
+   * the same URL which are too close together will not result in metrics
+   * retrieval. This property is used to throttle requests to the same URL being
+   * made too close together.
+   */
+  @Markdown(
+      relatedTo = "metrics.retrieval-service.request.ttl.enabled",
+      description = "The number of seconds to wait between issuing JMX or REST metric requests to the same endpoint. "
+          + "This property is used to throttle requests to the same URL being made too close together")
+  public static final ConfigurationProperty<Integer> METRIC_RETRIEVAL_SERVICE_REQUEST_TTL = new ConfigurationProperty<>(
+      "metrics.retrieval-service.request.ttl", 5);
+
+  /**
+   * The number of tasks that can be queried from the database at once In the
+   * case of more tasks, multiple queries are issued
+   *
    * @return
    */
   @Markdown(description = "The maximum number of tasks which can be queried by ID from the database.")
@@ -4633,8 +4661,30 @@ public class Configuration {
   }
 
   /**
+   * Gets the number of seconds that requests made to the same URL will be discarded in order to
+   * throttle the retrieval from the same endpoint.
+   *
+   * @return the number of seconds that must elapse between requests to the same endpoint.
+   */
+  public int getMetricsServiceRequestTTL() {
+    return Integer.parseInt(getProperty(METRIC_RETRIEVAL_SERVICE_REQUEST_TTL));
+  }
+
+  /**
+   * Gets whether the TTL request cache in the {@link MetricsRetrievalService}
+   * is enabled. This evicting cache is used to prevent requests to the same URL
+   * within a specified amount of time.
+   *
+   * @return {@code true} if enabled, {@code false} otherwise.
+   */
+  public boolean isMetricsServiceRequestTTLCacheEnabled() {
+    return Boolean.parseBoolean(getProperty(METRIC_RETRIEVAL_SERVICE_REQUEST_TTL_ENABLED));
+  }
+
+  /**
    * Returns the number of tasks that can be queried from the database at once
    * In the case of more tasks, multiple queries are issued
+   *
    * @return
    */
   public int getTaskIdListLimit() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ea3229d/ambari-server/src/main/java/org/apache/ambari/server/controller/jmx/JMXPropertyProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/jmx/JMXPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/jmx/JMXPropertyProvider.java
index 7665d7f..cbc15cb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/jmx/JMXPropertyProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/jmx/JMXPropertyProvider.java
@@ -41,6 +41,7 @@ import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.utilities.StreamProvider;
 import org.apache.ambari.server.state.services.MetricsRetrievalService;
+import org.apache.ambari.server.state.services.MetricsRetrievalService.MetricSourceType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -262,7 +263,7 @@ public class JMXPropertyProvider extends ThreadPoolEnabledPropertyProvider {
         String jmxUrl = getSpec(protocol, hostName, port, "/jmx");
 
         // always submit a request to cache the latest data
-        metricsRetrievalService.submitJMXRequest(streamProvider, jmxUrl);
+        metricsRetrievalService.submitRequest(MetricSourceType.JMX, streamProvider, jmxUrl);
 
         // check to see if there is a cached value and use it if there is
         JMXMetricHolder jmxMetricHolder = metricsRetrievalService.getCachedJMXMetric(jmxUrl);
@@ -286,7 +287,7 @@ public class JMXPropertyProvider extends ThreadPoolEnabledPropertyProvider {
               }
               if (queryURL != null) {
                 String adHocUrl = getSpec(protocol, hostName, port, queryURL);
-                metricsRetrievalService.submitJMXRequest(streamProvider, adHocUrl);
+                metricsRetrievalService.submitRequest(MetricSourceType.JMX, streamProvider, adHocUrl);
                 JMXMetricHolder adHocJMXMetricHolder = metricsRetrievalService.getCachedJMXMetric(adHocUrl);
 
                 // if the ticket becomes invalid (timeout) then bail out

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ea3229d/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
index cbe827a..0b8dd62 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
@@ -40,6 +40,7 @@ import org.apache.ambari.server.controller.utilities.StreamProvider;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.services.MetricsRetrievalService;
+import org.apache.ambari.server.state.services.MetricsRetrievalService.MetricSourceType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -241,7 +242,7 @@ public class RestMetricsPropertyProvider extends ThreadPoolEnabledPropertyProvid
       String spec = getSpec(protocol, hostname, port, url);
 
       // always submit a request to cache the latest data
-      metricsRetrievalService.submitRESTRequest(streamProvider, spec);
+      metricsRetrievalService.submitRequest(MetricSourceType.REST, streamProvider, spec);
 
       // check to see if there is a cached value and use it if there is
       Map<String, String> jsonMap = metricsRetrievalService.getCachedRESTMetric(spec);

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ea3229d/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java b/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java
index fa36905..629f6ab 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java
@@ -70,15 +70,34 @@ import com.google.inject.Inject;
  * in remote metric data. Otherwise, the cache will never be populated. On the
  * first usage of this service, the cache will always be empty. On every
  * subsequent request, the data from the prior invocation of
- * {@link #submit(JMXRunnable)} will be available.
+ * {@link #submitRequest(MetricSourceType, StreamProvider, String)} will be available.
  * <p/>
  * Metric data is cached temporarily and is controlled by
  * {@link Configuration#getMetricsServiceCacheTimeout()}.
+ * <p/>
+ * In order to control throttling requests to the same endpoint,
+ * {@link Configuration#isMetricsServiceRequestTTLCacheEnabled()} can be enabled
+ * to allow for a fixed interval of time to pass between requests.
  */
 @AmbariService
 public class MetricsRetrievalService extends AbstractService {
 
   /**
+   * The type of web service hosting the metrics.
+   */
+  public enum MetricSourceType {
+    /**
+     * JMX
+     */
+    JMX,
+
+    /**
+     * REST
+     */
+    REST
+  }
+
+  /**
    * Logger.
    */
   protected final static Logger LOG = LoggerFactory.getLogger(MetricsRetrievalService.class);
@@ -137,6 +156,18 @@ public class MetricsRetrievalService extends AbstractService {
    */
   private final Set<String> m_queuedUrls = Sets.newConcurrentHashSet();
 
+  /**
+   * An evicting cache which ensures that multiple requests for the same
+   * endpoint are not executed back-to-back. When enabled, a fixed period of
+   * time must pass before this service will make requests to a previously
+   * retrieved endpoint.
+   * <p/>
+   * If this cache is not enabled, then it will be {@code null}.
+   * <p/>
+   * For simplicity, this is a cache of URL to URL.
+   */
+  private Cache<String, String> m_ttlUrlCache;
+
 
   /**
    * The size of the worker queue (used for logged warnings about size).
@@ -166,6 +197,14 @@ public class MetricsRetrievalService extends AbstractService {
     m_restCache = CacheBuilder.newBuilder().expireAfterWrite(jmxCacheExpirationMinutes,
         TimeUnit.MINUTES).build();
 
+    // enable the TTL cache if configured; otherwise leave it as null
+    int ttlSeconds = m_configuration.getMetricCacheTTLSeconds();
+    boolean ttlCacheEnabled = m_configuration.isMetricsServiceRequestTTLCacheEnabled();
+    if (ttlCacheEnabled) {
+      m_ttlUrlCache = CacheBuilder.newBuilder().expireAfterWrite(ttlSeconds,
+          TimeUnit.SECONDS).build();
+    }
+
     // iniitalize the executor service
     int corePoolSize = m_configuration.getMetricsServiceThreadPoolCoreSize();
     int maxPoolSize = m_configuration.getMetricsServiceThreadPoolMaxSize();
@@ -187,6 +226,11 @@ public class MetricsRetrievalService extends AbstractService {
     LOG.info(
         "Initializing the Metrics Retrieval Service with core={}, max={}, workerQueue={}, threadPriority={}",
         corePoolSize, maxPoolSize, m_queueMaximumSize, threadPriority);
+
+    if (ttlCacheEnabled) {
+      LOG.info("Metrics Retrieval Service request TTL cache is enabled and set to {} seconds",
+          ttlSeconds);
+    }
   }
 
   /**
@@ -205,23 +249,34 @@ public class MetricsRetrievalService extends AbstractService {
   protected void doStop() {
     m_jmxCache.invalidateAll();
     m_restCache.invalidateAll();
+
+    if (null != m_ttlUrlCache) {
+      m_ttlUrlCache.invalidateAll();
+    }
+
     m_queuedUrls.clear();
     m_threadPoolExecutor.shutdownNow();
   }
 
   /**
-   * Submit a {@link JMXRunnable} for execution. This will run inside of an
-   * {@link ExecutorService} to retrieve JMX data from a URL endpoint and parse
-   * the result into a {@link JMXMetricHolder}.
+   * Submit a {@link Runnable} for execution which retrieves metric data from
+   * the supplied endpoint. This will run inside of an {@link ExecutorService}
+   * to retrieve metric data from a URL endpoint and parse the result into a
+   * cached value.
    * <p/>
-   * Once JMX data is retrieved it is cached. Data in the cache can be retrieved
-   * via {@link #getCachedJMXMetric(String)}.
+   * Once metric data is retrieved it is cached. Data in the cache can be
+   * retrieved via {@link #getCachedJMXMetric(String)} or
+   * {@link #getCachedRESTMetric(String)}, depending on the type of metric
+   * requested.
    * <p/>
    * Callers need not worry about invoking this mulitple times for the same URL
    * endpoint. A single endpoint will only be enqueued once regardless of how
    * many times this method is called until it has been fully retrieved and
-   * parsed.
+   * parsed. If the last endpoint request was too recent, then this method will
+   * opt to not make another call until the TTL period expires.
    *
+   * @param type
+   *          the type of service hosting the metric (not {@code null}).
    * @param streamProvider
    *          the {@link StreamProvider} to use to read from the remote
    *          endpoint.
@@ -230,62 +285,46 @@ public class MetricsRetrievalService extends AbstractService {
    *
    * @see #getCachedJMXMetric(String)
    */
-  public void submitJMXRequest(StreamProvider streamProvider, String jmxUrl) {
+  public void submitRequest(MetricSourceType type, StreamProvider streamProvider, String url) {
+    // check to ensure that the request isn't already queued
+    if (m_queuedUrls.contains(url)) {
+      return;
+    }
+
+    // check to ensure that the request wasn't made too recently
+    if (null != m_ttlUrlCache && null != m_ttlUrlCache.getIfPresent(url)) {
+      return;
+    }
+
     // log warnings if the queue size seems to be rather large
-    BlockingQueue<Runnable> queue =  m_threadPoolExecutor.getQueue();
+    BlockingQueue<Runnable> queue = m_threadPoolExecutor.getQueue();
     int queueSize = queue.size();
     if (queueSize > Math.floor(0.9f * m_queueMaximumSize)) {
       LOG.warn("The worker queue contains {} work items and is at {}% of capacity", queueSize,
           ((float) queueSize / m_queueMaximumSize) * 100);
     }
 
-    // don't enqueue another request for the same URL
-    if (m_queuedUrls.contains(jmxUrl)) {
-      return;
-    }
-
     // enqueue this URL
-    m_queuedUrls.add(jmxUrl);
-
-    JMXRunnable jmxRunnable = new JMXRunnable(m_jmxCache, m_queuedUrls, m_jmxObjectReader,
-        streamProvider, jmxUrl);
-
-    m_threadPoolExecutor.execute(jmxRunnable);
-  }
-
-  /**
-   * Submit a {@link RESTRunnable} for execution. This will run inside of an
-   * {@link ExecutorService} to retrieve JMX data from a URL endpoint and parse
-   * the result into a {@link Map} of {@link String}.
-   * <p/>
-   * Once REST data is retrieved it is cached. Data in the cache can be
-   * retrieved via {@link #getCachedRESTMetric(String)}.
-   * <p/>
-   * Callers need not worry about invoking this mulitple times for the same URL
-   * endpoint. A single endpoint will only be enqueued once regardless of how
-   * many times this method is called until it has been fully retrieved and
-   * parsed.
-   *
-   * @param streamProvider
-   *          the {@link StreamProvider} to use to read from the remote
-   *          endpoint.
-   * @param restUrl
-   *          the URL to read from
-   *
-   * @see #getCachedRESTMetric(String)
-   */
-  public void submitRESTRequest(StreamProvider streamProvider, String restUrl) {
-    if (m_queuedUrls.contains(restUrl)) {
-      return;
+    m_queuedUrls.add(url);
+
+    Runnable runnable = null;
+    switch (type) {
+      case JMX:
+        runnable = new JMXRunnable(m_jmxCache, m_queuedUrls, m_ttlUrlCache, m_jmxObjectReader,
+            streamProvider, url);
+        break;
+      case REST:
+        runnable = new RESTRunnable(m_restCache, m_queuedUrls, m_ttlUrlCache, m_gson,
+            streamProvider, url);
+        break;
+      default:
+        LOG.warn("Unable to retrieve metrics for the unknown type {}", type);
+        break;
     }
 
-    // enqueue this URL
-    m_queuedUrls.add(restUrl);
-
-    RESTRunnable restRunnable = new RESTRunnable(m_restCache, m_queuedUrls, m_gson,
-        streamProvider, restUrl);
-
-    m_threadPoolExecutor.execute(restRunnable);
+    if (null != runnable) {
+      m_threadPoolExecutor.execute(runnable);
+    }
   }
 
   /**
@@ -293,11 +332,13 @@ public class MetricsRetrievalService extends AbstractService {
    * is no metric data cached for the given URL, then {@code null} is returned.
    * <p/>
    * The onky way this cache is populated is by requesting the data to be loaded
-   * asynchronously via {@link #submit(JMXRunnable)}.
+   * asynchronously via
+   * {@link #submitRequest(MetricSourceType, StreamProvider, String)} with the
+   * {@link MetricSourceType#JMX} type.
    *
    * @param jmxUrl
    *          the URL to retrieve cached data for (not {@code null}).
-   * @return
+   * @return the metric, or {@code null} if none.
    */
   public JMXMetricHolder getCachedJMXMetric(String jmxUrl) {
     return m_jmxCache.getIfPresent(jmxUrl);
@@ -308,11 +349,13 @@ public class MetricsRetrievalService extends AbstractService {
    * metric data cached for the given URL, then {@code null} is returned.
    * <p/>
    * The onky way this cache is populated is by requesting the data to be loaded
-   * asynchronously via {@link #submit(JMXRunnable)}.
+   * asynchronously via
+   * {@link #submitRequest(MetricSourceType, StreamProvider, String)} with the
+   * {@link MetricSourceType#REST} type.
    *
    * @param restUrl
    *          the URL to retrieve cached data for (not {@code null}).
-   * @return
+   * @return the metric, or {@code null} if none.
    */
   public Map<String, String> getCachedRESTMetric(String restUrl) {
     return m_restCache.getIfPresent(restUrl);
@@ -339,6 +382,12 @@ public class MetricsRetrievalService extends AbstractService {
     private final Set<String> m_queuedUrls;
 
     /**
+     * An evicting cache used to control whether a request for a metric can be
+     * made or if it is too soon after the last request.
+     */
+    private final Cache<String, String> m_ttlUrlCache;
+
+    /**
      * Constructor.
      *
      * @param streamProvider
@@ -349,11 +398,17 @@ public class MetricsRetrievalService extends AbstractService {
      *          the URLs which are currently waiting to be processed. This
      *          method will remove the specified URL from this {@link Set} when
      *          it completes (successful or not).
+     * @param m_ttlUrlCache
+     *          an evicting cache which is used to determine if a request for a
+     *          metric is too soon after the last request, or {@code null} if
+     *          requests can be made sequentially without any separation.
      */
-    private MetricRunnable(StreamProvider streamProvider, String url, Set<String> queuedUrls) {
+    private MetricRunnable(StreamProvider streamProvider, String url, Set<String> queuedUrls,
+        Cache<String, String> ttlUrlCache) {
       m_streamProvider = streamProvider;
       m_url = url;
       m_queuedUrls = queuedUrls;
+      m_ttlUrlCache = ttlUrlCache;
     }
 
     /**
@@ -382,14 +437,19 @@ public class MetricsRetrievalService extends AbstractService {
         inputStream = m_streamProvider.readFrom(m_url);
         processInputStreamAndCacheResult(inputStream);
 
+        // cache the URL, but only after successful parsing of the response
+        if (null != m_ttlUrlCache) {
+          m_ttlUrlCache.put(m_url, m_url);
+        }
+
       } catch (Exception exception) {
         logException(exception, m_url);
       } finally {
+        IOUtils.closeQuietly(inputStream);
+
         // remove this URL from the list of queued URLs to ensure it will be
         // requested again
         m_queuedUrls.remove(m_url);
-
-        IOUtils.closeQuietly(inputStream);
       }
     }
 
@@ -454,19 +514,20 @@ public class MetricsRetrievalService extends AbstractService {
     private final ObjectReader m_jmxObjectReader;
     private final Cache<String, JMXMetricHolder> m_cache;
 
-
     /**
      * Constructor.
      *
      * @param cache
      * @param queuedUrls
+     * @param ttlUrlCache
      * @param jmxObjectReader
      * @param streamProvider
      * @param jmxUrl
      */
     private JMXRunnable(Cache<String, JMXMetricHolder> cache, Set<String> queuedUrls,
-        ObjectReader jmxObjectReader, StreamProvider streamProvider, String jmxUrl) {
-      super(streamProvider, jmxUrl, queuedUrls);
+        Cache<String, String> ttlUrlCache, ObjectReader jmxObjectReader,
+        StreamProvider streamProvider, String jmxUrl) {
+      super(streamProvider, jmxUrl, queuedUrls, ttlUrlCache);
       m_cache = cache;
       m_jmxObjectReader = jmxObjectReader;
     }
@@ -497,13 +558,15 @@ public class MetricsRetrievalService extends AbstractService {
      *
      * @param cache
      * @param queuedUrls
+     * @param ttlUrlCache
      * @param gson
      * @param streamProvider
      * @param restUrl
      */
     private RESTRunnable(Cache<String, Map<String, String>> cache, Set<String> queuedUrls,
-        Gson gson, StreamProvider streamProvider, String restUrl) {
-      super(streamProvider, restUrl, queuedUrls);
+        Cache<String, String> ttlUrlCache, Gson gson, StreamProvider streamProvider,
+        String restUrl) {
+      super(streamProvider, restUrl, queuedUrls, ttlUrlCache);
       m_cache = cache;
       m_gson = gson;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ea3229d/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java
index 80d7438..12a829f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java
@@ -89,7 +89,13 @@ public class JMXPropertyProviderTest {
   @BeforeClass
   public static void setupClass() {
     Injector injector = Guice.createInjector(new InMemoryDefaultTestModule());
-    JMXPropertyProvider.init(injector.getInstance(Configuration.class));
+
+    // disable request TTL for these tests
+    Configuration configuration = injector.getInstance(Configuration.class);
+    configuration.setProperty(Configuration.METRIC_RETRIEVAL_SERVICE_REQUEST_TTL_ENABLED.getKey(),
+        "false");
+
+    JMXPropertyProvider.init(configuration);
 
     metricPropertyProviderFactory = injector.getInstance(MetricPropertyProviderFactory.class);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ea3229d/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java
index 304b42f..a9934a2 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java
@@ -112,7 +112,13 @@ public class RestMetricsPropertyProviderTest {
     clusters = injector.getInstance(Clusters.class);
     clusters.addCluster("c1", new StackId("HDP-2.1.1"));
     c1 = clusters.getCluster("c1");
-    JMXPropertyProvider.init(injector.getInstance(Configuration.class));
+
+    // disable request TTL for these tests
+    Configuration configuration = injector.getInstance(Configuration.class);
+    configuration.setProperty(Configuration.METRIC_RETRIEVAL_SERVICE_REQUEST_TTL_ENABLED.getKey(),
+        "false");
+
+    JMXPropertyProvider.init(configuration);
 
     MetricsRetrievalService metricsRetrievalService = injector.getInstance(
         MetricsRetrievalService.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ea3229d/ambari-server/src/test/java/org/apache/ambari/server/state/services/MetricsRetrievalServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/services/MetricsRetrievalServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/services/MetricsRetrievalServiceTest.java
new file mode 100644
index 0000000..784ba92
--- /dev/null
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/services/MetricsRetrievalServiceTest.java
@@ -0,0 +1,195 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.state.services;
+
+import java.io.InputStream;
+import java.util.Map;
+
+import javax.persistence.EntityManager;
+
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.jmx.JMXMetricHolder;
+import org.apache.ambari.server.controller.utilities.StreamProvider;
+import org.apache.ambari.server.orm.DBAccessor;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.services.MetricsRetrievalService.MetricSourceType;
+import org.apache.ambari.server.state.stack.OsFamily;
+import org.apache.ambari.server.utils.SynchronousThreadPoolExecutor;
+import org.apache.commons.io.IOUtils;
+import org.easymock.EasyMock;
+import org.easymock.EasyMockSupport;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.inject.Binder;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+
+import junit.framework.Assert;
+
+/**
+ * Tests the {@link MetricsRetrievalService}.
+ */
+public class MetricsRetrievalServiceTest extends EasyMockSupport {
+
+  private Injector m_injector;
+
+  private static final String JMX_URL = "http://jmx-endpoint";
+  private static final String REST_URL = "http://rest-endpoint";
+
+  MetricsRetrievalService m_service = new MetricsRetrievalService();
+
+  /**
+   *
+   */
+  @Before
+  public void before() {
+    // create an injector which will inject the mocks
+    m_injector = Guice.createInjector(new MockModule());
+    m_injector.injectMembers(m_service);
+  }
+
+  /**
+   * Tests that initial missing values are returned correctly as {@code null}.
+   */
+  @Test
+  public void testCachedValueRetrievalDoesNotRequest() throws Exception {
+    m_service.doStart();
+
+    JMXMetricHolder jmxMetricHolder = m_service.getCachedJMXMetric(JMX_URL);
+    Assert.assertNull(jmxMetricHolder);
+
+    Map<String, String> restMetrics = m_service.getCachedRESTMetric(REST_URL);
+    Assert.assertNull(restMetrics);
+  }
+
+  /**
+   * Tests retrieval of metrics.
+   */
+  @Test
+  public void testRetrievalOfMetrics() throws Exception {
+    InputStream jmxInputStream = IOUtils.toInputStream("{ \"beans\": [] }");
+    InputStream restInputStream = IOUtils.toInputStream("{}");
+
+    StreamProvider streamProvider = createNiceMock(StreamProvider.class);
+    EasyMock.expect(streamProvider.readFrom(JMX_URL)).andReturn(jmxInputStream).once();
+    EasyMock.expect(streamProvider.readFrom(REST_URL)).andReturn(restInputStream).once();
+
+    replayAll();
+
+    m_service.doStart();
+
+    // make the service synchronous
+    m_service.setThreadPoolExecutor(new SynchronousThreadPoolExecutor());
+
+    JMXMetricHolder jmxMetricHolder = m_service.getCachedJMXMetric(JMX_URL);
+    Assert.assertNull(jmxMetricHolder);
+
+    Map<String, String> restMetrics = m_service.getCachedRESTMetric(REST_URL);
+    Assert.assertNull(restMetrics);
+
+    m_service.submitRequest(MetricSourceType.JMX, streamProvider, JMX_URL);
+    jmxMetricHolder = m_service.getCachedJMXMetric(JMX_URL);
+    Assert.assertNotNull(jmxMetricHolder);
+
+    m_service.submitRequest(MetricSourceType.REST, streamProvider, REST_URL);
+    restMetrics = m_service.getCachedRESTMetric(REST_URL);
+    Assert.assertNotNull(restMetrics);
+
+    verifyAll();
+  }
+
+  /**
+   * Tests that many requests to the same URL do not invoke the stream provider
+   * more than once.
+   */
+  @Test
+  public void testRequestTTL() throws Exception {
+    InputStream jmxInputStream = IOUtils.toInputStream("{ \"beans\": [] }");
+
+    // only allow a single call to the mock
+    StreamProvider streamProvider = createStrictMock(StreamProvider.class);
+    EasyMock.expect(streamProvider.readFrom(JMX_URL)).andReturn(jmxInputStream).once();
+
+    replayAll();
+
+    m_service.doStart();
+
+    // make the service synchronous
+    m_service.setThreadPoolExecutor(new SynchronousThreadPoolExecutor());
+
+    // make 100 requests in rapid succession to the same URL
+    for (int i = 0; i < 100; i++) {
+      m_service.submitRequest(MetricSourceType.JMX, streamProvider, JMX_URL);
+    }
+
+    verifyAll();
+  }
+
+  /**
+   * Tests that disabling the request TTL allows subsequent requests for the
+   * same resource.
+   */
+  @Test
+  public void testRequestTTLDisabled() throws Exception {
+    Configuration configuration = m_injector.getInstance(Configuration.class);
+    configuration.setProperty(
+        Configuration.METRIC_RETRIEVAL_SERVICE_REQUEST_TTL_ENABLED.getKey(), "false");
+
+    InputStream jmxInputStream = IOUtils.toInputStream("{ \"beans\": [] }");
+
+    // allow 100 calls to the mock exactly
+    StreamProvider streamProvider = createStrictMock(StreamProvider.class);
+    EasyMock.expect(streamProvider.readFrom(JMX_URL)).andReturn(jmxInputStream).times(100);
+
+    replayAll();
+
+    m_service.doStart();
+
+    // make the service synchronous
+    m_service.setThreadPoolExecutor(new SynchronousThreadPoolExecutor());
+
+    // make 100 requests in rapid succession to the same URL
+    for (int i = 0; i < 100; i++) {
+      m_service.submitRequest(MetricSourceType.JMX, streamProvider, JMX_URL);
+    }
+
+    verifyAll();
+  }
+
+  /**
+   *
+   */
+  private class MockModule implements Module {
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void configure(Binder binder) {
+      Cluster cluster = EasyMock.createNiceMock(Cluster.class);
+      binder.bind(Clusters.class).toInstance(createNiceMock(Clusters.class));
+      binder.bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class));
+      binder.bind(DBAccessor.class).toInstance(createNiceMock(DBAccessor.class));
+      binder.bind(Cluster.class).toInstance(cluster);
+      binder.bind(EntityManager.class).toInstance(createNiceMock(EntityManager.class));
+    }
+  }
+
+}


[02/10] ambari git commit: AMBARI-18089 - Create Documentation Around All Options In ambari.properties (jonathanhurley)

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/src/main/java/org/apache/ambari/server/configuration/index_template.md
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/index_template.md b/ambari-server/src/main/java/org/apache/ambari/server/configuration/index_template.md
new file mode 100644
index 0000000..5c52013
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/index_template.md
@@ -0,0 +1,63 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Ambari Server Configuration
+---
+- [Introduction](#introduction)
+- [Configuration Properties](#configuration-properties)
+- [Baseline Values](#baseline-values)
+- [Database And Persistence](#db-persistence)
+
+<a name="introduction"></a>
+## Introduction
+Ambari Server is configured using a flat text properties file. The file is read once when starting Ambari. Any changes made to the properties file are only reflected after restarting Ambari. 
+
+```
+/etc/ambari-server/conf/ambari.properties
+```
+
+<a name="configuration-properties"></a>
+## Configuration Properties
+The following are the properties which can be used to configure Ambari. 
+
+$configuration-properties
+
+<a name="baseline-values"></a>
+## Baseline Values
+As the size of a cluster grows, some of the default property values may no longer be sufficient. The below tables offer recommendations on the values of some configuration properties based on the size and usage of the cluster.
+
+$baseline-values
+
+<a name="db-persistence"></a>
+## Database And Persistence
+In addition to the static database connection properties, it's possible to supply custom properties for both EclipseLink and the database driver through `ambari.properties`. 
+
+### Database Driver
+Using the `server.jdbc.properties.` prefix, it's possible to supply specific properties to the database driver being used by Ambari. These properties do not affect JPA or any of the persistence-unit operations. They are solely to govern the behavior of the database driver. 
+
+```
+server.jdbc.properties.lockTimeout=15000
+server.jdbc.properties.loginTimeout=15000
+```
+
+### Persistence Unit
+EclipseLink properties can also be configured using a prefix of `server.persistence.properties.`. The EclipseLink properties should be defined in their entirety with the prefix prepended in front of them.
+
+```
+server.persistence.properties.eclipselink.jdbc.batch-writing.size=25
+server.persistence.properties.eclipselink.profiler=QueryMonitor
+```
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index 46f6ce5..097f01c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -800,7 +800,7 @@ public class AmbariServer {
       users.createUser("user", "user");
 
       MetainfoEntity schemaVersion = new MetainfoEntity();
-      schemaVersion.setMetainfoName(Configuration.SERVER_VERSION.getKey());
+      schemaVersion.setMetainfoName(Configuration.SERVER_VERSION_KEY);
       schemaVersion.setMetainfoValue(VersionUtils.getVersionSubstring(ambariMetaInfo.getServerVersion()));
 
       metainfoDAO.create(schemaVersion);

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
index 722e6f1..d35fc1a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
@@ -269,7 +269,7 @@ public class DatabaseChecker {
       metainfoDAO = injector.getInstance(MetainfoDAO.class);
     }
 
-    MetainfoEntity schemaVersionEntity = metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey());
+    MetainfoEntity schemaVersionEntity = metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY);
     String schemaVersion = null;
 
     if (schemaVersionEntity != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
index 22f4afa..f9b76f8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
@@ -28,11 +28,15 @@ import static org.powermock.api.easymock.PowerMock.verifyAll;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.ambari.annotations.Markdown;
 import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.configuration.Configuration.ConfigurationMarkdown;
+import org.apache.ambari.server.configuration.Configuration.ConfigurationProperty;
 import org.apache.ambari.server.configuration.Configuration.ConnectionPoolType;
 import org.apache.ambari.server.configuration.Configuration.DatabaseType;
 import org.apache.ambari.server.controller.metrics.ThreadPoolEnabledPropertyProvider;
@@ -40,6 +44,7 @@ import org.apache.ambari.server.security.authorization.LdapServerProperties;
 import org.apache.ambari.server.state.services.MetricsRetrievalService;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.RandomStringUtils;
+import org.apache.commons.lang.StringUtils;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -178,8 +183,6 @@ public class ConfigurationTest {
     //Different certificates for two-way SSL and HTTPS
     Assert.assertFalse(conf.getConfigsMap().get(Configuration.KSTR_NAME.getKey()).
       equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_KSTR_NAME.getKey())));
-    Assert.assertFalse(conf.getConfigsMap().get(Configuration.SRVR_CRT_NAME.getKey()).
-      equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_CRT_NAME.getKey())));
 
     Assert.assertEquals("keystore.p12", conf.getConfigsMap().get(
         Configuration.KSTR_NAME.getKey()));
@@ -437,7 +440,7 @@ public class ConfigurationTest {
     ambariProperties.setProperty(Configuration.LDAP_USER_OBJECT_CLASS.getKey(), "10");
     ambariProperties.setProperty(Configuration.LDAP_GROUP_BASE.getKey(), "11");
     ambariProperties.setProperty(Configuration.LDAP_GROUP_OBJECT_CLASS.getKey(), "12");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_MEMEBERSHIP_ATTR.getKey(), "13");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_MEMBERSHIP_ATTR.getKey(), "13");
     ambariProperties.setProperty(Configuration.LDAP_GROUP_NAMING_ATTR.getKey(), "14");
     ambariProperties.setProperty(Configuration.LDAP_ADMIN_GROUP_MAPPING_RULES.getKey(), "15");
     ambariProperties.setProperty(Configuration.LDAP_GROUP_SEARCH_FILTER.getKey(), "16");
@@ -886,4 +889,35 @@ public class ConfigurationTest {
     Assert.assertTrue(maxPoolSize > 2 && maxPoolSize <= processorCount * 4);
     Assert.assertTrue(workerQueueSize >= processorCount * 10);
   }
+
+  /**
+   * Tests that every {@link ConfigurationProperty} field in
+   * {@link Configuration} has a property {@link Markdown} annotation.
+   *
+   * @throws Exception
+   */
+  @Test
+  public void testAllPropertiesHaveMarkdownDescriptions() throws Exception {
+    Field[] fields = Configuration.class.getDeclaredFields();
+    for (Field field : fields) {
+      if (field.getType() != ConfigurationProperty.class) {
+        continue;
+      }
+
+      ConfigurationProperty<?> configurationProperty = (ConfigurationProperty<?>) field.get(null);
+      Markdown markdown = field.getAnnotation(Markdown.class);
+      if( null == markdown ){
+        ConfigurationMarkdown configMarkdown = field.getAnnotation(ConfigurationMarkdown.class);
+        markdown = configMarkdown.markdown();
+      }
+
+      Assert.assertNotNull("The configuration property " + configurationProperty.getKey()
+          + " is missing the Markdown annotation", markdown);
+
+      Assert.assertFalse(
+          "The configuration property " + configurationProperty.getKey()
+              + " has a Markdown annotation with no description",
+          StringUtils.isEmpty(markdown.description()));
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
index 2702fdf..f148da1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
@@ -69,9 +69,9 @@ public class DatabaseCheckerTest {
     MetainfoDAO metainfoDAO =  createMock(MetainfoDAO.class);
     MetainfoEntity metainfoEntity = new MetainfoEntity();
     String serverVersion = ambariMetaInfo.getServerVersion();
-    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION.getKey());
+    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION_KEY);
     metainfoEntity.setMetainfoValue(serverVersion);
-    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey())).
+    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY)).
       andReturn(metainfoEntity);
     replay(metainfoDAO);
     DatabaseChecker.metainfoDAO = metainfoDAO;
@@ -88,9 +88,9 @@ public class DatabaseCheckerTest {
   public void testCheckDBVersionInvalid() throws Exception {
     MetainfoDAO metainfoDAO =  createMock(MetainfoDAO.class);
     MetainfoEntity metainfoEntity = new MetainfoEntity();
-    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION.getKey());
+    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION_KEY);
     metainfoEntity.setMetainfoValue("0.0.0"); // Incompatible version
-    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey())).
+    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY)).
       andReturn(metainfoEntity);
     replay(metainfoDAO);
     DatabaseChecker.metainfoDAO = metainfoDAO;

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc43870d/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java
index dbf28be..f770f4c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/LdapPerformanceTest.java
@@ -67,7 +67,7 @@ public class LdapPerformanceTest {
     configuration.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE.getKey(), "uid");
     configuration.setProperty(Configuration.LDAP_GROUP_OBJECT_CLASS.getKey(), "posixGroup");
     configuration.setProperty(Configuration.LDAP_GROUP_NAMING_ATTR.getKey(), "cn");
-    configuration.setProperty(Configuration.LDAP_GROUP_MEMEBERSHIP_ATTR.getKey(), "memberUid");
+    configuration.setProperty(Configuration.LDAP_GROUP_MEMBERSHIP_ATTR.getKey(), "memberUid");
     configuration.setProperty(Configuration.LDAP_BASE_DN.getKey(), "dc=apache,dc=org");
     configuration.setProperty(Configuration.LDAP_BIND_ANONYMOUSLY.getKey(), String.valueOf(false));
     configuration.setProperty(Configuration.LDAP_MANAGER_DN.getKey(), "uid=hdfs,ou=people,ou=dev,dc=apache,dc=org");


[07/10] ambari git commit: AMBARI-18126 - Refactor Configuration To Allow For Generation Of Documentation (jonathanhurley)

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
index e9aebc0..22f4afa 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
@@ -85,10 +85,10 @@ public class ConfigurationTest {
   @Test
   public void testValidateAgentHostnamesOn() {
     Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE_KEY, "true");
+    ambariProperties.setProperty(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE.getKey(), "true");
     Configuration conf = new Configuration(ambariProperties);
     Assert.assertTrue(conf.validateAgentHostnames());
-    Assert.assertEquals("true", conf.getConfigsMap().get(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE_KEY));
+    Assert.assertEquals("true", conf.getConfigsMap().get(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE.getKey()));
   }
 
   /**
@@ -97,10 +97,10 @@ public class ConfigurationTest {
   @Test
   public void testValidateAgentHostnamesOff() {
     Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE_KEY, "false");
+    ambariProperties.setProperty(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE.getKey(), "false");
     Configuration conf = new Configuration(ambariProperties);
     Assert.assertFalse(conf.validateAgentHostnames());
-    Assert.assertEquals("false", conf.getConfigsMap().get(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE_KEY));
+    Assert.assertEquals("false", conf.getConfigsMap().get(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE.getKey()));
   }
 
   /**
@@ -139,7 +139,7 @@ public class ConfigurationTest {
   @Test
   public void testGetClientSSLApiPort() throws Exception {
     Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.CLIENT_API_SSL_PORT_KEY, "6666");
+    ambariProperties.setProperty(Configuration.CLIENT_API_SSL_PORT.getKey(), "6666");
     Configuration conf = new Configuration(ambariProperties);
     Assert.assertEquals(6666, conf.getClientSSLApiPort());
     conf = new Configuration();
@@ -157,50 +157,50 @@ public class ConfigurationTest {
     FileUtils.writeStringToFile(passFile, password);
 
     Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.API_USE_SSL, "true");
+    ambariProperties.setProperty(Configuration.API_USE_SSL.getKey(), "true");
     ambariProperties.setProperty(
-        Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY,
+        Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(),
         passFile.getParent());
     ambariProperties.setProperty(
-        Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY,
+        Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(),
         passFile.getName());
 
 
     String oneWayPort = RandomStringUtils.randomNumeric(4);
     String twoWayPort = RandomStringUtils.randomNumeric(4);
 
-    ambariProperties.setProperty(Configuration.SRVR_TWO_WAY_SSL_PORT_KEY, twoWayPort.toString());
-    ambariProperties.setProperty(Configuration.SRVR_ONE_WAY_SSL_PORT_KEY, oneWayPort.toString());
+    ambariProperties.setProperty(Configuration.SRVR_TWO_WAY_SSL_PORT.getKey(), twoWayPort.toString());
+    ambariProperties.setProperty(Configuration.SRVR_ONE_WAY_SSL_PORT.getKey(), oneWayPort.toString());
 
     Configuration conf = new Configuration(ambariProperties);
     Assert.assertTrue(conf.getApiSSLAuthentication());
 
     //Different certificates for two-way SSL and HTTPS
-    Assert.assertFalse(conf.getConfigsMap().get(Configuration.KSTR_NAME_KEY).
-      equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_KSTR_NAME_KEY)));
-    Assert.assertFalse(conf.getConfigsMap().get(Configuration.SRVR_CRT_NAME_KEY).
-      equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_CRT_NAME_KEY)));
+    Assert.assertFalse(conf.getConfigsMap().get(Configuration.KSTR_NAME.getKey()).
+      equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_KSTR_NAME.getKey())));
+    Assert.assertFalse(conf.getConfigsMap().get(Configuration.SRVR_CRT_NAME.getKey()).
+      equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_CRT_NAME.getKey())));
 
     Assert.assertEquals("keystore.p12", conf.getConfigsMap().get(
-        Configuration.KSTR_NAME_KEY));
+        Configuration.KSTR_NAME.getKey()));
     Assert.assertEquals("PKCS12", conf.getConfigsMap().get(
-        Configuration.KSTR_TYPE_KEY));
+        Configuration.KSTR_TYPE.getKey()));
     Assert.assertEquals("keystore.p12", conf.getConfigsMap().get(
-        Configuration.TSTR_NAME_KEY));
+        Configuration.TSTR_NAME.getKey()));
     Assert.assertEquals("PKCS12", conf.getConfigsMap().get(
-        Configuration.TSTR_TYPE_KEY));
+        Configuration.TSTR_TYPE.getKey()));
 
     Assert.assertEquals("https.keystore.p12", conf.getConfigsMap().get(
-      Configuration.CLIENT_API_SSL_KSTR_NAME_KEY));
+      Configuration.CLIENT_API_SSL_KSTR_NAME.getKey()));
     Assert.assertEquals("PKCS12", conf.getConfigsMap().get(
-        Configuration.CLIENT_API_SSL_KSTR_TYPE_KEY));
+        Configuration.CLIENT_API_SSL_KSTR_TYPE.getKey()));
     Assert.assertEquals("https.keystore.p12", conf.getConfigsMap().get(
-        Configuration.CLIENT_API_SSL_TSTR_NAME_KEY));
+        Configuration.CLIENT_API_SSL_TSTR_NAME.getKey()));
     Assert.assertEquals("PKCS12", conf.getConfigsMap().get(
-        Configuration.CLIENT_API_SSL_TSTR_TYPE_KEY));
+        Configuration.CLIENT_API_SSL_TSTR_TYPE.getKey()));
     Assert.assertEquals(passFile.getName(), conf.getConfigsMap().get(
-      Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY));
-    Assert.assertEquals(password, conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_CRT_PASS_KEY));
+      Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey()));
+    Assert.assertEquals(password, conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_CRT_PASS.getKey()));
     Assert.assertEquals(Integer.parseInt(twoWayPort), conf.getTwoWayAuthPort());
     Assert.assertEquals(Integer.parseInt(oneWayPort), conf.getOneWayAuthPort());
 
@@ -211,7 +211,7 @@ public class ConfigurationTest {
     Properties ambariProperties = new Properties();
     String unencrypted = "fake-unencrypted-password";
     String encrypted = "fake-encrypted-password";
-    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD_KEY, unencrypted);
+    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD.getKey(), unencrypted);
     Configuration conf = spy(new Configuration(ambariProperties));
     doReturn(null).when(conf).readPasswordFromStore(anyString());
     conf.loadSSLParams();
@@ -223,7 +223,7 @@ public class ConfigurationTest {
     Properties ambariProperties = new Properties();
     String unencrypted = "fake-unencrypted-password";
     String encrypted = "fake-encrypted-password";
-    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD_KEY, unencrypted);
+    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD.getKey(), unencrypted);
     Configuration conf = spy(new Configuration(ambariProperties));
     doReturn(encrypted).when(conf).readPasswordFromStore(anyString());
     conf.loadSSLParams();
@@ -236,7 +236,7 @@ public class ConfigurationTest {
     String encrypted = "password";
 
     Properties properties = new Properties();
-    properties.setProperty(Configuration.SERVER_JDBC_RCA_USER_PASSWD_KEY, serverJdbcRcaUserPasswdKey);
+    properties.setProperty(Configuration.SERVER_JDBC_RCA_USER_PASSWD.getKey(), serverJdbcRcaUserPasswdKey);
     Configuration conf = spy(new Configuration(properties));
     doReturn(encrypted).when(conf).readPasswordFromStore(serverJdbcRcaUserPasswdKey);
 
@@ -267,7 +267,7 @@ public class ConfigurationTest {
     String passwordFile = temp.getRoot().getAbsolutePath()
       + System.getProperty("file.separator") + "password.dat";
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_USER_PASSWD_KEY,
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_USER_PASSWD.getKey(),
       passwordFile);
 
     Configuration conf = new Configuration(ambariProperties);
@@ -360,7 +360,7 @@ public class ConfigurationTest {
     Assert.assertEquals(Integer.valueOf(1200), conf.getDefaultServerTaskTimeout());
 
     ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.SERVER_TASK_TIMEOUT_KEY, "3600");
+    ambariProperties.setProperty(Configuration.SERVER_TASK_TIMEOUT.getKey(), "3600");
 
     conf = new Configuration(ambariProperties);
 
@@ -370,7 +370,7 @@ public class ConfigurationTest {
   @Test
   public void testGetLdapServerProperties_WrongManagerPassword() throws Exception {
     final Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.LDAP_MANAGER_PASSWORD_KEY, "somePassword");
+    ambariProperties.setProperty(Configuration.LDAP_MANAGER_PASSWORD.getKey(), "somePassword");
     final Configuration configuration = new Configuration(ambariProperties);
 
     final LdapServerProperties ldapProperties = configuration.getLdapServerProperties();
@@ -384,11 +384,11 @@ public class ConfigurationTest {
     Configuration configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewValidationEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_VALIDATE, "false");
+    ambariProperties.setProperty(Configuration.VIEWS_VALIDATE.getKey(), "false");
     configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewValidationEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_VALIDATE, "true");
+    ambariProperties.setProperty(Configuration.VIEWS_VALIDATE.getKey(), "true");
     configuration = new Configuration(ambariProperties);
     Assert.assertTrue(configuration.isViewValidationEnabled());
   }
@@ -399,15 +399,17 @@ public class ConfigurationTest {
     Configuration configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewRemoveUndeployedEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED, "false");
+    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED.getKey(), "false");
     configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewRemoveUndeployedEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED, "true");
+    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED.getKey(), "true");
     configuration = new Configuration(ambariProperties);
     Assert.assertTrue(configuration.isViewRemoveUndeployedEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED, Configuration.VIEWS_REMOVE_UNDEPLOYED_DEFAULT);
+    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED.getKey(),
+        Configuration.VIEWS_REMOVE_UNDEPLOYED.getDefaultValue());
+
     configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewRemoveUndeployedEnabled());
   }
@@ -423,22 +425,22 @@ public class ConfigurationTest {
     fos.close();
     final String passwordFilePath = temp.getRoot().getAbsolutePath() + File.separator + "ldap-password.dat";
 
-    ambariProperties.setProperty(Configuration.LDAP_PRIMARY_URL_KEY, "1");
-    ambariProperties.setProperty(Configuration.LDAP_SECONDARY_URL_KEY, "2");
-    ambariProperties.setProperty(Configuration.LDAP_USE_SSL_KEY, "true");
-    ambariProperties.setProperty(Configuration.LDAP_BIND_ANONYMOUSLY_KEY, "true");
-    ambariProperties.setProperty(Configuration.LDAP_MANAGER_DN_KEY, "5");
-    ambariProperties.setProperty(Configuration.LDAP_MANAGER_PASSWORD_KEY, passwordFilePath);
-    ambariProperties.setProperty(Configuration.LDAP_BASE_DN_KEY, "7");
-    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE_KEY, "8");
-    ambariProperties.setProperty(Configuration.LDAP_USER_BASE_KEY, "9");
-    ambariProperties.setProperty(Configuration.LDAP_USER_OBJECT_CLASS_KEY, "10");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_BASE_KEY, "11");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_OBJECT_CLASS_KEY, "12");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_MEMEBERSHIP_ATTR_KEY, "13");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_NAMING_ATTR_KEY, "14");
-    ambariProperties.setProperty(Configuration.LDAP_ADMIN_GROUP_MAPPING_RULES_KEY, "15");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_SEARCH_FILTER_KEY, "16");
+    ambariProperties.setProperty(Configuration.LDAP_PRIMARY_URL.getKey(), "1");
+    ambariProperties.setProperty(Configuration.LDAP_SECONDARY_URL.getKey(), "2");
+    ambariProperties.setProperty(Configuration.LDAP_USE_SSL.getKey(), "true");
+    ambariProperties.setProperty(Configuration.LDAP_BIND_ANONYMOUSLY.getKey(), "true");
+    ambariProperties.setProperty(Configuration.LDAP_MANAGER_DN.getKey(), "5");
+    ambariProperties.setProperty(Configuration.LDAP_MANAGER_PASSWORD.getKey(), passwordFilePath);
+    ambariProperties.setProperty(Configuration.LDAP_BASE_DN.getKey(), "7");
+    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE.getKey(), "8");
+    ambariProperties.setProperty(Configuration.LDAP_USER_BASE.getKey(), "9");
+    ambariProperties.setProperty(Configuration.LDAP_USER_OBJECT_CLASS.getKey(), "10");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_BASE.getKey(), "11");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_OBJECT_CLASS.getKey(), "12");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_MEMEBERSHIP_ATTR.getKey(), "13");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_NAMING_ATTR.getKey(), "14");
+    ambariProperties.setProperty(Configuration.LDAP_ADMIN_GROUP_MAPPING_RULES.getKey(), "15");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_SEARCH_FILTER.getKey(), "16");
 
     final LdapServerProperties ldapProperties = configuration.getLdapServerProperties();
 
@@ -476,16 +478,16 @@ public class ConfigurationTest {
     Assert.assertEquals(30, configuration.getConnectionPoolAcquisitionRetryAttempts());
     Assert.assertEquals(1000, configuration.getConnectionPoolAcquisitionRetryDelay());
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL, ConnectionPoolType.C3P0.getName());
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MIN_SIZE, "1");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_SIZE, "2");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_AQUISITION_SIZE, "3");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_AGE, "4");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME, "5");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME_EXCESS, "6");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_IDLE_TEST_INTERVAL, "7");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_ATTEMPTS, "8");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_DELAY, "9");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL.getKey(), ConnectionPoolType.C3P0.getName());
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MIN_SIZE.getKey(), "1");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_SIZE.getKey(), "2");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_AQUISITION_SIZE.getKey(), "3");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_AGE.getKey(), "4");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME.getKey(), "5");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME_EXCESS.getKey(), "6");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_IDLE_TEST_INTERVAL.getKey(), "7");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_ATTEMPTS.getKey(), "8");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_DELAY.getKey(), "9");
 
 
     Assert.assertEquals(ConnectionPoolType.C3P0, configuration.getConnectionPoolType());
@@ -505,19 +507,19 @@ public class ConfigurationTest {
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:oracle://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:oracle://server");
     Assert.assertEquals( DatabaseType.ORACLE, configuration.getDatabaseType() );
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:postgres://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:postgres://server");
     Assert.assertEquals( DatabaseType.POSTGRES, configuration.getDatabaseType() );
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:mysql://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:mysql://server");
     Assert.assertEquals( DatabaseType.MYSQL, configuration.getDatabaseType() );
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:derby://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:derby://server");
     Assert.assertEquals( DatabaseType.DERBY, configuration.getDatabaseType() );
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:sqlserver://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:sqlserver://server");
     Assert.assertEquals( DatabaseType.SQL_SERVER, configuration.getDatabaseType() );
   }
 
@@ -528,10 +530,10 @@ public class ConfigurationTest {
 
     Assert.assertEquals(100, configuration.getAgentPackageParallelCommandsLimit());
 
-    ambariProperties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT_KEY, "5");
+    ambariProperties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT.getKey(), "5");
     Assert.assertEquals(5, configuration.getAgentPackageParallelCommandsLimit());
 
-    ambariProperties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT_KEY, "0");
+    ambariProperties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT.getKey(), "0");
     Assert.assertEquals(1, configuration.getAgentPackageParallelCommandsLimit());
   }
 
@@ -543,13 +545,13 @@ public class ConfigurationTest {
     //default
     Assert.assertEquals(new Long(1000L), configuration.getExecutionSchedulerWait());
 
-    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT_KEY, "5");
+    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT.getKey(), "5");
     Assert.assertEquals(new Long(5000L), configuration.getExecutionSchedulerWait());
     // > 60 secs
-    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT_KEY, "100");
+    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT.getKey(), "100");
     Assert.assertEquals(new Long(60000L), configuration.getExecutionSchedulerWait());
     //not a number
-    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT_KEY, "100m");
+    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT.getKey(), "100m");
     Assert.assertEquals(new Long(1000L), configuration.getExecutionSchedulerWait());
   }
 
@@ -560,7 +562,7 @@ public class ConfigurationTest {
 
     Assert.assertFalse(configuration.isExperimentalConcurrentStageProcessingEnabled());
 
-    ambariProperties.setProperty(Configuration.EXPERIMENTAL_CONCURRENCY_STAGE_PROCESSING_ENABLED,
+    ambariProperties.setProperty(Configuration.EXPERIMENTAL_CONCURRENCY_STAGE_PROCESSING_ENABLED.getKey(),
         Boolean.TRUE.toString());
 
     Assert.assertTrue(configuration.isExperimentalConcurrentStageProcessingEnabled());
@@ -573,9 +575,9 @@ public class ConfigurationTest {
 
     Assert.assertFalse(configuration.isAlertCacheEnabled());
 
-    ambariProperties.setProperty(Configuration.ALERTS_CACHE_ENABLED, Boolean.TRUE.toString());
-    ambariProperties.setProperty(Configuration.ALERTS_CACHE_FLUSH_INTERVAL, "60");
-    ambariProperties.setProperty(Configuration.ALERTS_CACHE_SIZE, "1000");
+    ambariProperties.setProperty(Configuration.ALERTS_CACHE_ENABLED.getKey(), Boolean.TRUE.toString());
+    ambariProperties.setProperty(Configuration.ALERTS_CACHE_FLUSH_INTERVAL.getKey(), "60");
+    ambariProperties.setProperty(Configuration.ALERTS_CACHE_SIZE.getKey(), "1000");
 
     Assert.assertTrue(configuration.isAlertCacheEnabled());
     Assert.assertEquals(60, configuration.getAlertCacheFlushInterval());
@@ -590,8 +592,8 @@ public class ConfigurationTest {
     Assert.assertEquals(2 * Runtime.getRuntime().availableProcessors(), configuration.getPropertyProvidersThreadPoolCoreSize());
     Assert.assertEquals(4 * Runtime.getRuntime().availableProcessors(), configuration.getPropertyProvidersThreadPoolMaxSize());
 
-    ambariProperties.setProperty(Configuration.PROPERTY_PROVIDER_THREADPOOL_MAX_SIZE_KEY, "44");
-    ambariProperties.setProperty(Configuration.PROPERTY_PROVIDER_THREADPOOL_CORE_SIZE_KEY, "22");
+    ambariProperties.setProperty(Configuration.PROPERTY_PROVIDER_THREADPOOL_MAX_SIZE.getKey(), "44");
+    ambariProperties.setProperty(Configuration.PROPERTY_PROVIDER_THREADPOOL_CORE_SIZE.getKey(), "22");
 
     Assert.assertEquals(22, configuration.getPropertyProvidersThreadPoolCoreSize());
     Assert.assertEquals(44, configuration.getPropertyProvidersThreadPoolMaxSize());
@@ -602,7 +604,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE, "3000");
+    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE.getKey(), "3000");
 
     // When
     long actualCacheSize = configuration.getHostRoleCommandStatusSummaryCacheSize();
@@ -618,10 +620,10 @@ public class ConfigurationTest {
     final Configuration configuration = new Configuration(ambariProperties);
 
     // When
-    long actualCacheSize = configuration.getHostRoleCommandStatusSummaryCacheSize();
+    Long actualCacheSize = configuration.getHostRoleCommandStatusSummaryCacheSize();
 
     // Then
-    Assert.assertEquals(actualCacheSize, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE_DEFAULT);
+    Assert.assertEquals(actualCacheSize, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE.getDefaultValue());
   }
 
   @Test
@@ -629,7 +631,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION, "60");
+    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION.getKey(), "60");
 
     // When
     long actualCacheExpiryDuration = configuration.getHostRoleCommandStatusSummaryCacheExpiryDuration();
@@ -645,10 +647,10 @@ public class ConfigurationTest {
     final Configuration configuration = new Configuration(ambariProperties);
 
     // When
-    long actualCacheExpiryDuration = configuration.getHostRoleCommandStatusSummaryCacheExpiryDuration();
+    Long actualCacheExpiryDuration = configuration.getHostRoleCommandStatusSummaryCacheExpiryDuration();
 
     // Then
-    Assert.assertEquals(actualCacheExpiryDuration, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION_DEFAULT);
+    Assert.assertEquals(actualCacheExpiryDuration, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION.getDefaultValue());
   }
 
   @Test
@@ -656,7 +658,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED, "true");
+    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED.getKey(), "true");
 
     // When
     boolean actualCacheEnabledConfig = configuration.getHostRoleCommandStatusSummaryCacheEnabled();
@@ -670,7 +672,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED, "false");
+    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED.getKey(), "false");
 
     // When
     boolean actualCacheEnabledConfig = configuration.getHostRoleCommandStatusSummaryCacheEnabled();
@@ -686,10 +688,10 @@ public class ConfigurationTest {
     final Configuration configuration = new Configuration(ambariProperties);
 
     // When
-    boolean actualCacheEnabledConfig = configuration.getHostRoleCommandStatusSummaryCacheEnabled();
+    Boolean actualCacheEnabledConfig = configuration.getHostRoleCommandStatusSummaryCacheEnabled();
 
     // Then
-    Assert.assertEquals(actualCacheEnabledConfig, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED_DEFAULT);
+    Assert.assertEquals(actualCacheEnabledConfig, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED.getDefaultValue());
   }
 
   @Test
@@ -710,8 +712,8 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE_KEY, "test_uid");
-    ambariProperties.setProperty(Configuration.LDAP_USER_SEARCH_FILTER_KEY, "{usernameAttribute}={0}");
+    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE.getKey(), "test_uid");
+    ambariProperties.setProperty(Configuration.LDAP_USER_SEARCH_FILTER.getKey(), "{usernameAttribute}={0}");
 
     // When
     String actualLdapUserSearchFilter = configuration.getLdapServerProperties().getUserSearchFilter(false);
@@ -738,8 +740,8 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE_KEY, "test_uid");
-    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_FILTER_KEY, "{usernameAttribute}={5}");
+    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE.getKey(), "test_uid");
+    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_FILTER.getKey(), "{usernameAttribute}={5}");
 
     // When
     String actualLdapUserSearchFilter = configuration.getLdapServerProperties().getUserSearchFilter(true);
@@ -766,7 +768,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "true");
+    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "true");
 
     // When
     boolean actual =  configuration.isLdapAlternateUserSearchEnabled();
@@ -780,7 +782,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "false");
+    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "false");
 
     // When
     boolean actual =  configuration.isLdapAlternateUserSearchEnabled();

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 3ad1f1f..40a11fe 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -8689,8 +8689,8 @@ public class AmbariManagementControllerTest {
     // verify change with new meta info
     Configuration configuration = injector.getInstance(Configuration.class);
     Properties properties = configuration.getProperties();
-    properties.setProperty(Configuration.METADATA_DIR_PATH, "src/test/resources/stacks");
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, "src/test/resources/version");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), "src/test/resources/stacks");
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), "src/test/resources/version");
     Configuration newConfiguration = new Configuration(properties);
 
     AmbariMetaInfo ami = new AmbariMetaInfo(newConfiguration);
@@ -8796,7 +8796,7 @@ public class AmbariManagementControllerTest {
     }
 
     // variation #1: url with trailing slash, suffix preceding slash
-    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU, "/repodata/repomd.xml");
+    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU.getKey(), "/repodata/repomd.xml");
     Assert.assertTrue(baseUrl.endsWith("/") && configuration.getRepoValidationSuffixes("ubuntu12")[0].startsWith("/"));
     request.setBaseUrl(baseUrl);
     try {
@@ -8809,7 +8809,7 @@ public class AmbariManagementControllerTest {
     }
 
     // variation #2: url with trailing slash, suffix no preceding slash
-    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_DEFAULT, "repodata/repomd.xml");
+    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_DEFAULT.getKey(), "repodata/repomd.xml");
     Assert.assertTrue(baseUrl.endsWith("/") && !configuration.getRepoValidationSuffixes("redhat6")[0].startsWith("/"));
     request.setBaseUrl(baseUrl);
     try {
@@ -8835,7 +8835,7 @@ public class AmbariManagementControllerTest {
     }
 
     // variation #4: url with no trailing slash, suffix preceding slash
-    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_DEFAULT, "/repodata/repomd.xml");
+    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_DEFAULT.getKey(), "/repodata/repomd.xml");
     Assert.assertTrue(!baseUrl.endsWith("/") && configuration.getRepoValidationSuffixes("suse11")[0].startsWith("/"));
     request.setBaseUrl(baseUrl);
     try {
@@ -8848,7 +8848,7 @@ public class AmbariManagementControllerTest {
     }
 
     // variation #5: multiple suffix tests
-    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU, "/foo/bar.xml,/repodata/repomd.xml");
+    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU.getKey(), "/foo/bar.xml,/repodata/repomd.xml");
     Assert.assertTrue(configuration.getRepoValidationSuffixes("ubuntu12").length > 1);
     request.setBaseUrl(baseUrl);
     try {
@@ -9293,14 +9293,12 @@ public class AmbariManagementControllerTest {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-
-        properties.setProperty(Configuration.METADATA_DIR_PATH,
-            "src/test/resources/stacks");
-        properties.setProperty(Configuration.SERVER_VERSION_FILE,
-            "../version");
-        properties.setProperty(Configuration.OS_VERSION_KEY, "centos6");
-        properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
+        properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+
+        properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(),"src/test/resources/stacks");
+        properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(),"../version");
+        properties.setProperty(Configuration.OS_VERSION.getKey(), "centos6");
+        properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
         try {
           install(new ControllerModule(properties));
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
index 0f5224d..73b5b75 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
@@ -26,8 +26,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import junit.framework.Assert;
-
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.ActionManager;
 import org.apache.ambari.server.actionmanager.ExecutionCommandWrapper;
@@ -59,11 +57,13 @@ import org.mockito.Captor;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
+import org.springframework.security.core.context.SecurityContextHolder;
 
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.persist.PersistService;
-import org.springframework.security.core.context.SecurityContextHolder;
+
+import junit.framework.Assert;
 
 @RunWith(MockitoJUnitRunner.class)
 public class BackgroundCustomCommandExecutionTest {
@@ -72,39 +72,39 @@ public class BackgroundCustomCommandExecutionTest {
   private Clusters clusters;
 
   private static final String REQUEST_CONTEXT_PROPERTY = "context";
-  
+
   @Captor ArgumentCaptor<Request> requestCapture;
   @Mock ActionManager am;
-  
+
   @Before
   public void setup() throws Exception {
     Configuration configuration;
     TopologyManager topologyManager;
 
     InMemoryDefaultTestModule module = new InMemoryDefaultTestModule(){
-      
-      
+
+
       @Override
       protected void configure() {
-        getProperties().put(Configuration.CUSTOM_ACTION_DEFINITION_KEY, "src/main/resources/custom_action_definitions");
+        getProperties().put(Configuration.CUSTOM_ACTION_DEFINITION.getKey(), "src/main/resources/custom_action_definitions");
         super.configure();
         bind(ActionManager.class).toInstance(am);
       }
     };
     injector = Guice.createInjector(module);
-    
-    
+
+
     injector.getInstance(GuiceJpaInitializer.class);
     controller = injector.getInstance(AmbariManagementController.class);
     clusters = injector.getInstance(Clusters.class);
     configuration = injector.getInstance(Configuration.class);
     topologyManager = injector.getInstance(TopologyManager.class);
-    
+
     Assert.assertEquals("src/main/resources/custom_action_definitions", configuration.getCustomActionDefinitionPath());
 
     StageUtils.setTopologyManager(topologyManager);
     StageUtils.setConfiguration(configuration);
-    
+
     // Set the authenticated user
     // TODO: remove this or replace the authenticated user to test authorization rules
     // Set the authenticated user
@@ -122,7 +122,7 @@ public class BackgroundCustomCommandExecutionTest {
   public void testRebalanceHdfsCustomCommand() {
     try {
       createClusterFixture();
-      
+
       Map<String, String> requestProperties = new HashMap<String, String>() {
         {
           put(REQUEST_CONTEXT_PROPERTY, "Refresh YARN Capacity Scheduler");
@@ -134,9 +134,9 @@ public class BackgroundCustomCommandExecutionTest {
       ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1",
           "REBALANCEHDFS", new HashMap<String, String>(), false);
       actionRequest.getResourceFilters().add(new RequestResourceFilter("HDFS", "NAMENODE",Collections.singletonList("c6401")));
-      
+
       controller.createAction(actionRequest, requestProperties);
-      
+
       Mockito.verify(am, Mockito.times(1)).sendActions(requestCapture.capture(), any(ExecuteActionRequest.class));
 
       Request request = requestCapture.getValue();
@@ -144,34 +144,34 @@ public class BackgroundCustomCommandExecutionTest {
       Assert.assertNotNull(request.getStages());
       Assert.assertEquals(1, request.getStages().size());
       Stage stage = request.getStages().iterator().next();
-      
+
       System.out.println(stage);
-      
+
       Assert.assertEquals(1, stage.getHosts().size());
-      
+
       List<ExecutionCommandWrapper> commands = stage.getExecutionCommands("c6401");
       Assert.assertEquals(1, commands.size());
-      
+
       ExecutionCommand command = commands.get(0).getExecutionCommand();
-      
+
       Assert.assertEquals(AgentCommandType.BACKGROUND_EXECUTION_COMMAND, command.getCommandType());
       Assert.assertEquals("{\"threshold\":13}", command.getCommandParams().get("namenode"));
-      
+
     } catch (Exception e) {
       Assert.fail(e.getMessage());
     }
   }
-  
+
   private void createClusterFixture() throws AmbariException, AuthorizationException {
     createCluster("c1");
     addHost("c6401","c1");
     addHost("c6402","c1");
-    
+
     clusters.getCluster("c1");
     createService("c1", "HDFS", null);
-    
+
     createServiceComponent("c1","HDFS","NAMENODE", State.INIT);
-    
+
     createServiceComponentHost("c1","HDFS","NAMENODE","c6401", null);
   }
   private void addHost(String hostname, String clusterName) throws AmbariException {
@@ -187,7 +187,7 @@ public class BackgroundCustomCommandExecutionTest {
     Map<String, String> hostAttributes = new HashMap<String, String>();
     hostAttributes.put("os_family", osFamily);
     hostAttributes.put("os_release_version", osVersion);
-    
+
     host.setHostAttributes(hostAttributes);
   }
 
@@ -195,7 +195,7 @@ public class BackgroundCustomCommandExecutionTest {
     ClusterRequest r = new ClusterRequest(null, clusterName, State.INSTALLED.name(), SecurityType.NONE, "HDP-2.0.6", null);
     controller.createCluster(r);
   }
-  
+
   private void createService(String clusterName,
       String serviceName, State desiredState) throws AmbariException, AuthorizationException {
     String dStateStr = null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
index 93dff82..1a66cc7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
@@ -18,7 +18,7 @@
 package org.apache.ambari.server.controller.internal;
 
 import static org.apache.ambari.server.configuration.Configuration.JDBC_IN_MEMORY_URL;
-import static org.apache.ambari.server.configuration.Configuration.JDBC_IN_MEMROY_DRIVER;
+import static org.apache.ambari.server.configuration.Configuration.JDBC_IN_MEMORY_DRIVER;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.createMock;
 import static org.easymock.EasyMock.expect;
@@ -734,10 +734,10 @@ public class AlertResourceProviderTest {
       binder.bind(Configuration.class).toInstance(configuration);
 
       expect(configuration.getDatabaseUrl()).andReturn(JDBC_IN_MEMORY_URL).anyTimes();
-      expect(configuration.getDatabaseDriver()).andReturn(JDBC_IN_MEMROY_DRIVER).anyTimes();
+      expect(configuration.getDatabaseDriver()).andReturn(JDBC_IN_MEMORY_DRIVER).anyTimes();
       expect(configuration.getDatabaseUser()).andReturn("test").anyTimes();
       expect(configuration.getDatabasePassword()).andReturn("test").anyTimes();
-      expect(configuration.getAlertEventPublisherPoolSize()).andReturn(Integer.valueOf(Configuration.ALERTS_EXECUTION_SCHEDULER_THREADS_DEFAULT)).anyTimes();
+      expect(configuration.getAlertEventPublisherPoolSize()).andReturn(Integer.valueOf(Configuration.ALERTS_EXECUTION_SCHEDULER_THREADS.getDefaultValue())).anyTimes();
       expect(configuration.getMasterKeyLocation()).andReturn(new File("/test")).anyTimes();
       expect(configuration.getTemporaryKeyStoreRetentionMinutes()).andReturn(2l).anyTimes();
       expect(configuration.isActivelyPurgeTemporaryKeyStore()).andReturn(true).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
index f0bddf8..5359f69 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
@@ -71,7 +71,6 @@ import org.apache.ambari.server.state.ServiceInfo;
 import org.apache.ambari.server.state.ServiceOsSpecific;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.utils.StageUtils;
-import org.easymock.EasyMock;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -256,8 +255,8 @@ public class ClientConfigResourceProviderTest {
     responses.add(shr1);
 
     Map<String, String> returnConfigMap = new HashMap<String, String>();
-    returnConfigMap.put(Configuration.SERVER_TMP_DIR_KEY, Configuration.SERVER_TMP_DIR_DEFAULT);
-    returnConfigMap.put(Configuration.AMBARI_PYTHON_WRAP_KEY, Configuration.AMBARI_PYTHON_WRAP_DEFAULT);
+    returnConfigMap.put(Configuration.SERVER_TMP_DIR.getKey(), Configuration.SERVER_TMP_DIR.getDefaultValue());
+    returnConfigMap.put(Configuration.AMBARI_PYTHON_WRAP.getKey(), Configuration.AMBARI_PYTHON_WRAP.getDefaultValue());
 
     // set expectations
     expect(managementController.getConfigHelper()).andReturn(configHelper);
@@ -265,19 +264,17 @@ public class ClientConfigResourceProviderTest {
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
     expect(clusters.getCluster(clusterName)).andReturn(cluster).anyTimes();
     expect(configHelper.getEffectiveConfigProperties(cluster, configTags)).andReturn(properties);
-    expect(clusterConfig.getType()).andReturn(Configuration.HIVE_CONFIG_TAG).anyTimes();
     expect(configHelper.getEffectiveConfigAttributes(cluster, configTags)).andReturn(attributes);
-    expect(configMap.get(Configuration.SERVER_TMP_DIR_KEY)).andReturn(Configuration.SERVER_TMP_DIR_DEFAULT);
-    expect(configMap.get(Configuration.AMBARI_PYTHON_WRAP_KEY)).andReturn(Configuration.AMBARI_PYTHON_WRAP_DEFAULT);
+    expect(configMap.get(Configuration.SERVER_TMP_DIR.getKey())).andReturn(Configuration.SERVER_TMP_DIR.getDefaultValue());
+    expect(configMap.get(Configuration.AMBARI_PYTHON_WRAP.getKey())).andReturn(Configuration.AMBARI_PYTHON_WRAP.getDefaultValue());
     expect(configuration.getConfigsMap()).andReturn(returnConfigMap);
     expect(configuration.getResourceDirPath()).andReturn(stackRoot);
     expect(configuration.getJavaVersion()).andReturn(8);
     expect(configuration.areHostsSysPrepped()).andReturn("false");
     expect(configuration.isAgentStackRetryOnInstallEnabled()).andReturn("false");
     expect(configuration.getAgentStackRetryOnInstallCount()).andReturn("5");
-    expect(configuration.getExternalScriptTimeout()).andReturn(Integer.parseInt(Configuration.EXTERNAL_SCRIPT_TIMEOUT_DEFAULT));
+    expect(configuration.getExternalScriptTimeout()).andReturn(Configuration.EXTERNAL_SCRIPT_TIMEOUT.getDefaultValue());
     Map<String,String> props = new HashMap<String, String>();
-    props.put(Configuration.HIVE_METASTORE_PASSWORD_PROPERTY, "pass");
     props.put("key","value");
     expect(clusterConfig.getProperties()).andReturn(props);
     expect(configHelper.getEffectiveDesiredTags(cluster, hostName)).andReturn(allConfigTags);
@@ -315,6 +312,7 @@ public class ClientConfigResourceProviderTest {
     expect(componentInfo.getCommandScript()).andReturn(commandScriptDefinition);
     expect(componentInfo.getClientConfigFiles()).andReturn(clientConfigFileDefinitionList);
     expect(cluster.getConfig("hive-site", null)).andReturn(clusterConfig);
+    expect(clusterConfig.getType()).andReturn("hive-site").anyTimes();
     expect(cluster.getDesiredConfigs()).andReturn(desiredConfigMap);
     expect(clusters.getHost(hostName)).andReturn(host);
 
@@ -458,8 +456,8 @@ public class ClientConfigResourceProviderTest {
     responses.add(shr1);
 
     Map<String, String> returnConfigMap = new HashMap<String, String>();
-    returnConfigMap.put(Configuration.SERVER_TMP_DIR_KEY, Configuration.SERVER_TMP_DIR_DEFAULT);
-    returnConfigMap.put(Configuration.AMBARI_PYTHON_WRAP_KEY, Configuration.AMBARI_PYTHON_WRAP_DEFAULT);
+    returnConfigMap.put(Configuration.SERVER_TMP_DIR.getKey(), Configuration.SERVER_TMP_DIR.getDefaultValue());
+    returnConfigMap.put(Configuration.AMBARI_PYTHON_WRAP.getKey(), Configuration.AMBARI_PYTHON_WRAP.getDefaultValue());
 
     // set expectations
     expect(managementController.getConfigHelper()).andReturn(configHelper);
@@ -467,20 +465,18 @@ public class ClientConfigResourceProviderTest {
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
     expect(clusters.getCluster(clusterName)).andReturn(cluster).anyTimes();
     expect(configHelper.getEffectiveConfigProperties(cluster, configTags)).andReturn(properties);
-    expect(clusterConfig.getType()).andReturn(Configuration.HIVE_CONFIG_TAG).anyTimes();
     expect(configHelper.getEffectiveConfigAttributes(cluster, configTags)).andReturn(attributes);
-    expect(configMap.get(Configuration.SERVER_TMP_DIR_KEY)).andReturn(Configuration.SERVER_TMP_DIR_DEFAULT);
-    expect(configMap.get(Configuration.AMBARI_PYTHON_WRAP_KEY)).andReturn(Configuration.AMBARI_PYTHON_WRAP_DEFAULT);
+    expect(configMap.get(Configuration.SERVER_TMP_DIR.getKey())).andReturn(Configuration.SERVER_TMP_DIR.getDefaultValue());
+    expect(configMap.get(Configuration.AMBARI_PYTHON_WRAP.getKey())).andReturn(Configuration.AMBARI_PYTHON_WRAP.getDefaultValue());
     expect(configuration.getConfigsMap()).andReturn(returnConfigMap);
     expect(configuration.getResourceDirPath()).andReturn("/var/lib/ambari-server/src/main/resources");
     expect(configuration.getJavaVersion()).andReturn(8);
     expect(configuration.areHostsSysPrepped()).andReturn("false");
     expect(configuration.isAgentStackRetryOnInstallEnabled()).andReturn("false");
     expect(configuration.getAgentStackRetryOnInstallCount()).andReturn("5");
-    expect(configuration.getExternalScriptTimeout()).andReturn(Integer.parseInt(Configuration.EXTERNAL_SCRIPT_TIMEOUT_DEFAULT));
+    expect(configuration.getExternalScriptTimeout()).andReturn(Configuration.EXTERNAL_SCRIPT_TIMEOUT.getDefaultValue());
 
     Map<String,String> props = new HashMap<String, String>();
-    props.put(Configuration.HIVE_METASTORE_PASSWORD_PROPERTY, "pass");
     props.put("key","value");
     expect(clusterConfig.getProperties()).andReturn(props);
     expect(configHelper.getEffectiveDesiredTags(cluster, hostName)).andReturn(allConfigTags);
@@ -518,6 +514,7 @@ public class ClientConfigResourceProviderTest {
     expect(componentInfo.getCommandScript()).andReturn(commandScriptDefinition);
     expect(componentInfo.getClientConfigFiles()).andReturn(clientConfigFileDefinitionList);
     expect(cluster.getConfig("hive-site", null)).andReturn(clusterConfig);
+    expect(clusterConfig.getType()).andReturn("hive-site").anyTimes();
     expect(cluster.getDesiredConfigs()).andReturn(desiredConfigMap);
     expect(clusters.getHost(hostName)).andReturn(host);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
index 6737d7d..a521139 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
@@ -111,6 +111,8 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 
 import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
@@ -120,8 +122,6 @@ import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.persist.PersistService;
 import com.google.inject.util.Modules;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
 
 
  /**
@@ -171,7 +171,7 @@ public class ClusterStackVersionResourceProviderTest {
     configHelper = createNiceMock(ConfigHelper.class);
     InMemoryDefaultTestModule inMemoryModule = new InMemoryDefaultTestModule();
     Properties properties = inMemoryModule.getProperties();
-    properties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT_KEY,
+    properties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT.getKey(),
             String.valueOf(MAX_TASKS_PER_STAGE));
     configuration = new Configuration(properties);
     stageFactory = createNiceMock(StageFactory.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
index df4d8ed..3116a80 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
@@ -18,10 +18,21 @@
 
 package org.apache.ambari.server.controller.internal;
 
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import junit.framework.Assert;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.ResourceProviderFactory;
@@ -49,15 +60,11 @@ import org.junit.rules.TemporaryFolder;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
 
-import java.io.File;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
 
-import static org.easymock.EasyMock.*;
+import junit.framework.Assert;
 
 
 /**
@@ -82,8 +89,8 @@ public class CredentialResourceProviderTest {
       protected void configure() {
         Properties properties = new Properties();
 
-        properties.setProperty(Configuration.MASTER_KEY_LOCATION, tmpFolder.getRoot().getAbsolutePath());
-        properties.setProperty(Configuration.MASTER_KEYSTORE_LOCATION, tmpFolder.getRoot().getAbsolutePath());
+        properties.setProperty(Configuration.MASTER_KEY_LOCATION.getKey(), tmpFolder.getRoot().getAbsolutePath());
+        properties.setProperty(Configuration.MASTER_KEYSTORE_LOCATION.getKey(), tmpFolder.getRoot().getAbsolutePath());
 
         bind(CredentialStoreService.class).to(CredentialStoreServiceImpl.class);
 
@@ -347,7 +354,7 @@ public class CredentialResourceProviderTest {
     // end expectations
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
-    
+
     AbstractControllerResourceProvider.init(factory);
 
     ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
@@ -423,7 +430,7 @@ public class CredentialResourceProviderTest {
     // end expectations
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
-    
+
     AbstractControllerResourceProvider.init(factory);
 
     ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
@@ -564,7 +571,7 @@ public class CredentialResourceProviderTest {
     // end expectations
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
-    
+
     AbstractControllerResourceProvider.init(factory);
 
     ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
@@ -620,9 +627,9 @@ public class CredentialResourceProviderTest {
 
     replay(request, factory, managementController);
     // end expectations
-    
+
     SecurityContextHolder.getContext().setAuthentication(authentication);
-    
+
     AbstractControllerResourceProvider.init(factory);
 
     ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
index f148da1..2702fdf 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
@@ -69,9 +69,9 @@ public class DatabaseCheckerTest {
     MetainfoDAO metainfoDAO =  createMock(MetainfoDAO.class);
     MetainfoEntity metainfoEntity = new MetainfoEntity();
     String serverVersion = ambariMetaInfo.getServerVersion();
-    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION_KEY);
+    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION.getKey());
     metainfoEntity.setMetainfoValue(serverVersion);
-    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY)).
+    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey())).
       andReturn(metainfoEntity);
     replay(metainfoDAO);
     DatabaseChecker.metainfoDAO = metainfoDAO;
@@ -88,9 +88,9 @@ public class DatabaseCheckerTest {
   public void testCheckDBVersionInvalid() throws Exception {
     MetainfoDAO metainfoDAO =  createMock(MetainfoDAO.class);
     MetainfoEntity metainfoEntity = new MetainfoEntity();
-    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION_KEY);
+    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION.getKey());
     metainfoEntity.setMetainfoValue("0.0.0"); // Incompatible version
-    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY)).
+    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey())).
       andReturn(metainfoEntity);
     replay(metainfoDAO);
     DatabaseChecker.metainfoDAO = metainfoDAO;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java b/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java
index 4f06ee2..95f9a0c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java
@@ -50,10 +50,10 @@ public class DispatchFactoryTest {
     Integer snmpPort = 30111;
 
     Properties properties = new Properties();
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY,"in-memory");
-    properties.setProperty(Configuration.OS_VERSION_KEY, "centos6");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY,sourceResourceDirectory);
-    properties.setProperty(Configuration.ALERTS_SNMP_DISPATCH_UDP_PORT,snmpPort.toString());
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(),"in-memory");
+    properties.setProperty(Configuration.OS_VERSION.getKey(), "centos6");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(),sourceResourceDirectory);
+    properties.setProperty(Configuration.ALERTS_SNMP_DISPATCH_UDP_PORT.getKey(),snmpPort.toString());
 
     Injector injector = Guice.createInjector(new AuditLoggerModule(), new ControllerModule(properties));
     DispatchFactory dispatchFactory = injector.getInstance(DispatchFactory.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
index 1ca486e..e327a04 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
@@ -71,24 +71,24 @@ public class InMemoryDefaultTestModule extends AbstractModule {
       sharedResourcesDir = ClassLoader.getSystemClassLoader().getResource("").getPath();
     }
 
-    if (!properties.containsKey(Configuration.SERVER_PERSISTENCE_TYPE_KEY)) {
-      properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
+    if (!properties.containsKey(Configuration.SERVER_PERSISTENCE_TYPE.getKey())) {
+      properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
     }
 
-    if (!properties.containsKey(Configuration.METADATA_DIR_PATH)) {
-      properties.setProperty(Configuration.METADATA_DIR_PATH, stacks);
+    if (!properties.containsKey(Configuration.METADATA_DIR_PATH.getKey())) {
+      properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), stacks);
     }
 
-    if (!properties.containsKey(Configuration.SERVER_VERSION_FILE)) {
-      properties.setProperty(Configuration.SERVER_VERSION_FILE, version);
+    if (!properties.containsKey(Configuration.SERVER_VERSION_FILE.getKey())) {
+      properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), version);
     }
 
-    if (!properties.containsKey(Configuration.OS_VERSION_KEY)) {
-      properties.setProperty(Configuration.OS_VERSION_KEY, "centos5");
+    if (!properties.containsKey(Configuration.OS_VERSION.getKey())) {
+      properties.setProperty(Configuration.OS_VERSION.getKey(), "centos5");
     }
 
-    if (!properties.containsKey(Configuration.SHARED_RESOURCES_DIR_KEY)) {
-      properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, sharedResourcesDir);
+    if (!properties.containsKey(Configuration.SHARED_RESOURCES_DIR.getKey())) {
+      properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), sharedResourcesDir);
     }
 
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java
index 1fac11b..20c0388 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java
@@ -19,8 +19,6 @@ package org.apache.ambari.server.orm;
 
 import java.util.Properties;
 
-import com.google.inject.persist.PersistService;
-
 import org.apache.ambari.server.audit.AuditLoggerModule;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.ControllerModule;
@@ -32,6 +30,7 @@ import org.junit.Test;
 
 import com.google.inject.Guice;
 import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
 
 public class JdbcPropertyTest {
   Properties properties;
@@ -40,11 +39,11 @@ public class JdbcPropertyTest {
   @Before
   public void configure() {
     properties = new Properties();
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-    properties.setProperty(Configuration.METADATA_DIR_PATH, "src/test/resources/stacks");
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, "src/test/resources/version");
-    properties.setProperty(Configuration.OS_VERSION_KEY, "centos5");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), "src/test/resources/stacks");
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), "src/test/resources/version");
+    properties.setProperty(Configuration.OS_VERSION.getKey(), "centos5");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
   }
 
   @After

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java b/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java
index 509a2ec..004975e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java
@@ -18,13 +18,13 @@
 
 package org.apache.ambari.server.resources;
 
+import static org.easymock.EasyMock.createNiceMock;
+
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.util.Properties;
 
-import junit.framework.TestCase;
-
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.apache.commons.io.FileUtils;
@@ -38,25 +38,25 @@ import com.google.inject.Guice;
 import com.google.inject.Inject;
 import com.google.inject.Injector;
 
-import static org.easymock.EasyMock.createNiceMock;
+import junit.framework.TestCase;
 
 public class TestResources extends TestCase {
-	
+
   private static ResourceManager resMan;
   private static final String RESOURCE_FILE_NAME = "resources.ext";
   private static final String RESOURCE_FILE_CONTENT = "CONTENT";
   Injector injector;
   private TemporaryFolder tempFolder = new TemporaryFolder();
   private File resourceFile;
-  
+
   protected Properties buildTestProperties() {
-	   
+
 	Properties properties = new Properties();
     try {
 		tempFolder.create();
-		
-		properties.setProperty(Configuration.SRVR_KSTR_DIR_KEY, tempFolder.getRoot().getAbsolutePath());
-		properties.setProperty(Configuration.RESOURCES_DIR_KEY, tempFolder.getRoot().getAbsolutePath());
+
+		properties.setProperty(Configuration.SRVR_KSTR_DIR.getKey(), tempFolder.getRoot().getAbsolutePath());
+		properties.setProperty(Configuration.RESOURCES_DIR.getKey(), tempFolder.getRoot().getAbsolutePath());
 
 	    resourceFile = tempFolder.newFile(RESOURCE_FILE_NAME);
 	    FileUtils.writeStringToFile(resourceFile, RESOURCE_FILE_CONTENT);
@@ -65,7 +65,7 @@ public class TestResources extends TestCase {
 	}
     return properties;
   }
-  
+
   protected Constructor<Configuration> getConfigurationConstructor() {
     try {
 	  return Configuration.class.getConstructor(Properties.class);
@@ -89,18 +89,20 @@ public class TestResources extends TestCase {
     resMan = instance;
   }
 
+  @Override
   @Before
   public void setUp() throws IOException {
     injector = Guice.createInjector(new ResourceModule());
     resMan = injector.getInstance(ResourceManager.class);
   }
-	
+
+  @Override
   @After
   public void tearDown() throws IOException {
     resourceFile.delete();
 	tempFolder.delete();
   }
-	
+
   @Test
   public void testGetResource() throws Exception {
     File resFile = resMan.getResource(resourceFile.getName());

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
index 860e647..f2fe3b8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
@@ -17,16 +17,26 @@
  */
 package org.apache.ambari.server.scheduler;
 
-import com.google.gson.Gson;
-import com.google.inject.Binder;
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.persist.PersistService;
-import com.google.inject.persist.Transactional;
-import com.google.inject.util.Modules;
-import junit.framework.Assert;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.createMockBuilder;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.ActionDBAccessor;
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
@@ -66,26 +76,17 @@ import org.quartz.impl.matchers.GroupMatcher;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
+import com.google.gson.Gson;
+import com.google.inject.Binder;
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+import com.google.inject.persist.PersistService;
+import com.google.inject.persist.Transactional;
+import com.google.inject.util.Modules;
 
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.capture;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.createMockBuilder;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import junit.framework.Assert;
 
 public class ExecutionScheduleManagerTest {
   private Clusters clusters;
@@ -97,7 +98,6 @@ public class ExecutionScheduleManagerTest {
   private RequestExecutionFactory requestExecutionFactory;
   private ExecutionScheduler executionScheduler;
   private Scheduler scheduler;
-  Properties properties;
 
   private static final Logger LOG =
     LoggerFactory.getLogger(ExecutionScheduleManagerTest.class);
@@ -105,7 +105,6 @@ public class ExecutionScheduleManagerTest {
   @Before
   public void setup() throws Exception {
     InMemoryDefaultTestModule defaultTestModule = new InMemoryDefaultTestModule();
-    properties = defaultTestModule.getProperties();
     injector  = Guice.createInjector(Modules.override(defaultTestModule)
       .with(new ExecutionSchedulerTestModule()));
     injector.getInstance(GuiceJpaInitializer.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java
index 8346c65..c49d799 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java
@@ -25,8 +25,6 @@ import static org.powermock.api.easymock.PowerMock.expectPrivate;
 
 import java.util.Properties;
 
-import junit.framework.Assert;
-
 import org.apache.ambari.server.configuration.Configuration;
 import org.junit.After;
 import org.junit.Before;
@@ -39,6 +37,8 @@ import org.powermock.modules.junit4.PowerMockRunner;
 import org.quartz.Scheduler;
 import org.quartz.impl.StdSchedulerFactory;
 
+import junit.framework.Assert;
+
 @RunWith(PowerMockRunner.class)
 @PowerMockIgnore("javax.management.*")
 public class ExecutionSchedulerTest {
@@ -48,13 +48,13 @@ public class ExecutionSchedulerTest {
   @Before
   public void setup() throws Exception {
     Properties properties = new Properties();
-    properties.setProperty(Configuration.EXECUTION_SCHEDULER_THREADS_KEY, "2");
-    properties.setProperty(Configuration.EXECUTION_SCHEDULER_CLUSTERED_KEY, "false");
-    properties.setProperty(Configuration.EXECUTION_SCHEDULER_CONNECTIONS_KEY, "2");
-    properties.setProperty(Configuration.SERVER_JDBC_DRIVER_KEY, "db.driver");
-    properties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:postgresql://localhost/");
-    properties.setProperty(Configuration.SERVER_JDBC_USER_NAME_KEY, "user");
-    properties.setProperty(Configuration.SERVER_DB_NAME_KEY, "derby");
+    properties.setProperty(Configuration.EXECUTION_SCHEDULER_THREADS.getKey(), "2");
+    properties.setProperty(Configuration.EXECUTION_SCHEDULER_CLUSTERED.getKey(), "false");
+    properties.setProperty(Configuration.EXECUTION_SCHEDULER_CONNECTIONS.getKey(), "2");
+    properties.setProperty(Configuration.SERVER_JDBC_DRIVER.getKey(), "db.driver");
+    properties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:postgresql://localhost/");
+    properties.setProperty(Configuration.SERVER_JDBC_USER_NAME.getKey(), "user");
+    properties.setProperty(Configuration.SERVER_DB_NAME.getKey(), "derby");
 
     configuration = new Configuration(properties);
 
@@ -113,9 +113,9 @@ public class ExecutionSchedulerTest {
   @Test
   public void testGetQuartzDbDelegateClassAndValidationQuery() throws Exception {
     Properties testProperties = new Properties();
-    testProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY,
+    testProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(),
       "jdbc:postgresql://host:port/dbname");
-    testProperties.setProperty(Configuration.SERVER_DB_NAME_KEY, "ambari");
+    testProperties.setProperty(Configuration.SERVER_DB_NAME.getKey(), "ambari");
     Configuration configuration1 = new Configuration(testProperties);
     ExecutionSchedulerImpl executionScheduler =
       spy(new ExecutionSchedulerImpl(configuration1));
@@ -126,7 +126,7 @@ public class ExecutionSchedulerTest {
     Assert.assertEquals("org.quartz.impl.jdbcjobstore.PostgreSQLDelegate", subProps[0]);
     Assert.assertEquals("select 0", subProps[1]);
 
-    testProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY,
+    testProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(),
       "jdbc:mysql://host:port/dbname");
     configuration1 = new Configuration(testProperties);
     executionScheduler = spy(new ExecutionSchedulerImpl(configuration1));
@@ -136,7 +136,7 @@ public class ExecutionSchedulerTest {
     Assert.assertEquals("org.quartz.impl.jdbcjobstore.StdJDBCDelegate", subProps[0]);
     Assert.assertEquals("select 0", subProps[1]);
 
-    testProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY,
+    testProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(),
       "jdbc:oracle:thin://host:port/dbname");
     configuration1 = new Configuration(testProperties);
     executionScheduler = spy(new ExecutionSchedulerImpl(configuration1));

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
index 48231b7..7be70a3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
@@ -18,6 +18,8 @@
 
 package org.apache.ambari.server.security;
 
+import static org.easymock.EasyMock.expectLastCall;
+
 import java.io.File;
 import java.util.Map;
 import java.util.Properties;
@@ -42,8 +44,6 @@ import com.google.inject.Injector;
 
 import junit.framework.Assert;
 
-import static org.easymock.EasyMock.expectLastCall;
-
 public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
 
   @Rule
@@ -78,7 +78,7 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.API_USE_SSL, "false");
+        properties.setProperty(Configuration.API_USE_SSL.getKey(), "false");
 
         bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class));
         bind(Configuration.class).toInstance(new Configuration(properties));
@@ -120,9 +120,9 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.API_USE_SSL, "true");
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.API_USE_SSL.getKey(), "true");
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
 
         bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class));
         bind(Configuration.class).toInstance(new Configuration(properties));
@@ -166,8 +166,8 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER), "custom1");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER), "custom2");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER), "custom3");
@@ -212,9 +212,9 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.API_USE_SSL, "true");
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.API_USE_SSL.getKey(), "true");
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER), "custom1");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER), "custom2");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER), "custom3");
@@ -261,8 +261,8 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER), "");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER), "");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER), "");
@@ -303,9 +303,9 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.API_USE_SSL, "true");
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.API_USE_SSL.getKey(), "true");
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER), "");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER), "");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER), "");

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
index e6a8eff..6537130 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
@@ -18,6 +18,8 @@
 
 package org.apache.ambari.server.security;
 
+import static org.easymock.EasyMock.expect;
+
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -26,8 +28,6 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.apache.ambari.server.configuration.Configuration;
 
-import static org.easymock.EasyMock.expect;
-
 public class AmbariServerSecurityHeaderFilterTest extends AbstractSecurityHeaderFilterTest {
 
   private static final Map<String, String> PROPERTY_NAME_MAP;
@@ -37,15 +37,15 @@ public class AmbariServerSecurityHeaderFilterTest extends AbstractSecurityHeader
 
     Map<String, String> map;
     map = new HashMap<String, String>();
-    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE_KEY);
-    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE_KEY);
-    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE_KEY);
+    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE.getKey());
+    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE.getKey());
+    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE.getKey());
     PROPERTY_NAME_MAP = Collections.unmodifiableMap(map);
 
     map = new HashMap<String, String>();
-    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE_DEFAULT);
-    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE_DEFAULT);
-    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE_DEFAULT);
+    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE.getDefaultValue());
+    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE.getDefaultValue());
+    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE.getDefaultValue());
     DEFAULT_PROPERTY_VALUE_MAP = Collections.unmodifiableMap(map);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
index a2882ae..c9d7974 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
@@ -18,6 +18,8 @@
 
 package org.apache.ambari.server.security;
 
+import static org.easymock.EasyMock.expectLastCall;
+
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -26,8 +28,6 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.apache.ambari.server.configuration.Configuration;
 
-import static org.easymock.EasyMock.expectLastCall;
-
 public class AmbariViewsSecurityHeaderFilterTest extends AbstractSecurityHeaderFilterTest {
 
   private static final Map<String, String> PROPERTY_NAME_MAP;
@@ -38,15 +38,15 @@ public class AmbariViewsSecurityHeaderFilterTest extends AbstractSecurityHeaderF
     Map<String, String> map;
 
     map = new HashMap<String, String>();
-    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.VIEWS_HTTP_STRICT_TRANSPORT_HEADER_VALUE_KEY);
-    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.VIEWS_HTTP_X_FRAME_OPTIONS_HEADER_VALUE_KEY);
-    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.VIEWS_HTTP_X_XSS_PROTECTION_HEADER_VALUE_KEY);
+    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.VIEWS_HTTP_STRICT_TRANSPORT_HEADER_VALUE.getKey());
+    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.VIEWS_HTTP_X_FRAME_OPTIONS_HEADER_VALUE.getKey());
+    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.VIEWS_HTTP_X_XSS_PROTECTION_HEADER_VALUE.getKey());
     PROPERTY_NAME_MAP = Collections.unmodifiableMap(map);
 
     map = new HashMap<String, String>();
-    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.VIEWS_HTTP_STRICT_TRANSPORT_HEADER_VALUE_DEFAULT);
-    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.VIEWS_HTTP_X_FRAME_OPTIONS_HEADER_VALUE_DEFAULT);
-    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.VIEWS_HTTP_X_XSS_PROTECTION_HEADER_VALUE_DEFAULT);
+    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.VIEWS_HTTP_STRICT_TRANSPORT_HEADER_VALUE.getDefaultValue());
+    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.VIEWS_HTTP_X_FRAME_OPTIONS_HEADER_VALUE.getDefaultValue());
+    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.VIEWS_HTTP_X_XSS_PROTECTION_HEADER_VALUE.getDefaultValue());
     DEFAULT_PROPERTY_VALUE_MAP = Collections.unmodifiableMap(map);
   }