You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2017/07/10 19:56:33 UTC

[01/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-14714 6fdf4d116 -> ba7b5cbe8


http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/themes/theme_version_1.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/themes/theme_version_1.json b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/themes/theme_version_1.json
new file mode 100644
index 0000000..848f10b
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/themes/theme_version_1.json
@@ -0,0 +1,409 @@
+{
+  "name": "default",
+  "description": "Default theme for Ranger KMS service",
+  "configuration": {
+    "layouts": [
+    {
+        "name": "default",
+        "tabs": [
+          {
+            "name": "db_settings",
+            "display-name": "Settings",
+            "layout": {
+              "tab-columns": "2",
+              "tab-rows": "2",
+              "sections": [
+                {
+                  "name": "section-db-settings",
+                  "display-name": "",
+                  "row-index": "0",
+                  "column-index": "0",
+                  "row-span": "4",
+                  "column-span": "2",
+                  "section-columns": "2",
+                  "section-rows": "4",
+                  "subsections": [
+                    {
+                      "name": "subsection-kms-db-row1-col1",
+                      "display-name": "Ranger KMS DB",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    },
+                    {
+                      "name": "subsection-kms-db-row1-col2",
+                      "row-index": "0",
+                      "column-index": "1",
+                      "row-span": "1",
+                      "column-span": "1"
+                    },
+                    {
+                      "name": "subsection-kms-create-db-user-row2-col",
+                      "display-name": "Setup Database and Database User",
+                      "row-index": "1",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "2"
+                    },
+                    {
+                      "name": "subsection-kms-db-root-user-row3-col1",
+                      "display-name": "Ranger KMS Root DB",
+                      "row-index": "2",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1",
+                      "depends-on": [
+                        {
+                          "configs":[
+                            "kms-env/create_db_user"
+                          ],
+                          "if": "${kms-env/create_db_user}",
+                          "then": {
+                            "property_value_attributes": {
+                              "visible": true
+                            }
+                          },
+                          "else": {
+                            "property_value_attributes": {
+                              "visible": false
+                            }
+                          }
+                        }
+                      ]
+                    },
+                    {
+                      "name": "subsection-kms-db-root-user-row3-col2",
+                      "row-index": "2",
+                      "column-index": "1",
+                      "row-span": "1",
+                      "column-span": "1",
+                      "depends-on": [
+                        {
+                          "configs":[
+                            "kms-env/create_db_user"
+                          ],
+                          "if": "${kms-env/create_db_user}",
+                          "then": {
+                            "property_value_attributes": {
+                              "visible": true
+                            }
+                          },
+                          "else": {
+                            "property_value_attributes": {
+                              "visible": false
+                            }
+                          }
+                        }
+                      ]
+                    },
+                    {
+                      "name": "subsection-kms-master-row4-col",
+                      "display-name": "KMS Master Secret Password",
+                      "row-index": "3",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "2"
+                    }
+                  ]
+                }
+              ]
+            }
+          },
+          {
+            "name": "kms_hsm",
+            "display-name": "KMS HSM",
+            "layout": {
+              "tab-columns": "1",
+              "tab-rows": "1",
+              "sections": [
+                {
+                  "name": "section-kms-hms",
+                  "display-name": "",
+                  "row-index": "0",
+                  "column-index": "0",
+                  "row-span": "2",
+                  "column-span": "1",
+                  "section-columns": "1",
+                  "section-rows": "2",
+                  "subsections": [
+                    {
+                      "name": "subsection-kms-hsm-row1-col1",
+                      "display-name": "Ranger KMS HSM Enabled",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    },
+                    {
+                      "name": "subsection-kms-hsm-row2-col1",
+                      "display-name": "Configuration Settings",
+                      "row-index": "1",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1",
+                      "depends-on": [
+                        {
+                          "configs": [
+                            "dbks-site/ranger.ks.hsm.enabled"
+                          ],
+                          "if": "${dbks-site/ranger.ks.hsm.enabled}",
+                          "then": {
+                            "property_value_attributes": {
+                              "visible": true
+                            }
+                          },
+                          "else": {
+                            "property_value_attributes": {
+                              "visible": false
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  ]
+                }
+              ]
+            }
+          }
+        ]
+      }
+    ],
+    "placement": {
+      "configuration-layout": "default",
+      "configs": [
+        {
+          "config": "kms-properties/DB_FLAVOR",
+          "subsection-name": "subsection-kms-db-row1-col1"
+        },
+        {
+          "config": "kms-properties/db_name",
+          "subsection-name": "subsection-kms-db-row1-col1"
+        },
+        {
+          "config": "dbks-site/ranger.ks.jpa.jdbc.url",
+          "subsection-name": "subsection-kms-db-row1-col1"
+        },
+        {
+          "config": "kms-properties/db_user",
+          "subsection-name": "subsection-kms-db-row1-col1"
+        },
+        {
+          "config": "kms-properties/db_host",
+          "subsection-name": "subsection-kms-db-row1-col2"
+        },
+        {
+          "config": "kms-properties/SQL_CONNECTOR_JAR",
+          "subsection-name": "subsection-kms-db-row1-col2",
+          "depends-on" : [
+            {
+              "configs":[
+                "kms-properties/DB_FLAVOR"
+              ],
+              "if": "${kms-properties/DB_FLAVOR} === SQLA",
+              "then": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "dbks-site/ranger.ks.jpa.jdbc.driver",
+          "subsection-name": "subsection-kms-db-row1-col2"
+        },
+        {
+          "config": "kms-properties/db_password",
+          "subsection-name": "subsection-kms-db-row1-col2"
+        },
+        {
+          "config": "kms-properties/db_root_user",
+          "subsection-name": "subsection-kms-db-root-user-row3-col1"
+        },
+        {
+          "config": "kms-properties/db_root_password",
+          "subsection-name": "subsection-kms-db-root-user-row3-col2"
+        },
+        {
+          "config": "kms-properties/KMS_MASTER_KEY_PASSWD",
+          "subsection-name": "subsection-kms-master-row4-col"
+        },
+        {
+          "config" : "kms-env/create_db_user",
+          "subsection-name": "subsection-kms-create-db-user-row2-col"
+        },
+        {
+          "config": "kms-env/test_db_kms_connection",
+          "subsection-name": "subsection-kms-create-db-user-row2-col",
+          "property_value_attributes": {
+            "ui_only_property": true
+          },
+          "depends-on": [
+            {
+              "configs":[
+                "kms-env/create_db_user"
+              ],
+              "if": "${kms-env/create_db_user}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "dbks-site/ranger.ks.hsm.enabled",
+          "subsection-name": "subsection-kms-hsm-row1-col1"
+        },
+        {
+          "config": "dbks-site/ranger.ks.hsm.type",
+          "subsection-name": "subsection-kms-hsm-row2-col1"
+        },
+        {
+          "config": "dbks-site/ranger.ks.hsm.partition.name",
+          "subsection-name": "subsection-kms-hsm-row2-col1"
+        },
+        {
+          "config": "dbks-site/ranger.ks.hsm.partition.password.alias",
+          "subsection-name": "subsection-kms-hsm-row2-col1"
+        },
+        {
+          "config": "kms-env/hsm_partition_password",
+          "subsection-name": "subsection-kms-hsm-row2-col1"
+        }
+      ]
+    },
+    "widgets": [
+      {
+        "config": "kms-properties/DB_FLAVOR",
+        "widget": {
+          "type": "combo"
+        }
+      },
+      {
+        "config": "kms-properties/db_user",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "kms-properties/db_name",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "kms-properties/SQL_CONNECTOR_JAR",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "kms-properties/db_root_user",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "kms-properties/db_host",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "kms-properties/db_password",
+        "widget": {
+          "type": "password"
+        }
+      },
+      {
+        "config": "kms-properties/db_root_password",
+        "widget": {
+          "type": "password"
+        }
+      },
+      {
+        "config": "kms-properties/KMS_MASTER_KEY_PASSWD",
+        "widget": {
+          "type": "password"
+        }
+      },
+      {
+        "config": "kms-env/create_db_user",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "kms-env/test_db_kms_connection",
+        "widget": {
+          "type": "test-db-connection",
+          "display-name": "Test Connection",
+          "required-properties": {
+            "jdbc.driver.class": "dbks-site/ranger.ks.jpa.jdbc.driver",
+            "jdbc.driver.url": "dbks-site/ranger.ks.jpa.jdbc.url",
+            "db.connection.source.host": "ranger_kms-site/ranger_kms_server_hosts",
+            "db.type": "kms-properties/DB_FLAVOR",
+            "db.connection.destination.host": "kms-properties/db_host",
+            "db.connection.user": "kms-properties/db_user",
+            "db.connection.password": "kms-properties/db_password"
+          }
+        }
+      },
+      {
+        "config": "dbks-site/ranger.ks.jpa.jdbc.driver",
+        "widget" : {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "dbks-site/ranger.ks.jpa.jdbc.url",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "dbks-site/ranger.ks.hsm.enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "dbks-site/ranger.ks.hsm.type",
+        "widget": {
+          "type": "combo"
+        }
+      },
+      {
+        "config": "dbks-site/ranger.ks.hsm.partition.name",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "dbks-site/ranger.ks.hsm.partition.password.alias",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "kms-env/hsm_partition_password",
+        "widget": {
+          "type": "password"
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER/metainfo.xml
index c8b3d65..12aa559 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER/metainfo.xml
@@ -20,8 +20,8 @@
     <services>
         <service>
             <name>RANGER</name>
-            <version>0.7.0.3.0</version>
-            <extends>common-services/RANGER/0.7.0.3.0</extends>
+            <version>1.0.0.3.0</version>
+            <extends>common-services/RANGER/1.0.0.3.0</extends>
         </service>
     </services>
 </metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER_KMS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER_KMS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER_KMS/metainfo.xml
index 3375d90..3942ed3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER_KMS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/services/RANGER_KMS/metainfo.xml
@@ -20,8 +20,8 @@
     <services>
         <service>
             <name>RANGER_KMS</name>
-            <version>0.5.0.3.0</version>
-            <extends>common-services/RANGER_KMS/0.5.0.3.0</extends>
+            <version>1.0.0.3.0</version>
+            <extends>common-services/RANGER_KMS/1.0.0.3.0</extends>
         </service>
     </services>
 </metainfo>


[49/52] [abbrv] ambari git commit: Revert "AMBARI-21077: Refactor API endpoint to have a single entry point for an API version (jluniya)"

Posted by jl...@apache.org.
Revert "AMBARI-21077: Refactor API endpoint to have a single entry point for an API version (jluniya)"

This reverts commit ea3dc9a0dd0c952e8465374e3b26a50cc2d32d19.


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: bf0bb2eacd17c616d1ca2dbde3aeb1b28308b960
Parents: 6fdf4d1
Author: Jayush Luniya <jl...@hortonworks.com>
Authored: Mon Jul 10 10:00:36 2017 -0700
Committer: Jayush Luniya <jl...@hortonworks.com>
Committed: Mon Jul 10 10:00:36 2017 -0700

----------------------------------------------------------------------
 .../ambari/server/api/rest/HealthCheck.java     |  2 +
 .../api/rest/KdcServerReachabilityCheck.java    |  1 +
 .../server/api/services/ActionService.java      |  7 +--
 .../api/services/ActiveWidgetLayoutService.java |  4 +-
 .../api/services/AlertDefinitionService.java    |  4 +-
 .../server/api/services/AlertGroupService.java  |  4 +-
 .../api/services/AlertHistoryService.java       |  4 +-
 .../server/api/services/AlertNoticeService.java |  4 +-
 .../server/api/services/AlertService.java       |  4 +-
 .../server/api/services/AlertTargetService.java |  6 +-
 .../api/services/AmbariPrivilegeService.java    |  7 +--
 .../ambari/server/api/services/BaseService.java | 17 ------
 .../server/api/services/BlueprintService.java   |  6 +-
 .../ClusterKerberosDescriptorService.java       |  4 +-
 .../api/services/ClusterPrivilegeService.java   |  4 +-
 .../server/api/services/ClusterService.java     | 58 ++++++++++----------
 .../services/ClusterStackVersionService.java    |  6 +-
 .../CompatibleRepositoryVersionService.java     |  6 +-
 .../server/api/services/ComponentService.java   |  4 +-
 .../server/api/services/ConfigGroupService.java |  4 +-
 .../api/services/ConfigurationService.java      |  6 +-
 .../server/api/services/CredentialService.java  |  4 +-
 .../api/services/ExtensionLinksService.java     |  6 +-
 .../server/api/services/ExtensionsService.java  |  6 +-
 .../ambari/server/api/services/FeedService.java |  8 +--
 .../api/services/GroupPrivilegeService.java     |  4 +-
 .../server/api/services/GroupService.java       | 10 +---
 .../api/services/HostComponentService.java      |  4 +-
 .../services/HostKerberosIdentityService.java   |  4 +-
 .../ambari/server/api/services/HostService.java | 18 +++---
 .../api/services/HostStackVersionService.java   |  6 +-
 .../server/api/services/InstanceService.java    |  8 +--
 .../ambari/server/api/services/JobService.java  |  6 +-
 .../api/services/KerberosDescriptorService.java |  6 +-
 .../ambari/server/api/services/KeyService.java  |  1 +
 .../api/services/LdapSyncEventService.java      |  6 +-
 .../server/api/services/LoggingService.java     |  8 +--
 .../server/api/services/LogoutService.java      |  2 +
 .../server/api/services/MemberService.java      |  4 +-
 .../api/services/OperatingSystemService.java    |  6 +-
 .../server/api/services/PermissionService.java  |  8 +--
 .../api/services/PreUpgradeCheckService.java    |  4 +-
 .../server/api/services/PrivilegeService.java   |  5 --
 .../api/services/RecommendationService.java     | 38 ++++---------
 .../api/services/RemoteClustersService.java     |  6 +-
 .../server/api/services/RepositoryService.java  |  4 +-
 .../api/services/RepositoryVersionService.java  |  7 +--
 .../api/services/RequestScheduleService.java    |  4 +-
 .../server/api/services/RequestService.java     | 12 ++--
 .../api/services/RoleAuthorizationService.java  |  9 ++-
 .../server/api/services/RootServiceService.java |  8 +--
 .../services/ServiceConfigVersionService.java   |  4 +-
 .../server/api/services/ServiceService.java     | 10 ++--
 .../server/api/services/SettingService.java     |  6 +-
 .../server/api/services/StacksService.java      | 38 ++-----------
 .../server/api/services/StageService.java       |  6 +-
 .../api/services/TargetClusterService.java      |  6 +-
 .../server/api/services/TaskAttemptService.java |  4 +-
 .../ambari/server/api/services/TaskService.java |  4 +-
 .../api/services/UpgradeGroupService.java       |  6 +-
 .../server/api/services/UpgradeItemService.java |  6 +-
 .../server/api/services/UpgradeService.java     |  6 +-
 .../api/services/UpgradeSummaryService.java     |  4 +-
 .../api/services/UserAuthorizationService.java  |  4 +-
 .../api/services/UserPrivilegeService.java      |  5 +-
 .../ambari/server/api/services/UserService.java | 12 ++--
 .../ambari/server/api/services/V1Service.java   | 28 ----------
 .../ambari/server/api/services/V2Service.java   | 28 ----------
 .../server/api/services/ValidationService.java  | 35 +++---------
 .../api/services/VersionDefinitionService.java  |  8 +--
 .../api/services/ViewDataMigrationService.java  |  4 +-
 .../ViewExternalSubResourceService.java         |  4 +-
 .../api/services/ViewInstanceService.java       |  8 +--
 .../api/services/ViewPermissionService.java     |  4 +-
 .../api/services/ViewPrivilegeService.java      |  4 +-
 .../ambari/server/api/services/ViewService.java |  8 +--
 .../api/services/ViewSubResourceService.java    |  4 +-
 .../server/api/services/ViewUrlsService.java    |  6 +-
 .../server/api/services/ViewVersionService.java |  8 +--
 .../api/services/WidgetLayoutService.java       |  4 +-
 .../server/api/services/WidgetService.java      |  4 +-
 .../server/api/services/WorkflowService.java    |  6 +-
 .../stackadvisor/StackAdvisorHelper.java        | 11 ++--
 .../ComponentLayoutRecommendationCommand.java   |  5 +-
 .../ComponentLayoutValidationCommand.java       |  5 +-
 ...rationDependenciesRecommendationCommand.java |  5 +-
 .../ConfigurationRecommendationCommand.java     |  5 +-
 .../ConfigurationValidationCommand.java         |  5 +-
 .../commands/StackAdvisorCommand.java           |  4 +-
 .../ambari/server/api/util/ApiVersion.java      | 32 -----------
 .../controller/AmbariManagementController.java  |  4 +-
 .../AmbariManagementControllerImpl.java         | 11 +---
 .../ambari/server/controller/AmbariServer.java  | 23 ++------
 .../apache/ambari/server/view/ViewRegistry.java |  5 +-
 .../server/api/services/ActionServiceTest.java  |  2 -
 .../services/ActiveWidgetLayoutServiceTest.java |  3 +-
 .../api/services/BlueprintServiceTest.java      |  2 -
 .../ClusterKerberosDescriptorServiceTest.java   |  3 +-
 .../services/ClusterPrivilegeServiceTest.java   |  3 +-
 .../server/api/services/ClusterServiceTest.java |  3 +-
 .../ClusterStackVersionServiceTest.java         |  3 +-
 .../api/services/ComponentServiceTest.java      |  3 +-
 .../api/services/ConfigGroupServiceTest.java    |  3 +-
 .../api/services/ConfigurationServiceTest.java  |  4 +-
 .../api/services/CredentialServiceTest.java     |  3 +-
 .../api/services/ExtensionsServiceTest.java     |  2 -
 .../server/api/services/FeedServiceTest.java    |  3 +-
 .../api/services/GroupPrivilegeServiceTest.java |  3 +-
 .../server/api/services/GroupServiceTest.java   |  5 --
 .../api/services/HostComponentServiceTest.java  |  3 +-
 .../HostKerberosIdentityServiceTest.java        |  3 +-
 .../server/api/services/HostServiceTest.java    |  3 +-
 .../services/HostStackVersionServiceTest.java   |  3 +-
 .../api/services/InstanceServiceTest.java       |  3 +-
 .../server/api/services/JobServiceTest.java     |  3 +-
 .../api/services/LdapSyncEventServiceTest.java  |  3 +-
 .../server/api/services/LoggingServiceTest.java |  3 +-
 .../server/api/services/MemberServiceTest.java  |  3 +-
 .../api/services/PermissionServiceTest.java     |  3 +-
 .../services/PreUpgradeCheckServiceTest.java    |  3 +-
 .../api/services/PrivilegeServiceTest.java      |  3 +-
 .../api/services/RecommendationServiceTest.java |  7 +--
 .../api/services/RepositoryServiceTest.java     |  3 +-
 .../services/RoleAuthorizationServiceTest.java  |  3 +-
 .../api/services/RootServiceServiceTest.java    |  2 -
 .../server/api/services/ServiceServiceTest.java |  5 +-
 .../server/api/services/SettingServiceTest.java |  2 -
 .../server/api/services/StacksServiceTest.java  |  2 -
 .../api/services/TargetClusterServiceTest.java  |  3 +-
 .../api/services/TaskAttemptServiceTest.java    |  3 +-
 .../api/services/UpgradeItemServiceTest.java    |  3 +-
 .../services/UserAuthorizationServiceTest.java  |  5 +-
 .../api/services/UserPrivilegeServiceTest.java  |  5 +-
 .../api/services/ValidationServiceTest.java     |  7 +--
 .../services/ViewDataMigrationServiceTest.java  |  5 +-
 .../ViewExternalSubResourceServiceTest.java     |  3 +-
 .../api/services/ViewPermissionServiceTest.java |  3 +-
 .../services/ViewSubResourceServiceTest.java    |  7 +--
 .../api/services/WorkflowServiceTest.java       |  3 +-
 .../ConfigurationRecommendationCommandTest.java |  3 +-
 .../commands/StackAdvisorCommandTest.java       |  3 +-
 141 files changed, 258 insertions(+), 683 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/rest/HealthCheck.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/rest/HealthCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/api/rest/HealthCheck.java
index 1b4fc03..2f31611 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/rest/HealthCheck.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/rest/HealthCheck.java
@@ -19,6 +19,7 @@
 package org.apache.ambari.server.api.rest;
 
 import javax.ws.rs.GET;
+import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 
@@ -27,6 +28,7 @@ import javax.ws.rs.core.MediaType;
  * or not
  */
 
+@Path("/check")
 public class HealthCheck {
   private static final String status = "RUNNING";
   // This method is called if TEXT_PLAIN is request

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/rest/KdcServerReachabilityCheck.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/rest/KdcServerReachabilityCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/api/rest/KdcServerReachabilityCheck.java
index bb08a0a..898e7e6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/rest/KdcServerReachabilityCheck.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/rest/KdcServerReachabilityCheck.java
@@ -36,6 +36,7 @@ import com.google.inject.Inject;
  * Service responsible for kerberos related resource requests.
  */
 @StaticallyInject
+@Path("/kdc_check/")
 public class KdcServerReachabilityCheck {
   private static final String REACHABLE = "REACHABLE";
   private static final String UNREACHABLE = "UNREACHABLE";

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
index 2b6cf36..0290151 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
@@ -33,18 +33,15 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
+
 /**
  * Service responsible for action definition resource requests.
  */
+@Path("/actions/")
 public class ActionService extends BaseService {
 
-  public ActionService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Handles: GET /actions/{actionName}
    * Get a specific action definition.

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java
index 0996abb..dd7c917 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java
@@ -29,7 +29,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.commons.lang.StringUtils;
 
@@ -40,8 +39,7 @@ public class ActiveWidgetLayoutService extends BaseService {
 
   private final String userName;
 
-  public ActiveWidgetLayoutService(ApiVersion apiVersion, String userName) {
-    super(apiVersion);
+  public ActiveWidgetLayoutService(String userName) {
     this.userName = userName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertDefinitionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertDefinitionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertDefinitionService.java
index aae23cc..fb5423b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertDefinitionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertDefinitionService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -43,8 +42,7 @@ public class AlertDefinitionService extends BaseService {
 
   private String clusterName = null;
 
-  AlertDefinitionService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  AlertDefinitionService(String clusterName) {
     this.clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertGroupService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertGroupService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertGroupService.java
index 439c3d4..97a61ba 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertGroupService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertGroupService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -52,8 +51,7 @@ public class AlertGroupService extends BaseService {
    *
    * @param clusterName
    */
-  AlertGroupService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  AlertGroupService(String clusterName) {
     m_clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertHistoryService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertHistoryService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertHistoryService.java
index 31f1019..6f7e2fa 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertHistoryService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertHistoryService.java
@@ -30,7 +30,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -53,8 +52,7 @@ public class AlertHistoryService extends BaseService {
    * @param hostName
    *          the host name, or {@code null} to return history across all hosts.
    */
-  AlertHistoryService(ApiVersion apiVersion, String clusterName, String serviceName, String hostName) {
-    super(apiVersion);
+  AlertHistoryService(String clusterName, String serviceName, String hostName) {
     this.clusterName = clusterName;
     this.serviceName = serviceName;
     this.hostName = hostName;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertNoticeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertNoticeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertNoticeService.java
index d5e6642..3a4cda6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertNoticeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertNoticeService.java
@@ -30,7 +30,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -46,8 +45,7 @@ public class AlertNoticeService extends BaseService {
    * @param clusterName
    *          the cluster name (not {@code null}).
    */
-  AlertNoticeService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  AlertNoticeService(String clusterName) {
     this.clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertService.java
index 6a583d4..babf42c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertService.java
@@ -30,7 +30,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -42,8 +41,7 @@ public class AlertService extends BaseService {
   private String serviceName = null;
   private String hostName = null;
 
-  AlertService(ApiVersion apiVersion, String clusterName, String serviceName, String hostName) {
-    super(apiVersion);
+  AlertService(String clusterName, String serviceName, String hostName) {
     this.clusterName = clusterName;
     this.serviceName = serviceName;
     this.hostName = hostName;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java
index b08db6f..3d995b3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.state.alert.AlertTarget;
 
@@ -41,12 +40,9 @@ import org.apache.ambari.server.state.alert.AlertTarget;
  * The {@link AlertTargetService} handles CRUD operation requests for alert
  * targets.
  */
+@Path("/alert_targets/")
 public class AlertTargetService extends BaseService {
 
-  public AlertTargetService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   @GET
   @Produces("text/plain")
   public Response getTargets(@Context HttpHeaders headers,

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariPrivilegeService.java
index 62d8149..be46ad5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariPrivilegeService.java
@@ -20,17 +20,16 @@ package org.apache.ambari.server.api.services;
 
 import java.util.Collections;
 
+import javax.ws.rs.Path;
+
 import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  *  Service responsible for Ambari privilege resource requests.
  */
+@Path("/privileges/")
 public class AmbariPrivilegeService extends PrivilegeService {
-  public AmbariPrivilegeService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
 
   // ----- PrivilegeService --------------------------------------------------
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
index c9bc978..0185d37 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
@@ -21,7 +21,6 @@ package org.apache.ambari.server.api.services;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
-import java.util.regex.Pattern;
 
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
@@ -37,7 +36,6 @@ import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.CsvSerializer;
 import org.apache.ambari.server.api.services.serializers.JsonSerializer;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.audit.request.RequestAuditLogger;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.utils.RetryHelper;
@@ -52,12 +50,6 @@ public abstract class BaseService {
   public final static MediaType MEDIA_TYPE_TEXT_CSV_TYPE = new MediaType("text", "csv");
 
   /**
-   * Regex for checking API version from the request URI
-   */
-  public static final Pattern API_VERSION_REGEX = Pattern.compile("^(/api/)(v[0-9\\.]+)");
-
-
-  /**
    * Logger instance.
    */
   protected final static Logger LOG = LoggerFactory.getLogger(BaseService.class);
@@ -74,15 +66,6 @@ public abstract class BaseService {
 
   protected static RequestAuditLogger requestAuditLogger;
 
-  /**
-   * Api version
-   */
-  protected ApiVersion m_apiVersion;
-
-  public BaseService(ApiVersion apiVersion) {
-    m_apiVersion = apiVersion;
-  }
-
   public static void init(RequestAuditLogger instance) {
     requestAuditLogger = instance;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
index 27f5f17..8159ea4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
@@ -32,7 +32,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -41,12 +40,9 @@ import org.apache.ambari.server.controller.spi.Resource;
  * any cluster specific information.  Updates are not permitted as blueprints are
  * immutable.
  */
+@Path("/blueprints/")
 public class BlueprintService extends BaseService {
 
-  public BlueprintService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Handles: GET  /blueprints
    * Get all blueprints.

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorService.java
index 3e7cbdc..0aeb52b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -55,8 +54,7 @@ public class ClusterKerberosDescriptorService extends BaseService {
    *
    * @param clusterName cluster id
    */
-  public ClusterKerberosDescriptorService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public ClusterKerberosDescriptorService(String clusterName) {
     this.clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterPrivilegeService.java
index 4ac27ec..2efd392 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterPrivilegeService.java
@@ -22,7 +22,6 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -43,8 +42,7 @@ public class ClusterPrivilegeService extends PrivilegeService {
    *
    * @param clusterName  the cluster name
    */
-  public ClusterPrivilegeService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public ClusterPrivilegeService(String clusterName) {
     this.clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
index a0c27f0..5577633 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
@@ -35,7 +35,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.AmbariServer;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.state.Clusters;
@@ -44,6 +43,7 @@ import org.apache.ambari.server.state.Clusters;
 /**
  * Service responsible for cluster resource requests.
  */
+@Path("/clusters/")
 public class ClusterService extends BaseService {
 
   /**
@@ -57,8 +57,7 @@ public class ClusterService extends BaseService {
   /**
    * Construct a ClusterService.
    */
-  public ClusterService(ApiVersion apiVersion) {
-    super(apiVersion);
+  public ClusterService() {
     clusters = AmbariServer.getController().getClusters();
   }
 
@@ -67,8 +66,7 @@ public class ClusterService extends BaseService {
    *
    * @param clusters  the clusters utilities
    */
-  protected ClusterService(ApiVersion apiVersion, Clusters clusters) {
-    super(apiVersion);
+  protected ClusterService(Clusters clusters) {
     this.clusters = clusters;
   }
 
@@ -328,7 +326,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/hosts")
   public HostService getHostHandler(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new HostService(m_apiVersion, clusterName);
+    return new HostService(clusterName);
   }
 
   /**
@@ -341,7 +339,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/services")
   public ServiceService getServiceHandler(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new ServiceService(m_apiVersion, clusterName);
+    return new ServiceService(clusterName);
   }
 
   /**
@@ -354,7 +352,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/configurations")
   public ConfigurationService getConfigurationHandler(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new ConfigurationService(m_apiVersion, clusterName);
+    return new ConfigurationService(clusterName);
   }
 
   /**
@@ -367,7 +365,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/requests")
   public RequestService getRequestHandler(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new RequestService(m_apiVersion, clusterName);
+    return new RequestService(clusterName);
   }
 
   /**
@@ -381,7 +379,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/host_components")
   public HostComponentService getHostComponentHandler(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new HostComponentService(m_apiVersion, clusterName, null);
+    return new HostComponentService(clusterName, null);
   }
 
   /**
@@ -395,7 +393,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/kerberos_identities")
   public HostKerberosIdentityService getHostKerberosIdentityHandler(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new HostKerberosIdentityService(m_apiVersion, clusterName, null);
+    return new HostKerberosIdentityService(clusterName, null);
   }
 
   /**
@@ -409,7 +407,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/components")
   public ComponentService getComponentHandler(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new ComponentService(m_apiVersion, clusterName, null);
+    return new ComponentService(clusterName, null);
   }
 
   /**
@@ -422,7 +420,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/workflows")
   public WorkflowService getWorkflowHandler(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new WorkflowService(m_apiVersion, clusterName);
+    return new WorkflowService(clusterName);
   }
 
   /**
@@ -435,7 +433,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/config_groups")
   public ConfigGroupService getConfigGroupService(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new ConfigGroupService(m_apiVersion, clusterName);
+    return new ConfigGroupService(clusterName);
   }
 
   /**
@@ -449,7 +447,7 @@ public class ClusterService extends BaseService {
   @Path("{clusterName}/request_schedules")
   public RequestScheduleService getRequestScheduleService
                              (@Context javax.ws.rs.core.Request request, @PathParam ("clusterName") String clusterName) {
-    return new RequestScheduleService(m_apiVersion, clusterName);
+    return new RequestScheduleService(clusterName);
   }
 
   /**
@@ -463,7 +461,7 @@ public class ClusterService extends BaseService {
   @Path("{clusterName}/alert_definitions")
   public AlertDefinitionService getAlertDefinitionService(
       @Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new AlertDefinitionService(m_apiVersion, clusterName);
+    return new AlertDefinitionService(clusterName);
   }
 
   /**
@@ -479,7 +477,7 @@ public class ClusterService extends BaseService {
   public AlertGroupService getAlertGroups(
       @Context javax.ws.rs.core.Request request,
       @PathParam("clusterName") String clusterName) {
-    return new AlertGroupService(m_apiVersion, clusterName);
+    return new AlertGroupService(clusterName);
   }
 
   /**
@@ -494,7 +492,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/privileges")
   public PrivilegeService getPrivilegeService(@Context javax.ws.rs.core.Request request, @PathParam ("clusterName") String clusterName) {
-    return new ClusterPrivilegeService(m_apiVersion, clusterName);
+    return new ClusterPrivilegeService(clusterName);
   }
 
   /**
@@ -508,7 +506,7 @@ public class ClusterService extends BaseService {
   @Path("{clusterName}/alerts")
   public AlertService getAlertService(
       @Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new AlertService(m_apiVersion, clusterName, null, null);
+    return new AlertService(clusterName, null, null);
   }
 
   /**
@@ -525,7 +523,7 @@ public class ClusterService extends BaseService {
   public AlertHistoryService getAlertHistoryService(
       @Context javax.ws.rs.core.Request request,
       @PathParam("clusterName") String clusterName) {
-    return new AlertHistoryService(m_apiVersion, clusterName, null, null);
+    return new AlertHistoryService(clusterName, null, null);
   }
 
   /**
@@ -542,7 +540,7 @@ public class ClusterService extends BaseService {
   public AlertNoticeService getAlertNoticeService(
       @Context javax.ws.rs.core.Request request,
       @PathParam("clusterName") String clusterName) {
-    return new AlertNoticeService(m_apiVersion, clusterName);
+    return new AlertNoticeService(clusterName);
   }
 
   /**
@@ -558,7 +556,7 @@ public class ClusterService extends BaseService {
   @Path("{clusterName}/stack_versions")
   public ClusterStackVersionService getClusterStackVersionService(@Context javax.ws.rs.core.Request request,
       @PathParam("clusterName") String clusterName) {
-    return new ClusterStackVersionService(m_apiVersion, clusterName);
+    return new ClusterStackVersionService(clusterName);
   }
 
   /**
@@ -573,7 +571,7 @@ public class ClusterService extends BaseService {
   public UpgradeService getUpgradeService(
       @Context javax.ws.rs.core.Request request,
       @PathParam("clusterName") String clusterName) {
-    return new UpgradeService(m_apiVersion, clusterName);
+    return new UpgradeService(clusterName);
   }
 
   /**
@@ -588,7 +586,7 @@ public class ClusterService extends BaseService {
   public UpgradeSummaryService getUpgradeSummaryService(
       @Context javax.ws.rs.core.Request request,
       @PathParam("clusterName") String clusterName) {
-    return new UpgradeSummaryService(m_apiVersion, clusterName);
+    return new UpgradeSummaryService(clusterName);
   }
   
   /**
@@ -601,7 +599,7 @@ public class ClusterService extends BaseService {
    */
   @Path("{clusterName}/rolling_upgrades_check")
   public PreUpgradeCheckService getPreUpgradeCheckService(@Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
-    return new PreUpgradeCheckService(m_apiVersion, clusterName);
+    return new PreUpgradeCheckService(clusterName);
   }
 
   /**
@@ -611,7 +609,7 @@ public class ClusterService extends BaseService {
   public WidgetLayoutService getWidgetLayoutService(@Context javax.ws.rs.core.Request request,
                                                     @PathParam ("clusterName") String clusterName) {
 
-    return new WidgetLayoutService(m_apiVersion, clusterName);
+    return new WidgetLayoutService(clusterName);
   }
 
   /**
@@ -621,7 +619,7 @@ public class ClusterService extends BaseService {
   public WidgetService getWidgetService(@Context javax.ws.rs.core.Request request,
                                                     @PathParam ("clusterName") String clusterName) {
 
-    return new WidgetService(m_apiVersion, clusterName);
+    return new WidgetService(clusterName);
   }
 
   /**
@@ -635,7 +633,7 @@ public class ClusterService extends BaseService {
   public CredentialService getCredentials(
       @Context javax.ws.rs.core.Request request,
       @PathParam("clusterName") String clusterName) {
-    return new CredentialService(m_apiVersion, clusterName);
+    return new CredentialService(clusterName);
   }
 
   /**
@@ -650,7 +648,7 @@ public class ClusterService extends BaseService {
   public ClusterKerberosDescriptorService getCompositeKerberosDescriptor(
       @Context javax.ws.rs.core.Request request,
       @PathParam("clusterName") String clusterName) {
-    return new ClusterKerberosDescriptorService(m_apiVersion, clusterName);
+    return new ClusterKerberosDescriptorService(clusterName);
   }
 
   /**
@@ -664,7 +662,7 @@ public class ClusterService extends BaseService {
   @Path("{clusterName}/logging")
   public LoggingService getLogging(@Context javax.ws.rs.core.Request request,
                                    @PathParam("clusterName") String clusterName) {
-    return AmbariServer.getController().getLoggingService(m_apiVersion, clusterName);
+    return AmbariServer.getController().getLoggingService(clusterName);
   }
 
   // ----- helper methods ----------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterStackVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterStackVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterStackVersionService.java
index 8f96503..0821f7c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterStackVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterStackVersionService.java
@@ -32,7 +32,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -49,8 +48,7 @@ public class ClusterStackVersionService extends BaseService {
    *
    * @param clusterName name of the cluster
    */
-  public ClusterStackVersionService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public ClusterStackVersionService(String clusterName) {
     this.clusterName = clusterName;
   }
 
@@ -104,7 +102,7 @@ public class ClusterStackVersionService extends BaseService {
     final Map<Resource.Type, String> mapIds = new HashMap<>();
     mapIds.put(Resource.Type.Cluster, clusterName);
     mapIds.put(Resource.Type.ClusterStackVersion, stackVersion);
-    return new RepositoryVersionService(m_apiVersion, mapIds);
+    return new RepositoryVersionService(mapIds);
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/CompatibleRepositoryVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/CompatibleRepositoryVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/CompatibleRepositoryVersionService.java
index bdde7a2..c6748bc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/CompatibleRepositoryVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/CompatibleRepositoryVersionService.java
@@ -30,7 +30,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -48,8 +47,7 @@ public class CompatibleRepositoryVersionService extends BaseService {
    *
    * @param parentProperties extra properties to be inserted into created resource
    */
-  public CompatibleRepositoryVersionService(ApiVersion apiVersion, Map<Resource.Type, String> parentProperties) {
-    super(apiVersion);
+  public CompatibleRepositoryVersionService(Map<Resource.Type, String> parentProperties) {
     parentKeyProperties = parentProperties;
   }
 
@@ -96,7 +94,7 @@ public class CompatibleRepositoryVersionService extends BaseService {
     mapIds.putAll(parentKeyProperties);
     mapIds.put(Resource.Type.CompatibleRepositoryVersion, repositoryVersionId);
 
-    return new OperatingSystemService(m_apiVersion, mapIds);
+    return new OperatingSystemService(mapIds);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/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 8f6dc51..f29b396 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
@@ -39,7 +39,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.commons.lang.StringUtils;
@@ -65,8 +64,7 @@ public class ComponentService extends BaseService {
    * @param clusterName cluster id
    * @param serviceName service id
    */
-  public ComponentService(ApiVersion apiVersion, String clusterName, String serviceName) {
-    super(apiVersion);
+  public ComponentService(String clusterName, String serviceName) {
     m_clusterName = clusterName;
     m_serviceName = serviceName;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java
index 56ef41f..ae5ea53 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -49,8 +48,7 @@ public class ConfigGroupService extends BaseService {
    * Constructor
    * @param m_clusterName
    */
-  public ConfigGroupService(ApiVersion apiVersion, String m_clusterName) {
-    super(apiVersion);
+  public ConfigGroupService(String m_clusterName) {
     this.m_clusterName = m_clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java
index eac9686..bebcb03 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -48,14 +47,13 @@ public class ConfigurationService extends BaseService {
    *
    * @param clusterName cluster id
    */
-  public ConfigurationService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public ConfigurationService(String clusterName) {
     m_clusterName = clusterName;
   }
 
   @Path("service_config_versions")
   public ServiceConfigVersionService getServiceConfigVersionService() {
-    return new ServiceConfigVersionService(m_apiVersion, m_clusterName);
+    return new ServiceConfigVersionService(m_clusterName);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/CredentialService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/CredentialService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/CredentialService.java
index dc720c9..449c292 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/CredentialService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/CredentialService.java
@@ -34,7 +34,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -44,8 +43,7 @@ public class CredentialService extends BaseService {
 
   private final String clusterName;
 
-  public CredentialService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public CredentialService(String clusterName) {
     this.clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionLinksService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionLinksService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionLinksService.java
index c5b7f4c..457313d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionLinksService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionLinksService.java
@@ -34,7 +34,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -44,12 +43,9 @@ import org.apache.ambari.server.controller.spi.Resource;
  * version to the current stack version allows the cluster to install the custom services contained in
  * the extension version.
  */
+@Path("/links/")
 public class ExtensionLinksService extends BaseService {
 
-  public ExtensionLinksService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   @GET
   @Produces("text/plain")
   public Response getExtensionLinks(String body, @Context HttpHeaders headers, @Context UriInfo ui) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionsService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionsService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionsService.java
index 9fad03e..5ba7341 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionsService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ExtensionsService.java
@@ -32,7 +32,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -42,12 +41,9 @@ import org.apache.ambari.server.controller.spi.Resource;
  * version to the current stack version allows the cluster to install the custom services contained in
  * the extension version.
  */
+@Path("/extensions/")
 public class ExtensionsService extends BaseService {
 
-  public ExtensionsService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   @GET
   @Produces("text/plain")
   public Response getExtensions(String body, @Context HttpHeaders headers, @Context UriInfo ui) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java
index 9e0aa16..4a87c32 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java
@@ -33,18 +33,14 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * DR feed service.
  */
+@Path("/feeds/")
 public class FeedService extends BaseService {
 
-  public FeedService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Handles: GET /feeds/{feedName}
    * Get a specific feed.
@@ -139,7 +135,7 @@ public class FeedService extends BaseService {
    */
   @Path("{feedName}/instances")
   public InstanceService getHostHandler(@PathParam("feedName") String feedName) {
-    return new InstanceService(m_apiVersion, feedName);
+    return new InstanceService(feedName);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java
index eae68ee..0c7c2e9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java
@@ -27,7 +27,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -37,8 +36,7 @@ public class GroupPrivilegeService extends PrivilegeService {
 
   private final String groupName;
 
-  public GroupPrivilegeService(ApiVersion apiVersion, String groupName) {
-    super(apiVersion);
+  public GroupPrivilegeService(String groupName) {
     this.groupName = groupName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java
index 47414b3..8ec0097 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java
@@ -31,17 +31,13 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * Service responsible for user groups requests.
  */
+@Path("/groups/")
 public class GroupService extends BaseService {
-  public GroupService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Gets all groups.
    * Handles: GET /groups requests.
@@ -131,7 +127,7 @@ public class GroupService extends BaseService {
    */
   @Path("{groupName}/members")
   public MemberService getMemberHandler(@PathParam("groupName") String groupName) {
-    return new MemberService(m_apiVersion, groupName);
+    return new MemberService(groupName);
   }
 
   /**
@@ -141,7 +137,7 @@ public class GroupService extends BaseService {
   public PrivilegeService getPrivilegeService(@Context javax.ws.rs.core.Request request,
                                               @PathParam ("groupName") String groupName) {
 
-    return new GroupPrivilegeService(m_apiVersion, groupName);
+    return new GroupPrivilegeService(groupName);
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/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 62f2f89..e4f2be9 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
@@ -39,7 +39,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.commons.lang.StringUtils;
@@ -65,8 +64,7 @@ public class HostComponentService extends BaseService {
    * @param clusterName cluster id
    * @param hostName    host id
    */
-  public HostComponentService(ApiVersion apiVersion, String clusterName, String hostName) {
-    super(apiVersion);
+  public HostComponentService(String clusterName, String hostName) {
     m_clusterName = clusterName;
     m_hostName = hostName;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostKerberosIdentityService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostKerberosIdentityService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostKerberosIdentityService.java
index 35a5e07..a99d269 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostKerberosIdentityService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostKerberosIdentityService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -57,8 +56,7 @@ public class HostKerberosIdentityService extends BaseService {
    * @param clusterName cluster name
    * @param hostName    host name
    */
-  public HostKerberosIdentityService(ApiVersion apiVersion, String clusterName, String hostName) {
-    super(apiVersion);
+  public HostKerberosIdentityService(String clusterName, String hostName) {
     this.clusterName = clusterName;
     this.hostName = hostName;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
index 9c25445..c26c5d8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
@@ -34,12 +34,12 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * Service responsible for hosts resource requests.
  */
+@Path("/hosts/")
 public class HostService extends BaseService {
 
   /**
@@ -50,8 +50,7 @@ public class HostService extends BaseService {
   /**
    * Constructor.
    */
-  public HostService(ApiVersion apiVersion) {
-    super(apiVersion);
+  public HostService() {
   }
 
   /**
@@ -59,8 +58,7 @@ public class HostService extends BaseService {
    *
    * @param clusterName cluster id
    */
-  public HostService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public HostService(String clusterName) {
     m_clusterName = clusterName;
   }
 
@@ -213,7 +211,7 @@ public class HostService extends BaseService {
    */
   @Path("{hostName}/host_components")
   public HostComponentService getHostComponentHandler(@PathParam("hostName") String hostName) {
-    return new HostComponentService(m_apiVersion, m_clusterName, hostName);
+    return new HostComponentService(m_clusterName, hostName);
   }
 
   /**
@@ -224,7 +222,7 @@ public class HostService extends BaseService {
    */
   @Path("{hostName}/kerberos_identities")
   public HostKerberosIdentityService getHostKerberosIdentityHandler(@PathParam("hostName") String hostName) {
-    return new HostKerberosIdentityService(m_apiVersion, m_clusterName, hostName);
+    return new HostKerberosIdentityService(m_clusterName, hostName);
   }
 
   /**
@@ -235,7 +233,7 @@ public class HostService extends BaseService {
    */
   @Path("{hostName}/alerts")
   public AlertService getAlertHandler(@PathParam("hostName") String hostName) {
-    return new AlertService(m_apiVersion, m_clusterName, null, hostName);
+    return new AlertService(m_clusterName, null, hostName);
   }
 
   /**
@@ -253,7 +251,7 @@ public class HostService extends BaseService {
       @Context javax.ws.rs.core.Request request,
       @PathParam("hostName") String hostName) {
 
-    return new AlertHistoryService(m_apiVersion, m_clusterName, null, hostName);
+    return new AlertHistoryService(m_clusterName, null, hostName);
   }
 
   /**
@@ -270,7 +268,7 @@ public class HostService extends BaseService {
   public HostStackVersionService getHostStackVersionService(@Context javax.ws.rs.core.Request request,
       @PathParam("hostName") String hostName) {
 
-    return new HostStackVersionService(m_apiVersion, hostName, m_clusterName);
+    return new HostStackVersionService(hostName, m_clusterName);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostStackVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostStackVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostStackVersionService.java
index 6d1a445..1c91eee 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostStackVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostStackVersionService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -53,8 +52,7 @@ public class HostStackVersionService extends BaseService {
    *
    * @param hostName name of the host
    */
-  public HostStackVersionService(ApiVersion apiVersion, String hostName, String clusterName) {
-    super(apiVersion);
+  public HostStackVersionService(String hostName, String clusterName) {
     this.hostName = hostName;
     this.clusterName = clusterName;
   }
@@ -118,7 +116,7 @@ public class HostStackVersionService extends BaseService {
     final Map<Resource.Type, String> stackVersionProperties = new HashMap<>();
     stackVersionProperties.put(Resource.Type.Host, hostName);
     stackVersionProperties.put(Resource.Type.HostStackVersion, stackVersionId);
-    return new RepositoryVersionService(m_apiVersion, stackVersionProperties);
+    return new RepositoryVersionService(stackVersionProperties);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java
index afa31dc..f216e67 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java
@@ -34,12 +34,12 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * Service responsible for instances resource requests.
  */
+@Path("/instances/")
 public class InstanceService extends BaseService {
 
   /**
@@ -50,8 +50,7 @@ public class InstanceService extends BaseService {
   /**
    * Constructor.
    */
-  public InstanceService(ApiVersion apiVersion) {
-    super(apiVersion);
+  public InstanceService() {
   }
 
   /**
@@ -59,8 +58,7 @@ public class InstanceService extends BaseService {
    *
    * @param feedName feed id
    */
-  public InstanceService(ApiVersion apiVersion, String feedName) {
-    super(apiVersion);
+  public InstanceService(String feedName) {
     m_feedName = feedName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java
index 6a856b8..2ea83e2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -49,8 +48,7 @@ public class JobService extends BaseService {
    * @param workflowId
    *          workflow id
    */
-  public JobService(ApiVersion apiVersion, String clusterName, String workflowId) {
-    super(apiVersion);
+  public JobService(String clusterName, String workflowId) {
     this.clusterName = clusterName;
     this.workflowId = workflowId;
   }
@@ -97,7 +95,7 @@ public class JobService extends BaseService {
   @Path("{jobId}/taskattempts")
   public TaskAttemptService getTaskAttemptHandler(
       @PathParam("jobId") String jobId) {
-    return new TaskAttemptService(m_apiVersion, clusterName, workflowId, jobId);
+    return new TaskAttemptService(clusterName, workflowId, jobId);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java
index 012c27a..5f20c4f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java
@@ -14,7 +14,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -35,12 +34,9 @@ import org.apache.ambari.server.controller.spi.Resource;
  * limitations under the License.
  */
 
+@Path("/kerberos_descriptors/")
 public class KerberosDescriptorService extends BaseService {
 
-  public KerberosDescriptorService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Handles: GET  /kerberos_descriptors
    * Get all kerberos descriptors.

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/KeyService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/KeyService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/KeyService.java
index 1a2b523..9ddcc79 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/KeyService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/KeyService.java
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.inject.Inject;
 
+@Path("/keys/")
 public class KeyService {
   private static final Logger log = LoggerFactory.getLogger(KeyService.class);
   private static PersistKeyValueImpl persistKeyVal;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/LdapSyncEventService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/LdapSyncEventService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/LdapSyncEventService.java
index 85da59a..61f5ba7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/LdapSyncEventService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/LdapSyncEventService.java
@@ -33,17 +33,13 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * Service responsible for ldap sync event resource requests.
  */
+@Path("/ldap_sync_events/")
 public class LdapSyncEventService extends BaseService {
-  public LdapSyncEventService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Handles: GET /ldap_sync_events/{eventId}
    * Get a specific view.

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java
index f2ddfdc..83853d2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/LoggingService.java
@@ -36,7 +36,6 @@ import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.AmbariServer;
 import org.apache.ambari.server.controller.internal.ResourceImpl;
@@ -76,12 +75,11 @@ public class LoggingService extends BaseService {
 
   private final String clusterName;
 
-  public LoggingService(ApiVersion apiVersion, String clusterName) {
-    this(apiVersion, clusterName, new DefaultControllerFactory());
+  public LoggingService(String clusterName) {
+    this(clusterName, new DefaultControllerFactory());
   }
 
-  public LoggingService(ApiVersion apiVersion, String clusterName, ControllerFactory controllerFactory) {
-    super(apiVersion);
+  public LoggingService(String clusterName, ControllerFactory controllerFactory) {
     this.clusterName = clusterName;
     this.controllerFactory = controllerFactory;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java
index 4354b34..f2f5e0e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java
@@ -19,6 +19,7 @@ package org.apache.ambari.server.api.services;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.GET;
+import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.Response;
@@ -36,6 +37,7 @@ import com.google.inject.Inject;
  * Service performing logout of current user
  */
 @StaticallyInject
+@Path("/logout")
 public class LogoutService {
 
   @Inject

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/MemberService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MemberService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MemberService.java
index e9246de..836aa9c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MemberService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MemberService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -50,8 +49,7 @@ public class MemberService extends BaseService {
    *
    * @param groupName name of the group
    */
-  public MemberService(ApiVersion apiVersion, String groupName) {
-    super(apiVersion);
+  public MemberService(String groupName) {
     this.groupName = groupName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/OperatingSystemService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/OperatingSystemService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/OperatingSystemService.java
index b72b4c2..3117054 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/OperatingSystemService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/OperatingSystemService.java
@@ -47,7 +47,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -65,8 +64,7 @@ public class OperatingSystemService extends BaseService {
    *
    * @param parentKeyProperties extra properties to be inserted into created resource
    */
-  public OperatingSystemService(ApiVersion apiVersion, Map<Resource.Type, String> parentKeyProperties) {
-    super(apiVersion);
+  public OperatingSystemService(Map<Resource.Type, String> parentKeyProperties) {
     this.parentKeyProperties = parentKeyProperties;
   }
 
@@ -110,7 +108,7 @@ public class OperatingSystemService extends BaseService {
     final Map<Resource.Type, String> mapIds = new HashMap<>();
     mapIds.putAll(parentKeyProperties);
     mapIds.put(Resource.Type.OperatingSystem, osType);
-    return new RepositoryService(m_apiVersion, mapIds);
+    return new RepositoryService(mapIds);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/PermissionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/PermissionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/PermissionService.java
index c8f46a2..bb33884 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/PermissionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/PermissionService.java
@@ -33,19 +33,15 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 
 /**
  * Service responsible for permission resource requests.
  */
+@Path("/permissions/")
 public class PermissionService extends BaseService {
 
-  public PermissionService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Handles: GET /permissions/{permissionID}
    * Get a specific permission.
@@ -147,7 +143,7 @@ public class PermissionService extends BaseService {
   @Path("{permissionId}/authorizations")
   public RoleAuthorizationService getRoleAuthorizations(
       @Context javax.ws.rs.core.Request request, @PathParam("permissionId") String permissionId) {
-    return new RoleAuthorizationService(m_apiVersion, permissionId);
+    return new RoleAuthorizationService(permissionId);
   }
 
   // ----- helper methods ----------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/PreUpgradeCheckService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/PreUpgradeCheckService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/PreUpgradeCheckService.java
index 3071c5f..b43fc93 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/PreUpgradeCheckService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/PreUpgradeCheckService.java
@@ -27,7 +27,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -45,8 +44,7 @@ public class PreUpgradeCheckService extends BaseService {
    *
    * @param clusterName cluster name
    */
-  public PreUpgradeCheckService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public PreUpgradeCheckService(String clusterName) {
     this.clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/PrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/PrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/PrivilegeService.java
index a2a970b..ab07bce 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/PrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/PrivilegeService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 
 
 /**
@@ -39,10 +38,6 @@ import org.apache.ambari.server.api.util.ApiVersion;
  */
 public abstract class PrivilegeService extends BaseService {
 
-  public PrivilegeService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Handles: GET /privileges/{privilegeID}
    * Get a specific privilege.

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/RecommendationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RecommendationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RecommendationService.java
index 4bb4b09..8c8fb7f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RecommendationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RecommendationService.java
@@ -22,6 +22,8 @@ import java.util.HashMap;
 import java.util.Map;
 
 import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
@@ -30,50 +32,32 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
- * Service responsible for preparing recommendations for host-layout and configurations.
+ * Service responsible for preparing recommendations for host-layout and
+ * configurations.
  */
+@Path("/stacks/{stackName}/versions/{stackVersion}/recommendations")
 public class RecommendationService extends BaseService {
 
   /**
-   * Stack name.
-   */
-  private String m_stackName;
-
-  /**
-   * Stack version.
-   */
-  private String m_stackVersion;
-
-  /**
-   * Constructor.
-   *
-   * @param apiVersion API version
-   * @param stackName Stack name
-   * @param stackVersion Stack version
-   */
-  public RecommendationService(final ApiVersion apiVersion, String stackName, String stackVersion) {
-    super(apiVersion);
-    this.m_stackName = stackName;
-    this.m_stackVersion = stackVersion;
-  }
-
-  /**
    * Returns host-layout recommendations for list of hosts and services.
    * 
    * @param body http body
    * @param headers http headers
    * @param ui uri info
+   * @param stackName stack name
+   * @param stackVersion stack version
    * @return recommendations for host-layout
    */
   @POST
   @Produces(MediaType.TEXT_PLAIN)
-  public Response getRecommendation(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+  public Response getRecommendation(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+      @PathParam("stackName") String stackName, @PathParam("stackVersion") String stackVersion) {
+
     return handleRequest(headers, body, ui, Request.Type.POST,
-        createRecommendationResource(m_stackName, m_stackVersion));
+        createRecommendationResource(stackName, stackVersion));
   }
 
   ResourceInstance createRecommendationResource(String stackName, String stackVersion) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/RemoteClustersService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RemoteClustersService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RemoteClustersService.java
index d6b26fd..799ae5f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RemoteClustersService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RemoteClustersService.java
@@ -33,19 +33,15 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 
 /**
  * Service responsible for Remote Cluster resource requests.
  */
+@Path("/remoteclusters")
 public class RemoteClustersService extends BaseService {
 
-  public RemoteClustersService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Get the list of all Remote Clusters
    * @param headers

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryService.java
index 882d9b3..c88ca14 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryService.java
@@ -49,7 +49,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -67,8 +66,7 @@ public class RepositoryService extends BaseService {
    *
    * @param parentKeyProperties extra properties to be inserted into created resource
    */
-  public RepositoryService(ApiVersion apiVersion, Map<Resource.Type, String> parentKeyProperties) {
-    super(apiVersion);
+  public RepositoryService(Map<Resource.Type, String> parentKeyProperties) {
     this.parentKeyProperties = parentKeyProperties;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryVersionService.java
index 396f209..a3e707d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryVersionService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -49,11 +48,9 @@ public class RepositoryVersionService extends BaseService {
   /**
    * Constructor.
    *
-   * @param apiVersion API version
    * @param parentKeyProperties extra properties to be inserted into created resource
    */
-  public RepositoryVersionService(ApiVersion apiVersion, Map<Resource.Type, String> parentKeyProperties) {
-    super(apiVersion);
+  public RepositoryVersionService(Map<Resource.Type, String> parentKeyProperties) {
     this.parentKeyProperties = parentKeyProperties;
   }
 
@@ -144,7 +141,7 @@ public class RepositoryVersionService extends BaseService {
     final Map<Resource.Type, String> mapIds = new HashMap<>();
     mapIds.putAll(parentKeyProperties);
     mapIds.put(Resource.Type.RepositoryVersion, repositoryVersionId);
-    return new OperatingSystemService(m_apiVersion, mapIds);
+    return new OperatingSystemService(mapIds);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java
index d418214..cfcc2d7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java
@@ -32,7 +32,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -49,8 +48,7 @@ public class RequestScheduleService extends BaseService {
    * Constructor
    * @param m_clusterName
    */
-  public RequestScheduleService(ApiVersion apiVersion, String m_clusterName) {
-    super(apiVersion);
+  public RequestScheduleService(String m_clusterName) {
     this.m_clusterName = m_clusterName;
   }
 


[40/52] [abbrv] ambari git commit: AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_tools.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_tools.json b/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_tools.json
index 535b9d9..62562f8 100644
--- a/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_tools.json
+++ b/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_tools.json
@@ -1,4 +1,14 @@
 {
-  "stack_selector": ["distro-select", "/usr/bin/distro-select", "distro-select"],
-  "conf_selector": ["conf-select", "/usr/bin/conf-select", "conf-select"]
-}
\ No newline at end of file
+  "PERF": {
+    "stack_selector": [
+      "distro-select",
+      "/usr/bin/distro-select",
+      "distro-select"
+    ],
+    "conf_selector": [
+      "conf-select",
+      "/usr/bin/conf-select",
+      "conf-select"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
index ca579ea..bade238 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
@@ -46,9 +46,11 @@ import org.apache.ambari.server.controller.KerberosHelper;
 import org.apache.ambari.server.controller.StackConfigurationResponse;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.PropertyDependencyInfo;
 import org.apache.ambari.server.state.PropertyInfo;
 import org.apache.ambari.server.state.ServiceInfo;
+import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.ValueAttributesInfo;
 import org.apache.ambari.server.state.kerberos.KerberosDescriptor;
 import org.apache.ambari.server.topology.AdvisedConfiguration;
@@ -66,6 +68,7 @@ import org.apache.ambari.server.topology.HostGroupInfo;
 import org.apache.ambari.server.topology.InvalidTopologyException;
 import org.apache.ambari.server.topology.TopologyRequest;
 import org.apache.commons.lang.StringUtils;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockRule;
 import org.easymock.EasyMockSupport;
 import org.easymock.Mock;
@@ -95,6 +98,10 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
 
   private static final Configuration EMPTY_CONFIG = new Configuration(Collections.<String, Map<String, String>>emptyMap(), Collections.<String, Map<String, Map<String, String>>>emptyMap());
   private final Map<String, Collection<String>> serviceComponents = new HashMap<>();
+  private final Map<String, Map<String, String>> stackProperties = new HashMap<>();
+
+  private final String STACK_NAME = "testStack";
+  private final String STACK_VERSION = "1";
 
   @Rule
   public EasyMockRule mocks = new EasyMockRule(this);
@@ -129,13 +136,16 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
   @Mock
   private TopologyRequest topologyRequestMock;
 
+  @Mock(type = MockType.NICE)
+  private ConfigHelper configHelper;
+
   @Before
   public void init() throws Exception {
     expect(bp.getStack()).andReturn(stack).anyTimes();
     expect(bp.getName()).andReturn("test-bp").anyTimes();
 
-    expect(stack.getName()).andReturn("testStack").anyTimes();
-    expect(stack.getVersion()).andReturn("1").anyTimes();
+    expect(stack.getName()).andReturn(STACK_NAME).atLeastOnce();
+    expect(stack.getVersion()).andReturn(STACK_VERSION).atLeastOnce();
     // return false for all components since for this test we don't care about the value
     expect(stack.isMasterComponent((String) anyObject())).andReturn(false).anyTimes();
     expect(stack.getConfigurationPropertiesWithMetadata(anyObject(String.class), anyObject(String.class))).andReturn(Collections.<String, Stack.ConfigProperty>emptyMap()).anyTimes();
@@ -225,6 +235,11 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
 
     Set<String> emptySet = Collections.emptySet();
     expect(stack.getExcludedConfigurationTypes(anyObject(String.class))).andReturn(emptySet).anyTimes();
+
+    expect(ambariContext.getConfigHelper()).andReturn(configHelper).anyTimes();
+    expect(configHelper.getDefaultStackProperties(
+        EasyMock.eq(new StackId(STACK_NAME, STACK_VERSION)))).andReturn(stackProperties).anyTimes();
+
     expect(ambariContext.isClusterKerberosEnabled(1)).andReturn(true).once();
     expect(ambariContext.getClusterName(1L)).andReturn("clusterName").anyTimes();
     PowerMock.mockStatic(AmbariServer.class);
@@ -234,14 +249,14 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(controller.getKerberosHelper()).andReturn(kerberosHelper).anyTimes();
     expect(controller.getClusters()).andReturn(clusters).anyTimes();
     expect(kerberosHelper.getKerberosDescriptor(cluster)).andReturn(kerberosDescriptor).anyTimes();
-    Set<String> properties = new HashSet<String>();
+    Set<String> properties = new HashSet<>();
     properties.add("core-site/hadoop.security.auth_to_local");
     expect(kerberosDescriptor.getAllAuthToLocalProperties()).andReturn(properties).anyTimes();
   }
 
   @After
   public void tearDown() {
-    reset(bp, serviceInfo, stack, ambariContext);
+    reset(bp, serviceInfo, stack, ambariContext, configHelper);
   }
 
   @Test
@@ -6322,13 +6337,16 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     topology.getAdvisedConfigurations().putAll(createAdvisedConfigMap());
     topology.setConfigRecommendationStrategy(ConfigRecommendationStrategy.ONLY_STACK_DEFAULTS_APPLY);
     BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+
     reset(stack);
+    expect(stack.getName()).andReturn(STACK_NAME).anyTimes();
+    expect(stack.getVersion()).andReturn(STACK_VERSION).anyTimes();
     expect(stack.getConfiguration(bp.getServices())).andReturn(createStackDefaults()).anyTimes();
 
     Set<String> emptySet = Collections.emptySet();
     expect(stack.getExcludedConfigurationTypes(anyObject(String.class))).andReturn(emptySet).anyTimes();
-
     replay(stack);
+
     // WHEN
     Set<String> configTypeUpdated = configProcessor.doUpdateForClusterCreate();
     // THEN
@@ -6379,13 +6397,17 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     topology.getAdvisedConfigurations().putAll(createAdvisedConfigMap());
     topology.setConfigRecommendationStrategy(ConfigRecommendationStrategy.ONLY_STACK_DEFAULTS_APPLY);
     BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+
     reset(stack);
+    expect(stack.getName()).andReturn(STACK_NAME).anyTimes();
+    expect(stack.getVersion()).andReturn(STACK_VERSION).anyTimes();
     expect(stack.getConfiguration(bp.getServices())).andReturn(createStackDefaults()).anyTimes();
 
     Set<String> emptySet = Collections.emptySet();
     expect(stack.getExcludedConfigurationTypes(anyObject(String.class))).andReturn(emptySet).anyTimes();
 
     replay(stack);
+
     // WHEN
     configProcessor.doUpdateForClusterCreate();
     // THEN
@@ -8050,6 +8072,10 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
   @Test
   public void testValuesTrimming() throws Exception {
     reset(stack);
+
+    expect(stack.getName()).andReturn(STACK_NAME).anyTimes();
+    expect(stack.getVersion()).andReturn(STACK_VERSION).anyTimes();
+
     Map<String, Map<String, String>> properties = new HashMap<>();
 
     Map<String, String> hdfsSite = new HashMap<>();
@@ -8073,6 +8099,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
       new StackConfigurationResponse(null, null, null, null, "hdfs-site", null, Collections.singleton(PropertyInfo.PropertyType.PASSWORD), null, null, null)));
     propertyConfigs.put("test.host", new Stack.ConfigProperty(
       new StackConfigurationResponse(null, null, null, null, "hdfs-site", null, null, null, valueAttributesInfoHost, null)));
+
     expect(stack.getServiceForConfigType("hdfs-site")).andReturn("HDFS").anyTimes();
     expect(stack.getConfigurationPropertiesWithMetadata("HDFS", "hdfs-site")).andReturn(propertyConfigs).anyTimes();
 
@@ -8144,7 +8171,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     throws InvalidTopologyException {
 
 
-    replay(stack, serviceInfo, ambariContext, controller, kerberosHelper, kerberosDescriptor, clusters, cluster);
+    replay(stack, serviceInfo, ambariContext, configHelper, controller, kerberosHelper, kerberosDescriptor, clusters, cluster);
 
     Map<String, HostGroupInfo> hostGroupInfo = new HashMap<>();
     Collection<String> allServices = new HashSet<>();
@@ -8207,7 +8234,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
       this.name = name;
       this.components = components;
       this.hosts = hosts;
-      this.configuration = new Configuration(Collections.<String, Map<String, String>>emptyMap(),
+      configuration = new Configuration(Collections.<String, Map<String, String>>emptyMap(),
         Collections.<String, Map<String, Map<String, String>>>emptyMap());
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/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 32a5358..39aee82 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
@@ -1414,8 +1414,8 @@ public class ClusterStackVersionResourceProviderTest {
     expect(cluster.getClusterId()).andReturn(1L).anyTimes();
     expect(cluster.getHosts()).andReturn(hostsForCluster.values()).atLeastOnce();
     expect(cluster.getServices()).andReturn(serviceMap).anyTimes();
-    expect(cluster.getServiceComponentHosts(anyObject(String.class))).andReturn(
-        serviceComponentHosts).anyTimes();
+    expect(cluster.getServiceComponentHosts(anyObject(String.class))).andReturn(serviceComponentHosts).anyTimes();
+    expect(cluster.getCurrentStackVersion()).andReturn(stackId).atLeastOnce();
 
     expect(repositoryVersionDAOMock.findByStackAndVersion(anyObject(StackId.class),
         anyObject(String.class))).andReturn(repoVersionEntity);

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
index 8b08dc4..5535256 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
@@ -50,6 +50,8 @@ import org.apache.ambari.server.controller.internal.Stack;
 import org.apache.ambari.server.serveraction.kerberos.KerberosInvalidConfigurationException;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.ConfigHelper;
+import org.apache.ambari.server.state.StackId;
 import org.easymock.Capture;
 import org.easymock.CaptureType;
 import org.easymock.EasyMock;
@@ -103,6 +105,13 @@ public class ClusterConfigurationRequestTest {
   @Mock(type = MockType.NICE)
   private KerberosHelper kerberosHelper;
 
+  @Mock(type = MockType.NICE)
+  private ConfigHelper configHelper;
+
+  private final String STACK_NAME = "testStack";
+  private final String STACK_VERSION = "1";
+  private final Map<String, Map<String, String>> stackProperties = new HashMap<>();
+
   /**
    * testConfigType config type should be in updatedConfigTypes, as no custom property in Blueprint
    * ==> Kerberos config property should be updated
@@ -221,6 +230,8 @@ public class ClusterConfigurationRequestTest {
     expect(clusters.getCluster("testCluster")).andReturn(cluster).anyTimes();
 
     expect(blueprint.getStack()).andReturn(stack).anyTimes();
+    expect(stack.getName()).andReturn(STACK_NAME).anyTimes();
+    expect(stack.getVersion()).andReturn(STACK_VERSION).anyTimes();
     expect(stack.getServiceForConfigType("testConfigType")).andReturn("KERBEROS").anyTimes();
     expect(stack.getAllConfigurationTypes(anyString())).andReturn(Collections.singletonList("testConfigType")
     ).anyTimes();
@@ -246,6 +257,7 @@ public class ClusterConfigurationRequestTest {
     expect(blueprint.getComponents("KERBEROS")).andReturn(kerberosComponents).anyTimes();
     expect(blueprint.getComponents("ZOOKEPER")).andReturn(zookeeperComponents).anyTimes();
 
+    expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();
     expect(topology.getConfigRecommendationStrategy()).andReturn(ConfigRecommendationStrategy.NEVER_APPLY).anyTimes();
     expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
     expect(blueprint.isValidConfigType("testConfigType")).andReturn(true).anyTimes();
@@ -256,10 +268,14 @@ public class ClusterConfigurationRequestTest {
     expect(topology.getHostGroupsForComponent(anyString())).andReturn(Collections.<String>emptyList())
       .anyTimes();
 
-      expect(ambariContext.getClusterName(Long.valueOf(1))).andReturn("testCluster").anyTimes();
+    expect(ambariContext.getConfigHelper()).andReturn(configHelper).anyTimes();
+    expect(ambariContext.getClusterName(Long.valueOf(1))).andReturn("testCluster").anyTimes();
     expect(ambariContext.createConfigurationRequests(EasyMock.<Map<String, Object>>anyObject())).andReturn(Collections
       .<ConfigurationRequest>emptyList()).anyTimes();
 
+    expect(configHelper.getDefaultStackProperties(
+        EasyMock.eq(new StackId(STACK_NAME, STACK_VERSION)))).andReturn(stackProperties).anyTimes();
+
     if (kerberosConfig == null) {
       kerberosConfig = new HashMap<>();
       Map<String, String> properties = new HashMap<>();
@@ -277,15 +293,14 @@ public class ClusterConfigurationRequestTest {
       (captureUpdatedConfigTypes));
     expectLastCall();
 
-    PowerMock.replay(stack, blueprint, topology, controller, clusters, kerberosHelper, ambariContext,
-      AmbariContext
-        .class);
+    PowerMock.replay(stack, blueprint, topology, controller, clusters, kerberosHelper,
+        ambariContext, AmbariContext.class, configHelper);
 
     ClusterConfigurationRequest clusterConfigurationRequest = new ClusterConfigurationRequest(
       ambariContext, topology, false, stackAdvisorBlueprintProcessor, true);
     clusterConfigurationRequest.process();
 
-    verify(blueprint, topology, ambariContext, controller, kerberosHelper);
+    verify(blueprint, topology, ambariContext, controller, kerberosHelper, configHelper);
 
 
     String clusterName = captureClusterName.getValue();
@@ -308,8 +323,9 @@ public class ClusterConfigurationRequestTest {
     expect(clusters.getCluster("testCluster")).andReturn(cluster).anyTimes();
 
     expect(blueprint.getStack()).andReturn(stack).anyTimes();
-    expect(stack.getAllConfigurationTypes(anyString())).andReturn(Collections.singletonList("testConfigType")
-    ).anyTimes();
+    expect(stack.getName()).andReturn(STACK_NAME).anyTimes();
+    expect(stack.getVersion()).andReturn(STACK_VERSION).anyTimes();
+    expect(stack.getAllConfigurationTypes(anyString())).andReturn(Collections.<String>singletonList("testConfigType")).anyTimes();
     expect(stack.getExcludedConfigurationTypes(anyString())).andReturn(Collections.<String>emptySet()).anyTimes();
     expect(stack.getConfigurationPropertiesWithMetadata(anyString(), anyString())).andReturn(Collections.<String,
       Stack.ConfigProperty>emptyMap()).anyTimes();
@@ -331,25 +347,29 @@ public class ClusterConfigurationRequestTest {
     expect(blueprint.getComponents("KERBEROS")).andReturn(kerberosComponents).anyTimes();
     expect(blueprint.getComponents("ZOOKEPER")).andReturn(zookeeperComponents).anyTimes();
 
+    expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();
     expect(topology.getConfigRecommendationStrategy()).andReturn(ConfigRecommendationStrategy.NEVER_APPLY).anyTimes();
     expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
     expect(topology.getConfiguration()).andReturn(stackConfig).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(Collections.<String, HostGroupInfo>emptyMap()).anyTimes();
     expect(topology.getClusterId()).andReturn(Long.valueOf(1)).anyTimes();
+
+    expect(ambariContext.getConfigHelper()).andReturn(configHelper).anyTimes();
     expect(ambariContext.getClusterName(Long.valueOf(1))).andReturn("testCluster").anyTimes();
     expect(ambariContext.createConfigurationRequests(EasyMock.<Map<String, Object>>anyObject())).andReturn(Collections
       .<ConfigurationRequest>emptyList()).anyTimes();
 
+    expect(configHelper.getDefaultStackProperties(
+        EasyMock.eq(new StackId(STACK_NAME, STACK_VERSION)))).andReturn(stackProperties).anyTimes();
 
     PowerMock.replay(stack, blueprint, topology, controller, clusters, ambariContext,
-      AmbariContext
-        .class);
+        AmbariContext.class, configHelper);
 
     ClusterConfigurationRequest clusterConfigurationRequest = new ClusterConfigurationRequest(
       ambariContext, topology, false, stackAdvisorBlueprintProcessor);
     clusterConfigurationRequest.process();
 
-    verify(blueprint, topology, ambariContext, controller);
+    verify(blueprint, topology, ambariContext, controller, configHelper);
 
   }
 
@@ -365,6 +385,7 @@ public class ClusterConfigurationRequestTest {
     hg1.setConfiguration(createConfigurationsForHostGroup());
     hostGroupInfoMap.put("hg1", hg1);
 
+    expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();
     expect(topology.getConfiguration()).andReturn(configuration).anyTimes();
     expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(hostGroupInfoMap);
@@ -377,7 +398,12 @@ public class ClusterConfigurationRequestTest {
     expect(blueprint.isValidConfigType("cluster-env")).andReturn(true).anyTimes();
     expect(blueprint.isValidConfigType("global")).andReturn(true).anyTimes();
 
-    EasyMock.replay(stack, blueprint, topology);
+    expect(ambariContext.getConfigHelper()).andReturn(configHelper).anyTimes();
+
+    expect(configHelper.getDefaultStackProperties(
+        EasyMock.eq(new StackId(STACK_NAME, STACK_VERSION)))).andReturn(stackProperties).anyTimes();
+
+    EasyMock.replay(stack, blueprint, topology, ambariContext, configHelper);
     // WHEN
     new ClusterConfigurationRequest(ambariContext, topology, false, stackAdvisorBlueprintProcessor);
     // THEN
@@ -388,7 +414,7 @@ public class ClusterConfigurationRequestTest {
 
     assertFalse("SPARK service not present in topology host group config thus 'spark-env' config type should be removed from config.", hg1.getConfiguration().getFullAttributes().containsKey("spark-env"));
     assertTrue("HDFS service is present in topology host group config thus 'hdfs-site' config type should be left in the config.", hg1.getConfiguration().getFullAttributes().containsKey("hdfs-site"));
-    verify(stack, blueprint, topology);
+    verify(stack, blueprint, topology, ambariContext, configHelper);
   }
 
   @Test
@@ -409,6 +435,7 @@ public class ClusterConfigurationRequestTest {
     hg1.setConfiguration(createConfigurationsForHostGroup());
     hostGroupInfoMap.put("hg1", hg1);
 
+    expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();
     expect(topology.getConfiguration()).andReturn(configuration).anyTimes();
     expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(hostGroupInfoMap);
@@ -419,7 +446,12 @@ public class ClusterConfigurationRequestTest {
     expect(blueprint.isValidConfigType("cluster-env")).andReturn(true).anyTimes();
     expect(blueprint.isValidConfigType("global")).andReturn(true).anyTimes();
 
-    EasyMock.replay(stack, blueprint, topology);
+    expect(ambariContext.getConfigHelper()).andReturn(configHelper).anyTimes();
+
+    expect(configHelper.getDefaultStackProperties(
+        EasyMock.eq(new StackId(STACK_NAME, STACK_VERSION)))).andReturn(stackProperties).anyTimes();
+
+    EasyMock.replay(stack, blueprint, topology, ambariContext, configHelper);
 
     // When
 
@@ -431,7 +463,7 @@ public class ClusterConfigurationRequestTest {
 
     assertFalse("SPARK service not present in topology host group config thus 'spark-env' config type should be removed from config.", hg1.getConfiguration().getFullAttributes().containsKey("spark-env"));
     assertTrue("HDFS service is present in topology host group config thus 'hdfs-site' config type should be left in the config.", hg1.getConfiguration().getFullAttributes().containsKey("hdfs-site"));
-    verify(stack, blueprint, topology);
+    verify(stack, blueprint, topology, ambariContext, configHelper);
 
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/python/common-services/configs/hawq_default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/common-services/configs/hawq_default.json b/ambari-server/src/test/python/common-services/configs/hawq_default.json
index 79864a9..1b6fafb 100644
--- a/ambari-server/src/test/python/common-services/configs/hawq_default.json
+++ b/ambari-server/src/test/python/common-services/configs/hawq_default.json
@@ -73,7 +73,11 @@
         "cluster-env": {
             "managed_hdfs_resource_property_names": "",
             "security_enabled": "false",
-            "user_group": "hadoop"
+            "user_group": "hadoop",
+            "stack_name": "PHD",
+            "stack_root": "{\"PHD\": \"/usr/phd\"}",
+            "stack_tools": "{\n \"PHD\": { \"stack_selector\": [\"phd-select\", \"/usr/bin/phd-select\", \"phd-select\"],\n  \"conf_selector\": [\"conf-select\", \"/usr/bin/conf-select\", \"conf-select\"]\n}\n}",
+            "stack_features": "{\"PHD\":{\"stack_features\":[{\"name\":\"express_upgrade\",\"description\":\"Express upgrade support\",\"min_version\":\"3.0.0.0\"},{\"name\":\"rolling_upgrade\",\"description\":\"Rolling upgrade support\",\"min_version\":\"3.0.0.0\"},{\"name\":\"config_versioning\",\"description\":\"Configurable versions support\",\"min_version\":\"3.0.0.0\"}]\n}\n}"
         }
     },
     "clusterHostInfo": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/python/host_scripts/TestAlertDiskSpace.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/host_scripts/TestAlertDiskSpace.py b/ambari-server/src/test/python/host_scripts/TestAlertDiskSpace.py
index 0d47061..e6cce98 100644
--- a/ambari-server/src/test/python/host_scripts/TestAlertDiskSpace.py
+++ b/ambari-server/src/test/python/host_scripts/TestAlertDiskSpace.py
@@ -41,7 +41,11 @@ class TestAlertDiskSpace(RMFTestCase):
       total = 21673930752L, used = 5695861760L,
       free = 15978068992L, path="/")
 
-    res = alert_disk_space.execute(configurations={'{{cluster-env/stack_root}}': '/usr/hdp'})
+    configurations = {'{{cluster-env/stack_name}}': 'HDP',
+      '{{cluster-env/stack_root}}': '{"HDP":"/usr/hdp"}'}
+
+    res = alert_disk_space.execute(configurations=configurations)
+
     self.assertEqual(res,
       ('OK', ['Capacity Used: [26.28%, 5.7 GB], Capacity Total: [21.7 GB], path=/']))
 
@@ -50,7 +54,7 @@ class TestAlertDiskSpace(RMFTestCase):
       total = 21673930752L, used = 14521533603L,
       free = 7152397149L, path="/")
 
-    res = alert_disk_space.execute(configurations={'{{cluster-env/stack_root}}': '/usr/hdp'})
+    res = alert_disk_space.execute(configurations = configurations)
     self.assertEqual(res, (
       'WARNING',
       ['Capacity Used: [67.00%, 14.5 GB], Capacity Total: [21.7 GB], path=/']))
@@ -60,7 +64,7 @@ class TestAlertDiskSpace(RMFTestCase):
       total = 21673930752L, used = 20590234214L,
       free = 1083696538, path="/")
 
-    res = alert_disk_space.execute(configurations={'{{cluster-env/stack_root}}': '/usr/hdp'})
+    res = alert_disk_space.execute(configurations = configurations)
     self.assertEqual(res, ('CRITICAL',
     ['Capacity Used: [95.00%, 20.6 GB], Capacity Total: [21.7 GB], path=/']))
 
@@ -69,7 +73,7 @@ class TestAlertDiskSpace(RMFTestCase):
       total = 5418482688L, used = 1625544806L,
       free = 3792937882L, path="/")
 
-    res = alert_disk_space.execute(configurations={'{{cluster-env/stack_root}}': '/usr/hdp'})
+    res = alert_disk_space.execute(configurations = configurations)
     self.assertEqual(res, ('WARNING', [
       'Capacity Used: [30.00%, 1.6 GB], Capacity Total: [5.4 GB], path=/. Total free space is less than 5.0 GB']))
 
@@ -81,7 +85,7 @@ class TestAlertDiskSpace(RMFTestCase):
       total = 21673930752L, used = 5695861760L,
       free = 15978068992L, path="/usr/hdp")
 
-    res = alert_disk_space.execute(configurations={'{{cluster-env/stack_root}}': '/usr/hdp'})
+    res = alert_disk_space.execute(configurations = configurations)
     self.assertEqual(res,
       ('OK', ['Capacity Used: [26.28%, 5.7 GB], Capacity Total: [21.7 GB], path=/usr/hdp']))
 
@@ -90,6 +94,6 @@ class TestAlertDiskSpace(RMFTestCase):
       total = 5418482688L, used = 1625544806L,
       free = 3792937882L, path="/usr/hdp")
 
-    res = alert_disk_space.execute(configurations={'{{cluster-env/stack_root}}': '/usr/hdp'})
+    res = alert_disk_space.execute(configurations = configurations)
     self.assertEqual(res, (
       'WARNING', ["Capacity Used: [30.00%, 1.6 GB], Capacity Total: [5.4 GB], path=/usr/hdp. Total free space is less than 5.0 GB"]))


[41/52] [abbrv] ambari git commit: AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)

Posted by jl...@apache.org.
AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: f33a250c0e7624b6cbc0a11ffce12506eaa95d9a
Parents: a795f38
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Fri Jul 7 14:36:05 2017 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Fri Jul 7 23:00:23 2017 -0400

----------------------------------------------------------------------
 .../libraries/functions/stack_features.py       |   13 +
 .../libraries/functions/stack_tools.py          |   39 +
 .../libraries/script/script.py                  |   19 +-
 .../server/api/query/JpaPredicateVisitor.java   |    8 +-
 .../controller/ActionExecutionContext.java      |   26 +
 .../controller/AmbariActionExecutionHelper.java |   26 +-
 .../BlueprintConfigurationProcessor.java        |   59 +-
 .../ClusterStackVersionResourceProvider.java    |  163 ++-
 .../ambari/server/state/ConfigHelper.java       |   32 +
 .../ambari/server/topology/AmbariContext.java   |   18 +
 .../server/upgrade/UpgradeCatalog252.java       |   61 +
 .../package/alerts/alert_hive_metastore.py      |   11 +-
 .../package/alerts/alert_llap_app_status.py     |   12 +-
 .../package/alerts/alert_check_oozie_server.py  |    8 +-
 .../resources/host_scripts/alert_disk_space.py  |   10 +-
 .../host_scripts/alert_version_select.py        |   16 +-
 .../HDP/2.0.6/configuration/cluster-env.xml     |   16 +-
 .../HDP/2.0.6/properties/stack_features.json    |  852 +++++------
 .../HDP/2.0.6/properties/stack_tools.json       |   16 +-
 .../PERF/1.0/configuration/cluster-env.xml      |   16 +-
 .../PERF/1.0/properties/stack_features.json     |   38 +-
 .../stacks/PERF/1.0/properties/stack_tools.json |   16 +-
 .../BlueprintConfigurationProcessorTest.java    |   41 +-
 ...ClusterStackVersionResourceProviderTest.java |    4 +-
 .../ClusterConfigurationRequestTest.java        |   60 +-
 .../common-services/configs/hawq_default.json   |    6 +-
 .../python/host_scripts/TestAlertDiskSpace.py   |   16 +-
 .../2.5/configs/ranger-admin-default.json       |  990 ++++++-------
 .../2.5/configs/ranger-admin-secured.json       | 1108 +++++++--------
 .../stacks/2.5/configs/ranger-kms-default.json  | 1158 +++++++--------
 .../stacks/2.5/configs/ranger-kms-secured.json  | 1320 +++++++++---------
 .../2.6/configs/ranger-admin-default.json       |  953 +++++++------
 .../2.6/configs/ranger-admin-secured.json       | 1066 +++++++-------
 .../src/test/python/stacks/utils/RMFTestCase.py |    8 +-
 34 files changed, 4353 insertions(+), 3852 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py b/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
index cbd32e7..576c138 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
@@ -43,6 +43,12 @@ def check_stack_feature(stack_feature, stack_version):
 
   from resource_management.libraries.functions.default import default
   from resource_management.libraries.functions.version import compare_versions
+
+  stack_name = default("/hostLevelParams/stack_name", None)
+  if stack_name is None:
+    Logger.warning("Cannot find the stack name in the command. Stack features cannot be loaded")
+    return False
+
   stack_features_config = default("/configurations/cluster-env/stack_features", None)
 
   if not stack_version:
@@ -51,6 +57,13 @@ def check_stack_feature(stack_feature, stack_version):
 
   if stack_features_config:
     data = json.loads(stack_features_config)
+
+    if stack_name not in data:
+      Logger.warning("Cannot find stack features for the stack named {0}".format(stack_name))
+      return False
+
+    data = data[stack_name]
+
     for feature in data["stack_features"]:
       if feature["name"] == stack_feature:
         if "min_version" in feature:

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py b/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py
index 02ae62d..420ae11 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py
@@ -39,15 +39,33 @@ def get_stack_tool(name):
   :return: tool_name, tool_path, tool_package
   """
   from resource_management.libraries.functions.default import default
+
+  stack_name = default("/hostLevelParams/stack_name", None)
+  if stack_name is None:
+    Logger.warning("Cannot find the stack name in the command. Stack tools cannot be loaded")
+    return (None, None, None)
+
   stack_tools = None
   stack_tools_config = default("/configurations/cluster-env/stack_tools", None)
   if stack_tools_config:
     stack_tools = json.loads(stack_tools_config)
 
+  if stack_tools is None:
+    Logger.warning("The stack tools could not be found in cluster-env")
+    return (None, None, None)
+
+  if stack_name not in stack_tools:
+    Logger.warning("Cannot find stack tools for the stack named {0}".format(stack_name))
+    return (None, None, None)
+
+  # load the stack tooks keyed by the stack name
+  stack_tools = stack_tools[stack_name]
+
   if not stack_tools or not name or name.lower() not in stack_tools:
     Logger.warning("Cannot find config for {0} stack tool in {1}".format(str(name), str(stack_tools)))
     return (None, None, None)
 
+
   tool_config = stack_tools[name.lower()]
 
   # Return fixed length (tool_name, tool_path tool_package) tuple
@@ -81,3 +99,24 @@ def get_stack_tool_package(name):
   """
   (tool_name, tool_path, tool_package) = get_stack_tool(name)
   return tool_package
+
+
+def get_stack_root(stack_name, stack_root_json):
+  """
+  Get the stack-specific install root directory from the raw, JSON-escaped properties.
+  :param stack_name:
+  :param stack_root_json:
+  :return: stack_root
+  """
+  from resource_management.libraries.functions.default import default
+
+  if stack_root_json is None:
+    return "/usr/{0}".format(stack_name.lower())
+
+  stack_root = json.loads(stack_root_json)
+
+  if stack_name not in stack_root:
+    Logger.warning("Cannot determine stack root for stack named {0}".format(stack_name))
+    return "/usr/{0}".format(stack_name.lower())
+
+  return stack_root[stack_name]

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 2c56a13..2b374c5 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -597,7 +597,11 @@ class Script(object):
     :return: a stack name or None
     """
     from resource_management.libraries.functions.default import default
-    return default("/hostLevelParams/stack_name", "HDP")
+    stack_name = default("/hostLevelParams/stack_name", None)
+    if stack_name is None:
+      stack_name = default("/configurations/cluster-env/stack_name", "HDP")
+
+    return stack_name
 
   @staticmethod
   def get_stack_root():
@@ -607,7 +611,18 @@ class Script(object):
     """
     from resource_management.libraries.functions.default import default
     stack_name = Script.get_stack_name()
-    return default("/configurations/cluster-env/stack_root", "/usr/{0}".format(stack_name.lower()))
+    stack_root_json = default("/configurations/cluster-env/stack_root", None)
+
+    if stack_root_json is None:
+      return "/usr/{0}".format(stack_name.lower())
+
+    stack_root = json.loads(stack_root_json)
+
+    if stack_name not in stack_root:
+      Logger.warning("Cannot determine stack root for stack named {0}".format(stack_name))
+      return "/usr/{0}".format(stack_name.lower())
+
+    return stack_root[stack_name]
 
   @staticmethod
   def get_stack_version():

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/java/org/apache/ambari/server/api/query/JpaPredicateVisitor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/query/JpaPredicateVisitor.java b/ambari-server/src/main/java/org/apache/ambari/server/api/query/JpaPredicateVisitor.java
index 984dc3b..84e9dd9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/query/JpaPredicateVisitor.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/query/JpaPredicateVisitor.java
@@ -63,11 +63,6 @@ public abstract class JpaPredicateVisitor<T> implements PredicateVisitor {
   final private CriteriaQuery<T> m_query;
 
   /**
-   * The entity class that the root of the query is built from.
-   */
-  final private Class<T> m_entityClass;
-
-  /**
    * The last calculated predicate.
    */
   private javax.persistence.criteria.Predicate m_lastPredicate = null;
@@ -92,7 +87,6 @@ public abstract class JpaPredicateVisitor<T> implements PredicateVisitor {
   public JpaPredicateVisitor(EntityManager entityManager, Class<T> entityClass) {
     m_entityManager = entityManager;
     m_builder = m_entityManager.getCriteriaBuilder();
-    m_entityClass = entityClass;
     m_query = m_builder.createQuery(entityClass);
     m_root = m_query.from(entityClass);
   }
@@ -178,7 +172,7 @@ public abstract class JpaPredicateVisitor<T> implements PredicateVisitor {
     }
 
     String operator = predicate.getOperator();
-    Comparable<?> value = predicate.getValue();
+    Comparable value = predicate.getValue();
 
     // convert string to enum for proper JPA comparisons
     if (lastSingularAttribute != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionExecutionContext.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionExecutionContext.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionExecutionContext.java
index 42a95c0..34d6db9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionExecutionContext.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionExecutionContext.java
@@ -27,6 +27,7 @@ import org.apache.ambari.server.actionmanager.TargetHostType;
 import org.apache.ambari.server.agent.ExecutionCommand;
 import org.apache.ambari.server.controller.internal.RequestOperationLevel;
 import org.apache.ambari.server.controller.internal.RequestResourceFilter;
+import org.apache.ambari.server.state.StackId;
 
 /**
  * The context required to create tasks and stages for a custom action
@@ -43,6 +44,7 @@ public class ActionExecutionContext {
   private String expectedComponentName;
   private boolean hostsInMaintenanceModeExcluded = true;
   private boolean allowRetry = false;
+  private StackId stackId;
 
   private List<ExecutionCommandVisitor> m_visitors = new ArrayList<>();
 
@@ -173,6 +175,30 @@ public class ActionExecutionContext {
   }
 
   /**
+   * Gets the stack to use for generating stack-associated values for a command.
+   * In some cases the cluster's stack is not the correct one to use, such as
+   * when distributing a repository.
+   *
+   * @return the stackId the stack to use when generating stack-specific content
+   *         for the command.
+   */
+  public StackId getStackId() {
+    return stackId;
+  }
+
+  /**
+   * Sets the stack to use for generating stack-associated values for a command.
+   * In some cases the cluster's stack is not the correct one to use, such as
+   * when distributing a repository.
+   *
+   * @param stackId
+   *          the stackId to use for stack-based properties on the command.
+   */
+  public void setStackId(StackId stackId) {
+    this.stackId = stackId;
+  }
+
+  /**
    * Adds a command visitor that will be invoked after a command is created.  Provides access
    * to the command.
    *

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
index 8f522b0..391daa9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
@@ -465,7 +465,10 @@ public class AmbariActionExecutionHelper {
 
       if (StringUtils.isNotBlank(serviceName)) {
         Service service = cluster.getService(serviceName);
-        addRepoInfoToHostLevelParams(service.getDesiredRepositoryVersion(), hostLevelParams, hostName);
+        addRepoInfoToHostLevelParams(actionContext, service.getDesiredRepositoryVersion(),
+            hostLevelParams, hostName);
+      } else {
+        addRepoInfoToHostLevelParams(actionContext, null, hostLevelParams, hostName);
       }
 
 
@@ -529,9 +532,19 @@ public class AmbariActionExecutionHelper {
   *
   * */
 
-  private void addRepoInfoToHostLevelParams(RepositoryVersionEntity repositoryVersion,
-      Map<String, String> hostLevelParams, String hostName) throws AmbariException {
+  private void addRepoInfoToHostLevelParams(ActionExecutionContext actionContext,
+      RepositoryVersionEntity repositoryVersion, Map<String, String> hostLevelParams,
+      String hostName) throws AmbariException {
+
+    // if the repo is null, see if any values from the context should go on the
+    // host params and then return
     if (null == repositoryVersion) {
+      if (null != actionContext.getStackId()) {
+        StackId stackId = actionContext.getStackId();
+        hostLevelParams.put(STACK_NAME, stackId.getStackName());
+        hostLevelParams.put(STACK_VERSION, stackId.getStackVersion());
+      }
+
       return;
     }
 
@@ -557,7 +570,10 @@ public class AmbariActionExecutionHelper {
 
     hostLevelParams.put(REPO_INFO, rootJsonObject.toString());
 
-    hostLevelParams.put(STACK_NAME, repositoryVersion.getStackName());
-    hostLevelParams.put(STACK_VERSION, repositoryVersion.getStackVersion());
+    // set the host level params if not already set by whoever is creating this command
+    if (!hostLevelParams.containsKey(STACK_NAME) || !hostLevelParams.containsKey(STACK_VERSION)) {
+      hostLevelParams.put(STACK_NAME, repositoryVersion.getStackName());
+      hostLevelParams.put(STACK_VERSION, repositoryVersion.getStackVersion());
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index e93b2f7..37284be 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -36,7 +36,9 @@ import java.util.regex.Pattern;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.PropertyDependencyInfo;
+import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.ValueAttributesInfo;
 import org.apache.ambari.server.topology.AdvisedConfiguration;
 import org.apache.ambari.server.topology.Blueprint;
@@ -356,7 +358,7 @@ public class BlueprintConfigurationProcessor {
             final String originalValue = typeMap.get(propertyName);
             final String updatedValue =
               updater.updateForClusterCreate(propertyName, originalValue, clusterProps, clusterTopology);
-            
+
             if(updatedValue == null ) {
               continue;
             }
@@ -419,6 +421,7 @@ public class BlueprintConfigurationProcessor {
     }
 
     // Explicitly set any properties that are required but not currently provided in the stack definition.
+    setStackToolsAndFeatures(clusterConfig, configTypesUpdated);
     setRetryConfiguration(clusterConfig, configTypesUpdated);
     setupHDFSProxyUsers(clusterConfig, configTypesUpdated);
     addExcludedConfigProperties(clusterConfig, configTypesUpdated, clusterTopology.getBlueprint().getStack());
@@ -531,7 +534,7 @@ public class BlueprintConfigurationProcessor {
     try {
       String clusterName = clusterTopology.getAmbariContext().getClusterName(clusterTopology.getClusterId());
       Cluster cluster = clusterTopology.getAmbariContext().getController().getClusters().getCluster(clusterName);
-      authToLocalPerClusterMap = new HashMap<Long, Set<String>>();
+      authToLocalPerClusterMap = new HashMap<>();
       authToLocalPerClusterMap.put(Long.valueOf(clusterTopology.getClusterId()), clusterTopology.getAmbariContext().getController().getKerberosHelper().getKerberosDescriptor(cluster).getAllAuthToLocalProperties());
       } catch (AmbariException e) {
         LOG.error("Error while getting authToLocal properties. ", e);
@@ -2186,8 +2189,9 @@ public class BlueprintConfigurationProcessor {
       StringBuilder sb = new StringBuilder();
 
       Matcher m = REGEX_IN_BRACKETS.matcher(origValue);
-      if (m.matches())
+      if (m.matches()) {
         origValue = m.group("INNER");
+      }
 
       if (origValue != null) {
         sb.append("[");
@@ -2195,8 +2199,9 @@ public class BlueprintConfigurationProcessor {
         for (String value : origValue.split(",")) {
 
           m = REGEX_IN_QUOTES.matcher(value);
-          if (m.matches())
+          if (m.matches()) {
             value = m.group("INNER");
+          }
 
           if (!isFirst) {
             sb.append(",");
@@ -2230,6 +2235,7 @@ public class BlueprintConfigurationProcessor {
    */
   private static class OriginalValuePropertyUpdater implements PropertyUpdater {
 
+    @Override
     public String updateForClusterCreate(String propertyName,
                                          String origValue,
                                          Map<String, Map<String, String>> properties,
@@ -2950,6 +2956,49 @@ public class BlueprintConfigurationProcessor {
 
 
   /**
+   * Sets the read-only properties for stack features & tools, overriding
+   * anything provided in the blueprint.
+   *
+   * @param configuration
+   *          the configuration to update with values from the stack.
+   * @param configTypesUpdated
+   *          the list of configuration types updated (cluster-env will be added
+   *          to this).
+   * @throws ConfigurationTopologyException
+   */
+  private void setStackToolsAndFeatures(Configuration configuration, Set<String> configTypesUpdated)
+      throws ConfigurationTopologyException {
+    ConfigHelper configHelper = clusterTopology.getAmbariContext().getConfigHelper();
+    Stack stack = clusterTopology.getBlueprint().getStack();
+    String stackName = stack.getName();
+    String stackVersion = stack.getVersion();
+
+    StackId stackId = new StackId(stackName, stackVersion);
+
+    Set<String> properties = Sets.newHashSet(ConfigHelper.CLUSTER_ENV_STACK_NAME_PROPERTY,
+        ConfigHelper.CLUSTER_ENV_STACK_ROOT_PROPERTY, ConfigHelper.CLUSTER_ENV_STACK_TOOLS_PROPERTY,
+        ConfigHelper.CLUSTER_ENV_STACK_FEATURES_PROPERTY);
+
+    try {
+      Map<String, Map<String, String>> defaultStackProperties = configHelper.getDefaultStackProperties(stackId);
+      Map<String,String> clusterEnvDefaultProperties = defaultStackProperties.get(CLUSTER_ENV_CONFIG_TYPE_NAME);
+
+      for( String property : properties ){
+        if (defaultStackProperties.containsKey(property)) {
+          configuration.setProperty(CLUSTER_ENV_CONFIG_TYPE_NAME, property,
+              clusterEnvDefaultProperties.get(property));
+
+          // make sure to include the configuration type as being updated
+          configTypesUpdated.add(CLUSTER_ENV_CONFIG_TYPE_NAME);
+        }
+      }
+    } catch( AmbariException ambariException ){
+      throw new ConfigurationTopologyException("Unable to retrieve the stack tools and features",
+          ambariException);
+    }
+  }
+
+  /**
    * Ensure that the specified property exists.
    * If not, set a default value.
    *
@@ -3099,7 +3148,7 @@ public class BlueprintConfigurationProcessor {
 
     @Override
     public boolean isPropertyIncluded(String propertyName, String propertyValue, String configType, ClusterTopology topology) {
-      return !(this.propertyConfigType.equals(configType) &&
+      return !(propertyConfigType.equals(configType) &&
              this.propertyName.equals(propertyName));
     }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
index 93c02be..c4fce8a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
@@ -67,11 +67,13 @@ import org.apache.ambari.server.security.authorization.RoleAuthorization;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.ComponentInfo;
+import org.apache.ambari.server.state.Config;
+import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.Host;
 import org.apache.ambari.server.state.RepositoryType;
 import org.apache.ambari.server.state.RepositoryVersionState;
-import org.apache.ambari.server.state.Service;
 import org.apache.ambari.server.state.ServiceComponentHost;
+import org.apache.ambari.server.state.ServiceOsSpecific;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.repository.VersionDefinitionXml;
 import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper;
@@ -83,6 +85,7 @@ import org.apache.commons.lang.math.NumberUtils;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
+import com.google.gson.Gson;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.persist.Transactional;
@@ -171,12 +174,20 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou
   @Inject
   private static RepositoryVersionHelper repoVersionHelper;
 
-
+  @Inject
+  private static Gson gson;
 
   @Inject
   private static Provider<Clusters> clusters;
 
   /**
+   * Used for updating the existing stack tools with those of the stack being
+   * distributed.
+   */
+  @Inject
+  private static Provider<ConfigHelper> configHelperProvider;
+
+  /**
    * Constructor.
    */
   public ClusterStackVersionResourceProvider(
@@ -287,8 +298,6 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou
 
     String clName;
     final String desiredRepoVersion;
-    String stackName;
-    String stackVersion;
 
     Map<String, Object> propertyMap = iterator.next();
 
@@ -327,30 +336,30 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou
           cluster.getClusterName(), entity.getDirection().getText(false)));
     }
 
-    Set<StackId> stackIds = new HashSet<>();
-    if (propertyMap.containsKey(CLUSTER_STACK_VERSION_STACK_PROPERTY_ID) &&
-            propertyMap.containsKey(CLUSTER_STACK_VERSION_VERSION_PROPERTY_ID)) {
-      stackName = (String) propertyMap.get(CLUSTER_STACK_VERSION_STACK_PROPERTY_ID);
-      stackVersion = (String) propertyMap.get(CLUSTER_STACK_VERSION_VERSION_PROPERTY_ID);
-      StackId stackId = new StackId(stackName, stackVersion);
-      if (! ami.isSupportedStack(stackName, stackVersion)) {
-        throw new NoSuchParentResourceException(String.format("Stack %s is not supported",
-                stackId));
-      }
-      stackIds.add(stackId);
-    } else { // Using stack that is current for cluster
-      for (Service service : cluster.getServices().values()) {
-        stackIds.add(service.getDesiredStackId());
-      }
+    String stackName = (String) propertyMap.get(CLUSTER_STACK_VERSION_STACK_PROPERTY_ID);
+    String stackVersion = (String) propertyMap.get(CLUSTER_STACK_VERSION_VERSION_PROPERTY_ID);
+    if (StringUtils.isBlank(stackName) || StringUtils.isBlank(stackVersion)) {
+      String message = String.format(
+          "Both the %s and %s properties are required when distributing a new stack",
+          CLUSTER_STACK_VERSION_STACK_PROPERTY_ID, CLUSTER_STACK_VERSION_VERSION_PROPERTY_ID);
+
+      throw new SystemException(message);
     }
 
-    if (stackIds.size() > 1) {
-      throw new SystemException("Could not determine stack to add out of " + StringUtils.join(stackIds, ','));
+    StackId stackId = new StackId(stackName, stackVersion);
+
+    if (!ami.isSupportedStack(stackName, stackVersion)) {
+      throw new NoSuchParentResourceException(String.format("Stack %s is not supported", stackId));
     }
 
-    StackId stackId = stackIds.iterator().next();
-    stackName = stackId.getStackName();
-    stackVersion = stackId.getStackVersion();
+    // bootstrap the stack tools if necessary for the stack which is being
+    // distributed
+    try {
+      bootstrapStackTools(stackId, cluster);
+    } catch (AmbariException ambariException) {
+      throw new SystemException("Unable to modify stack tools for new stack being distributed",
+          ambariException);
+    }
 
     RepositoryVersionEntity repoVersionEntity = repositoryVersionDAO.findByStackAndVersion(
         stackId, desiredRepoVersion);
@@ -580,6 +589,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou
     }
 
     // determine packages for all services that are installed on host
+    List<ServiceOsSpecific.Package> packages = new ArrayList<>();
     Set<String> servicesOnHost = new HashSet<>();
     List<ServiceComponentHost> components = cluster.getServiceComponentHosts(host.getHostName());
     for (ServiceComponentHost component : components) {
@@ -600,16 +610,15 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou
     RequestResourceFilter filter = new RequestResourceFilter(null, null,
             Collections.singletonList(host.getHostName()));
 
-    ActionExecutionContext actionContext = new ActionExecutionContext(
-            cluster.getClusterName(), INSTALL_PACKAGES_ACTION,
-            Collections.singletonList(filter),
-            roleParams);
+    ActionExecutionContext actionContext = new ActionExecutionContext(cluster.getClusterName(),
+        INSTALL_PACKAGES_ACTION, Collections.singletonList(filter), roleParams);
+
+    actionContext.setStackId(stackId);
     actionContext.setTimeout(Short.valueOf(configuration.getDefaultAgentTaskTimeout(true)));
 
     repoVersionHelper.addCommandRepository(actionContext, osFamily, repoVersion, repoInfo);
 
     return actionContext;
-
   }
 
 
@@ -698,4 +707,100 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou
   }
 
 
+  /**
+   * Ensures that the stack tools and stack features are set on
+   * {@link ConfigHelper#CLUSTER_ENV} for the stack of the repository being
+   * distributed. This step ensures that the new repository can be distributed
+   * with the correct tools.
+   * <p/>
+   * If the cluster's current stack name matches that of the new stack or the
+   * new stack's tools are already added in the configuration, then this method
+   * will not change anything.
+   *
+   * @param stackId
+   *          the stack of the repository being distributed (not {@code null}).
+   * @param cluster
+   *          the cluster the new stack/repo is being distributed for (not
+   *          {@code null}).
+   * @throws AmbariException
+   */
+  private void bootstrapStackTools(StackId stackId, Cluster cluster) throws AmbariException {
+    // if the stack name is the same as the cluster's current stack name, then
+    // there's no work to do
+    if (StringUtils.equals(stackId.getStackName(),
+        cluster.getCurrentStackVersion().getStackName())) {
+      return;
+    }
+
+    ConfigHelper configHelper = configHelperProvider.get();
+
+    // get the stack tools/features for the stack being distributed
+    Map<String, Map<String, String>> defaultStackConfigurationsByType = configHelper.getDefaultStackProperties(stackId);
+
+    Map<String, String> clusterEnvDefaults = defaultStackConfigurationsByType.get(
+        ConfigHelper.CLUSTER_ENV);
+
+    Config clusterEnv = cluster.getDesiredConfigByType(ConfigHelper.CLUSTER_ENV);
+    Map<String, String> clusterEnvProperties = clusterEnv.getProperties();
+
+    // the 3 properties we need to check and update
+    Set<String> properties = Sets.newHashSet(ConfigHelper.CLUSTER_ENV_STACK_ROOT_PROPERTY,
+        ConfigHelper.CLUSTER_ENV_STACK_TOOLS_PROPERTY,
+        ConfigHelper.CLUSTER_ENV_STACK_FEATURES_PROPERTY);
+
+    // any updates are stored here and merged into the existing config type
+    Map<String, String> updatedProperties = new HashMap<>();
+
+    for (String property : properties) {
+      // determine if the property exists in the stack being distributed (it
+      // kind of has to, but we'll be safe if it's not found)
+      String newStackDefaultJson = clusterEnvDefaults.get(property);
+      if (StringUtils.isBlank(newStackDefaultJson)) {
+        continue;
+      }
+
+      String existingPropertyJson = clusterEnvProperties.get(property);
+
+      // if the stack tools/features property doesn't exist, then just set the
+      // one from the new stack
+      if (StringUtils.isBlank(existingPropertyJson)) {
+        updatedProperties.put(property, newStackDefaultJson);
+        continue;
+      }
+
+      // now is the hard part - we need to check to see if the new stack tools
+      // exists alongside the current tools and if it doesn't, then add the new
+      // tools in
+      final Map<String, Object> existingJson;
+      final Map<String, ?> newStackJsonAsObject;
+      if (StringUtils.equals(property, ConfigHelper.CLUSTER_ENV_STACK_ROOT_PROPERTY)) {
+        existingJson = gson.<Map<String, Object>> fromJson(existingPropertyJson, Map.class);
+        newStackJsonAsObject = gson.<Map<String, String>> fromJson(newStackDefaultJson, Map.class);
+      } else {
+        existingJson = gson.<Map<String, Object>> fromJson(existingPropertyJson,
+            Map.class);
+
+        newStackJsonAsObject = gson.<Map<String, Map<Object, Object>>> fromJson(newStackDefaultJson,
+            Map.class);
+      }
+
+      if (existingJson.keySet().contains(stackId.getStackName())) {
+        continue;
+      }
+
+      existingJson.put(stackId.getStackName(), newStackJsonAsObject.get(stackId.getStackName()));
+
+      String newJson = gson.toJson(existingJson);
+      updatedProperties.put(property, newJson);
+    }
+
+    if (!updatedProperties.isEmpty()) {
+      AmbariManagementController amc = getManagementController();
+      String serviceNote = String.format(
+          "Adding stack tools for %s while distributing a new repository", stackId.toString());
+
+      configHelper.updateConfigType(cluster, stackId, amc, clusterEnv.getType(), updatedProperties,
+          null, amc.getAuthName(), serviceNote);
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index 9f75bf9..a3a676d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -88,8 +88,10 @@ public class ConfigHelper {
   public static final String CLUSTER_ENV_RETRY_COMMANDS = "commands_to_retry";
   public static final String CLUSTER_ENV_RETRY_MAX_TIME_IN_SEC = "command_retry_max_time_in_sec";
   public static final String COMMAND_RETRY_MAX_TIME_IN_SEC_DEFAULT = "600";
+  public static final String CLUSTER_ENV_STACK_NAME_PROPERTY = "stack_name";
   public static final String CLUSTER_ENV_STACK_FEATURES_PROPERTY = "stack_features";
   public static final String CLUSTER_ENV_STACK_TOOLS_PROPERTY = "stack_tools";
+  public static final String CLUSTER_ENV_STACK_ROOT_PROPERTY = "stack_root";
 
   public static final String HTTP_ONLY = "HTTP_ONLY";
   public static final String HTTPS_ONLY = "HTTPS_ONLY";
@@ -1148,6 +1150,36 @@ public class ConfigHelper {
    *
    * @param stack
    *          the stack to pull stack-values from (not {@code null})
+   * @return a mapping of configuration type to map of key/value pairs for the
+   *         default configurations.
+   * @throws AmbariException
+   */
+  public Map<String, Map<String, String>> getDefaultStackProperties(StackId stack)
+      throws AmbariException {
+    Map<String, Map<String, String>> defaultPropertiesByType = new HashMap<>();
+
+    // populate the stack (non-service related) properties
+    Set<org.apache.ambari.server.state.PropertyInfo> stackConfigurationProperties = ambariMetaInfo.getStackProperties(
+        stack.getStackName(), stack.getStackVersion());
+
+    for (PropertyInfo stackDefaultProperty : stackConfigurationProperties) {
+      String type = ConfigHelper.fileNameToConfigType(stackDefaultProperty.getFilename());
+
+      if (!defaultPropertiesByType.containsKey(type)) {
+        defaultPropertiesByType.put(type, new HashMap<String, String>());
+      }
+
+      defaultPropertiesByType.get(type).put(stackDefaultProperty.getName(),
+          stackDefaultProperty.getValue());
+    }
+
+    return defaultPropertiesByType;
+  }
+
+  /**
+   *
+   * @param stack
+   *          the stack to pull stack-values from (not {@code null})
    * @param serviceName
    *          the service name {@code null}).
    * @return a mapping of configuration type to map of key/value pairs for the

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
index 0467b9b..9b64edc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
@@ -69,6 +69,7 @@ import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.ConfigFactory;
+import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.Host;
 import org.apache.ambari.server.state.SecurityType;
@@ -80,6 +81,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Sets;
+import com.google.inject.Provider;
 
 
 /**
@@ -100,6 +102,12 @@ public class AmbariContext {
   @Inject
   ConfigFactory configFactory;
 
+  /**
+   * Used for getting configuration property values from stack and services.
+   */
+  @Inject
+  private Provider<ConfigHelper> configHelper;
+
   private static AmbariManagementController controller;
   private static ClusterController clusterController;
   //todo: task id's.  Use existing mechanism for getting next task id sequence
@@ -674,6 +682,16 @@ public class AmbariContext {
     return String.format("%s:%s", bpName, hostGroupName);
   }
 
+  /**
+   * Gets an instance of {@link ConfigHelper} for classes which are not
+   * dependency injected.
+   *
+   * @return a {@link ConfigHelper} instance.
+   */
+  public ConfigHelper getConfigHelper() {
+    return configHelper.get();
+  }
+
   private synchronized HostResourceProvider getHostResourceProvider() {
     if (hostResourceProvider == null) {
       hostResourceProvider = (HostResourceProvider)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java
index 74f8f35..fa3aea3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java
@@ -18,10 +18,20 @@
 package org.apache.ambari.server.upgrade;
 
 import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.orm.DBAccessor.DBColumnInfo;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+import org.apache.ambari.server.state.ConfigHelper;
+import org.apache.ambari.server.state.PropertyInfo;
+import org.apache.hadoop.metrics2.sink.relocated.commons.lang.StringUtils;
 
+import com.google.common.collect.Sets;
 import com.google.inject.Inject;
 import com.google.inject.Injector;
 
@@ -33,6 +43,8 @@ public class UpgradeCatalog252 extends AbstractUpgradeCatalog {
   static final String CLUSTERCONFIG_TABLE = "clusterconfig";
   static final String SERVICE_DELETED_COLUMN = "service_deleted";
 
+  private static final String CLUSTER_ENV = "cluster-env";
+
   /**
    * Constructor.
    *
@@ -79,6 +91,7 @@ public class UpgradeCatalog252 extends AbstractUpgradeCatalog {
    */
   @Override
   protected void executeDMLUpdates() throws AmbariException, SQLException {
+    resetStackToolsAndFeatures();
   }
 
   /**
@@ -91,4 +104,52 @@ public class UpgradeCatalog252 extends AbstractUpgradeCatalog {
     dbAccessor.addColumn(CLUSTERCONFIG_TABLE,
         new DBColumnInfo(SERVICE_DELETED_COLUMN, Short.class, null, 0, false));
   }
+
+  /**
+   * Resets the following properties in {@code cluster-env} to their new
+   * defaults:
+   * <ul>
+   * <li>stack_root
+   * <li>stack_tools
+   * <li>stack_features
+   * <ul>
+   *
+   * @throws AmbariException
+   */
+  private void resetStackToolsAndFeatures() throws AmbariException {
+    Set<String> propertiesToReset = Sets.newHashSet("stack_tools", "stack_features", "stack_root");
+
+    Clusters clusters = injector.getInstance(Clusters.class);
+    ConfigHelper configHelper = injector.getInstance(ConfigHelper.class);
+
+    Map<String, Cluster> clusterMap = clusters.getClusters();
+    for (Cluster cluster : clusterMap.values()) {
+      Config clusterEnv = cluster.getDesiredConfigByType(CLUSTER_ENV);
+      if (null == clusterEnv) {
+        continue;
+      }
+
+      Map<String, String> newStackProperties = new HashMap<>();
+      Set<PropertyInfo> stackProperties = configHelper.getStackProperties(cluster);
+      if (null == stackProperties) {
+        continue;
+      }
+
+      for (PropertyInfo propertyInfo : stackProperties) {
+        String fileName = propertyInfo.getFilename();
+        if (StringUtils.isEmpty(fileName)) {
+          continue;
+        }
+
+        if (StringUtils.equals(ConfigHelper.fileNameToConfigType(fileName), CLUSTER_ENV)) {
+          String stackPropertyName = propertyInfo.getName();
+          if (propertiesToReset.contains(stackPropertyName)) {
+            newStackProperties.put(stackPropertyName, propertyInfo.getValue());
+          }
+        }
+      }
+
+      updateConfigurationPropertiesForCluster(cluster, CLUSTER_ENV, newStackProperties, true, false);
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
index 32df7d3..5b4fd68 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
@@ -27,6 +27,7 @@ import logging
 from resource_management.core import global_lock
 from resource_management.libraries.functions import format
 from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.functions import stack_tools
 from resource_management.core.resources import Execute
 from resource_management.core.signal_utils import TerminateStrategy
 from ambari_commons.os_check import OSConst
@@ -56,6 +57,7 @@ SMOKEUSER_PRINCIPAL_DEFAULT = 'ambari-qa@EXAMPLE.COM'
 SMOKEUSER_SCRIPT_PARAM_KEY = 'default.smoke.user'
 SMOKEUSER_DEFAULT = 'ambari-qa'
 
+STACK_NAME = '{{cluster-env/stack_name}}'
 STACK_ROOT = '{{cluster-env/stack_root}}'
 
 HIVE_CONF_DIR_LEGACY = '/etc/hive/conf.server'
@@ -78,7 +80,7 @@ def get_tokens():
   """
   return (SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,
     HIVE_METASTORE_URIS_KEY, SMOKEUSER_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY,
-    STACK_ROOT)
+    STACK_NAME, STACK_ROOT)
 
 @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
 def get_tokens():
@@ -175,9 +177,10 @@ def execute(configurations={}, parameters={}, host_name=None):
     bin_dir = HIVE_BIN_DIR_LEGACY
 
 
-    if STACK_ROOT in configurations:
-      hive_conf_dir = configurations[STACK_ROOT] + format("/current/hive-metastore/conf")
-      hive_bin_dir = configurations[STACK_ROOT] + format("/current/hive-metastore/bin")
+    if STACK_NAME in configurations and STACK_ROOT in configurations:
+      stack_root = stack_tools.get_stack_root(configurations[STACK_NAME], configurations[STACK_ROOT])
+      hive_conf_dir = stack_root + format("/current/hive-metastore/conf")
+      hive_bin_dir = stack_root + format("/current/hive-metastore/bin")
 
       if os.path.exists(hive_conf_dir):
         conf_dir = hive_conf_dir

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_llap_app_status.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_llap_app_status.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_llap_app_status.py
index 98d1899..e46c896 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_llap_app_status.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_llap_app_status.py
@@ -26,7 +26,7 @@ import subprocess
 
 from resource_management.libraries.functions import format
 from resource_management.libraries.functions import get_kinit_path
-from ambari_commons.os_check import OSConst
+from resource_management.libraries.functions import stack_tools
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from resource_management.core import shell
 from resource_management.core.resources import Execute
@@ -58,6 +58,7 @@ HIVE_AUTHENTICATION_DEFAULT = 'NOSASL'
 HIVE_USER_KEY = '{{hive-env/hive_user}}'
 HIVE_USER_DEFAULT = 'default.smoke.user'
 
+STACK_NAME = '{{cluster-env/stack_name}}'
 STACK_ROOT = '{{cluster-env/stack_root}}'
 STACK_ROOT_DEFAULT = Script.get_stack_root()
 
@@ -88,7 +89,7 @@ def get_tokens():
   to build the dictionary passed into execute
   """
   return (SECURITY_ENABLED_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, HIVE_PRINCIPAL_KEY, HIVE_PRINCIPAL_KEYTAB_KEY,
-          HIVE_USER_KEY, STACK_ROOT, LLAP_APP_NAME_KEY)
+          HIVE_USER_KEY, STACK_NAME, STACK_ROOT, LLAP_APP_NAME_KEY)
 
 
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
@@ -159,8 +160,11 @@ def execute(configurations={}, parameters={}, host_name=None):
 
 
     start_time = time.time()
-    if STACK_ROOT in configurations:
-      llap_status_cmd = configurations[STACK_ROOT] + format("/current/hive-server2-hive2/bin/hive --service llapstatus --name {llap_app_name}  --findAppTimeout {LLAP_APP_STATUS_CMD_TIMEOUT}")
+    if STACK_NAME in configurations and STACK_ROOT in configurations:
+      stack_root = stack_tools.get_stack_root(configurations[STACK_NAME],
+        configurations[STACK_ROOT])
+
+      llap_status_cmd = stack_root + format("/current/hive-server2-hive2/bin/hive --service llapstatus --name {llap_app_name}  --findAppTimeout {LLAP_APP_STATUS_CMD_TIMEOUT}")
     else:
       llap_status_cmd = STACK_ROOT_DEFAULT + format("/current/hive-server2-hive2/bin/hive --service llapstatus --name {llap_app_name} --findAppTimeout {LLAP_APP_STATUS_CMD_TIMEOUT}")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
index 0e9fe74..54eef18 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
@@ -26,6 +26,7 @@ from resource_management.core.resources import Execute
 from resource_management.libraries.functions import format
 from resource_management.libraries.functions import get_kinit_path
 from resource_management.libraries.functions import get_klist_path
+from resource_management.libraries.functions import stack_tools
 from ambari_commons.os_check import OSConst, OSCheck
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from urlparse import urlparse
@@ -66,6 +67,7 @@ USER_PRINCIPAL_DEFAULT = 'oozie@EXAMPLE.COM'
 # default user
 USER_DEFAULT = 'oozie'
 
+STACK_NAME_KEY = '{{cluster-env/stack_name}}'
 STACK_ROOT_KEY = '{{cluster-env/stack_root}}'
 STACK_ROOT_DEFAULT = '/usr/hdp'
 
@@ -86,7 +88,7 @@ def get_tokens():
   to build the dictionary passed into execute
   """
   return (OOZIE_URL_KEY, USER_PRINCIPAL_KEY, SECURITY_ENABLED, USER_KEYTAB_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY,
-          USER_KEY, OOZIE_HTTPS_PORT, OOZIE_ENV_CONTENT, STACK_ROOT_KEY)
+          USER_KEY, OOZIE_HTTPS_PORT, OOZIE_ENV_CONTENT, STACK_NAME_KEY, STACK_ROOT_KEY)
 
 @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
 def get_check_command(oozie_url, host_name, configurations):
@@ -158,8 +160,8 @@ def get_check_command(oozie_url, host_name, configurations, parameters, only_kin
 
   # Configure stack root
   stack_root = STACK_ROOT_DEFAULT
-  if STACK_ROOT_KEY in configurations:
-    stack_root = configurations[STACK_ROOT_KEY].lower()
+  if STACK_NAME_KEY in configurations and STACK_ROOT_KEY in configurations:
+    stack_root = stack_tools.get_stack_root(configurations[STACK_NAME_KEY], configurations[STACK_ROOT_KEY]).lower()
 
   # oozie configuration directory using a symlink
   oozie_config_directory = OOZIE_CONF_DIR.replace(STACK_ROOT_PATTERN, stack_root)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/host_scripts/alert_disk_space.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/host_scripts/alert_disk_space.py b/ambari-server/src/main/resources/host_scripts/alert_disk_space.py
index 4c5834f..f3c6406 100644
--- a/ambari-server/src/main/resources/host_scripts/alert_disk_space.py
+++ b/ambari-server/src/main/resources/host_scripts/alert_disk_space.py
@@ -23,6 +23,7 @@ import os
 import platform
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from ambari_commons import OSConst
+from resource_management.libraries.functions import stack_tools
 
 DiskInfo = collections.namedtuple('DiskInfo', 'total used free path')
 
@@ -36,6 +37,7 @@ MIN_FREE_SPACE_DEFAULT = 5000000000L
 PERCENT_USED_WARNING_DEFAULT = 50
 PERCENT_USED_CRITICAL_DEFAULT = 80
 
+STACK_NAME = '{{cluster-env/stack_name}}'
 STACK_ROOT = '{{cluster-env/stack_root}}'
 
 def get_tokens():
@@ -43,7 +45,7 @@ def get_tokens():
   Returns a tuple of tokens in the format {{site/property}} that will be used
   to build the dictionary passed into execute
   """
-  return (STACK_ROOT, )
+  return (STACK_NAME, STACK_ROOT)
 
 
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
@@ -64,10 +66,10 @@ def execute(configurations={}, parameters={}, host_name=None):
   if configurations is None:
     return (('UNKNOWN', ['There were no configurations supplied to the script.']))
 
-  if not STACK_ROOT in configurations:
-    return (('STACK_ROOT', ['cluster-env/stack_root is not specified']))
+  if not STACK_NAME in configurations or not STACK_ROOT in configurations:
+    return (('STACK_ROOT', ['cluster-env/stack_name and cluster-env/stack_root are required']))
 
-  path = configurations[STACK_ROOT]
+  path = stack_tools.get_stack_root(configurations[STACK_NAME], configurations[STACK_ROOT])
 
   try:
     disk_usage = _get_disk_usage(path)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/host_scripts/alert_version_select.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/host_scripts/alert_version_select.py b/ambari-server/src/main/resources/host_scripts/alert_version_select.py
index 0ce79e7..f54ccad 100644
--- a/ambari-server/src/main/resources/host_scripts/alert_version_select.py
+++ b/ambari-server/src/main/resources/host_scripts/alert_version_select.py
@@ -31,6 +31,7 @@ RESULT_STATE_WARNING = 'WARNING'
 RESULT_STATE_CRITICAL = 'CRITICAL'
 RESULT_STATE_UNKNOWN = 'UNKNOWN'
 
+STACK_NAME = '{{cluster-env/stack_name}}'
 STACK_TOOLS = '{{cluster-env/stack_tools}}'
 
 
@@ -42,7 +43,7 @@ def get_tokens():
   Returns a tuple of tokens in the format {{site/property}} that will be used
   to build the dictionary passed into execute
   """
-  return (STACK_TOOLS,)
+  return (STACK_NAME, STACK_TOOLS)
 
 
 def execute(configurations={}, parameters={}, host_name=None):
@@ -65,8 +66,10 @@ def execute(configurations={}, parameters={}, host_name=None):
     if STACK_TOOLS not in configurations:
       return (RESULT_STATE_UNKNOWN, ['{0} is a required parameter for the script'.format(STACK_TOOLS)])
 
+    stack_name = Script.get_stack_name()
+
     # Of the form,
-    # { "stack_selector": ["hdp-select", "/usr/bin/hdp-select", "hdp-select"], "conf_selector": ["conf-select", "/usr/bin/conf-select", "conf-select"] }
+    # { "HDP" : { "stack_selector": ["hdp-select", "/usr/bin/hdp-select", "hdp-select"], "conf_selector": ["conf-select", "/usr/bin/conf-select", "conf-select"] } }
     stack_tools_str = configurations[STACK_TOOLS]
 
     if stack_tools_str is None:
@@ -75,6 +78,7 @@ def execute(configurations={}, parameters={}, host_name=None):
     distro_select = "unknown-distro-select"
     try:
       stack_tools = json.loads(stack_tools_str)
+      stack_tools = stack_tools[stack_name]
       distro_select = stack_tools["stack_selector"][0]
     except:
       pass
@@ -87,18 +91,18 @@ def execute(configurations={}, parameters={}, host_name=None):
       (code, out, versions) = unsafe_get_stack_versions()
 
       if code == 0:
-        msg.append("Ok. {0}".format(distro_select))
+        msg.append("{0} ".format(distro_select))
         if versions is not None and type(versions) is list and len(versions) > 0:
-          msg.append("Versions: {0}".format(", ".join(versions)))
+          msg.append("reported the following versions: {0}".format(", ".join(versions)))
         return (RESULT_STATE_OK, ["\n".join(msg)])
       else:
-        msg.append("Failed, check dir {0} for unexpected contents.".format(stack_root_dir))
+        msg.append("{0} could not properly read {1}. Check this directory for unexpected contents.".format(distro_select, stack_root_dir))
         if out is not None:
           msg.append(out)
 
         return (RESULT_STATE_CRITICAL, ["\n".join(msg)])
     else:
-      msg.append("Ok. No stack root {0} to check.".format(stack_root_dir))
+      msg.append("No stack root {0} to check.".format(stack_root_dir))
       return (RESULT_STATE_OK, ["\n".join(msg)])
   except Exception, e:
     return (RESULT_STATE_CRITICAL, [e.message])

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
index f7d5de5..e6ec285 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
@@ -220,6 +220,18 @@ gpgcheck=0</value>
     </value-attributes>
     <on-ambari-upgrade add="true"/>
   </property>
+  <!-- Define stack_name property in the base stack. DO NOT override this property for each stack version -->
+  <property>
+    <name>stack_name</name>
+    <value>HDP</value>
+    <description>The name of the stack.</description>
+    <value-attributes>
+      <read-only>true</read-only>
+      <overridable>false</overridable>
+      <visible>false</visible>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
   <!-- Define stack_tools property in the base stack. DO NOT override this property for each stack version -->
   <property>
     <name>stack_tools</name>
@@ -252,8 +264,8 @@ gpgcheck=0</value>
   </property>
   <property>
     <name>stack_root</name>
-    <value>/usr/hdp</value>
-    <description>Stack root folder</description>
+    <value>{"HDP":"/usr/hdp"}</value>
+    <description>JSON which defines the stack root by stack name</description>
     <value-attributes>
       <read-only>true</read-only>
       <overridable>false</overridable>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
index 878645b..31cf0c8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
@@ -1,427 +1,429 @@
 {
-  "stack_features": [
-    {
-      "name": "snappy",
-      "description": "Snappy compressor/decompressor support",
-      "min_version": "2.0.0.0",
-      "max_version": "2.2.0.0"
-    },
-    {
-      "name": "lzo",
-      "description": "LZO libraries support",
-      "min_version": "2.2.1.0"
-    },
-    {
-      "name": "express_upgrade",
-      "description": "Express upgrade support",
-      "min_version": "2.1.0.0"
-    },
-    {
-      "name": "rolling_upgrade",
-      "description": "Rolling upgrade support",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "kafka_acl_migration_support",
-      "description": "ACL migration support",
-      "min_version": "2.3.4.0"
-    },
-    {
-      "name": "secure_zookeeper",
-      "description": "Protect ZNodes with SASL acl in secure clusters",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "config_versioning",
-      "description": "Configurable versions support",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "datanode_non_root",
-      "description": "DataNode running as non-root support (AMBARI-7615)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "remove_ranger_hdfs_plugin_env",
-      "description": "HDFS removes Ranger env files (AMBARI-14299)",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "ranger",
-      "description": "Ranger Service support",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "ranger_tagsync_component",
-      "description": "Ranger Tagsync component support (AMBARI-14383)",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "phoenix",
-      "description": "Phoenix Service support",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "nfs",
-      "description": "NFS support",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "tez_for_spark",
-      "description": "Tez dependency for Spark",
-      "min_version": "2.2.0.0",
-      "max_version": "2.3.0.0"
-    },
-    {
-      "name": "timeline_state_store",
-      "description": "Yarn application timeline-service supports state store property (AMBARI-11442)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "copy_tarball_to_hdfs",
-      "description": "Copy tarball to HDFS support (AMBARI-12113)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "spark_16plus",
-      "description": "Spark 1.6+",
-      "min_version": "2.4.0.0"
-    },
-    {
-      "name": "spark_thriftserver",
-      "description": "Spark Thrift Server",
-      "min_version": "2.3.2.0"
-    },
-    {
-      "name": "storm_kerberos",
-      "description": "Storm Kerberos support (AMBARI-7570)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "storm_ams",
-      "description": "Storm AMS integration (AMBARI-10710)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "create_kafka_broker_id",
-      "description": "Ambari should create Kafka Broker Id (AMBARI-12678)",
-      "min_version": "2.2.0.0",
-      "max_version": "2.3.0.0"
-    },
-    {
-      "name": "kafka_listeners",
-      "description": "Kafka listeners (AMBARI-10984)",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "kafka_kerberos",
-      "description": "Kafka Kerberos support (AMBARI-10984)",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "pig_on_tez",
-      "description": "Pig on Tez support (AMBARI-7863)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "ranger_usersync_non_root",
-      "description": "Ranger Usersync as non-root user (AMBARI-10416)",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "ranger_audit_db_support",
-      "description": "Ranger Audit to DB support",
-      "min_version": "2.2.0.0",
-      "max_version": "2.4.99.99"
-    },
-    {
-      "name": "accumulo_kerberos_user_auth",
-      "description": "Accumulo Kerberos User Auth (AMBARI-10163)",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "knox_versioned_data_dir",
-      "description": "Use versioned data dir for Knox (AMBARI-13164)",
-      "min_version": "2.3.2.0"
-    },
-    {
-      "name": "knox_sso_topology",
-      "description": "Knox SSO Topology support (AMBARI-13975)",
-      "min_version": "2.3.8.0"
-    },
-    {
-      "name": "atlas_rolling_upgrade",
-      "description": "Rolling upgrade support for Atlas",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "oozie_admin_user",
-      "description": "Oozie install user as an Oozie admin user (AMBARI-7976)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "oozie_create_hive_tez_configs",
-      "description": "Oozie create configs for Ambari Hive and Tez deployments (AMBARI-8074)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "oozie_setup_shared_lib",
-      "description": "Oozie setup tools used to shared Oozie lib to HDFS (AMBARI-7240)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "oozie_host_kerberos",
-      "description": "Oozie in secured clusters uses _HOST in Kerberos principal (AMBARI-9775)",
-      "min_version": "2.0.0.0"
-    },
-    {
-      "name": "falcon_extensions",
-      "description": "Falcon Extension",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "hive_metastore_upgrade_schema",
-      "description": "Hive metastore upgrade schema support (AMBARI-11176)",
-      "min_version": "2.3.0.0"
-     },
-    {
-      "name": "hive_server_interactive",
-      "description": "Hive server interactive support (AMBARI-15573)",
-      "min_version": "2.5.0.0"
-     },
-    {
-      "name": "hive_webhcat_specific_configs",
-      "description": "Hive webhcat specific configurations support (AMBARI-12364)",
-      "min_version": "2.3.0.0"
-     },
-    {
-      "name": "hive_purge_table",
-      "description": "Hive purge table support (AMBARI-12260)",
-      "min_version": "2.3.0.0"
-     },
-    {
-      "name": "hive_server2_kerberized_env",
-      "description": "Hive server2 working on kerberized environment (AMBARI-13749)",
-      "min_version": "2.2.3.0",
-      "max_version": "2.2.5.0"
-     },
-    {
-      "name": "hive_env_heapsize",
-      "description": "Hive heapsize property defined in hive-env (AMBARI-12801)",
-      "min_version": "2.2.0.0"
-    },
-    {
-      "name": "ranger_kms_hsm_support",
-      "description": "Ranger KMS HSM support (AMBARI-15752)",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "ranger_log4j_support",
-      "description": "Ranger supporting log-4j properties (AMBARI-15681)",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "ranger_kerberos_support",
-      "description": "Ranger Kerberos support",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "hive_metastore_site_support",
-      "description": "Hive Metastore site support",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "ranger_usersync_password_jceks",
-      "description": "Saving Ranger Usersync credentials in jceks",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "ranger_install_infra_client",
-      "description": "Ambari Infra Service support",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "falcon_atlas_support_2_3",
-      "description": "Falcon Atlas integration support for 2.3 stack",
-      "min_version": "2.3.99.0",
-      "max_version": "2.4.0.0"
-    },
-    {
-      "name": "falcon_atlas_support",
-      "description": "Falcon Atlas integration",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "hbase_home_directory",
-      "description": "Hbase home directory in HDFS needed for HBASE backup",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "spark_livy",
-      "description": "Livy as slave component of spark",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "spark_livy2",
-      "description": "Livy as slave component of spark",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "atlas_ranger_plugin_support",
-      "description": "Atlas Ranger plugin support",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "atlas_conf_dir_in_path",
-      "description": "Prepend the Atlas conf dir (/etc/atlas/conf) to the classpath of Storm and Falcon",
-      "min_version": "2.3.0.0",
-      "max_version": "2.4.99.99"
-    },
-    {
-      "name": "atlas_upgrade_support",
-      "description": "Atlas supports express and rolling upgrades",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "atlas_hook_support",
-      "description": "Atlas support for hooks in Hive, Storm, Falcon, and Sqoop",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "ranger_pid_support",
-      "description": "Ranger Service support pid generation AMBARI-16756",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "ranger_kms_pid_support",
-      "description": "Ranger KMS Service support pid generation",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "ranger_admin_password_change",
-      "description": "Allow ranger admin credentials to be specified during cluster creation (AMBARI-17000)",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "ranger_setup_db_on_start",
-      "description": "Allows setup of ranger db and java patches to be called multiple times on each START",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "storm_metrics_apache_classes",
-      "description": "Metrics sink for Storm that uses Apache class names",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "spark_java_opts_support",
-      "description": "Allow Spark to generate java-opts file",
-      "min_version": "2.2.0.0",
-      "max_version": "2.4.0.0"
-    },
-    {
-      "name": "atlas_hbase_setup",
-      "description": "Use script to create Atlas tables in Hbase and set permissions for Atlas user.",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "ranger_hive_plugin_jdbc_url",
-      "description": "Handle Ranger hive repo config jdbc url change for stack 2.5 (AMBARI-18386)",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "zkfc_version_advertised",
-      "description": "ZKFC advertise version",
-      "min_version": "2.5.0.0"
-    },
-    {
-      "name": "phoenix_core_hdfs_site_required",
-      "description": "HDFS and CORE site required for Phoenix",
-      "max_version": "2.5.9.9"
-    },
-    {
-      "name": "ranger_tagsync_ssl_xml_support",
-      "description": "Ranger Tagsync ssl xml support.",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "ranger_xml_configuration",
-      "description": "Ranger code base support xml configurations",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "kafka_ranger_plugin_support",
-      "description": "Ambari stack changes for Ranger Kafka Plugin (AMBARI-11299)",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "yarn_ranger_plugin_support",
-      "description": "Implement Stack changes for Ranger Yarn Plugin integration (AMBARI-10866)",
-      "min_version": "2.3.0.0"
-    },
-    {
-      "name": "ranger_solr_config_support",
-      "description": "Showing Ranger solrconfig.xml on UI",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "hive_interactive_atlas_hook_required",
-      "description": "Registering Atlas Hook for Hive Interactive.",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "core_site_for_ranger_plugins",
-      "description": "Adding core-site.xml in when Ranger plugin is enabled for Storm, Kafka, and Knox.",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "atlas_install_hook_package_support",
-      "description": "Stop installing packages from 2.6",
-      "max_version": "2.5.9.9"
-    },
-    {
-      "name": "atlas_hdfs_site_on_namenode_ha",
-      "description": "Need to create hdfs-site under atlas-conf dir when Namenode-HA is enabled.",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "hive_interactive_ga",
-      "description": "Hive Interactive GA support",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "secure_ranger_ssl_password",
-      "description": "Securing Ranger Admin and Usersync SSL and Trustore related passwords in jceks",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "ranger_kms_ssl",
-      "description": "Ranger KMS SSL properties in ambari stack",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "nifi_encrypt_config",
-      "description": "Encrypt sensitive properties written to nifi property file",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "toolkit_config_update",
-      "description": "Support separate input and output for toolkit configuration",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "admin_toolkit_support",
-      "description": "Supports the nifi admin toolkit",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "tls_toolkit_san",
-      "description": "Support subject alternative name flag",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "nifi_jaas_conf_create",
-      "description": "Create NIFI jaas configuration when kerberos is enabled",
-      "min_version": "2.6.0.0"
-    }
-  ]
+  "HDP": {
+    "stack_features": [
+      {
+        "name": "snappy",
+        "description": "Snappy compressor/decompressor support",
+        "min_version": "2.0.0.0",
+        "max_version": "2.2.0.0"
+      },
+      {
+        "name": "lzo",
+        "description": "LZO libraries support",
+        "min_version": "2.2.1.0"
+      },
+      {
+        "name": "express_upgrade",
+        "description": "Express upgrade support",
+        "min_version": "2.1.0.0"
+      },
+      {
+        "name": "rolling_upgrade",
+        "description": "Rolling upgrade support",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "kafka_acl_migration_support",
+        "description": "ACL migration support",
+        "min_version": "2.3.4.0"
+      },
+      {
+        "name": "secure_zookeeper",
+        "description": "Protect ZNodes with SASL acl in secure clusters",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "config_versioning",
+        "description": "Configurable versions support",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "datanode_non_root",
+        "description": "DataNode running as non-root support (AMBARI-7615)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "remove_ranger_hdfs_plugin_env",
+        "description": "HDFS removes Ranger env files (AMBARI-14299)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "ranger",
+        "description": "Ranger Service support",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "ranger_tagsync_component",
+        "description": "Ranger Tagsync component support (AMBARI-14383)",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "phoenix",
+        "description": "Phoenix Service support",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "nfs",
+        "description": "NFS support",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "tez_for_spark",
+        "description": "Tez dependency for Spark",
+        "min_version": "2.2.0.0",
+        "max_version": "2.3.0.0"
+      },
+      {
+        "name": "timeline_state_store",
+        "description": "Yarn application timeline-service supports state store property (AMBARI-11442)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "copy_tarball_to_hdfs",
+        "description": "Copy tarball to HDFS support (AMBARI-12113)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "spark_16plus",
+        "description": "Spark 1.6+",
+        "min_version": "2.4.0.0"
+      },
+      {
+        "name": "spark_thriftserver",
+        "description": "Spark Thrift Server",
+        "min_version": "2.3.2.0"
+      },
+      {
+        "name": "storm_kerberos",
+        "description": "Storm Kerberos support (AMBARI-7570)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "storm_ams",
+        "description": "Storm AMS integration (AMBARI-10710)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "create_kafka_broker_id",
+        "description": "Ambari should create Kafka Broker Id (AMBARI-12678)",
+        "min_version": "2.2.0.0",
+        "max_version": "2.3.0.0"
+      },
+      {
+        "name": "kafka_listeners",
+        "description": "Kafka listeners (AMBARI-10984)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "kafka_kerberos",
+        "description": "Kafka Kerberos support (AMBARI-10984)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "pig_on_tez",
+        "description": "Pig on Tez support (AMBARI-7863)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "ranger_usersync_non_root",
+        "description": "Ranger Usersync as non-root user (AMBARI-10416)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "ranger_audit_db_support",
+        "description": "Ranger Audit to DB support",
+        "min_version": "2.2.0.0",
+        "max_version": "2.4.99.99"
+      },
+      {
+        "name": "accumulo_kerberos_user_auth",
+        "description": "Accumulo Kerberos User Auth (AMBARI-10163)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "knox_versioned_data_dir",
+        "description": "Use versioned data dir for Knox (AMBARI-13164)",
+        "min_version": "2.3.2.0"
+      },
+      {
+        "name": "knox_sso_topology",
+        "description": "Knox SSO Topology support (AMBARI-13975)",
+        "min_version": "2.3.8.0"
+      },
+      {
+        "name": "atlas_rolling_upgrade",
+        "description": "Rolling upgrade support for Atlas",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "oozie_admin_user",
+        "description": "Oozie install user as an Oozie admin user (AMBARI-7976)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "oozie_create_hive_tez_configs",
+        "description": "Oozie create configs for Ambari Hive and Tez deployments (AMBARI-8074)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "oozie_setup_shared_lib",
+        "description": "Oozie setup tools used to shared Oozie lib to HDFS (AMBARI-7240)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "oozie_host_kerberos",
+        "description": "Oozie in secured clusters uses _HOST in Kerberos principal (AMBARI-9775)",
+        "min_version": "2.0.0.0"
+      },
+      {
+        "name": "falcon_extensions",
+        "description": "Falcon Extension",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "hive_metastore_upgrade_schema",
+        "description": "Hive metastore upgrade schema support (AMBARI-11176)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "hive_server_interactive",
+        "description": "Hive server interactive support (AMBARI-15573)",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "hive_webhcat_specific_configs",
+        "description": "Hive webhcat specific configurations support (AMBARI-12364)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "hive_purge_table",
+        "description": "Hive purge table support (AMBARI-12260)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "hive_server2_kerberized_env",
+        "description": "Hive server2 working on kerberized environment (AMBARI-13749)",
+        "min_version": "2.2.3.0",
+        "max_version": "2.2.5.0"
+      },
+      {
+        "name": "hive_env_heapsize",
+        "description": "Hive heapsize property defined in hive-env (AMBARI-12801)",
+        "min_version": "2.2.0.0"
+      },
+      {
+        "name": "ranger_kms_hsm_support",
+        "description": "Ranger KMS HSM support (AMBARI-15752)",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "ranger_log4j_support",
+        "description": "Ranger supporting log-4j properties (AMBARI-15681)",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "ranger_kerberos_support",
+        "description": "Ranger Kerberos support",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "hive_metastore_site_support",
+        "description": "Hive Metastore site support",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "ranger_usersync_password_jceks",
+        "description": "Saving Ranger Usersync credentials in jceks",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "ranger_install_infra_client",
+        "description": "Ambari Infra Service support",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "falcon_atlas_support_2_3",
+        "description": "Falcon Atlas integration support for 2.3 stack",
+        "min_version": "2.3.99.0",
+        "max_version": "2.4.0.0"
+      },
+      {
+        "name": "falcon_atlas_support",
+        "description": "Falcon Atlas integration",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "hbase_home_directory",
+        "description": "Hbase home directory in HDFS needed for HBASE backup",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "spark_livy",
+        "description": "Livy as slave component of spark",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "spark_livy2",
+        "description": "Livy as slave component of spark",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "atlas_ranger_plugin_support",
+        "description": "Atlas Ranger plugin support",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "atlas_conf_dir_in_path",
+        "description": "Prepend the Atlas conf dir (/etc/atlas/conf) to the classpath of Storm and Falcon",
+        "min_version": "2.3.0.0",
+        "max_version": "2.4.99.99"
+      },
+      {
+        "name": "atlas_upgrade_support",
+        "description": "Atlas supports express and rolling upgrades",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "atlas_hook_support",
+        "description": "Atlas support for hooks in Hive, Storm, Falcon, and Sqoop",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "ranger_pid_support",
+        "description": "Ranger Service support pid generation AMBARI-16756",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "ranger_kms_pid_support",
+        "description": "Ranger KMS Service support pid generation",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "ranger_admin_password_change",
+        "description": "Allow ranger admin credentials to be specified during cluster creation (AMBARI-17000)",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "ranger_setup_db_on_start",
+        "description": "Allows setup of ranger db and java patches to be called multiple times on each START",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "storm_metrics_apache_classes",
+        "description": "Metrics sink for Storm that uses Apache class names",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "spark_java_opts_support",
+        "description": "Allow Spark to generate java-opts file",
+        "min_version": "2.2.0.0",
+        "max_version": "2.4.0.0"
+      },
+      {
+        "name": "atlas_hbase_setup",
+        "description": "Use script to create Atlas tables in Hbase and set permissions for Atlas user.",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "ranger_hive_plugin_jdbc_url",
+        "description": "Handle Ranger hive repo config jdbc url change for stack 2.5 (AMBARI-18386)",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "zkfc_version_advertised",
+        "description": "ZKFC advertise version",
+        "min_version": "2.5.0.0"
+      },
+      {
+        "name": "phoenix_core_hdfs_site_required",
+        "description": "HDFS and CORE site required for Phoenix",
+        "max_version": "2.5.9.9"
+      },
+      {
+        "name": "ranger_tagsync_ssl_xml_support",
+        "description": "Ranger Tagsync ssl xml support.",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "ranger_xml_configuration",
+        "description": "Ranger code base support xml configurations",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "kafka_ranger_plugin_support",
+        "description": "Ambari stack changes for Ranger Kafka Plugin (AMBARI-11299)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "yarn_ranger_plugin_support",
+        "description": "Implement Stack changes for Ranger Yarn Plugin integration (AMBARI-10866)",
+        "min_version": "2.3.0.0"
+      },
+      {
+        "name": "ranger_solr_config_support",
+        "description": "Showing Ranger solrconfig.xml on UI",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "hive_interactive_atlas_hook_required",
+        "description": "Registering Atlas Hook for Hive Interactive.",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "core_site_for_ranger_plugins",
+        "description": "Adding core-site.xml in when Ranger plugin is enabled for Storm, Kafka, and Knox.",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "atlas_install_hook_package_support",
+        "description": "Stop installing packages from 2.6",
+        "max_version": "2.5.9.9"
+      },
+      {
+        "name": "atlas_hdfs_site_on_namenode_ha",
+        "description": "Need to create hdfs-site under atlas-conf dir when Namenode-HA is enabled.",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "hive_interactive_ga",
+        "description": "Hive Interactive GA support",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "secure_ranger_ssl_password",
+        "description": "Securing Ranger Admin and Usersync SSL and Trustore related passwords in jceks",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "ranger_kms_ssl",
+        "description": "Ranger KMS SSL properties in ambari stack",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "nifi_encrypt_config",
+        "description": "Encrypt sensitive properties written to nifi property file",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "toolkit_config_update",
+        "description": "Support separate input and output for toolkit configuration",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "admin_toolkit_support",
+        "description": "Supports the nifi admin toolkit",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "tls_toolkit_san",
+        "description": "Support subject alternative name flag",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "nifi_jaas_conf_create",
+        "description": "Create NIFI jaas configuration when kerberos is enabled",
+        "min_version": "2.6.0.0"
+      }
+    ]
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_tools.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_tools.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_tools.json
index d1aab4b..c515d57 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_tools.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_tools.json
@@ -1,4 +1,14 @@
 {
-  "stack_selector": ["hdp-select", "/usr/bin/hdp-select", "hdp-select"],
-  "conf_selector": ["conf-select", "/usr/bin/conf-select", "conf-select"]
-}
\ No newline at end of file
+  "HDP": {
+    "stack_selector": [
+      "hdp-select",
+      "/usr/bin/hdp-select",
+      "hdp-select"
+    ],
+    "conf_selector": [
+      "conf-select",
+      "/usr/bin/conf-select",
+      "conf-select"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml b/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml
index 7df00ee..f19ac52 100644
--- a/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml
+++ b/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml
@@ -20,6 +20,18 @@
  */
 -->
 <configuration>
+  <!-- Define stack_name property in the base stack. DO NOT override this property for each stack version -->
+  <property>
+    <name>stack_name</name>
+    <value>PERF</value>
+    <description>The name of the stack.</description>
+    <value-attributes>
+      <read-only>true</read-only>
+      <overridable>false</overridable>
+      <visible>false</visible>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
 
   <!-- Define stack_tools property in the base stack. DO NOT override this property for each stack version -->
   <property>
@@ -55,8 +67,8 @@
 
   <property>
     <name>stack_root</name>
-    <value>/usr/perf</value>
-    <description>Stack root folder</description>
+    <value>{"PERF":"/usr/perf"}</value>
+    <description>JSON which defines the stack root by stack name</description>  
     <value-attributes>
       <read-only>true</read-only>
       <overridable>false</overridable>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_features.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_features.json b/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_features.json
index e9e0ed2..839e8e6 100644
--- a/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_features.json
+++ b/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_features.json
@@ -1,19 +1,21 @@
 {
-  "stack_features": [
-    {
-      "name": "rolling_upgrade",
-      "description": "Rolling upgrade support",
-      "min_version": "1.0.0.0"
-    },
-    {
-      "name": "secure_zookeeper",
-      "description": "Protect ZNodes with SASL acl in secure clusters",
-      "min_version": "2.6.0.0"
-    },
-    {
-      "name": "config_versioning",
-      "description": "Configurable versions support",
-      "min_version": "1.0.0.0"
-    }
-  ]
-}
+  "PERF": {
+    "stack_features": [
+      {
+        "name": "rolling_upgrade",
+        "description": "Rolling upgrade support",
+        "min_version": "1.0.0.0"
+      },
+      {
+        "name": "secure_zookeeper",
+        "description": "Protect ZNodes with SASL acl in secure clusters",
+        "min_version": "2.6.0.0"
+      },
+      {
+        "name": "config_versioning",
+        "description": "Configurable versions support",
+        "min_version": "1.0.0.0"
+      }
+    ]
+  }
+}
\ No newline at end of file


[24/52] [abbrv] ambari git commit: AMBARI-21416 Unable to Click on Stack Installation Details During Installation. (atkach)

Posted by jl...@apache.org.
AMBARI-21416 Unable to Click on Stack Installation Details During Installation. (atkach)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 88cba7fbd1842c6e87eec010a00653bcedbfac65
Parents: 068f86a
Author: Andrii Tkach <at...@apache.org>
Authored: Thu Jul 6 17:58:28 2017 +0300
Committer: Andrii Tkach <at...@apache.org>
Committed: Thu Jul 6 18:10:22 2017 +0300

----------------------------------------------------------------------
 .../main/admin/stack_and_upgrade_controller.js  | 16 +++++++-
 .../stack_upgrade/upgrade_version_box_view.js   |  2 +-
 .../admin/stack_and_upgrade_controller_test.js  | 40 +++++++++++++++++++-
 .../upgrade_version_box_view_test.js            | 11 +++---
 4 files changed, 60 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/88cba7fb/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index c4f835d..f712eea 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -1699,11 +1699,25 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
    */
   showProgressPopup: function(version) {
     var popupTitle = Em.I18n.t('admin.stackVersions.details.install.hosts.popup.title').format(version.get('displayName'));
-    var requestIds = App.get('testMode') ? [1] : App.db.get('repoVersionInstall', 'id');
+    var requestIds = this.getRepoVersionInstallId();
     var hostProgressPopupController = App.router.get('highAvailabilityProgressPopupController');
     hostProgressPopupController.initPopup(popupTitle, requestIds, this);
   },
 
+  getRepoVersionInstallId: function() {
+    if (App.get('testMode')) return [1];
+
+    var requestIds = App.db.get('repoVersionInstall', 'id');
+    var lastRepoVersionInstall = App.router.get('backgroundOperationsController.services').find(function(request) {
+      return request.get('name').startsWith('Install version');
+    });
+    if (!requestIds ||
+      (lastRepoVersionInstall && !requestIds.contains(lastRepoVersionInstall.get('id')))) {
+      requestIds = [lastRepoVersionInstall.get('id')];
+    }
+    return requestIds;
+  },
+
   /**
    * reset upgradeState to NOT_REQUIRED when upgrade is COMPLETED
    * and clean auxiliary data

http://git-wip-us.apache.org/repos/asf/ambari/blob/88cba7fb/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
index 1af7d5c..3462b58 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
@@ -43,7 +43,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
   installProgress: function() {
     if (App.get('testMode')) return 100;
 
-    var installRequest, requestIds = App.db.get('repoVersionInstall', 'id');
+    var installRequest, requestIds = this.get('controller').getRepoVersionInstallId();
     if (requestIds) {
       installRequest = App.router.get('backgroundOperationsController.services').findProperty('id', requestIds[0]);
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/88cba7fb/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index b87714e..ca0c4e7 100644
--- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -3093,13 +3093,13 @@ describe('App.MainAdminStackAndUpgradeController', function() {
     beforeEach(function() {
       sinon.stub(App.router, 'get').withArgs('highAvailabilityProgressPopupController').returns(mock);
       sinon.stub(mock, 'initPopup');
-      sinon.stub(App.db, 'get').returns([1]);
+      sinon.stub(controller, 'getRepoVersionInstallId').returns([1]);
     });
 
     afterEach(function() {
       App.router.get.restore();
       mock.initPopup.restore();
-      App.db.get.restore();
+      controller.getRepoVersionInstallId.restore();
     });
 
     it("initPopup should be called", function() {
@@ -3112,6 +3112,42 @@ describe('App.MainAdminStackAndUpgradeController', function() {
     });
   });
 
+  describe('#getRepoVersionInstallId', function() {
+    beforeEach(function() {
+      this.mockDB = sinon.stub(App.db, 'get');
+      this.mockRequests = sinon.stub(App.router, 'get');
+    });
+    afterEach(function() {
+      this.mockDB.restore();
+      this.mockRequests.restore();
+    });
+
+    it('should return id from latest version install', function() {
+      this.mockDB.returns(null);
+      this.mockRequests.returns([Em.Object.create({
+        name: 'Install version',
+        id: 1
+      })]);
+      expect(controller.getRepoVersionInstallId()[0]).to.be.equal(1);
+    });
+    it('should return id from localDB', function() {
+      this.mockDB.returns([2]);
+      this.mockRequests.returns([Em.Object.create({
+        name: 'Install version',
+        id: 2
+      })]);
+      expect(controller.getRepoVersionInstallId()[0]).to.be.equal(2);
+    });
+    it('should return id from latest version install and ignore deprecated localDb value', function() {
+      this.mockDB.returns([2]);
+      this.mockRequests.returns([Em.Object.create({
+        name: 'Install version',
+        id: 3
+      })]);
+      expect(controller.getRepoVersionInstallId()[0]).to.be.equal(3);
+    });
+  });
+
   describe("#finish()", function () {
 
     beforeEach(function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/88cba7fb/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
index b5738a0..0b8eb1e 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
@@ -31,6 +31,7 @@ describe('App.UpgradeVersionBoxView', function () {
       initFilters: Em.K,
       controller: Em.Object.create({
         upgrade: Em.K,
+        getRepoVersionInstallId: Em.K,
         currentVersion: Em.Object.create()
       }),
       content: Em.Object.create(),
@@ -93,29 +94,29 @@ describe('App.UpgradeVersionBoxView', function () {
   describe("#installProgress", function () {
 
     beforeEach(function () {
-      this.mockDB = sinon.stub(App.db, 'get');
+      this.mockId = sinon.stub(view.get('controller'), 'getRepoVersionInstallId');
       this.mock = sinon.stub(App.router, 'get');
       App.set('testMode', false);
     });
     afterEach(function () {
-      this.mockDB.restore();
+      this.mockId.restore();
       this.mock.restore();
     });
 
     it("request id is not set", function () {
       this.mock.returns([]);
-      this.mockDB.returns(undefined);
+      this.mockId.returns(undefined);
       view.propertyDidChange('installProgress');
       expect(view.get('installProgress')).to.equal(0);
     });
     it("request absent", function () {
       this.mock.returns([]);
-      this.mockDB.returns([1]);
+      this.mockId.returns([1]);
       view.propertyDidChange('installProgress');
       expect(view.get('installProgress')).to.equal(0);
     });
     it("request present", function () {
-      this.mockDB.returns([1]);
+      this.mockId.returns([1]);
       this.mock.returns([Em.Object.create({progress: 100, id: 1})]);
       view.propertyDidChange('installProgress');
       expect(view.get('installProgress')).to.equal(100);


[17/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 3dc51b0c93bf13089dddd0f0f937b44d84f5017a
Parents: 19d4200
Author: Mugdha Varadkar <mu...@apache.org>
Authored: Tue Jun 27 15:52:53 2017 +0530
Committer: Mugdha Varadkar <mu...@apache.org>
Committed: Thu Jul 6 09:48:45 2017 +0530

----------------------------------------------------------------------
 .../HDFS/3.0.0.3.0/service_advisor.py           |   53 +
 .../RANGER/0.7.0.3.0/alerts.json                |   76 -
 .../0.7.0.3.0/configuration/admin-log4j.xml     |  132 --
 .../configuration/admin-properties.xml          |  163 --
 .../configuration/atlas-tagsync-ssl.xml         |   72 -
 .../configuration/ranger-admin-site.xml         |  785 --------
 .../0.7.0.3.0/configuration/ranger-env.xml      |  513 -----
 .../0.7.0.3.0/configuration/ranger-site.xml     |   30 -
 .../configuration/ranger-solr-configuration.xml |   59 -
 .../ranger-tagsync-policymgr-ssl.xml            |   72 -
 .../configuration/ranger-tagsync-site.xml       |  206 --
 .../configuration/ranger-ugsync-site.xml        |  577 ------
 .../tagsync-application-properties.xml          |   62 -
 .../0.7.0.3.0/configuration/tagsync-log4j.xml   |   90 -
 .../0.7.0.3.0/configuration/usersync-log4j.xml  |   89 -
 .../configuration/usersync-properties.xml       |   32 -
 .../RANGER/0.7.0.3.0/kerberos.json              |  153 --
 .../RANGER/0.7.0.3.0/metainfo.xml               |  189 --
 .../alerts/alert_ranger_admin_passwd_check.py   |  195 --
 .../RANGER/0.7.0.3.0/package/scripts/params.py  |  448 -----
 .../0.7.0.3.0/package/scripts/ranger_admin.py   |  217 --
 .../0.7.0.3.0/package/scripts/ranger_service.py |   69 -
 .../0.7.0.3.0/package/scripts/ranger_tagsync.py |  139 --
 .../package/scripts/ranger_usersync.py          |  124 --
 .../0.7.0.3.0/package/scripts/service_check.py  |   49 -
 .../0.7.0.3.0/package/scripts/setup_ranger.py   |  153 --
 .../package/scripts/setup_ranger_xml.py         |  853 --------
 .../0.7.0.3.0/package/scripts/status_params.py  |   39 -
 .../RANGER/0.7.0.3.0/package/scripts/upgrade.py |   31 -
 .../templates/input.config-ranger.json.j2       |   79 -
 .../package/templates/ranger_admin_pam.j2       |   22 -
 .../package/templates/ranger_remote_pam.j2      |   22 -
 .../package/templates/ranger_solr_jaas_conf.j2  |   26 -
 .../properties/ranger-solrconfig.xml.j2         | 1874 ------------------
 .../RANGER/0.7.0.3.0/quicklinks/quicklinks.json |   41 -
 .../RANGER/0.7.0.3.0/role_command_order.json    |    9 -
 .../RANGER/0.7.0.3.0/service_advisor.py         |  793 --------
 .../0.7.0.3.0/themes/theme_version_1.json       |  722 -------
 .../0.7.0.3.0/themes/theme_version_2.json       | 1470 --------------
 .../0.7.0.3.0/themes/theme_version_3.json       |  692 -------
 .../0.7.0.3.0/themes/theme_version_5.json       |   48 -
 .../RANGER/1.0.0.3.0/alerts.json                |   76 +
 .../1.0.0.3.0/configuration/admin-log4j.xml     |  132 ++
 .../configuration/admin-properties.xml          |  161 ++
 .../configuration/atlas-tagsync-ssl.xml         |   72 +
 .../configuration/ranger-admin-site.xml         |  751 +++++++
 .../1.0.0.3.0/configuration/ranger-env.xml      |  503 +++++
 .../configuration/ranger-solr-configuration.xml |   59 +
 .../ranger-tagsync-policymgr-ssl.xml            |   72 +
 .../configuration/ranger-tagsync-site.xml       |  201 ++
 .../configuration/ranger-ugsync-site.xml        |  571 ++++++
 .../tagsync-application-properties.xml          |   62 +
 .../1.0.0.3.0/configuration/tagsync-log4j.xml   |   90 +
 .../1.0.0.3.0/configuration/usersync-log4j.xml  |   89 +
 .../RANGER/1.0.0.3.0/kerberos.json              |  153 ++
 .../RANGER/1.0.0.3.0/metainfo.xml               |  177 ++
 .../alerts/alert_ranger_admin_passwd_check.py   |  195 ++
 .../RANGER/1.0.0.3.0/package/scripts/params.py  |  449 +++++
 .../1.0.0.3.0/package/scripts/ranger_admin.py   |  210 ++
 .../1.0.0.3.0/package/scripts/ranger_service.py |   69 +
 .../1.0.0.3.0/package/scripts/ranger_tagsync.py |  139 ++
 .../package/scripts/ranger_usersync.py          |  120 ++
 .../1.0.0.3.0/package/scripts/service_check.py  |   49 +
 .../package/scripts/setup_ranger_xml.py         |  853 ++++++++
 .../1.0.0.3.0/package/scripts/status_params.py  |   39 +
 .../RANGER/1.0.0.3.0/package/scripts/upgrade.py |   31 +
 .../templates/input.config-ranger.json.j2       |   79 +
 .../package/templates/ranger_admin_pam.j2       |   22 +
 .../package/templates/ranger_remote_pam.j2      |   22 +
 .../package/templates/ranger_solr_jaas_conf.j2  |   26 +
 .../properties/ranger-solrconfig.xml.j2         | 1874 ++++++++++++++++++
 .../RANGER/1.0.0.3.0/quicklinks/quicklinks.json |   41 +
 .../RANGER/1.0.0.3.0/role_command_order.json    |    9 +
 .../RANGER/1.0.0.3.0/service_advisor.py         |  774 ++++++++
 .../1.0.0.3.0/themes/theme_version_1.json       | 1821 +++++++++++++++++
 .../RANGER_KMS/0.5.0.3.0/alerts.json            |   32 -
 .../0.5.0.3.0/configuration/dbks-site.xml       |  206 --
 .../0.5.0.3.0/configuration/kms-env.xml         |  116 --
 .../0.5.0.3.0/configuration/kms-log4j.xml       |  120 --
 .../0.5.0.3.0/configuration/kms-properties.xml  |  166 --
 .../0.5.0.3.0/configuration/kms-site.xml        |  133 --
 .../configuration/ranger-kms-audit.xml          |  124 --
 .../configuration/ranger-kms-policymgr-ssl.xml  |   68 -
 .../configuration/ranger-kms-security.xml       |   64 -
 .../0.5.0.3.0/configuration/ranger-kms-site.xml |  104 -
 .../RANGER_KMS/0.5.0.3.0/kerberos.json          |   84 -
 .../RANGER_KMS/0.5.0.3.0/metainfo.xml           |  115 --
 .../RANGER_KMS/0.5.0.3.0/package/scripts/kms.py |  677 -------
 .../0.5.0.3.0/package/scripts/kms_server.py     |  117 --
 .../0.5.0.3.0/package/scripts/kms_service.py    |   58 -
 .../0.5.0.3.0/package/scripts/params.py         |  331 ----
 .../0.5.0.3.0/package/scripts/service_check.py  |   41 -
 .../0.5.0.3.0/package/scripts/status_params.py  |   36 -
 .../0.5.0.3.0/package/scripts/upgrade.py        |   30 -
 .../templates/input.config-ranger-kms.json.j2   |   48 -
 .../0.5.0.3.0/role_command_order.json           |    7 -
 .../RANGER_KMS/0.5.0.3.0/service_advisor.py     |  281 ---
 .../0.5.0.3.0/themes/theme_version_1.json       |  303 ---
 .../0.5.0.3.0/themes/theme_version_2.json       |  124 --
 .../RANGER_KMS/1.0.0.3.0/alerts.json            |   32 +
 .../1.0.0.3.0/configuration/dbks-site.xml       |  206 ++
 .../1.0.0.3.0/configuration/kms-env.xml         |  115 ++
 .../1.0.0.3.0/configuration/kms-log4j.xml       |  120 ++
 .../1.0.0.3.0/configuration/kms-properties.xml  |  166 ++
 .../1.0.0.3.0/configuration/kms-site.xml        |  133 ++
 .../configuration/ranger-kms-audit.xml          |  118 ++
 .../configuration/ranger-kms-policymgr-ssl.xml  |   68 +
 .../configuration/ranger-kms-security.xml       |   64 +
 .../1.0.0.3.0/configuration/ranger-kms-site.xml |  110 +
 .../RANGER_KMS/1.0.0.3.0/kerberos.json          |   84 +
 .../RANGER_KMS/1.0.0.3.0/metainfo.xml           |  111 ++
 .../RANGER_KMS/1.0.0.3.0/package/scripts/kms.py |  675 +++++++
 .../1.0.0.3.0/package/scripts/kms_server.py     |  117 ++
 .../1.0.0.3.0/package/scripts/kms_service.py    |   58 +
 .../1.0.0.3.0/package/scripts/params.py         |  331 ++++
 .../1.0.0.3.0/package/scripts/service_check.py  |   41 +
 .../1.0.0.3.0/package/scripts/status_params.py  |   36 +
 .../1.0.0.3.0/package/scripts/upgrade.py        |   30 +
 .../templates/input.config-ranger-kms.json.j2   |   48 +
 .../1.0.0.3.0/role_command_order.json           |    7 +
 .../RANGER_KMS/1.0.0.3.0/service_advisor.py     |  358 ++++
 .../1.0.0.3.0/themes/theme_version_1.json       |  409 ++++
 .../stacks/HDP/3.0/services/RANGER/metainfo.xml |    4 +-
 .../HDP/3.0/services/RANGER_KMS/metainfo.xml    |    4 +-
 124 files changed, 13485 insertions(+), 14804 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py
index 356ad59..e135275 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py
@@ -138,6 +138,7 @@ class HDFSServiceAdvisor(service_advisor.ServiceAdvisor):
     # Due to the existing stack inheritance, make it clear where each calculation came from.
     recommender = HDFSRecommender()
     recommender.recommendConfigurationsFromHDP206(configurations, clusterData, services, hosts)
+    recommender.recommendConfigurationsFromHDP22(configurations, clusterData, services, hosts)
     recommender.recommendConfigurationsFromHDP23(configurations, clusterData, services, hosts)
     recommender.recommendConfigurationsFromHDP26(configurations, clusterData, services, hosts)
 
@@ -253,6 +254,58 @@ class HDFSRecommender(service_advisor.ServiceAdvisor):
     # recommendations for "hadoop.proxyuser.*.hosts", "hadoop.proxyuser.*.groups" properties in core-site
     self.recommendHadoopProxyUsers(configurations, services, hosts)
 
+  def recommendConfigurationsFromHDP22(self, configurations, clusterData, services, hosts):
+    """
+    Recommend configurations for this service based on HDP 2.2
+    """
+    putHdfsSiteProperty = self.putProperty(configurations, "hdfs-site", services)
+    putCoreSiteProperty = self.putProperty(configurations, "core-site", services)
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+
+    keyserverHostsString = None
+    keyserverPortString = None
+    if "hadoop-env" in services["configurations"] and "keyserver_host" in services["configurations"]["hadoop-env"]["properties"] and "keyserver_port" in services["configurations"]["hadoop-env"]["properties"]:
+      keyserverHostsString = services["configurations"]["hadoop-env"]["properties"]["keyserver_host"]
+      keyserverPortString = services["configurations"]["hadoop-env"]["properties"]["keyserver_port"]
+
+    # Irrespective of what hadoop-env has, if Ranger-KMS is installed, we use its values.
+    rangerKMSServerHosts = self.getHostsWithComponent("RANGER_KMS", "RANGER_KMS_SERVER", services, hosts)
+    if rangerKMSServerHosts is not None and len(rangerKMSServerHosts) > 0:
+      rangerKMSServerHostsArray = []
+      for rangeKMSServerHost in rangerKMSServerHosts:
+        rangerKMSServerHostsArray.append(rangeKMSServerHost["Hosts"]["host_name"])
+      keyserverHostsString = ";".join(rangerKMSServerHostsArray)
+      if "kms-env" in services["configurations"] and "kms_port" in services["configurations"]["kms-env"]["properties"]:
+        keyserverPortString = services["configurations"]["kms-env"]["properties"]["kms_port"]
+
+    if keyserverHostsString is not None and len(keyserverHostsString.strip()) > 0:
+      urlScheme = "http"
+      if "ranger-kms-site" in services["configurations"] and \
+          "ranger.service.https.attrib.ssl.enabled" in services["configurations"]["ranger-kms-site"]["properties"] and \
+          services["configurations"]["ranger-kms-site"]["properties"]["ranger.service.https.attrib.ssl.enabled"].lower() == "true":
+        urlScheme = "https"
+
+      if keyserverPortString is None or len(keyserverPortString.strip()) < 1:
+        keyserverPortString = ":9292"
+      else:
+        keyserverPortString = ":" + keyserverPortString.strip()
+
+      kmsPath = "kms://" + urlScheme + "@" + keyserverHostsString.strip() + keyserverPortString + "/kms"
+      putCoreSiteProperty("hadoop.security.key.provider.path", kmsPath)
+      putHdfsSiteProperty("dfs.encryption.key.provider.uri", kmsPath)
+
+    putHdfsSitePropertyAttribute = self.putPropertyAttribute(configurations, "hdfs-site")
+    putCoreSitePropertyAttribute = self.putPropertyAttribute(configurations, "core-site")
+    if not "RANGER_KMS" in servicesList:
+      putCoreSitePropertyAttribute('hadoop.security.key.provider.path','delete','true')
+      putHdfsSitePropertyAttribute('dfs.encryption.key.provider.uri','delete','true')
+
+    if "ranger-env" in services["configurations"] and "ranger-hdfs-plugin-properties" in services["configurations"] and \
+      "ranger-hdfs-plugin-enabled" in services["configurations"]["ranger-env"]["properties"]:
+      putHdfsRangerPluginProperty = self.putProperty(configurations, "ranger-hdfs-plugin-properties", services)
+      rangerEnvHdfsPluginProperty = services["configurations"]["ranger-env"]["properties"]["ranger-hdfs-plugin-enabled"]
+      putHdfsRangerPluginProperty("ranger-hdfs-plugin-enabled", rangerEnvHdfsPluginProperty)
+
   def recommendConfigurationsFromHDP23(self, configurations, clusterData, services, hosts):
     """
     Recommend configurations for this service based on HDP 2.3.

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/alerts.json b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/alerts.json
deleted file mode 100644
index ab473a8..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/alerts.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
-  "RANGER": {
-    "service": [],
-    "RANGER_ADMIN": [
-      {
-        "name": "ranger_admin_process",
-        "label": "Ranger Admin Process",
-        "description": "This host-level alert is triggered if the Ranger Admin Web UI is unreachable.",
-        "interval": 1,
-        "scope": "ANY",
-        "source": {
-          "type": "WEB",
-          "uri": {
-              "http": "{{admin-properties/policymgr_external_url}}/login.jsp",
-              "https": "{{admin-properties/policymgr_external_url}}/login.jsp",
-              "kerberos_keytab": "{{cluster-env/smokeuser_keytab}}",
-              "kerberos_principal": "{{cluster-env/smokeuser_principal_name}}",
-              "https_property": "{{ranger-admin-site/ranger.service.https.attrib.ssl.enabled}}",
-              "https_property_value": "true",
-              "connection_timeout": 5.0
-            },
-          "reporting": {
-            "ok": {
-              "text": "HTTP {0} response in {2:.3f}s"
-            },
-            "warning": {
-              "text": "HTTP {0} response from {1} in {2:.3f}s ({3})"
-            },
-            "critical": {
-              "text": "Connection failed to {1} ({3})"
-            }
-          }
-        }
-      },
-      {
-        "name": "ranger_admin_password_check",
-        "label": "Ranger Admin password check",
-        "description": "This alert is used to ensure that the Ranger Admin password in Ambari is correct.",
-        "interval": 30,
-        "scope": "ANY",
-        "source": {
-          "type": "SCRIPT",
-          "path": "RANGER/0.4.0/package/alerts/alert_ranger_admin_passwd_check.py",
-          "parameters": []
-        }
-      }
-    ],
-    "RANGER_USERSYNC": [
-      {
-        "name": "ranger_usersync_process",
-        "label": "Ranger Usersync Process",
-        "description": "This host-level alert is triggered if the Ranger Usersync cannot be determined to be up.",
-        "interval": 1,
-        "scope": "HOST",
-        "source": {
-          "type": "PORT",
-          "uri": "{{ranger-ugsync-site/ranger.usersync.port}}",
-          "default_port": 5151,
-          "reporting": {
-            "ok": {
-              "text": "TCP OK - {0:.3f}s response on port {1}"
-            },
-            "warning": {
-              "text": "TCP OK - {0:.3f}s response on port {1}",
-              "value": 1.5
-            },
-            "critical": {
-              "text": "Connection failed: {0} to {1}:{2}",
-              "value": 5.0
-            }
-          }
-        }
-      }
-    ]
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/admin-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/admin-log4j.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/admin-log4j.xml
deleted file mode 100644
index fbbfac7..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/admin-log4j.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_adding_forbidden="false">
-  <property>
-    <name>ranger_xa_log_maxfilesize</name>
-    <value>256</value>
-   <description>The maximum size of backup file before the log is rotated</description>
-    <display-name>Ranger Log: backup file size</display-name>
-    <value-attributes>
-      <unit>MB</unit>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-   </property>
-   <property>
-    <name>ranger_xa_log_maxbackupindex</name>
-    <value>20</value>
-    <description>The number of backup files</description>
-    <display-name>Ranger Log: # of backup files</display-name>
-    <value-attributes>
-      <type>int</type>
-      <minimum>0</minimum>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>content</name>
-    <display-name>admin-log4j template</display-name>
-    <description>admin-log4j.properties</description>
-    <value>
-#
-# 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.
-#
-
-
-log4j.rootLogger = warn,xa_log_appender
-
-
-# xa_logger
-log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.xa_log_appender.file=${logdir}/xa_portal.log
-log4j.appender.xa_log_appender.datePattern='.'yyyy-MM-dd
-log4j.appender.xa_log_appender.append=true
-log4j.appender.xa_log_appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.xa_log_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n
-log4j.appender.xa_log_appender.MaxFileSize={{ranger_xa_log_maxfilesize}}MB
-log4j.appender.xa_log_appender.MaxBackupIndex={{ranger_xa_log_maxbackupindex}}
-
-# xa_log_appender : category and additivity
-log4j.category.org.springframework=warn,xa_log_appender
-log4j.additivity.org.springframework=false
-
-log4j.category.org.apache.ranger=info,xa_log_appender
-log4j.additivity.org.apache.ranger=false
-
-log4j.category.xa=info,xa_log_appender
-log4j.additivity.xa=false
-
-# perf_logger
-log4j.appender.perf_appender=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.perf_appender.file=${logdir}/ranger_admin_perf.log
-log4j.appender.perf_appender.datePattern='.'yyyy-MM-dd
-log4j.appender.perf_appender.append=true
-log4j.appender.perf_appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.perf_appender.layout.ConversionPattern=%d [%t] %m%n
-
-
-# sql_appender
-log4j.appender.sql_appender=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.sql_appender.file=${logdir}/xa_portal_sql.log
-log4j.appender.sql_appender.datePattern='.'yyyy-MM-dd
-log4j.appender.sql_appender.append=true
-log4j.appender.sql_appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.sql_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n
-
-# sql_appender : category and additivity
-log4j.category.org.hibernate.SQL=warn,sql_appender
-log4j.additivity.org.hibernate.SQL=false
-
-log4j.category.jdbc.sqlonly=fatal,sql_appender
-log4j.additivity.jdbc.sqlonly=false
-
-log4j.category.jdbc.sqltiming=warn,sql_appender
-log4j.additivity.jdbc.sqltiming=false
-
-log4j.category.jdbc.audit=fatal,sql_appender
-log4j.additivity.jdbc.audit=false
-
-log4j.category.jdbc.resultset=fatal,sql_appender
-log4j.additivity.jdbc.resultset=false
-
-log4j.category.jdbc.connection=fatal,sql_appender
-log4j.additivity.jdbc.connection=false
-        </value>
-    <value-attributes>
-      <type>content</type>
-      <show-property-name>false</show-property-name>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/admin-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/admin-properties.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/admin-properties.xml
deleted file mode 100644
index 1d73087..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/admin-properties.xml
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_final="false">
-
-
-  <property>
-    <name>SQL_CONNECTOR_JAR</name>
-    <value>{{driver_curl_target}}</value>
-    <display-name>Location of Sql Connector Jar</display-name>
-    <description>Location of DB client library (please check the location of the jar file)</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>admin-properties</type>
-        <name>DB_FLAVOR</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false" update="false"/>
-  </property>
-  <property>
-    <name>db_root_user</name>
-    <value>root</value>
-    <display-name>Database Administrator (DBA) username</display-name>
-    <description>Database admin user. This user should have DBA permission to create the Ranger Database and Ranger Database User</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property require-input="true">
-    <name>db_root_password</name>
-    <value/>
-    <property-type>PASSWORD</property-type>
-    <display-name>Database Administrator (DBA) password</display-name>
-    <description>Database password for the database admin username</description>
-    <value-attributes>
-      <type>password</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>db_host</name>
-    <value/>
-    <display-name>Ranger DB host</display-name>
-    <description>Database host</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>db_name</name>
-    <value>ranger</value>
-    <display-name>Ranger DB name</display-name>
-    <description>Database name</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>db_user</name>
-    <value>rangeradmin</value>
-    <display-name>Ranger DB username</display-name>
-    <description>Database username used for the Ranger schema</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property require-input="true">
-    <name>db_password</name>
-    <value/>
-    <property-type>PASSWORD</property-type>
-    <display-name>Ranger DB password</display-name>
-    <description>Database password for the Ranger schema</description>
-    <value-attributes>
-      <type>password</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>DB_FLAVOR</name>
-    <value>MYSQL</value>
-    <display-name>DB FLAVOR</display-name>
-    <description>The database type to be used (mysql/oracle)</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>MYSQL</value>
-          <label>MYSQL</label>
-        </entry>
-        <entry>
-          <value>ORACLE</value>
-          <label>ORACLE</label>
-        </entry>
-        <entry>
-          <value>POSTGRES</value>
-          <label>POSTGRES</label>
-        </entry>
-        <entry>
-          <value>MSSQL</value>
-          <label>MSSQL</label>
-        </entry>
-        <entry>
-          <value>SQLA</value>
-          <label>SQL Anywhere</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>policymgr_external_url</name>
-    <value/>
-    <display-name>External URL</display-name>
-    <description>Policy Manager external url eg: http://RANGER_HOST:6080</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>ranger-admin-site</type>
-        <name>ranger.service.http.enabled</name>
-      </property>
-      <property>
-        <type>ranger-admin-site</type>
-        <name>ranger.service.http.port</name>
-      </property>
-      <property>
-        <type>ranger-admin-site</type>
-        <name>ranger.service.https.port</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/atlas-tagsync-ssl.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/atlas-tagsync-ssl.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/atlas-tagsync-ssl.xml
deleted file mode 100644
index d43c010..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/atlas-tagsync-ssl.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>xasecure.policymgr.clientssl.keystore</name>
-    <value>/etc/security/serverKeys/atlas-tagsync-keystore.jks</value>
-    <description>Java Keystore files</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.keystore.password</name>
-    <value>myKeyFilePassword</value>
-    <property-type>PASSWORD</property-type>
-    <description>password for keystore</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.truststore</name>
-    <value>/etc/security/serverKeys/atlas-tagsync-mytruststore.jks</value>
-    <description>java truststore file</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.truststore.password</name>
-    <value>changeit</value>
-    <property-type>PASSWORD</property-type>
-    <description>java truststore password</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.keystore.credential.file</name>
-    <value>jceks://file{{atlas_tagsync_credential_file}}</value>
-    <description>java keystore credential file</description>
-    <on-ambari-upgrade add="false" />
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.truststore.credential.file</name>
-    <value>jceks://file{{atlas_tagsync_credential_file}}</value>
-    <description>java truststore credential file</description>
-    <on-ambari-upgrade add="false" />
-  </property>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-admin-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-admin-site.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-admin-site.xml
deleted file mode 100644
index a9153f8..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-admin-site.xml
+++ /dev/null
@@ -1,785 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<configuration supports_final="true">
-  <property>
-    <name>ranger.service.host</name>
-    <value>{{ranger_host}}</value>
-    <description>Host where ranger service to be installed</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.http.enabled</name>
-    <value>true</value>
-    <display-name>HTTP enabled</display-name>
-    <description>Enable HTTP</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>boolean</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.http.port</name>
-    <value>6080</value>
-    <description>HTTP port</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.https.port</name>
-    <value>6182</value>
-    <description>HTTPS port (if SSL is enabled)</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.ssl.enabled</name>
-    <value>false</value>
-    <description>true/false, set to true if using SSL</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.clientAuth</name>
-    <value>want</value>
-    <description>Needs to be set to want for two way SSL</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.keystore.keyalias</name>
-    <value>rangeradmin</value>
-    <description>Alias for Ranger Admin key in keystore</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.keystore.pass</name>
-    <value>xasecure</value>
-    <property-type>PASSWORD</property-type>
-    <description>Password for keystore</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.https.attrib.keystore.file</name>
-    <value>/etc/ranger/admin/conf/ranger-admin-keystore.jks</value>
-    <description>Ranger admin keystore (specify full path)</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.externalurl</name>
-    <value>{{ranger_external_url}}</value>
-    <display-name>External URL</display-name>
-    <description>URL to be used by clients to access ranger admin</description>
-    <value-attributes>
-      <visible>false</visible>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.jpa.jdbc.driver</name>
-    <value>com.mysql.jdbc.Driver</value>
-    <display-name>Driver class name for a JDBC Ranger database</display-name>
-    <description>JDBC driver class name. Example: For MySQL / MariaDB: com.mysql.jdbc.Driver, For Oracle: oracle.jdbc.OracleDriver</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>admin-properties</type>
-        <name>DB_FLAVOR</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.jpa.jdbc.url</name>
-    <value>jdbc:mysql://localhost</value>
-    <display-name>JDBC connect string for a Ranger database</display-name>
-    <description>JDBC connect string</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>admin-properties</type>
-        <name>DB_FLAVOR</name>
-      </property>
-      <property>
-        <type>admin-properties</type>
-        <name>db_host</name>
-      </property>
-      <property>
-        <type>admin-properties</type>
-        <name>db_name</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.jpa.jdbc.user</name>
-    <value>{{ranger_db_user}}</value>
-    <description>JDBC user</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.jpa.jdbc.password</name>
-    <value>_</value>
-    <property-type>PASSWORD</property-type>
-    <description>JDBC password</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.jpa.jdbc.credential.alias</name>
-    <value>rangeradmin</value>
-    <description>Alias name for storing JDBC password</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.credential.provider.path</name>
-    <value>/etc/ranger/admin/rangeradmin.jceks</value>
-    <description>File for credential store, provide full file path</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.audit.source.type</name>
-    <value>solr</value>
-    <description>db or solr, based on the audit destination used</description>
-    <depends-on>
-      <property>
-        <type>ranger-env</type>
-        <name>xasecure.audit.destination.solr</name>
-      </property>
-      <property>
-        <type>ranger-env</type>
-        <name>xasecure.audit.destination.db</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.audit.solr.urls</name>
-    <value/>
-    <description>Solr url for audit. Example: http://solr_host:6083/solr/ranger_audits</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.authentication.method</name>
-    <value>UNIX</value>
-    <display-name>Authentication method</display-name>
-    <description>Ranger admin Authentication - UNIX/PAM/LDAP/AD/NONE</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>ranger-ugsync-site</type>
-        <name>ranger.usersync.source.impl.class</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.url</name>
-    <display-name>​LDAP URL</display-name>
-    <value>{{ranger_ug_ldap_url}}</value>
-    <description>LDAP Server URL, only used if Authentication method is LDAP</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.user.dnpattern</name>
-    <value>uid={0},ou=users,dc=xasecure,dc=net</value>
-    <description>LDAP user DN, only used if Authentication method is LDAP</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.group.searchbase</name>
-    <display-name>Group Search Base</display-name>
-    <value>{{ranger_ug_ldap_group_searchbase}}</value>
-    <description>LDAP group searchbase, only used if Authentication method is LDAP</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.group.searchfilter</name>
-    <display-name>Group Search Filter</display-name>
-    <value>{{ranger_ug_ldap_group_searchfilter}}</value>
-    <description>LDAP group search filter, only used if Authentication method is LDAP</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.ldap.group.roleattribute</name>
-    <value>cn</value>
-    <description>LDAP group role attribute, only used if Authentication method is LDAP</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.base.dn</name>
-    <value>dc=example,dc=com</value>
-    <description>The Distinguished Name (DN) of the starting point for directory server searches.</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.bind.dn</name>
-    <display-name>Bind User</display-name>
-    <value>{{ranger_ug_ldap_bind_dn}}</value>
-    <description>Full distinguished name (DN), including common name (CN), of an LDAP user account that has privileges to search for users. </description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.bind.password</name>
-    <display-name>​Bind User Password</display-name>
-    <value>{{ranger_usersync_ldap_ldapbindpassword}}</value>
-    <property-type>PASSWORD</property-type>
-    <description>Password for the account that can search for users</description>
-    <value-attributes>
-      <type>password</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.referral</name>
-    <value>ignore</value>
-    <description>Set to follow if multiple LDAP servers are configured to return continuation references for results. Set to ignore (default) if no referrals should be followed. Possible values are follow|throw|ignore</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.ad.domain</name>
-    <display-name>Domain Name (Only for AD)</display-name>
-    <value/>
-    <description>AD domain, only used if Authentication method is AD</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.ad.url</name>
-    <value>{{ranger_ug_ldap_url}}</value>
-    <description>AD URL, only used if Authentication method is AD</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.ad.base.dn</name>
-    <value>dc=example,dc=com</value>
-    <description>The Distinguished Name (DN) of the starting point for directory server searches.</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.ad.bind.dn</name>
-    <value>{{ranger_ug_ldap_bind_dn}}</value>
-    <description>Full distinguished name (DN), including common name (CN), of an LDAP user account that has privileges to search for users.</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.ad.bind.password</name>
-    <value>{{ranger_usersync_ldap_ldapbindpassword}}</value>
-    <property-type>PASSWORD</property-type>
-    <description>Password for the account that can search for users</description>
-    <value-attributes>
-      <type>password</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.ldap.ad.referral</name>
-    <value>ignore</value>
-    <description>Set to follow if multiple LDAP servers are configured to return continuation references for results. Set to ignore (default) if no referrals should be followed. Possible values are follow|throw|ignore</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-
-
-
-
-  <property>
-    <name>ranger.unixauth.remote.login.enabled</name>
-    <value>true</value>
-    <display-name>Allow remote Login</display-name>
-    <description>Remote login enabled? - only used if Authentication method is UNIX</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.unixauth.service.hostname</name>
-    <value>{{ugsync_host}}</value>
-    <description>Host where unix authentication service is running - only used if Authentication method is UNIX</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.unixauth.service.port</name>
-    <value>5151</value>
-    <description>Port for unix authentication service - only used if Authentication method is UNIX</description>
-    <value-attributes>
-      <type>int</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.jpa.jdbc.dialect</name>
-    <value>{{jdbc_dialect}}</value>
-    <description>JDBC dialect used for policy DB</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-
-  <property>
-    <name>ranger.audit.solr.username</name>
-    <value>ranger_solr</value>
-    <description>Solr username</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.audit.solr.password</name>
-    <value>NONE</value>
-    <property-type>PASSWORD</property-type>
-    <description>Solr password</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.sso.providerurl</name>
-    <value/>
-    <display-name>SSO provider url</display-name>
-    <description>Example: https://KNOX_HOST:KNOX_PORT/gateway/TOPOLOGY_NAME/knoxsso/api/v1/websso</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>gateway-site</type>
-        <name>gateway.port</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.sso.publicKey</name>
-    <value/>
-    <display-name>SSO public key</display-name>
-    <description>Public key for SSO cookie verification</description>
-    <value-attributes>
-      <type>multiLine</type>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.sso.enabled</name>
-    <value>false</value>
-    <display-name>Enable Ranger SSO</display-name>
-    <description/>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>boolean</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.sso.browser.useragent</name>
-    <value>Mozilla,chrome</value>
-    <display-name>SSO browser useragent</display-name>
-    <description>Comma seperated browser agent</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.binddn.credential.alias</name>
-    <value>ranger.ldap.bind.password</value>
-    <description></description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ldap.ad.binddn.credential.alias</name>
-    <value>ranger.ldap.ad.bind.password</value>
-    <description></description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-
-
-
-
-
-
-
-
-
-
-  <property>
-    <name>ranger.admin.kerberos.token.valid.seconds</name>
-    <value>30</value>
-    <description/>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.admin.kerberos.cookie.domain</name>
-    <value>{{ranger_host}}</value>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.admin.kerberos.cookie.path</name>
-    <value>/</value>
-    <description/>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.spnego.kerberos.principal</name>
-    <value>*</value>
-    <description/>
-    <property-type>KERBEROS_PRINCIPAL</property-type>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.spnego.kerberos.keytab</name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.admin.kerberos.principal</name>
-    <value/>
-    <description/>
-    <property-type>KERBEROS_PRINCIPAL</property-type>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.admin.kerberos.keytab</name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.lookup.kerberos.principal</name>
-    <value/>
-    <description/>
-    <property-type>KERBEROS_PRINCIPAL</property-type>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.lookup.kerberos.keytab</name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.truststore.file</name>
-    <value>/etc/ranger/admin/conf/ranger-admin-keystore.jks</value>
-    <display-name>ranger.truststore.file</display-name>
-    <description>Ranger trust-store file-path</description>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.truststore.password</name>
-    <value>changeit</value>
-    <property-type>PASSWORD</property-type>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <display-name>ranger.truststore.password</display-name>
-    <description>Ranger trust-store password</description>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.audit.solr.zookeepers</name>
-    <value>NONE</value>
-    <description>Solr Zookeeper string</description>
-    <depends-on>
-      <property>
-        <type>infra-solr-env</type>
-        <name>infra_solr_znode</name>
-      </property>
-      <property>
-        <type>ranger-env</type>
-        <name>is_solrCloud_enabled</name>
-      </property>
-      <property>
-        <type>ranger-env</type>
-        <name>is_external_solrCloud_enabled</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-
-
-  <property>
-    <name>ranger.ldap.ad.user.searchfilter</name>
-    <value>(sAMAccountName={0})</value>
-    <description>Search filter used for Bind Authentication</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.ldap.user.searchfilter</name>
-    <display-name>User Search Filter</display-name>
-    <value>(uid={0})</value>
-    <description>Search filter used for Bind Authentication</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.kms.service.user.hdfs</name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>hadoop-env</type>
-        <name>hdfs_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.kms.service.user.hive</name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>hive-env</type>
-        <name>hive_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.plugins.hdfs.serviceuser</name>
-    <value>hdfs</value>
-    <depends-on>
-      <property>
-        <type>hadoop-env</type>
-        <name>hdfs_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.plugins.hive.serviceuser</name>
-    <value>hive</value>
-    <depends-on>
-      <property>
-        <type>hive-env</type>
-        <name>hive_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.plugins.hbase.serviceuser</name>
-    <value>hbase</value>
-    <depends-on>
-      <property>
-        <type>hbase-env</type>
-        <name>hbase_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.plugins.yarn.serviceuser</name>
-    <value>yarn</value>
-    <depends-on>
-      <property>
-        <type>yarn-env</type>
-        <name>yarn_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.plugins.knox.serviceuser</name>
-    <value>knox</value>
-    <depends-on>
-      <property>
-        <type>knox-env</type>
-        <name>knox_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.plugins.storm.serviceuser</name>
-    <value>storm</value>
-    <depends-on>
-      <property>
-        <type>storm-env</type>
-        <name>storm_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.plugins.kafka.serviceuser</name>
-    <value>kafka</value>
-    <depends-on>
-      <property>
-        <type>kafka-env</type>
-        <name>kafka_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.plugins.atlas.serviceuser</name>
-    <value>atlas</value>
-    <depends-on>
-      <property>
-        <type>atlas-env</type>
-        <name>metadata_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.plugins.kms.serviceuser</name>
-    <value>kms</value>
-    <depends-on>
-      <property>
-        <type>kms-env</type>
-        <name>kms_user</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-  <property>
-    <name>ranger.is.solr.kerberised</name>
-    <value>{{ranger_is_solr_kerberised}}</value>
-    <value-attributes>
-      <visible>false</visible>
-    </value-attributes>
-    <description/>
-    <on-ambari-upgrade add="true"/>
-  </property>
-
-
-
-  <property>
-    <name>ranger.truststore.alias</name>
-    <value>trustStoreAlias</value>
-    <description></description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.keystore.credential.alias</name>
-    <value>keyStoreCredentialAlias</value>
-    <description></description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-env.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-env.xml
deleted file mode 100644
index 3e25470..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-env.xml
+++ /dev/null
@@ -1,513 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_final="true" supports_adding_forbidden="true">
-  <property>
-    <name>ranger_user</name>
-    <value>ranger</value>
-    <property-type>USER</property-type>
-    <display-name>Ranger User</display-name>
-    <description>Ranger username</description>
-    <value-attributes>
-      <type>user</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_group</name>
-    <value>ranger</value>
-    <property-type>GROUP</property-type>
-    <display-name>Ranger Group</display-name>
-    <description>Ranger group</description>
-    <value-attributes>
-      <type>user</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_admin_log_dir</name>
-    <value>/var/log/ranger/admin</value>
-    <description/>
-    <value-attributes>
-      <type>directory</type>
-      <overridable>false</overridable>
-      <editable-only-at-install>true</editable-only-at-install>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_usersync_log_dir</name>
-    <value>/var/log/ranger/usersync</value>
-    <description/>
-    <value-attributes>
-      <type>directory</type>
-      <overridable>false</overridable>
-      <editable-only-at-install>true</editable-only-at-install>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_admin_username</name>
-    <value>amb_ranger_admin</value>
-    <property-type>TEXT</property-type>
-    <display-name>Ranger Admin username for Ambari</display-name>
-    <description>This is the ambari user created for creating repositories and policies in Ranger Admin for each plugin</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_admin_password</name>
-    <value/>
-    <property-type>PASSWORD</property-type>
-    <display-name>Ranger Admin user's password for Ambari</display-name>
-    <description>This is the ambari user password created for creating repositories and policies in Ranger Admin for each plugin</description>
-    <value-attributes>
-      <type>password</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>admin_username</name>
-    <value>admin</value>
-    <description>This is the username for default admin user that is used for creating ambari user in Ranger Admin</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>admin_password</name>
-    <value>admin</value>
-    <property-type>PASSWORD</property-type>
-    <description>This is the password for default admin user that is used for creating ambari user in Ranger Admin</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-
-  <property>
-    <name>ranger_pid_dir</name>
-    <value>/var/run/ranger</value>
-    <description/>
-    <value-attributes>
-      <type>directory</type>
-      <overridable>false</overridable>
-      <editable-only-at-install>true</editable-only-at-install>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger-hdfs-plugin-enabled</name>
-    <value>No</value>
-    <display-name>HDFS Ranger Plugin</display-name>
-    <description>Enable HDFS Ranger plugin</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>Yes</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>No</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger-hive-plugin-enabled</name>
-    <value>No</value>
-    <display-name>Hive Ranger Plugin</display-name>
-    <description>Enable Hive Ranger plugin</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>Yes</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>No</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger-hbase-plugin-enabled</name>
-    <value>No</value>
-    <display-name>Hbase Ranger Plugin</display-name>
-    <description>Enable HBase Ranger plugin</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>Yes</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>No</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger-storm-plugin-enabled</name>
-    <value>No</value>
-    <display-name>Storm Ranger Plugin</display-name>
-    <description>Enable Storm Ranger plugin</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>Yes</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>No</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger-knox-plugin-enabled</name>
-    <value>No</value>
-    <display-name>Knox Ranger Plugin</display-name>
-    <description>Enable Knox Ranger plugin</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>Yes</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>No</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-
-  <property>
-    <name>xml_configurations_supported</name>
-    <value>true</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>create_db_dbuser</name>
-    <value>true</value>
-    <display-name>Setup Database and Database User</display-name>
-    <description>If set to Yes, Ambari will create and setup Ranger Database and Database User. This will require to specify Database Admin user and password</description>
-    <value-attributes>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger_privelege_user_jdbc_url</name>
-    <display-name>JDBC connect string for root user</display-name>
-    <description>JDBC connect string - auto populated based on other values. This is to be used by root user</description>
-    <value>jdbc:mysql://localhost</value>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>admin-properties</type>
-        <name>DB_FLAVOR</name>
-      </property>
-      <property>
-        <type>admin-properties</type>
-        <name>db_host</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger-yarn-plugin-enabled</name>
-    <value>No</value>
-    <display-name>YARN Ranger Plugin</display-name>
-    <description>Enable YARN Ranger plugin</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>Yes</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>No</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger-kafka-plugin-enabled</name>
-    <value>No</value>
-    <display-name>Kafka Ranger Plugin</display-name>
-    <description>Enable Kafka Ranger plugin</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>Yes</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>No</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.solr</name>
-    <value>true</value>
-    <display-name>Audit to Solr</display-name>
-    <description>Enable Audit to Solr for all ranger supported services. This property is overridable at service level</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>is_solrCloud_enabled</name>
-    <display-name>SolrCloud</display-name>
-    <description>SolrCloud uses zookeeper for distributed search and indexing</description>
-    <value>false</value>
-    <value-attributes>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.hdfs</name>
-    <value>true</value>
-    <display-name>Audit to HDFS</display-name>
-    <description>Enable Audit to HDFS for all ranger supported services. This property is overridable at service level</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.hdfs.dir</name>
-    <value>hdfs://localhost:8020</value>
-    <display-name>Destination HDFS Directory</display-name>
-    <description>HDFS folder to write audit to, make sure all service user has required permissions. This property is overridable at service level</description>
-    <depends-on>
-      <property>
-        <type>core-site</type>
-        <name>fs.defaultFS</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_solr_config_set</name>
-    <value>ranger_audits</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_solr_collection_name</name>
-    <value>ranger_audits</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_solr_shards</name>
-    <value>1</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_solr_replication_factor</name>
-    <value>1</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger-atlas-plugin-enabled</name>
-    <value>No</value>
-    <display-name>Atlas Ranger Plugin</display-name>
-    <description>Enable Atlas Ranger plugin</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>Yes</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>No</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>is_external_solrCloud_enabled</name>
-    <display-name>External SolrCloud</display-name>
-    <value>false</value>
-    <description>Using Externally managed solr cloud ?</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>is_external_solrCloud_kerberos</name>
-    <display-name>External SolrCloud kerberos</display-name>
-    <value>false</value>
-    <description>Is Externally managed solr cloud kerberos ?</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger-nifi-plugin-enabled</name>
-    <value>No</value>
-    <display-name>NIFI Ranger Plugin</display-name>
-    <description>Enable NIFI Ranger plugin</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>Yes</value>
-          <label>ON</label>
-        </entry>
-        <entry>
-          <value>No</value>
-          <label>OFF</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-site.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-site.xml
deleted file mode 100644
index c70e222..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-site.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_final="false">
-
-
-
-
-
-
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-solr-configuration.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-solr-configuration.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-solr-configuration.xml
deleted file mode 100644
index 550ce0d..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-solr-configuration.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>ranger_audit_max_retention_days</name>
-    <display-name>Max Retention Days</display-name>
-    <description>Days to retain audit logs in Solr</description>
-    <value>90</value>
-    <value-attributes>
-      <type>int</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_audit_logs_merge_factor</name>
-    <display-name>Merge Factor</display-name>
-    <description>
-      The mergeFactor value tells Lucene how many segments of equal size to build before merging them into a
-      single segment. High value merge factor (e.g. 25) improves indexing speed, but slows down searching. Low value
-      (e.g. 5) improves searching, but slows down indexing.
-    </description>
-    <value>5</value>
-    <value-attributes>
-      <type>int</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>content</name>
-    <display-name>solr-config template</display-name>
-    <description>the jinja template for solrconfig.xml file used for ranger audit logs</description>
-    <value/>
-    <property-type>VALUE_FROM_PROPERTY_FILE</property-type>
-    <value-attributes>
-      <property-file-name>ranger-solrconfig.xml.j2</property-file-name>
-      <property-file-type>xml</property-file-type>
-    </value-attributes>
-    <on-ambari-upgrade add="false" />
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-policymgr-ssl.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-policymgr-ssl.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-policymgr-ssl.xml
deleted file mode 100644
index a4c9441..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-policymgr-ssl.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>xasecure.policymgr.clientssl.keystore</name>
-    <value>/etc/security/serverKeys/ranger-tagsync-keystore.jks</value>
-    <description>Java Keystore files</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.keystore.password</name>
-    <value>myKeyFilePassword</value>
-    <property-type>PASSWORD</property-type>
-    <description>password for keystore</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.truststore</name>
-    <value>/etc/security/serverKeys/ranger-tagsync-mytruststore.jks</value>
-    <description>java truststore file</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.truststore.password</name>
-    <value>changeit</value>
-    <property-type>PASSWORD</property-type>
-    <description>java truststore password</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.keystore.credential.file</name>
-    <value>jceks://file{{ranger_tagsync_credential_file}}</value>
-    <description>java keystore credential file</description>
-    <on-ambari-upgrade add="false" />
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.truststore.credential.file</name>
-    <value>jceks://file{{ranger_tagsync_credential_file}}</value>
-    <description>java truststore credential file</description>
-    <on-ambari-upgrade add="false" />
-  </property>
-
-</configuration>


[22/52] [abbrv] ambari git commit: AMBARI-21333 ADDENDUM Extract Log Search part from stack advisor to a separate service advisor (mgergely)

Posted by jl...@apache.org.
AMBARI-21333 ADDENDUM Extract Log Search part from stack advisor to a separate service advisor (mgergely)

Change-Id: I2ad3ab6ef1acbb637ea0cf5758c725cf96dd4292


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: e666e9b44c98b7d06b8cbe48d70b5e3c924302c7
Parents: 5c9bdbf
Author: Miklos Gergely <mg...@hortonworks.com>
Authored: Thu Jul 6 12:12:05 2017 +0200
Committer: Miklos Gergely <mg...@hortonworks.com>
Committed: Thu Jul 6 12:12:05 2017 +0200

----------------------------------------------------------------------
 .../common-services/LOGSEARCH/0.5.0/service_advisor.py        | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e666e9b4/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/service_advisor.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/service_advisor.py
index 6a61b07..fc49824 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/service_advisor.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/service_advisor.py
@@ -120,7 +120,9 @@ class LogSearchServiceAdvisor(service_advisor.ServiceAdvisor):
     putLogFeederEnvAttribute = self.putPropertyAttribute(configurations, "logfeeder-env")
 
     logSearchServerHosts = self.getComponentHostNames(services, "LOGSEARCH", "LOGSEARCH_SERVER")
+    # if there is no Log Search server on the cluster, i.e. there is an external server
     if logSearchServerHosts is None or len(logSearchServerHosts) == 0:
+      # hide logsearch specific attributes, except for a few which are used by the logfeeders too
       for key in services['configurations']['logsearch-env']['properties']:
         putLogSearchEnvAttribute(key, 'visible', 'false')
       for key in services['configurations']['logsearch-properties']['properties']:
@@ -135,10 +137,13 @@ class LogSearchServiceAdvisor(service_advisor.ServiceAdvisor):
       for key in services['configurations']['logsearch-log4j']['properties']:
         self.putPropertyAttribute(configurations, "logsearch-log4j")(key, 'visible', 'false')
       
+      # in the abscence of a server we can't provide a good estimation for the number of shards
       putLogSearchProperty("logsearch.collection.service.logs.numshards", 2)
       putLogSearchProperty("logsearch.collection.audit.logs.numshards", 2)
+    # if there is a Log Search server on the cluster
     else:
       infraSolrHosts = self.getComponentHostNames(services, "AMBARI_INFRA", "INFRA_SOLR")
+      # if there is AMBARI_INFRA, calculate the min/max shards and recommendations based on the number of infra solr hosts
       if infraSolrHosts is not None and len(infraSolrHosts) > 0 and "logsearch-properties" in services["configurations"]:
         replicationReccomendFloat = math.log(len(infraSolrHosts), 5)
         recommendedReplicationFactor = int(1 + math.floor(replicationReccomendFloat))
@@ -146,6 +151,7 @@ class LogSearchServiceAdvisor(service_advisor.ServiceAdvisor):
         recommendedMinShards = len(infraSolrHosts)
         recommendedShards = 2 * len(infraSolrHosts)
         recommendedMaxShards = 3 * len(infraSolrHosts)
+      # if there is no AMBARI_INFRA (i.e. external solr is used), use default values for min/max shards and recommendations
       else:
         recommendedReplicationFactor = 2
         
@@ -168,6 +174,7 @@ class LogSearchServiceAdvisor(service_advisor.ServiceAdvisor):
       putLogSearchProperty("logsearch.collection.audit.logs.replication.factor", recommendedReplicationFactor)
       
     kerberos_authentication_enabled = self.isSecurityEnabled(services)
+    # if there is no kerberos enabled hide kerberor related properties
     if not kerberos_authentication_enabled:
        putLogSearchCommonEnvProperty('logsearch_external_solr_kerberos_enabled', 'false')
        putLogSearchCommonEnvAttribute('logsearch_external_solr_kerberos_enabled', 'visible', 'false')


[32/52] [abbrv] ambari git commit: AMBARI-21400. Upgrade Infra Solr version from 5.5.2 to 6.6.x (oleewere)

Posted by jl...@apache.org.
AMBARI-21400. Upgrade Infra Solr version from 5.5.2 to 6.6.x (oleewere)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: a795f38cd49c2c55c837b0daecaa63a67015d0eb
Parents: 1939dab
Author: oleewere <ol...@gmail.com>
Authored: Thu Jul 6 20:28:11 2017 +0200
Committer: oleewere <ol...@gmail.com>
Committed: Fri Jul 7 14:25:24 2017 +0200

----------------------------------------------------------------------
 .../libraries/functions/solr_cloud_util.py      |  10 +
 .../src/main/resources/solr                     | 826 +++++++++++++++----
 .../ambari/infra/solr/AmbariSolrCloudCLI.java   |  14 +
 .../infra/solr/AmbariSolrCloudClient.java       |   8 +
 .../commands/RemoveAdminHandlersCommand.java    |  46 ++
 .../commands/SetClusterPropertyZkCommand.java   |   6 +-
 .../InfraRuleBasedAuthorizationPluginTest.java  |   5 +
 ambari-infra/pom.xml                            |   2 +-
 .../configsets/audit_logs/conf/solrconfig.xml   |   3 +-
 .../configsets/hadoop_logs/conf/solrconfig.xml  |   3 +-
 .../main/configsets/history/conf/solrconfig.xml |   3 +-
 .../logsearch/dao/SolrSchemaFieldDao.java       |   2 +-
 ambari-logsearch/docker/Dockerfile              |   2 +-
 ambari-logsearch/docker/bin/start.sh            |   4 +-
 ambari-logsearch/pom.xml                        |   2 +-
 .../server/upgrade/UpgradeCatalog300.java       |  18 +
 .../0.1.0/package/scripts/params.py             |   3 +
 .../0.1.0/package/scripts/setup_infra_solr.py   |  17 +-
 .../properties/audit_logs-solrconfig.xml.j2     |   3 +-
 .../properties/service_logs-solrconfig.xml.j2   |   3 +-
 .../server/upgrade/UpgradeCatalog300Test.java   |  33 +
 .../stacks/2.4/AMBARI_INFRA/test_infra_solr.py  |   3 +
 22 files changed, 836 insertions(+), 180 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
index 1c5432b..12356ed 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
@@ -190,6 +190,16 @@ def secure_solr_znode(zookeeper_quorum, solr_znode, jaas_file, java64_home, sasl
   secure_solr_znode_cmd = format('{solr_cli_prefix} --secure-solr-znode --jaas-file {jaas_file} --sasl-users {sasl_users_str}')
   Execute(secure_solr_znode_cmd)
 
+def remove_admin_handlers(zookeeper_quorum, solr_znode, java64_home, collection, jaas_file, retry = 5, interval = 10):
+  """
+  Remove "solr.admin.AdminHandlers" request handler from collection config. Required for migrating to Solr 6 from Solr 5.
+  """
+  solr_cli_prefix = __create_solr_cloud_cli_prefix(zookeeper_quorum, solr_znode, java64_home)
+  remove_admin_handlers_cmd = format('{solr_cli_prefix} --remove-admin-handlers --collection {collection} --retry {retry} --interval {interval}')
+  if jaas_file is not None:
+    remove_admin_handlers_cmd+=format(' --jaas-file {jaas_file}')
+  Execute(remove_admin_handlers_cmd)
+
 def default_config(config, name, default_value):
   subdicts = filter(None, name.split('/'))
   if not config:

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-infra/ambari-infra-assembly/src/main/resources/solr
----------------------------------------------------------------------
diff --git a/ambari-infra/ambari-infra-assembly/src/main/resources/solr b/ambari-infra/ambari-infra-assembly/src/main/resources/solr
old mode 100644
new mode 100755
index bf504d9..6f2de8f
--- a/ambari-infra/ambari-infra-assembly/src/main/resources/solr
+++ b/ambari-infra/ambari-infra-assembly/src/main/resources/solr
@@ -49,6 +49,9 @@ SOLR_SCRIPT="$0"
 verbose=false
 THIS_OS=`uname -s`
 
+# What version of Java is required to run this version of Solr.
+JAVA_VER_REQ="1.8"
+
 stop_all=false
 
 # for now, we don't support running this script from cygwin due to problems
@@ -84,6 +87,7 @@ if [ -z "$SOLR_INCLUDE" ]; then
                /etc/default/solr.in.sh \
                /opt/solr/solr.in.sh; do
     if [ -r "$include" ]; then
+        SOLR_INCLUDE="$include"
         . "$include"
         break
     fi
@@ -116,16 +120,44 @@ else
   JAVA=java
 fi
 
-# test that Java exists and is executable on this server
-"$JAVA" -version >/dev/null 2>&1 || {
+if [ -z "$SOLR_STOP_WAIT" ]; then
+  SOLR_STOP_WAIT=180
+fi
+# test that Java exists, is executable and correct version
+JAVA_VER=$("$JAVA" -version 2>&1)
+if [[ $? -ne 0 ]] ; then
   echo >&2 "Java not found, or an error was encountered when running java."
-  echo >&2 "A working Java 7 or later is required to run Solr!"
-  echo >&2 "Please install Java or fix JAVA_HOME before running this script."
-  echo >&2 "Command that we tried: '${JAVA} -version'"
+  echo >&2 "A working Java $JAVA_VER_REQ JRE is required to run Solr!"
+  echo >&2 "Please install latest version of Java $JAVA_VER_REQ or set JAVA_HOME properly."
+  echo >&2 "Command that we tried: '${JAVA} -version', with response:"
+  echo >&2 "${JAVA_VER}"
+  echo >&2
+  echo >&2 "Debug information:"
+  echo >&2 "JAVA_HOME: ${JAVA_HOME:-N/A}"
   echo >&2 "Active Path:"
   echo >&2 "${PATH}"
   exit 1
-}
+else
+  JAVA_VER_NUM=$(echo $JAVA_VER | head -1 | awk -F '"' '/version/ {print $2}')
+  if [[ "$JAVA_VER_NUM" < "$JAVA_VER_REQ" ]] ; then
+    echo >&2 "Your current version of Java is too old to run this version of Solr"
+    echo >&2 "We found version $JAVA_VER_NUM, using command '${JAVA} -version', with response:"
+    echo >&2 "${JAVA_VER}"
+    echo >&2
+    echo >&2 "Please install latest version of Java $JAVA_VER_REQ or set JAVA_HOME properly."
+    echo >&2
+    echo >&2 "Debug information:"
+    echo >&2 "JAVA_HOME: ${JAVA_HOME:-N/A}"
+    echo >&2 "Active Path:"
+    echo >&2 "${PATH}"
+    exit 1
+  fi
+  JAVA_VENDOR="Oracle"
+  if [ "`echo $JAVA_VER | grep -i "IBM J9"`" != "" ]; then
+      JAVA_VENDOR="IBM J9"
+  fi
+fi
+
 
 # Select HTTP OR HTTPS related configurations
 SOLR_URL_SCHEME=http
@@ -134,30 +166,109 @@ SOLR_SSL_OPTS=""
 if [ -n "$SOLR_SSL_KEY_STORE" ]; then
   SOLR_JETTY_CONFIG+=("--module=https")
   SOLR_URL_SCHEME=https
-  SOLR_SSL_OPTS=" -Dsolr.jetty.keystore=$SOLR_SSL_KEY_STORE \
-    -Dsolr.jetty.keystore.password=$SOLR_SSL_KEY_STORE_PASSWORD \
-    -Dsolr.jetty.truststore=$SOLR_SSL_TRUST_STORE \
-    -Dsolr.jetty.truststore.password=$SOLR_SSL_TRUST_STORE_PASSWORD \
-    -Dsolr.jetty.ssl.needClientAuth=$SOLR_SSL_NEED_CLIENT_AUTH \
-    -Dsolr.jetty.ssl.wantClientAuth=$SOLR_SSL_WANT_CLIENT_AUTH"
+  SOLR_SSL_OPTS+=" -Dsolr.jetty.keystore=$SOLR_SSL_KEY_STORE"
+  if [ -n "$SOLR_SSL_KEY_STORE_PASSWORD" ]; then
+    SOLR_SSL_OPTS+=" -Dsolr.jetty.keystore.password=$SOLR_SSL_KEY_STORE_PASSWORD"
+  fi
+  if [ -n "$SOLR_SSL_KEY_STORE_TYPE" ]; then
+    SOLR_SSL_OPTS+=" -Dsolr.jetty.keystore.type=$SOLR_SSL_KEY_STORE_TYPE"
+  fi
+
+  if [ -n "$SOLR_SSL_TRUST_STORE" ]; then
+    SOLR_SSL_OPTS+=" -Dsolr.jetty.truststore=$SOLR_SSL_TRUST_STORE"
+  fi
+  if [ -n "$SOLR_SSL_TRUST_STORE_PASSWORD" ]; then
+    SOLR_SSL_OPTS+=" -Dsolr.jetty.truststore.password=$SOLR_SSL_TRUST_STORE_PASSWORD"
+  fi
+  if [ -n "$SOLR_SSL_TRUST_STORE_TYPE" ]; then
+    SOLR_SSL_OPTS+=" -Dsolr.jetty.truststore.type=$SOLR_SSL_TRUST_STORE_TYPE"
+  fi
+
+  if [ -n "$SOLR_SSL_NEED_CLIENT_AUTH" ]; then
+    SOLR_SSL_OPTS+=" -Dsolr.jetty.ssl.needClientAuth=$SOLR_SSL_NEED_CLIENT_AUTH"
+  fi
+  if [ -n "$SOLR_SSL_WANT_CLIENT_AUTH" ]; then
+    SOLR_SSL_OPTS+=" -Dsolr.jetty.ssl.wantClientAuth=$SOLR_SSL_WANT_CLIENT_AUTH"
+  fi
+
   if [ -n "$SOLR_SSL_CLIENT_KEY_STORE" ]; then
-    SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStore=$SOLR_SSL_CLIENT_KEY_STORE \
-      -Djavax.net.ssl.keyStorePassword=$SOLR_SSL_CLIENT_KEY_STORE_PASSWORD \
-      -Djavax.net.ssl.trustStore=$SOLR_SSL_CLIENT_TRUST_STORE \
-      -Djavax.net.ssl.trustStorePassword=$SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD"
+    SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStore=$SOLR_SSL_CLIENT_KEY_STORE"
+
+    if [ -n "$SOLR_SSL_CLIENT_KEY_STORE_PASSWORD" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStorePassword=$SOLR_SSL_CLIENT_KEY_STORE_PASSWORD"
+    fi
+    if [ -n "$SOLR_SSL_CLIENT_KEY_STORE_TYPE" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStoreType=$SOLR_SSL_CLIENT_KEY_STORE_TYPE"
+    fi
+  else
+    if [ -n "$SOLR_SSL_KEY_STORE" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStore=$SOLR_SSL_KEY_STORE"
+    fi
+    if [ -n "$SOLR_SSL_KEY_STORE_PASSWORD" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStorePassword=$SOLR_SSL_KEY_STORE_PASSWORD"
+    fi
+    if [ -n "$SOLR_SSL_KEY_STORE_TYPE" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStoreType=$SOLR_SSL_KEYSTORE_TYPE"
+    fi
+  fi
+
+  if [ -n "$SOLR_SSL_CLIENT_TRUST_STORE" ]; then
+    SOLR_SSL_OPTS+=" -Djavax.net.ssl.trustStore=$SOLR_SSL_CLIENT_TRUST_STORE"
+
+    if [ -n "$SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.trustStorePassword=$SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD"
+    fi
+
+    if [ -n "$SOLR_SSL_CLIENT_TRUST_STORE_TYPE" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.trustStoreType=$SOLR_SSL_CLIENT_TRUST_STORE_TYPE"
+    fi
   else
-    SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStore=$SOLR_SSL_KEY_STORE \
-      -Djavax.net.ssl.keyStorePassword=$SOLR_SSL_KEY_STORE_PASSWORD \
-      -Djavax.net.ssl.trustStore=$SOLR_SSL_TRUST_STORE \
-      -Djavax.net.ssl.trustStorePassword=$SOLR_SSL_TRUST_STORE_PASSWORD"
+    if [ -n "$SOLR_SSL_TRUST_STORE" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.trustStore=$SOLR_SSL_TRUST_STORE"
+    fi
+
+    if [ -n "$SOLR_SSL_TRUST_STORE_PASSWORD" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.trustStorePassword=$SOLR_SSL_TRUST_STORE_PASSWORD"
+    fi
+
+    if [ -n "$SOLR_SSL_TRUST_STORE_TYPE" ]; then
+      SOLR_SSL_OPTS+=" -Djavax.net.ssl.trustStoreType=$SOLR_SSL_TRUST_STORE_TYPE"
+    fi
   fi
 else
   SOLR_JETTY_CONFIG+=("--module=http")
 fi
 
 # Authentication options
+if [ -z "$SOLR_AUTH_TYPE" ] && [ -n "$SOLR_AUTHENTICATION_OPTS" ]; then
+  echo "WARNING: SOLR_AUTHENTICATION_OPTS environment variable configured without associated SOLR_AUTH_TYPE variable"
+  echo "         Please configure SOLR_AUTH_TYPE environment variable with the authentication type to be used."
+  echo "         Currently supported authentication types are [kerberos, basic]"
+fi
+
+if [ -n "$SOLR_AUTH_TYPE" ] && [ -n "$SOLR_AUTHENTICATION_CLIENT_CONFIGURER" ]; then
+  echo "WARNING: SOLR_AUTHENTICATION_CLIENT_CONFIGURER and SOLR_AUTH_TYPE environment variables are configured together."
+  echo "         Use SOLR_AUTH_TYPE environment variable to configure authentication type to be used. "
+  echo "         Currently supported authentication types are [kerberos, basic]"
+  echo "         The value of SOLR_AUTHENTICATION_CLIENT_CONFIGURER environment variable will be ignored"
+fi
+
+if [ -n "$SOLR_AUTH_TYPE" ]; then
+  case "$(echo $SOLR_AUTH_TYPE | awk '{print tolower($0)}')" in
+    basic)
+      SOLR_AUTHENTICATION_CLIENT_CONFIGURER="org.apache.solr.client.solrj.impl.PreemptiveBasicAuthConfigurer"
+      ;;
+    kerberos)
+      SOLR_AUTHENTICATION_CLIENT_CONFIGURER="org.apache.solr.client.solrj.impl.Krb5HttpClientConfigurer"
+      ;;
+    *)
+      echo "ERROR: Value specified for SOLR_AUTH_TYPE environment variable is invalid."
+      exit 1
+   esac
+fi
+
 if [ "$SOLR_AUTHENTICATION_CLIENT_CONFIGURER" != "" ]; then
-  AUTHC_CLIENT_CONFIGURER_ARG="-Dsolr.authentication.httpclient.configurer=$SOLR_AUTHENTICATION_CLIENT_CONFIGURER"
+  AUTHC_CLIENT_CONFIGURER_ARG="-Dsolr.httpclient.builder.factory=$SOLR_AUTHENTICATION_CLIENT_CONFIGURER"
 fi
 AUTHC_OPTS="$AUTHC_CLIENT_CONFIGURER_ARG $SOLR_AUTHENTICATION_OPTS"
 
@@ -179,7 +290,7 @@ function print_usage() {
   if [ -z "$CMD" ]; then
     echo ""
     echo "Usage: solr COMMAND OPTIONS"
-    echo "       where COMMAND is one of: start, stop, restart, status, healthcheck, create, create_core, create_collection, delete, version, zk"
+    echo "       where COMMAND is one of: start, stop, restart, status, healthcheck, create, create_core, create_collection, delete, version, zk, auth"
     echo ""
     echo "  Standalone server example (start Solr running in the background on port 8984):"
     echo ""
@@ -206,7 +317,7 @@ function print_usage() {
     echo ""
     echo "  -p <port>     Specify the port to start the Solr HTTP listener on; default is 8983"
     echo "                  The specified port (SOLR_PORT) will also be used to determine the stop port"
-    echo "                  STOP_PORT=(\$SOLR_PORT-1000) and JMX RMI listen port RMI_PORT=(1\$SOLR_PORT). "
+    echo "                  STOP_PORT=(\$SOLR_PORT-1000) and JMX RMI listen port RMI_PORT=(\$SOLR_PORT+10000). "
     echo "                  For instance, if you set -p 8985, then the STOP_PORT=7985 and RMI_PORT=18985"
     echo ""
     echo "  -d <dir>      Specify the Solr server directory; defaults to server"
@@ -237,7 +348,9 @@ function print_usage() {
     echo ""
     echo "  -noprompt     Don't prompt for input; accept all defaults when running examples that accept user input"
     echo ""
-    echo "  -V            Verbose messages from this script"
+    echo "  -v and -q     Verbose (-v) or quiet (-q) logging. Sets default log level to DEBUG or WARN instead of INFO"
+    echo ""
+    echo "  -V or -verbose Verbose messages from this script"
     echo ""
   elif [ "$CMD" == "stop" ]; then
     echo ""
@@ -354,28 +467,132 @@ function print_usage() {
     echo "                            Solr instance and will use the port of the first server it finds."
     echo ""
   elif [ "$CMD" == "zk" ]; then
-    echo "Usage: solr zk [-upconfig|-downconfig] [-d confdir] [-n configName] [-z zkHost]"
+    print_short_zk_usage ""
+    echo "         Be sure to check the Solr logs in case of errors."
+    echo ""
+    echo "             -z zkHost Optional Zookeeper connection string for all commands. If specified it"
+    echo "                        overrides the 'ZK_HOST=...'' defined in solr.in.sh."
+    echo ""
+    echo "         upconfig uploads a configset from the local machine to Zookeeper. (Backcompat: -upconfig)"
+    echo ""
+    echo "         downconfig downloads a configset from Zookeeper to the local machine. (Backcompat: -downconfig)"
+    echo ""
+    echo "             -n configName   Name of the configset in Zookeeper that will be the destination of"
+    echo "                             'upconfig' and the source for 'downconfig'."
+    echo ""
+    echo "             -d confdir      The local directory the configuration will be uploaded from for"
+    echo "                             'upconfig' or downloaded to for 'downconfig'. If 'confdir' is a child of"
+    echo "                             ...solr/server/solr/configsets' then the configs will be copied from/to"
+    echo "                             that directory. Otherwise it is interpreted as a simple local path."
+    echo ""
+    echo "         cp copies files or folders to/from Zookeeper or Zokeeper -> Zookeeper"
+    echo "             -r   Recursively copy <src> to <dst>. Command will fail if <src> has children and "
+    echo "                        -r is not specified. Optional"
+    echo ""
+    echo "             <src>, <dest> : [file:][/]path/to/local/file or zk:/path/to/zk/node"
+    echo "                             NOTE: <src> and <dest> may both be Zookeeper resources prefixed by 'zk:'"
+    echo "             When <src> is a zk resource, <dest> may be '.'"
+    echo "             If <dest> ends with '/', then <dest> will be a local folder or parent znode and the last"
+    echo "             element of the <src> path will be appended unless <src> also ends in a slash. "
+    echo "             <dest> may be zk:, which may be useful when using the cp -r form to backup/restore "
+    echo "             the entire zk state."
+    echo "             You must enclose local paths that end in a wildcard in quotes or just"
+    echo "             end the local path in a slash. That is,"
+    echo "             'bin/solr zk cp -r /some/dir/ zk:/ -z localhost:2181' is equivalent to"
+    echo "             'bin/solr zk cp -r \"/some/dir/*\" zk:/ -z localhost:2181'"
+    echo "             but 'bin/solr zk cp -r /some/dir/* zk:/ -z localhost:2181' will throw an error"
+    echo ""
+    echo "             here's an example of backup/restore for a ZK configuration:"
+    echo "             to copy to local: 'bin/solr zk cp -r zk:/ /some/dir -z localhost:2181'"
+    echo "             to restore to ZK: 'bin/solr zk cp -r /some/dir/ zk:/ -z localhost:2181'"
+    echo ""
+    echo "             The 'file:' prefix is stripped, thus 'file:/wherever' specifies an absolute local path and"
+    echo "             'file:somewhere' specifies a relative local path. All paths on Zookeeper are absolute."
+    echo ""
+    echo "             Zookeeper nodes CAN have data, so moving a single file to a parent znode"
+    echo "             will overlay the data on the parent Znode so specifying the trailing slash"
+    echo "             can be important."
+    echo ""
+    echo "             Wildcards are supported when copying from local, trailing only and must be quoted."
+    echo ""
+    echo "         rm deletes files or folders on Zookeeper"
+    echo "             -r     Recursively delete if <path> is a directory. Command will fail if <path>"
+    echo "                    has children and -r is not specified. Optional"
+    echo "             <path> : [zk:]/path/to/zk/node. <path> may not be the root ('/')"
+    echo ""
+    echo "         mv moves (renames) znodes on Zookeeper"
+    echo "             <src>, <dest> : Zookeeper nodes, the 'zk:' prefix is optional."
+    echo "             If <dest> ends with '/', then <dest> will be a parent znode"
+    echo "             and the last element of the <src> path will be appended."
+    echo "             Zookeeper nodes CAN have data, so moving a single file to a parent znode"
+    echo "             will overlay the data on the parent Znode so specifying the trailing slash"
+    echo "             is important."
+    echo ""
+    echo "         ls lists the znodes on Zookeeper"
+    echo "             -r recursively descends the path listing all znodes. Optional"
+    echo "             <path>: The Zookeeper path to use as the root."
+    echo ""
+    echo "             Only the node names are listed, not data"
+    echo ""
+    echo "         mkroot makes a znode on Zookeeper with no data. Can be used to make a path of arbitrary"
+    echo "             depth but primarily intended to create a 'chroot'."
     echo ""
-    echo "     -upconfig to move a configset from the local machine to Zookeeper."
+    echo "             <path>: The Zookeeper path to create. Leading slash is assumed if not present."
+    echo "                     Intermediate nodes are created as needed if not present."
     echo ""
-    echo "     -downconfig to move a configset from Zookeeper to the local machine."
+  elif [ "$CMD" == "auth" ]; then
     echo ""
-    echo "     -n configName    Name of the configset in Zookeeper that will be the destinatino of"
-    echo "                       'upconfig' and the source for 'downconfig'."
+    echo "Usage: solr auth enable [-type basicAuth] -credentials user:pass [-blockUnknown <true|false>] [-updateIncludeFileOnly <true|false>]"
+    echo "       solr auth enable [-type basicAuth] -prompt <true|false> [-blockUnknown <true|false>] [-updateIncludeFileOnly <true|false>]"
+    echo "       solr auth disable [-updateIncludeFileOnly <true|false>]"
     echo ""
-    echo "     -d confdir       The local directory the configuration will be uploaded from for"
-    echo "                      'upconfig' or downloaded to for 'downconfig'. For 'upconfig', this"
-    echo "                      can be one of the example configsets, basic_configs, data_driven_schema_configs or"
-    echo "                      sample_techproducts_configs or an arbitrary directory."
+    echo "  -type <type>                           The authentication mechanism to enable. Defaults to 'basicAuth'."
     echo ""
-    echo "     -z zkHost        Zookeeper connection string."
+    echo "  -credentials <user:pass>               The username and password of the initial user"
+    echo "                                         Note: only one of -prompt or -credentials must be provided"
     echo ""
-    echo "  NOTE: Solr must have been started least once (or have it running) before using this command."
-    echo "        This initialized Zookeeper for Solr"
+    echo "  -prompt <true|false>                   Prompts the user to provide the credentials"
+    echo "                                         Note: only one of -prompt or -credentials must be provided"
+    echo ""
+    echo "  -blockUnknown <true|false>             When true, this blocks out access to unauthenticated users. When not provided,"
+    echo "                                         this defaults to false (i.e. unauthenticated users can access all endpoints, except the"
+    echo "                                         operations like collection-edit, security-edit, core-admin-edit etc.). Check the reference"
+    echo "                                         guide for Basic Authentication for more details."
+    echo ""
+    echo "  -updateIncludeFileOnly <true|false>    Only update the solr.in.sh or solr.in.cmd file, and skip actual enabling/disabling"
+    echo "                                         authentication (i.e. don't update security.json)"
+    echo ""
+    echo "  -z zkHost                              Zookeeper connection string"
+    echo ""
+    echo "  -d <dir>                               Specify the Solr server directory"
+    echo ""
+    echo "  -s <dir>                               Specify the Solr home directory. This is where any credentials or authentication"
+    echo "                                         configuration files (e.g. basicAuth.conf) would be placed."
     echo ""
   fi
 } # end print_usage
 
+function print_short_zk_usage() {
+
+  if [ "$1" != "" ]; then
+    echo -e "\nERROR: $1\n"
+  fi
+
+  echo "  Usage: solr zk upconfig|downconfig -d <confdir> -n <configName> [-z zkHost]"
+  echo "         solr zk cp [-r] <src> <dest> [-z zkHost]"
+  echo "         solr zk rm [-r] <path> [-z zkHost]"
+  echo "         solr zk mv <src> <dest> [-z zkHost]"
+  echo "         solr zk ls [-r] <path> [-z zkHost]"
+  echo "         solr zk mkroot <path> [-z zkHost]"
+  echo ""
+
+  if [ "$1" == "" ]; then
+    echo "Type bin/solr zk -help for full usage help"
+  else
+    exit 1
+  fi
+}
+
 # used to show the script is still alive when waiting on work to complete
 function spinner() {
   local pid=$1
@@ -407,7 +624,7 @@ function solr_pid_by_port() {
 # extract the value of the -Djetty.port parameter from a running Solr process 
 function jetty_port() {
   SOLR_PID="$1"
-  SOLR_PROC=`ps auxww | grep -w $SOLR_PID | grep start\.jar | grep jetty.port`
+  SOLR_PROC=`ps auxww | grep -w $SOLR_PID | grep start\.jar | grep jetty\.port`
   IFS=' ' read -a proc_args <<< "$SOLR_PROC"
   for arg in "${proc_args[@]}"
     do
@@ -455,10 +672,10 @@ function get_info() {
     done < <(find "$SOLR_PID_DIR" -name "solr-*.pid" -type f)
   else
     # no pid files but check using ps just to be sure
-    numSolrs=`ps auxww | grep start\.jar | grep solr.solr.home | grep -v grep | wc -l | sed -e 's/^[ \t]*//'`
+    numSolrs=`ps auxww | grep start\.jar | grep solr\.solr\.home | grep -v grep | wc -l | sed -e 's/^[ \t]*//'`
     if [ "$numSolrs" != "0" ]; then
       echo -e "\nFound $numSolrs Solr nodes: "
-      PROCESSES=$(ps auxww | grep start\.jar | grep solr.solr.home | grep -v grep | awk '{print $2}' | sort -r)
+      PROCESSES=$(ps auxww | grep start\.jar | grep solr\.solr\.home | grep -v grep | awk '{print $2}' | sort -r)
       for ID in $PROCESSES
         do
           port=`jetty_port "$ID"`
@@ -490,9 +707,24 @@ function stop_solr() {
   SOLR_PID="$4"
 
   if [ "$SOLR_PID" != "" ]; then
-    echo -e "Sending stop command to Solr running on port $SOLR_PORT ... waiting 5 seconds to allow Jetty process $SOLR_PID to stop gracefully."
+    echo -e "Sending stop command to Solr running on port $SOLR_PORT ... waiting up to $SOLR_STOP_WAIT seconds to allow Jetty process $SOLR_PID to stop gracefully."
     "$JAVA" $SOLR_SSL_OPTS $AUTHC_OPTS -jar "$DIR/start.jar" "STOP.PORT=$STOP_PORT" "STOP.KEY=$STOP_KEY" --stop || true
-    (sleep 5) &
+      (loops=0
+      while true
+      do
+        CHECK_PID=`ps auxww | awk '{print $2}' | grep -w $SOLR_PID | sort -r | tr -d ' '`
+        if [ "$CHECK_PID" != "" ]; then
+          slept=$((loops * 2))
+          if [ $slept -lt $SOLR_STOP_WAIT ]; then
+            sleep 2
+            loops=$[$loops+1]
+          else
+            exit # subshell!
+          fi
+        else
+          exit # subshell!
+        fi
+      done) &
     spinner $!
     rm -f "$SOLR_PID_DIR/solr-$SOLR_PORT.pid"
   else
@@ -555,6 +787,12 @@ if [ "$SCRIPT_CMD" == "status" ]; then
   exit
 fi
 
+# assert tool
+if [ "$SCRIPT_CMD" == "assert" ]; then
+  run_tool assert $*
+  exit $?
+fi
+
 # run a healthcheck and exit if requested
 if [ "$SCRIPT_CMD" == "healthcheck" ]; then
 
@@ -571,7 +809,7 @@ if [ "$SCRIPT_CMD" == "healthcheck" ]; then
           ;;
           -z|-zkhost)          
               if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
-                print_usage "$SCRIPT_CMD" "ZooKeepeer connection string is required when using the $1 option!"
+                print_usage "$SCRIPT_CMD" "ZooKeeper connection string is required when using the $1 option!"
                 exit 1
               fi
               ZK_HOST="$2"
@@ -617,6 +855,7 @@ if [[ "$SCRIPT_CMD" == "create" || "$SCRIPT_CMD" == "create_core" || "$SCRIPT_CM
 
   CREATE_NUM_SHARDS=1
   CREATE_REPFACT=1
+  FORCE=false
 
   if [ $# -gt 0 ]; then
     while true; do
@@ -669,6 +908,10 @@ if [[ "$SCRIPT_CMD" == "create" || "$SCRIPT_CMD" == "create_core" || "$SCRIPT_CM
               CREATE_PORT="$2"
               shift 2
           ;;
+          -force)
+              FORCE=true
+              shift
+          ;;
           -help|-usage)
               print_usage "$SCRIPT_CMD"
               exit 0
@@ -726,6 +969,11 @@ if [[ "$SCRIPT_CMD" == "create" || "$SCRIPT_CMD" == "create_core" || "$SCRIPT_CM
     exit 1
   fi
 
+  if [[ "$(whoami)" == "root" ]] && [[ "$FORCE" == "false" ]] ; then
+    echo "WARNING: Creating cores as the root user can cause Solr to fail and is not advisable. Exiting."
+    echo "         If you started Solr as root (not advisable either), force core creation by adding argument -force"
+    exit 1
+  fi
   if [ "$SCRIPT_CMD" == "create_core" ]; then
     run_tool create_core -name "$CREATE_NAME" -solrUrl "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:$CREATE_PORT/solr" \
       -confdir "$CREATE_CONFDIR" -configsetsDir "$SOLR_TIP/server/solr/configsets"
@@ -821,105 +1069,285 @@ if [[ "$SCRIPT_CMD" == "delete" ]]; then
   exit $?
 fi
 
-# Upload or download a configset to Zookeeper
+ZK_RECURSE=false
+# Zookeeper file maintenance (upconfig, downconfig, files up/down etc.)
+# It's a little clumsy to have the parsing go round and round for upconfig and downconfig, but that's
+# necessary for back-compat
 if [[ "$SCRIPT_CMD" == "zk" ]]; then
 
   if [ $# -gt 0 ]; then
     while true; do
       case "$1" in
-          -z|-zkhost)          
-              if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
-                print_usage "$SCRIPT_CMD" "ZooKeepeer connection string is required when using the $1 option!"
-                exit 1
-              fi
-              ZK_HOST="$2"
-              shift 2
-          ;;
-          -n|-confname)
-              if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
-                print_usage "$SCRIPT_CMD" "Configuration name is required when using the $1 option!"
-                exit 1
-              fi
-              CONFIGSET_CONFNAME="$2"
-              shift 2
-          ;;
-          -d|-confdir)
-              if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
-                print_usage "$SCRIPT_CMD" "Configuration directory is required when using the $1 option!"
-                exit 1
-              fi
-              CONFIGSET_CONFDIR="$2"
-              shift 2
-          ;;
-          -upconfig)
-              ZK_OP="upconfig"
-              shift 1
-          ;;
-          -downconfig)
-              ZK_OP="downconfig"
-              shift 1
-          ;;
-          -help|-usage|-h)
-              print_usage "$SCRIPT_CMD"
-              exit 0
-          ;;
-          --)
-              shift
-              break
-          ;;
-          *)
-              if [ "$1" != "" ]; then
-                print_usage "$SCRIPT_CMD" "Unrecognized or misplaced argument: $1!"
-                exit 1
+        -upconfig|upconfig|-downconfig|downconfig|cp|rm|mv|ls|mkroot)
+            if [ "${1:0:1}" == "-" ]; then
+              ZK_OP=${1:1}
+            else
+              ZK_OP=$1
+            fi
+            shift 1
+        ;;
+        -z|-zkhost)
+            if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
+              print_short_zk_usage "$SCRIPT_CMD" "ZooKeeper connection string is required when using the $1 option!"
+            fi
+            ZK_HOST="$2"
+            shift 2
+        ;;
+        -n|-confname)
+            if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
+              print_short_zk_usage "$SCRIPT_CMD" "Configuration name is required when using the $1 option!"
+            fi
+            CONFIGSET_CONFNAME="$2"
+            shift 2
+        ;;
+        -d|-confdir)
+            if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
+              print_short_zk_usage "$SCRIPT_CMD" "Configuration directory is required when using the $1 option!"
+            fi
+            CONFIGSET_CONFDIR="$2"
+            shift 2
+        ;;
+        -r)
+            ZK_RECURSE="true"
+            shift
+        ;;
+        -help|-usage|-h)
+            print_usage "$SCRIPT_CMD"
+            exit 0
+        ;;
+        --)
+            shift
+            break
+        ;;
+        *)  # Pick up <src> <dst> or <path> params for rm, ls, cp, mv, mkroot.
+            if [ "$1" == "" ]; then
+              break # out-of-args, stop looping
+            fi
+            if [ -z "$ZK_SRC" ]; then
+              ZK_SRC=$1
+            else
+              if [ -z "$ZK_DST" ]; then
+                ZK_DST=$1
               else
-                break # out-of-args, stop looping
+                print_short_zk_usage "Unrecognized or misplaced command $1. 'cp' with trailing asterisk requires quoting, see help text."
               fi
-          ;;
+            fi
+            shift
+        ;;
       esac
     done
   fi
 
   if [ -z "$ZK_OP" ]; then
-    echo "Zookeeper operation (one of '-upconfig' or  '-downconfig') is required!"
-    print_usage "$SCRIPT_CMD"
-    exit 1
+    print_short_zk_usage "Zookeeper operation (one of 'upconfig', 'downconfig', 'rm', 'mv', 'cp', 'ls', 'mkroot') is required!"
   fi
 
   if [ -z "$ZK_HOST" ]; then
-    echo "Zookeeper address (-z) argument is required!"
-    print_usage "$SCRIPT_CMD"
-    exit 1
+    print_short_zk_usage "Zookeeper address (-z) argument is required or ZK_HOST must be specified in the solr.in.sh file."
   fi
 
-  if [ -z "$CONFIGSET_CONFDIR" ]; then
-    echo "Local directory of the configset (-d) argument is required!"
-    print_usage "$SCRIPT_CMD"
-    exit 1
+  if [[ "$ZK_OP" == "upconfig" ||  "$ZK_OP" == "downconfig" ]]; then
+    if [ -z "$CONFIGSET_CONFDIR" ]; then
+      print_short_zk_usage "Local directory of the configset (-d) argument is required!"
+    fi
+
+    if [ -z "$CONFIGSET_CONFNAME" ]; then
+      print_short_zk_usage "Configset name on Zookeeper (-n) argument is required!"
+    fi
   fi
 
-  if [ -z "$CONFIGSET_CONFNAME" ]; then
-    echo "Configset name on Zookeeper (-n) argument is required!"
-    print_usage "$SCRIPT_CMD"
-    exit 1
+  if [[ "$ZK_OP" == "cp" || "$ZK_OP" == "mv" ]]; then
+    if [[ -z "$ZK_SRC" || -z "$ZK_DST" ]]; then
+      print_short_zk_usage "<source> and <destination> must be specified when using either the 'mv' or 'cp' commands."
+    fi
+    if [[ "$ZK_OP" == "cp" && "${ZK_SRC:0:3}" != "zk:" && "${ZK_DST:0:3}" != "zk:" ]]; then
+      print_short_zk_usage "One of the source or desintation paths must be prefixed by 'zk:' for the 'cp' command."
+    fi
   fi
 
-  if [ "$ZK_OP" == "upconfig" ]; then
-    run_tool "$ZK_OP" -confname "$CONFIGSET_CONFNAME" -confdir "$CONFIGSET_CONFDIR" -zkHost "$ZK_HOST" -configsetsDir "$SOLR_TIP/server/solr/configsets"
+  if [[ "$ZK_OP" == "mkroot" ]]; then
+    if [[ -z "$ZK_SRC" ]]; then
+      print_short_zk_usage "<path> must be specified when using the 'mkroot' command."
+    fi
+  fi
+
+
+  case "$ZK_OP" in
+    upconfig)
+      run_tool "$ZK_OP" -confname "$CONFIGSET_CONFNAME" -confdir "$CONFIGSET_CONFDIR" -zkHost "$ZK_HOST" -configsetsDir "$SOLR_TIP/server/solr/configsets"
+    ;;
+    downconfig)
+      run_tool "$ZK_OP" -confname "$CONFIGSET_CONFNAME" -confdir "$CONFIGSET_CONFDIR" -zkHost "$ZK_HOST"
+    ;;
+    rm)
+      if [ -z "$ZK_SRC" ]; then
+        print_short_zk_usage "Zookeeper path to remove must be specified when using the 'rm' command"
+      fi
+      run_tool "$ZK_OP" -path "$ZK_SRC" -zkHost "$ZK_HOST" -recurse "$ZK_RECURSE"
+    ;;
+    mv)
+      run_tool "$ZK_OP" -src "$ZK_SRC" -dst "$ZK_DST" -zkHost "$ZK_HOST"
+    ;;
+    cp)
+      run_tool "$ZK_OP" -src "$ZK_SRC" -dst "$ZK_DST" -zkHost "$ZK_HOST" -recurse "$ZK_RECURSE"
+    ;;
+    ls)
+      if [ -z "$ZK_SRC" ]; then
+        print_short_zk_usage "Zookeeper path to list must be specified when using the 'ls' command"
+      fi
+      run_tool "$ZK_OP" -path "$ZK_SRC" -recurse "$ZK_RECURSE" -zkHost "$ZK_HOST"
+    ;;
+    mkroot)
+      if [ -z "$ZK_SRC" ]; then
+        print_short_zk_usage "Zookeeper path to list must be specified when using the 'mkroot' command"
+      fi
+      run_tool "$ZK_OP" -path "$ZK_SRC" -zkHost "$ZK_HOST"
+    ;;
+    *)
+      print_short_zk_usage "Unrecognized Zookeeper operation $ZK_OP"
+    ;;
+  esac
+
+  exit $?
+fi
+
+if [[ "$SCRIPT_CMD" == "auth" ]]; then
+  declare -a AUTH_PARAMS
+  if [ $# -gt 0 ]; then
+    while true; do
+      case "$1" in
+        enable|disable)
+            AUTH_OP=$1
+            AUTH_PARAMS=("${AUTH_PARAMS[@]}" "$AUTH_OP")
+            shift
+        ;;
+        -z|-zkhost|zkHost)
+            ZK_HOST="$2"
+            AUTH_PARAMS=("${AUTH_PARAMS[@]}" "-zkHost" "$ZK_HOST")
+            shift 2
+        ;;
+        -t|-type)
+            AUTH_TYPE="$2"
+            AUTH_PARAMS=("${AUTH_PARAMS[@]}" "-type" "$AUTH_TYPE")
+            shift 2
+        ;;
+        -credentials)
+            AUTH_CREDENTIALS="$2"
+            AUTH_PARAMS=("${AUTH_PARAMS[@]}" "-credentials" "$AUTH_CREDENTIALS")
+            shift 2
+        ;;
+        -solrIncludeFile)
+            SOLR_INCLUDE="$2"
+            shift 2
+        ;;
+        -prompt)
+            AUTH_PARAMS=("${AUTH_PARAMS[@]}" "-prompt" "$2")
+            shift
+        ;;
+        -blockUnknown)
+            AUTH_PARAMS=("${AUTH_PARAMS[@]}" "-blockUnknown" "$2")
+            shift
+            break
+        ;;
+        -updateIncludeFileOnly)
+            AUTH_PARAMS=("${AUTH_PARAMS[@]}" "-updateIncludeFileOnly" "$2")
+            shift
+            break
+        ;;
+        -d|-dir)
+            if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
+              print_usage "$SCRIPT_CMD" "Server directory is required when using the $1 option!"
+              exit 1
+            fi
+
+            if [[ "$2" == "." || "$2" == "./" || "$2" == ".." || "$2" == "../" ]]; then
+              SOLR_SERVER_DIR="$(pwd)/$2"
+            else
+              # see if the arg value is relative to the tip vs full path
+              if [[ "$2" != /* ]] && [[ -d "$SOLR_TIP/$2" ]]; then
+                SOLR_SERVER_DIR="$SOLR_TIP/$2"
+              else
+                SOLR_SERVER_DIR="$2"
+              fi
+            fi
+            # resolve it to an absolute path
+            SOLR_SERVER_DIR="$(cd "$SOLR_SERVER_DIR"; pwd)"
+            shift 2
+        ;;
+        -s|-solr.home)
+            if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
+              print_usage "$SCRIPT_CMD" "Solr home directory is required when using the $1 option!"
+              exit 1
+            fi
+
+            SOLR_HOME="$2"
+            shift 2
+        ;;
+        -help|-usage|-h)
+            print_usage "$SCRIPT_CMD"
+            exit 0
+        ;;
+        --)
+            shift
+            break
+        ;;
+        *)
+            shift
+            break
+        ;;
+      esac
+    done
+  fi
+
+  if [ -z "$SOLR_SERVER_DIR" ]; then
+    SOLR_SERVER_DIR="$DEFAULT_SERVER_DIR"
+  fi
+  if [ ! -e "$SOLR_SERVER_DIR" ]; then
+    echo -e "\nSolr server directory $SOLR_SERVER_DIR not found!\n"
+    exit 1
+  fi
+  if [ -z "$SOLR_HOME" ]; then
+    SOLR_HOME="$SOLR_SERVER_DIR/solr"
   else
-    run_tool "$ZK_OP" -confname "$CONFIGSET_CONFNAME" -confdir "$CONFIGSET_CONFDIR" -zkHost "$ZK_HOST"
+    if [[ $SOLR_HOME != /* ]] && [[ -d "$SOLR_SERVER_DIR/$SOLR_HOME" ]]; then
+      SOLR_HOME="$SOLR_SERVER_DIR/$SOLR_HOME"
+      SOLR_PID_DIR="$SOLR_HOME"
+    elif [[ $SOLR_HOME != /* ]] && [[ -d "`pwd`/$SOLR_HOME" ]]; then
+      SOLR_HOME="$(pwd)/$SOLR_HOME"
+    fi
   fi
 
+  if [ -z "$AUTH_OP" ]; then
+    print_usage "$SCRIPT_CMD"
+    exit 0
+  fi
+
+  AUTH_PARAMS=("${AUTH_PARAMS[@]}" "-solrIncludeFile" "$SOLR_INCLUDE")
+
+  if [ -z "$AUTH_PORT" ]; then
+    for ID in `ps auxww | grep java | grep start\.jar | awk '{print $2}' | sort -r`
+      do
+        port=`jetty_port "$ID"`
+        if [ "$port" != "" ]; then
+          AUTH_PORT=$port
+          break
+        fi
+      done
+  fi
+  run_tool auth ${AUTH_PARAMS[@]} -solrUrl "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:$AUTH_PORT/solr" -authConfDir "$SOLR_HOME"
   exit $?
 fi
 
+
 # verify the command given is supported
-if [ "$SCRIPT_CMD" != "stop" ] && [ "$SCRIPT_CMD" != "start" ] && [ "$SCRIPT_CMD" != "restart" ] && [ "$SCRIPT_CMD" != "status" ]; then
+if [ "$SCRIPT_CMD" != "stop" ] && [ "$SCRIPT_CMD" != "start" ] && [ "$SCRIPT_CMD" != "restart" ] && [ "$SCRIPT_CMD" != "status" ] && [ "$SCRIPT_CMD" != "assert" ]; then
   print_usage "" "$SCRIPT_CMD is not a valid command!"
   exit 1
 fi
 
 # Run in foreground (default is to run in the background)
 FG="false"
+FORCE=false
 noprompt=false
 SOLR_OPTS=($SOLR_OPTS)
 PASS_TO_RUN_EXAMPLE=
@@ -1033,10 +1461,22 @@ if [ $# -gt 0 ]; then
             PASS_TO_RUN_EXAMPLE+=" --verbose"
             shift
         ;;
+        -v)
+            SOLR_LOG_LEVEL=DEBUG
+            shift
+        ;;
+        -q)
+            SOLR_LOG_LEVEL=WARN
+            shift
+        ;;
         -all)
             stop_all=true
             shift
         ;;
+        -force)
+            FORCE=true
+            shift
+        ;;
         --)
             shift
             break
@@ -1060,6 +1500,10 @@ if [ $# -gt 0 ]; then
   done
 fi
 
+if [[ $SOLR_LOG_LEVEL ]] ; then
+  SOLR_LOG_LEVEL_OPT="-Dsolr.log.level=$SOLR_LOG_LEVEL"
+fi
+
 if [ -z "$SOLR_SERVER_DIR" ]; then
   SOLR_SERVER_DIR="$DEFAULT_SERVER_DIR"
 fi
@@ -1157,13 +1601,21 @@ if [ -z "$STOP_PORT" ]; then
   STOP_PORT=`expr $SOLR_PORT - 1000`
 fi
 
+if [ "$SCRIPT_CMD" == "start" ] || [ "$SCRIPT_CMD" == "restart" ] ; then
+  if [[ "$(whoami)" == "root" ]] && [[ "$FORCE" == "false" ]] ; then
+    echo "WARNING: Starting Solr as the root user is a security risk and not considered best practice. Exiting."
+    echo "         Please consult the Reference Guide. To override this check, start with argument '-force'"
+    exit 1
+  fi
+fi
+
 if [[ "$SCRIPT_CMD" == "start" ]]; then
   # see if Solr is already running
   SOLR_PID=`solr_pid_by_port "$SOLR_PORT"`
 
   if [ -z "$SOLR_PID" ]; then
     # not found using the pid file ... but use ps to ensure not found
-    SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`
+    SOLR_PID=`ps auxww | grep start\.jar | grep -w "\-Djetty\.port=$SOLR_PORT" | grep -v grep | awk '{print $2}' | sort -r`
   fi
 
   if [ "$SOLR_PID" != "" ]; then
@@ -1176,7 +1628,7 @@ else
   SOLR_PID=`solr_pid_by_port "$SOLR_PORT"`
   if [ -z "$SOLR_PID" ]; then
     # not found using the pid file ... but use ps to ensure not found
-    SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`
+    SOLR_PID=`ps auxww | grep start\.jar | grep -w "\-Djetty\.port=$SOLR_PORT" | grep -v grep | awk '{print $2}' | sort -r`
   fi
   if [ "$SOLR_PID" != "" ]; then
     stop_solr "$SOLR_SERVER_DIR" "$SOLR_PORT" "$STOP_KEY" "$SOLR_PID"
@@ -1226,38 +1678,49 @@ if [ ! -e "$SOLR_HOME" ]; then
   echo -e "\nSolr home directory $SOLR_HOME not found!\n"
   exit 1
 fi
-
-# backup the log files before starting
-if [ -f "$SOLR_LOGS_DIR/solr.log" ]; then
-  if $verbose ; then
-    echo "Backing up $SOLR_LOGS_DIR/solr.log"
-  fi
-  mv "$SOLR_LOGS_DIR/solr.log" "$SOLR_LOGS_DIR/solr_log_$(date +"%Y%m%d_%H%M")"
+if $verbose ; then
+  q=""
+else
+  q="-q"
 fi
-
-if [ -f "$SOLR_LOGS_DIR/solr_gc.log" ]; then
-  if $verbose ; then
-    echo "Backing up $SOLR_LOGS_DIR/solr_gc.log"
-  fi
-  mv "$SOLR_LOGS_DIR/solr_gc.log" "$SOLR_LOGS_DIR/solr_gc_log_$(date +"%Y%m%d_%H%M")"
+if [ "${SOLR_LOG_PRESTART_ROTATION:=true}" == "true" ]; then
+  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" $q -remove_old_solr_logs 7 || echo "Failed removing old solr logs"
+  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" $q -archive_gc_logs $q     || echo "Failed archiving old GC logs"
+  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" $q -archive_console_logs   || echo "Failed archiving old console logs"
+  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" $q -rotate_solr_logs 9     || echo "Failed rotating old solr logs"
 fi
 
-java_ver_out=`echo "$("$JAVA" -version 2>&1)"`
-JAVA_VERSION=`echo $java_ver_out | grep "java version" | awk '{ print substr($3, 2, length($3)-2); }'`
-JAVA_VENDOR="Oracle"
-if [ "`echo $java_ver_out | grep -i "IBM J9"`" != "" ]; then
-  JAVA_VENDOR="IBM J9"
+# Establish default GC logging opts if no env var set (otherwise init to sensible default)
+if [ -z ${GC_LOG_OPTS+x} ]; then
+  if [[ "$JAVA_VER_NUM" < "9" ]] ; then
+    GC_LOG_OPTS=('-verbose:gc' '-XX:+PrintHeapAtGC' '-XX:+PrintGCDetails' \
+                 '-XX:+PrintGCDateStamps' '-XX:+PrintGCTimeStamps' '-XX:+PrintTenuringDistribution' \
+                 '-XX:+PrintGCApplicationStoppedTime')
+  else
+    GC_LOG_OPTS=('-Xlog:gc*')
+  fi
+else
+  GC_LOG_OPTS=($GC_LOG_OPTS)
 fi
 
-# if verbose gc logging enabled, setup the location of the log file
+# if verbose gc logging enabled, setup the location of the log file and rotation
 if [ "$GC_LOG_OPTS" != "" ]; then
-  gc_log_flag="-Xloggc"
-  if [ "$JAVA_VENDOR" == "IBM J9" ]; then
-    gc_log_flag="-Xverbosegclog"
+  if [[ "$JAVA_VER_NUM" < "9" ]] ; then
+    gc_log_flag="-Xloggc"
+    if [ "$JAVA_VENDOR" == "IBM J9" ]; then
+      gc_log_flag="-Xverbosegclog"
+    fi
+    GC_LOG_OPTS+=("$gc_log_flag:$SOLR_LOGS_DIR/solr_gc.log" '-XX:+UseGCLogFileRotation' '-XX:NumberOfGCLogFiles=9' '-XX:GCLogFileSize=20M')
+  else
+    # http://openjdk.java.net/jeps/158
+    for i in "${!GC_LOG_OPTS[@]}";
+    do
+      # for simplicity, we only look at the prefix '-Xlog:gc'
+      # (if 'all' or multiple tags are used starting with anything other then 'gc' the user is on their own)
+      # if a single additional ':' exists in param, then there is already an explicit output specifier
+      GC_LOG_OPTS[$i]=$(echo ${GC_LOG_OPTS[$i]} | sed "s|^\(-Xlog:gc[^:]*$\)|\1:file=$SOLR_LOGS_DIR/solr_gc.log:time,uptime:filecount=9,filesize=20000|")
+    done
   fi
-  GC_LOG_OPTS=($GC_LOG_OPTS "$gc_log_flag:$SOLR_LOGS_DIR/solr_gc.log")
-else
-  GC_LOG_OPTS=()
 fi
 
 # If ZK_HOST is defined, the assume SolrCloud mode
@@ -1298,7 +1761,11 @@ fi
 if [ "$ENABLE_REMOTE_JMX_OPTS" == "true" ]; then
 
   if [ -z "$RMI_PORT" ]; then
-    RMI_PORT="1$SOLR_PORT"
+    RMI_PORT=`expr $SOLR_PORT + 10000`
+    if [ $RMI_PORT -gt 65535 ]; then
+      echo -e "\nRMI_PORT is $RMI_PORT, which is invalid!\n"
+      exit 1
+    fi
   fi
 
   REMOTE_JMX_OPTS=('-Dcom.sun.management.jmxremote' \
@@ -1324,6 +1791,12 @@ else
   JAVA_MEM_OPTS=("-Xms$SOLR_HEAP" "-Xmx$SOLR_HEAP")
 fi
 
+# Pick default for Java thread stack size, and then add to SOLR_OPTS
+if [ -z ${SOLR_JAVA_STACK_SIZE+x} ]; then
+  SOLR_JAVA_STACK_SIZE='-Xss256k'
+fi
+SOLR_OPTS+=($SOLR_JAVA_STACK_SIZE)
+
 if [ -z "$SOLR_TIMEZONE" ]; then
   SOLR_TIMEZONE='UTC'
 fi
@@ -1336,20 +1809,28 @@ function launch_solr() {
   
   SOLR_ADDL_ARGS="$2"
 
-  GC_TUNE=($GC_TUNE)
-  # deal with Java version specific GC and other flags
-  if [ "${JAVA_VERSION:0:3}" == "1.7" ]; then
-    # Specific Java version hacking
-    GC_TUNE+=('-XX:CMSFullGCsBeforeCompaction=1' '-XX:CMSTriggerPermRatio=80')
-    if [ "$JAVA_VENDOR" != "IBM J9" ]; then
-      JAVA_MINOR_VERSION=${JAVA_VERSION:(-2)}
-      if [[ $JAVA_MINOR_VERSION -ge 40 && $JAVA_MINOR_VERSION -le 51 ]]; then
-        GC_TUNE+=('-XX:-UseSuperWord')
-        echo -e "\nWARNING: Java version $JAVA_VERSION has known bugs with Lucene and requires the -XX:-UseSuperWord flag. Please consider upgrading your JVM.\n"
-      fi
-    fi
+  # define default GC_TUNE
+  if [ -z ${GC_TUNE+x} ]; then
+      GC_TUNE=('-XX:NewRatio=3' \
+        '-XX:SurvivorRatio=4' \
+        '-XX:TargetSurvivorRatio=90' \
+        '-XX:MaxTenuringThreshold=8' \
+        '-XX:+UseConcMarkSweepGC' \
+        '-XX:+UseParNewGC' \
+        '-XX:ConcGCThreads=4' '-XX:ParallelGCThreads=4' \
+        '-XX:+CMSScavengeBeforeRemark' \
+        '-XX:PretenureSizeThreshold=64m' \
+        '-XX:+UseCMSInitiatingOccupancyOnly' \
+        '-XX:CMSInitiatingOccupancyFraction=50' \
+        '-XX:CMSMaxAbortablePrecleanTime=6000' \
+        '-XX:+CMSParallelRemarkEnabled' \
+        '-XX:+ParallelRefProcEnabled' \
+        '-XX:-OmitStackTraceInFastThrow')
+  else
+    GC_TUNE=($GC_TUNE)
   fi
 
+
   # If SSL-related system props are set, add them to SOLR_OPTS
   if [ -n "$SOLR_SSL_OPTS" ]; then
     # If using SSL and solr.jetty.https.port not set explicitly, use the jetty.port
@@ -1380,17 +1861,22 @@ function launch_solr() {
     fi
 
     if [ "$SOLR_OPTS" != "" ]; then
-      echo -e "    SOLR_OPTS        = ${SOLR_OPTS[@]}"
+      echo -e "    SOLR_OPTS       = ${SOLR_OPTS[@]}"
     fi
 
     if [ "$SOLR_ADDL_ARGS" != "" ]; then
-      echo -e "    SOLR_ADDL_ARGS   = $SOLR_ADDL_ARGS"
+      echo -e "    SOLR_ADDL_ARGS  = $SOLR_ADDL_ARGS"
     fi
 
     if [ "$ENABLE_REMOTE_JMX_OPTS" == "true" ]; then
       echo -e "    RMI_PORT        = $RMI_PORT"
       echo -e "    REMOTE_JMX_OPTS = ${REMOTE_JMX_OPTS[@]}"
     fi
+
+    if [ "$SOLR_LOG_LEVEL" != "" ]; then
+      echo -e "    SOLR_LOG_LEVEL  = $SOLR_LOG_LEVEL"
+    fi
+
     echo -e "\n"
   fi
     
@@ -1403,7 +1889,7 @@ function launch_solr() {
   fi
 
   SOLR_START_OPTS=('-server' "${JAVA_MEM_OPTS[@]}" "${GC_TUNE[@]}" "${GC_LOG_OPTS[@]}" \
-    "${REMOTE_JMX_OPTS[@]}" "${CLOUD_MODE_OPTS[@]}" \
+    "${REMOTE_JMX_OPTS[@]}" "${CLOUD_MODE_OPTS[@]}" $SOLR_LOG_LEVEL_OPT -Dsolr.log.dir="$SOLR_LOGS_DIR" \
     "-Djetty.port=$SOLR_PORT" "-DSTOP.PORT=$stop_port" "-DSTOP.KEY=$STOP_KEY" \
     "${SOLR_HOST_ARG[@]}" "-Duser.timezone=$SOLR_TIMEZONE" \
     "-Djetty.home=$SOLR_SERVER_DIR" "-Dsolr.solr.home=$SOLR_HOME" "-Dsolr.install.dir=$SOLR_TIP" \
@@ -1413,37 +1899,57 @@ function launch_solr() {
     IN_CLOUD_MODE=" in SolrCloud mode"
   fi
 
-  mkdir -p "$SOLR_LOGS_DIR"
+  mkdir -p "$SOLR_LOGS_DIR" 2>/dev/null
+  if [ $? -ne 0 ]; then
+    echo -e "\nERROR: Logs directory $SOLR_LOGS_DIR could not be created. Exiting"
+    exit 1
+  fi
+  if [ ! -w "$SOLR_LOGS_DIR" ]; then
+    echo -e "\nERROR: Logs directory $SOLR_LOGS_DIR is not writable. Exiting"
+    exit 1
+  fi
+  case "$SOLR_LOGS_DIR" in
+    contexts|etc|lib|modules|resources|scripts|solr|solr-webapp)
+      echo -e "\nERROR: Logs directory $SOLR_LOGS_DIR is invalid. Reserved for the system. Exiting"
+      exit 1
+      ;;
+  esac
 
   if [ "$run_in_foreground" == "true" ]; then
-    echo -e "\nStarting Solr$IN_CLOUD_MODE on port $SOLR_PORT from $SOLR_SERVER_DIR\n"
-    exec "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -jar start.jar "${SOLR_JETTY_CONFIG[@]}"
+    exec "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -Dsolr.kerberos.name.rules="$SOLR_KERB_NAME_RULES" -jar start.jar "${SOLR_JETTY_CONFIG[@]}"
   else
     # run Solr in the background
-    nohup "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -Dsolr.kerberos.name.rules="$SOLR_KERB_NAME_RULES" \
+    nohup "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -Dsolr.kerberos.name.rules="$SOLR_KERB_NAME_RULES" -Dsolr.log.muteconsole \
 	"-XX:OnOutOfMemoryError=$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT $SOLR_LOGS_DIR" \
         -jar start.jar "${SOLR_JETTY_CONFIG[@]}" \
 	1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > "$SOLR_PID_DIR/solr-$SOLR_PORT.pid"
 
+    # check if /proc/sys/kernel/random/entropy_avail exists then check output of cat /proc/sys/kernel/random/entropy_avail to see if less than 300
+    if [[ -f /proc/sys/kernel/random/entropy_avail ]] && (( `cat /proc/sys/kernel/random/entropy_avail` < 300)); then
+	echo "Warning: Available entropy is low. As a result, use of the UUIDField, SSL, or any other features that require"
+	echo "RNG might not work properly. To check for the amount of available entropy, use 'cat /proc/sys/kernel/random/entropy_avail'."
+	echo ""
+    fi
     # no lsof on cygwin though
     if hash lsof 2>/dev/null ; then  # hash returns true if lsof is on the path
-      echo -n "Waiting up to 30 seconds to see Solr running on port $SOLR_PORT"
+      echo -n "Waiting up to $SOLR_STOP_WAIT seconds to see Solr running on port $SOLR_PORT"
       # Launch in a subshell to show the spinner
       (loops=0
       while true
       do
         running=`lsof -PniTCP:$SOLR_PORT -sTCP:LISTEN`
         if [ -z "$running" ]; then
-          if [ $loops -lt 6 ]; then
-            sleep 5
+	  slept=$((loops * 2))
+          if [ $slept -lt $SOLR_STOP_WAIT ]; then
+            sleep 2
             loops=$[$loops+1]
           else
-            echo -e "Still not seeing Solr listening on $SOLR_PORT after 30 seconds!"
+            echo -e "Still not seeing Solr listening on $SOLR_PORT after $SOLR_STOP_WAIT seconds!"
             tail -30 "$SOLR_LOGS_DIR/solr.log"
             exit # subshell!
           fi
         else
-          SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`
+          SOLR_PID=`ps auxww | grep start\.jar | grep -w "\-Djetty\.port=$SOLR_PORT" | grep -v grep | awk '{print $2}' | sort -r`
           echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n"
           exit # subshell!
         fi
@@ -1452,7 +1958,7 @@ function launch_solr() {
     else
       echo -e "NOTE: Please install lsof as this script needs it to determine if Solr is listening on port $SOLR_PORT."
       sleep 10
-      SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`
+      SOLR_PID=`ps auxww | grep start\.jar | grep -w "\-Djetty\.port=$SOLR_PORT" | grep -v grep | awk '{print $2}' | sort -r`
       echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n"
       return;
     fi

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
----------------------------------------------------------------------
diff --git a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
index e3a1e79..70bc232 100644
--- a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
+++ b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
@@ -52,12 +52,14 @@ public class AmbariSolrCloudCLI {
   private static final String UNSECURE_ZNODE_COMMAND = "unsecure-znode";
   private static final String SECURE_SOLR_ZNODE_COMMAND = "secure-solr-znode";
   private static final String SECURITY_JSON_LOCATION = "security-json-location";
+  private static final String REMOVE_ADMIN_HANDLERS = "remove-admin-handlers";
   private static final String CMD_LINE_SYNTAX =
     "\n./solrCloudCli.sh --create-collection -z host1:2181,host2:2181/ambari-solr -c collection -cs conf_set"
       + "\n./solrCloudCli.sh --upload-config -z host1:2181,host2:2181/ambari-solr -d /tmp/myconfig_dir -cs config_set"
       + "\n./solrCloudCli.sh --download-config -z host1:2181,host2:2181/ambari-solr -cs config_set -d /tmp/myonfig_dir"
       + "\n./solrCloudCli.sh --check-config -z host1:2181,host2:2181/ambari-solr -cs config_set"
       + "\n./solrCloudCli.sh --create-shard -z host1:2181,host2:2181/ambari-solr -c collection -sn myshard"
+      + "\n./solrCloudCli.sh --remove-admin-handlers -z host1:2181,host2:2181/ambari-solr -c collection"
       + "\n./solrCloudCli.sh --create-znode -z host1:2181,host2:2181 -zn /ambari-solr"
       + "\n./solrCloudCli.sh --check-znode -z host1:2181,host2:2181 -zn /ambari-solr"
       + "\n./solrCloudCli.sh --cluster-prop -z host1:2181,host2:2181/ambari-solr -cpn urlScheme -cpn http"
@@ -137,6 +139,11 @@ public class AmbariSolrCloudCLI {
       .desc("Disable security for znode")
       .build();
 
+    final Option removeAdminHandlerOption = Option.builder("rah")
+      .longOpt(REMOVE_ADMIN_HANDLERS)
+      .desc("Remove AdminHandlers request handler from solrconfig.xml")
+      .build();
+
     final Option shardNameOption = Option.builder("sn")
       .longOpt("shard-name")
       .desc("Name of the shard for create-shard command")
@@ -328,6 +335,7 @@ public class AmbariSolrCloudCLI {
 
     options.addOption(helpOption);
     options.addOption(retryOption);
+    options.addOption(removeAdminHandlerOption);
     options.addOption(intervalOption);
     options.addOption(zkConnectStringOption);
     options.addOption(configSetOption);
@@ -414,6 +422,9 @@ public class AmbariSolrCloudCLI {
       } else if (cli.hasOption("uz")) {
         command = UNSECURE_ZNODE_COMMAND;
         validateRequiredOptions(cli, command, zkConnectStringOption, znodeOption, jaasFileOption);
+      } else if (cli.hasOption("rah")) {
+        command = REMOVE_ADMIN_HANDLERS;
+        validateRequiredOptions(cli, command, zkConnectStringOption, collectionOption);
       } else {
         List<String> commands = Arrays.asList(CREATE_COLLECTION_COMMAND, CREATE_SHARD_COMMAND, UPLOAD_CONFIG_COMMAND,
           DOWNLOAD_CONFIG_COMMAND, CONFIG_CHECK_COMMAND, SET_CLUSTER_PROP, CREATE_ZNODE, SECURE_ZNODE_COMMAND, UNSECURE_ZNODE_COMMAND,
@@ -539,6 +550,9 @@ public class AmbariSolrCloudCLI {
         case SECURE_SOLR_ZNODE_COMMAND:
           solrCloudClient = clientBuilder.build();
           solrCloudClient.secureSolrZnode();
+        case REMOVE_ADMIN_HANDLERS:
+          solrCloudClient = clientBuilder.build();
+          solrCloudClient.removeAdminHandlerFromCollectionConfig();
           break;
         default:
           throw new AmbariSolrCloudClientException(String.format("Not found command: '%s'", command));

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudClient.java
----------------------------------------------------------------------
diff --git a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudClient.java b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudClient.java
index 9479679..96c07a3 100644
--- a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudClient.java
+++ b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudClient.java
@@ -27,6 +27,7 @@ import org.apache.ambari.infra.solr.commands.EnableKerberosPluginSolrZkCommand;
 import org.apache.ambari.infra.solr.commands.GetShardsCommand;
 import org.apache.ambari.infra.solr.commands.GetSolrHostsCommand;
 import org.apache.ambari.infra.solr.commands.ListCollectionCommand;
+import org.apache.ambari.infra.solr.commands.RemoveAdminHandlersCommand;
 import org.apache.ambari.infra.solr.commands.SecureSolrZNodeZkCommand;
 import org.apache.ambari.infra.solr.commands.SecureZNodeZkCommand;
 import org.apache.ambari.infra.solr.commands.SetClusterPropertyZkCommand;
@@ -257,6 +258,13 @@ public class AmbariSolrCloudClient {
     return new GetSolrHostsCommand(getRetryTimes(), getInterval()).run(this);
   }
 
+  /**
+   * Remove solr.admin.AdminHandlers requestHandler from solrconfi.xml
+   */
+  public boolean removeAdminHandlerFromCollectionConfig() throws Exception {
+    return new RemoveAdminHandlersCommand(getRetryTimes(), getInterval()).run(this);
+  }
+
   public String getZkConnectString() {
     return zkConnectString;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/commands/RemoveAdminHandlersCommand.java
----------------------------------------------------------------------
diff --git a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/commands/RemoveAdminHandlersCommand.java b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/commands/RemoveAdminHandlersCommand.java
new file mode 100644
index 0000000..32fae7b
--- /dev/null
+++ b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/commands/RemoveAdminHandlersCommand.java
@@ -0,0 +1,46 @@
+/*
+ * 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.infra.solr.commands;
+
+import org.apache.ambari.infra.solr.AmbariSolrCloudClient;
+import org.apache.solr.common.cloud.SolrZkClient;
+import org.apache.solr.common.cloud.SolrZooKeeper;
+import org.apache.zookeeper.data.Stat;
+
+public class RemoveAdminHandlersCommand extends AbstractZookeeperRetryCommand<Boolean> {
+
+  public RemoveAdminHandlersCommand(int maxRetries, int interval) {
+    super(maxRetries, interval);
+  }
+
+  @Override
+  protected Boolean executeZkCommand(AmbariSolrCloudClient client, SolrZkClient zkClient, SolrZooKeeper solrZooKeeper) throws Exception {
+    String solrConfigXmlPath = String.format("/configs/%s/solrconfig.xml", client.getCollection());
+    if (zkClient.exists(solrConfigXmlPath, true)) {
+      Stat stat = new Stat();
+      byte[] solrConfigXmlBytes = zkClient.getData(solrConfigXmlPath, null, stat, true);
+      String solrConfigStr = new String(solrConfigXmlBytes);
+      if (solrConfigStr.contains("class=\"solr.admin.AdminHandlers\"")) {
+        byte[] newSolrConfigXmlBytes = new String(solrConfigXmlBytes).replaceAll("(?s)<requestHandler name=\"/admin/\".*?class=\"solr.admin.AdminHandlers\" />", "").getBytes();
+        zkClient.setData(solrConfigXmlPath, newSolrConfigXmlBytes, stat.getVersion() + 1, true);
+      }
+    }
+    return true;
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/commands/SetClusterPropertyZkCommand.java
----------------------------------------------------------------------
diff --git a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/commands/SetClusterPropertyZkCommand.java b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/commands/SetClusterPropertyZkCommand.java
index 34597c6..e79773e 100644
--- a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/commands/SetClusterPropertyZkCommand.java
+++ b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/commands/SetClusterPropertyZkCommand.java
@@ -19,9 +19,9 @@
 package org.apache.ambari.infra.solr.commands;
 
 import org.apache.ambari.infra.solr.AmbariSolrCloudClient;
+import org.apache.solr.common.cloud.ClusterProperties;
 import org.apache.solr.common.cloud.SolrZkClient;
 import org.apache.solr.common.cloud.SolrZooKeeper;
-import org.apache.solr.common.cloud.ZkStateReader;
 
 public class SetClusterPropertyZkCommand extends AbstractZookeeperRetryCommand<String>{
 
@@ -33,8 +33,8 @@ public class SetClusterPropertyZkCommand extends AbstractZookeeperRetryCommand<S
   protected String executeZkCommand(AmbariSolrCloudClient client, SolrZkClient zkClient, SolrZooKeeper solrZooKeeper) throws Exception {
     String propertyName = client.getPropName();
     String propertyValue = client.getPropValue();
-    ZkStateReader reader = new ZkStateReader(zkClient);
-    reader.setClusterProperty(propertyName, propertyValue);
+    ClusterProperties clusterProperties = new ClusterProperties(zkClient);
+    clusterProperties.setClusterProperty(propertyName, propertyValue);
     return propertyValue;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-infra/ambari-infra-solr-plugin/src/test/java/org/apache/ambari/infra/security/InfraRuleBasedAuthorizationPluginTest.java
----------------------------------------------------------------------
diff --git a/ambari-infra/ambari-infra-solr-plugin/src/test/java/org/apache/ambari/infra/security/InfraRuleBasedAuthorizationPluginTest.java b/ambari-infra/ambari-infra-solr-plugin/src/test/java/org/apache/ambari/infra/security/InfraRuleBasedAuthorizationPluginTest.java
index ee84969..f1f842d 100644
--- a/ambari-infra/ambari-infra-solr-plugin/src/test/java/org/apache/ambari/infra/security/InfraRuleBasedAuthorizationPluginTest.java
+++ b/ambari-infra/ambari-infra-solr-plugin/src/test/java/org/apache/ambari/infra/security/InfraRuleBasedAuthorizationPluginTest.java
@@ -242,6 +242,11 @@ public class InfraRuleBasedAuthorizationPluginTest {
     public String getResource() {
       return (String) values.get("resource");
     }
+
+    @Override
+    public Object getHandler() {
+      return null;
+    }
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-infra/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-infra/pom.xml b/ambari-infra/pom.xml
index 4f5c29c..908abb4 100644
--- a/ambari-infra/pom.xml
+++ b/ambari-infra/pom.xml
@@ -31,7 +31,7 @@
 
   <properties>
     <jdk.version>1.8</jdk.version>
-    <solr.version>5.5.2</solr.version>
+    <solr.version>6.6.0</solr.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <python.ver>python &gt;= 2.6</python.ver>
     <deb.python.ver>python (&gt;= 2.6)</deb.python.ver>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-logsearch/ambari-logsearch-server/src/main/configsets/audit_logs/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/configsets/audit_logs/conf/solrconfig.xml b/ambari-logsearch/ambari-logsearch-server/src/main/configsets/audit_logs/conf/solrconfig.xml
index 7af91df..b1290a4 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/configsets/audit_logs/conf/solrconfig.xml
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/configsets/audit_logs/conf/solrconfig.xml
@@ -1063,8 +1063,7 @@
        Admin Handlers - This will register all the standard admin
        RequestHandlers.  
     -->
-  <requestHandler name="/admin/" 
-                  class="solr.admin.AdminHandlers" />
+
   <!-- This single handler is equivalent to the following... -->
   <!--
      <requestHandler name="/admin/luke"       class="solr.admin.LukeRequestHandler" />

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/solrconfig.xml b/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/solrconfig.xml
index 59f778f..f0e46a0 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/solrconfig.xml
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/solrconfig.xml
@@ -1063,8 +1063,7 @@
        Admin Handlers - This will register all the standard admin
        RequestHandlers.  
     -->
-  <requestHandler name="/admin/" 
-                  class="solr.admin.AdminHandlers" />
+
   <!-- This single handler is equivalent to the following... -->
   <!--
      <requestHandler name="/admin/luke"       class="solr.admin.LukeRequestHandler" />

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-logsearch/ambari-logsearch-server/src/main/configsets/history/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/configsets/history/conf/solrconfig.xml b/ambari-logsearch/ambari-logsearch-server/src/main/configsets/history/conf/solrconfig.xml
index 8244a08..1827444 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/configsets/history/conf/solrconfig.xml
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/configsets/history/conf/solrconfig.xml
@@ -1063,8 +1063,7 @@
        Admin Handlers - This will register all the standard admin
        RequestHandlers.  
     -->
-  <requestHandler name="/admin/" 
-                  class="solr.admin.AdminHandlers" />
+
   <!-- This single handler is equivalent to the following... -->
   <!--
      <requestHandler name="/admin/luke"       class="solr.admin.LukeRequestHandler" />

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/SolrSchemaFieldDao.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/SolrSchemaFieldDao.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/SolrSchemaFieldDao.java
index d99694b..71f9f29 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/SolrSchemaFieldDao.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/SolrSchemaFieldDao.java
@@ -141,7 +141,7 @@ public class SolrSchemaFieldDao {
         try (CloseableHttpClient httpClient = HttpClientUtil.createClient(null)) {
           HttpGet request = new HttpGet(replica.getCoreUrl() + LUKE_REQUEST_URL_SUFFIX);
           HttpResponse response = httpClient.execute(request);
-          NamedList<Object> lukeData = (NamedList<Object>) new JavaBinCodec(null, null).unmarshal(response.getEntity().getContent());
+          NamedList<Object> lukeData = (NamedList<Object>) new JavaBinCodec().unmarshal(response.getEntity().getContent());
           LukeResponse lukeResponse = new LukeResponse();
           lukeResponse.setResponse(lukeData);
           lukeResponses.add(lukeResponse);

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-logsearch/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/ambari-logsearch/docker/Dockerfile b/ambari-logsearch/docker/Dockerfile
index 2b8fd5d..1e4135e 100644
--- a/ambari-logsearch/docker/Dockerfile
+++ b/ambari-logsearch/docker/Dockerfile
@@ -60,7 +60,7 @@ RUN npm install -g npm@2.1.11
 RUN npm install -g brunch@1.7.20
 
 # Install Solr
-ENV SOLR_VERSION 5.5.2
+ENV SOLR_VERSION 6.6.0
 RUN wget --no-check-certificate -O /root/solr-$SOLR_VERSION.tgz http://public-repo-1.hortonworks.com/ARTIFACTS/dist/lucene/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz
 RUN cd /root && tar -zxvf /root/solr-$SOLR_VERSION.tgz
 ADD bin/start.sh /root/start.sh

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-logsearch/docker/bin/start.sh
----------------------------------------------------------------------
diff --git a/ambari-logsearch/docker/bin/start.sh b/ambari-logsearch/docker/bin/start.sh
index 28ebf65..c4ee06c 100644
--- a/ambari-logsearch/docker/bin/start.sh
+++ b/ambari-logsearch/docker/bin/start.sh
@@ -70,7 +70,7 @@ function generate_keys() {
 
 function start_solr() {
   echo "Starting Solr..."
-  /root/solr-$SOLR_VERSION/bin/solr start -cloud -s /root/logsearch_solr_index/data -verbose
+  /root/solr-$SOLR_VERSION/bin/solr start -cloud -s /root/logsearch_solr_index/data -verbose -force
   touch /var/log/ambari-logsearch-solr/solr.log
 
   if [ $LOGSEARCH_SOLR_SSL_ENABLED == 'true'  ]
@@ -78,7 +78,7 @@ function start_solr() {
     echo "Setting urlScheme as https and restarting solr..."
     $ZKCLI -zkhost localhost:9983 -cmd clusterprop -name urlScheme -val https
     /root/solr-$SOLR_VERSION/bin/solr stop
-    /root/solr-$SOLR_VERSION/bin/solr start -cloud -s /root/logsearch_solr_index/data -verbose
+    /root/solr-$SOLR_VERSION/bin/solr start -cloud -s /root/logsearch_solr_index/data -verbose -force
   fi
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-logsearch/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/pom.xml b/ambari-logsearch/pom.xml
index 82943e4..2be11ee 100644
--- a/ambari-logsearch/pom.xml
+++ b/ambari-logsearch/pom.xml
@@ -45,7 +45,7 @@
     <deb.python.ver>python (&gt;= 2.6)</deb.python.ver>
     <deb.architecture>amd64</deb.architecture>
     <deb.dependency.list>${deb.python.ver}</deb.dependency.list>
-    <solr.version>5.5.2</solr.version>
+    <solr.version>6.6.0</solr.version>
     <hadoop.version>2.7.2</hadoop.version>
     <common.io.version>2.5</common.io.version>
   </properties>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog300.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog300.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog300.java
index 5fdc885..b4502d6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog300.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog300.java
@@ -369,6 +369,24 @@ public class UpgradeCatalog300 extends AbstractUpgradeCatalog {
               updateConfigurationPropertiesForCluster(cluster, "logsearch-log4j", Collections.singletonMap("content", content), true, true);
             }
           }
+
+          Config logsearchServiceLogsConfig = cluster.getDesiredConfigByType("logsearch-service_logs-solrconfig");
+          if (logsearchServiceLogsConfig != null) {
+            String content = logsearchServiceLogsConfig.getProperties().get("content");
+            if (content.contains("class=\"solr.admin.AdminHandlers\"")) {
+              content = content.replaceAll("(?s)<requestHandler name=\"/admin/\".*?class=\"solr.admin.AdminHandlers\" />", "");
+              updateConfigurationPropertiesForCluster(cluster, "logsearch-service_logs-solrconfig", Collections.singletonMap("content", content), true, true);
+            }
+          }
+
+          Config logsearchAuditLogsConfig = cluster.getDesiredConfigByType("logsearch-audit_logs-solrconfig");
+          if (logsearchAuditLogsConfig != null) {
+            String content = logsearchAuditLogsConfig.getProperties().get("content");
+            if (content.contains("class=\"solr.admin.AdminHandlers\"")) {
+              content = content.replaceAll("(?s)<requestHandler name=\"/admin/\".*?class=\"solr.admin.AdminHandlers\" />", "");
+              updateConfigurationPropertiesForCluster(cluster, "logsearch-audit_logs-solrconfig", Collections.singletonMap("content", content), true, true);
+            }
+          }
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py
index 5f547f3..e4ea885 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py
@@ -80,6 +80,9 @@ solr_client_dir = '/usr/lib/ambari-infra-solr-client'
 solr_bindir = solr_dir + '/bin'
 cloud_scripts = solr_dir + '/server/scripts/cloud-scripts'
 
+logsearch_hosts = default("/clusterHostInfo/logsearch_server_hosts", [])
+has_logsearch = len(logsearch_hosts) > 0
+
 if "infra-solr-env" in config['configurations']:
   infra_solr_hosts = config['clusterHostInfo']['infra_solr_hosts']
   infra_solr_znode = config['configurations']['infra-solr-env']['infra_solr_znode']

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/setup_infra_solr.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/setup_infra_solr.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/setup_infra_solr.py
index f3dbcf3..7427584 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/setup_infra_solr.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/setup_infra_solr.py
@@ -85,6 +85,11 @@ def setup_infra_solr(name = None):
 
     create_ambari_solr_znode()
 
+    if params.has_logsearch:
+      cleanup_logsearch_collections(params.logsearch_service_logs_collection, jaas_file)
+      cleanup_logsearch_collections(params.logsearch_audit_logs_collection, jaas_file)
+      cleanup_logsearch_collections('history', jaas_file)
+
     security_json_file_location = custom_security_json_location \
       if params.infra_solr_security_json_content and str(params.infra_solr_security_json_content).strip() \
       else format("{infra_solr_conf}/security.json") # security.json file to upload
@@ -141,4 +146,14 @@ def create_ambari_solr_znode():
     zookeeper_quorum=params.zookeeper_quorum,
     solr_znode=params.infra_solr_znode,
     java64_home=params.java64_home,
-    retry=30, interval=5)
\ No newline at end of file
+    retry=30, interval=5)
+
+def cleanup_logsearch_collections(collection, jaas_file):
+  import params
+  solr_cloud_util.remove_admin_handlers(
+    zookeeper_quorum=params.zookeeper_quorum,
+    solr_znode=params.infra_solr_znode,
+    java64_home=params.java64_home,
+    jaas_file=jaas_file,
+    collection=collection
+  )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2 b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2
index 63879e7..d56990a 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2
@@ -1063,8 +1063,7 @@ this file, see http://wiki.apache.org/solr/SolrConfigXml.
   Admin Handlers - This will register all the standard admin
   RequestHandlers.
   -->
-  <requestHandler name="/admin/"
-                  class="solr.admin.AdminHandlers"/>
+
   <!-- This single handler is equivalent to the following... -->
   <!--
   <requestHandler name="/admin/luke"       class="solr.admin.LukeRequestHandler" />

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2 b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2
index b6a4d1d..ed80e84 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2
@@ -1063,8 +1063,7 @@ this file, see http://wiki.apache.org/solr/SolrConfigXml.
   Admin Handlers - This will register all the standard admin
   RequestHandlers.
   -->
-  <requestHandler name="/admin/"
-                  class="solr.admin.AdminHandlers"/>
+
   <!-- This single handler is equivalent to the following... -->
   <!--
   <requestHandler name="/admin/luke"       class="solr.admin.LukeRequestHandler" />

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
index a342baa..d7bdf75 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
@@ -351,11 +351,38 @@ public class UpgradeCatalog300Test {
     expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(logSearchLog4jCapture), anyString(),
         EasyMock.<Map<String, Map<String, String>>>anyObject())).andReturn(config).once();
 
+    Map<String, String> oldLogSearchServiceLogsConf = ImmutableMap.of(
+      "content", "<before/><requestHandler name=\"/admin/\"   class=\"solr.admin.AdminHandlers\" /><after/>");
+
+    Map<String, String> expectedLogSearchServiceLogsConf = ImmutableMap.of(
+      "content", "<before/><after/>");
+
+    Config confLogSearchServiceLogsConf = easyMockSupport.createNiceMock(Config.class);
+    expect(cluster.getDesiredConfigByType("logsearch-service_logs-solrconfig")).andReturn(confLogSearchServiceLogsConf).atLeastOnce();
+    expect(confLogSearchServiceLogsConf.getProperties()).andReturn(oldLogSearchServiceLogsConf).anyTimes();
+    Capture<Map<String, String>> logSearchServiceLogsConfCapture = EasyMock.newCapture();
+    expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(logSearchServiceLogsConfCapture), anyString(),
+      EasyMock.<Map<String, Map<String, String>>>anyObject())).andReturn(config).once();
+
+    Map<String, String> oldLogSearchAuditLogsConf = ImmutableMap.of(
+      "content", "<before/><requestHandler name=\"/admin/\"   class=\"solr.admin.AdminHandlers\" /><after/>");
+
+    Map<String, String> expectedLogSearchAuditLogsConf = ImmutableMap.of(
+      "content", "<before/><after/>");
+
+    Config confLogSearchAuditLogsConf = easyMockSupport.createNiceMock(Config.class);
+    expect(cluster.getDesiredConfigByType("logsearch-audit_logs-solrconfig")).andReturn(confLogSearchAuditLogsConf).atLeastOnce();
+    expect(confLogSearchAuditLogsConf.getProperties()).andReturn(oldLogSearchAuditLogsConf).anyTimes();
+    Capture<Map<String, String>> logSearchAuditLogsConfCapture = EasyMock.newCapture();
+    expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(logSearchAuditLogsConfCapture), anyString(),
+      EasyMock.<Map<String, Map<String, String>>>anyObject())).andReturn(config).once();
+
     replay(clusters, cluster);
     replay(controller, injector2);
     replay(confSomethingElse1, confSomethingElse2, confLogSearchConf1, confLogSearchConf2);
     replay(logSearchPropertiesConf, logFeederPropertiesConf);
     replay(mockLogFeederLog4j, mockLogSearchLog4j);
+    replay(confLogSearchServiceLogsConf, confLogSearchAuditLogsConf);
     new UpgradeCatalog300(injector2).updateLogSearchConfigs();
     easyMockSupport.verifyAll();
 
@@ -376,5 +403,11 @@ public class UpgradeCatalog300Test {
 
     Map<String, String> updatedLogSearchLog4j = logSearchLog4jCapture.getValue();
     assertTrue(Maps.difference(expectedLogSearchLog4j, updatedLogSearchLog4j).areEqual());
+
+    Map<String, String> updatedServiceLogsConf = logSearchServiceLogsConfCapture.getValue();
+    assertTrue(Maps.difference(expectedLogSearchServiceLogsConf, updatedServiceLogsConf).areEqual());
+
+    Map<String, String> updatedAuditLogsConf = logSearchAuditLogsConfCapture.getValue();
+    assertTrue(Maps.difference(expectedLogSearchAuditLogsConf, updatedAuditLogsConf).areEqual());
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a795f38c/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py b/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py
index 87304cd..e1fa1d8 100644
--- a/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py
+++ b/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py
@@ -106,6 +106,9 @@ class TestInfraSolr(RMFTestCase):
                                 )
 
       self.assertResourceCalled('Execute', 'ambari-sudo.sh JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181 --znode /infra-solr --create-znode --retry 30 --interval 5')
+      self.assertResourceCalled('Execute', 'ambari-sudo.sh JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181/infra-solr --remove-admin-handlers --collection hadoop_logs --retry 5 --interval 10')
+      self.assertResourceCalled('Execute', 'ambari-sudo.sh JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181/infra-solr --remove-admin-handlers --collection audit_logs --retry 5 --interval 10')
+      self.assertResourceCalled('Execute', 'ambari-sudo.sh JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181/infra-solr --remove-admin-handlers --collection history --retry 5 --interval 10')
       self.assertResourceCalled('Execute', 'ambari-sudo.sh JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181/infra-solr --cluster-prop --property-name urlScheme --property-value http')
       self.assertResourceCalled('Execute', 'ambari-sudo.sh JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181 --znode /infra-solr --setup-kerberos-plugin')
 


[30/52] [abbrv] ambari git commit: AMBARI-21409. Ambari agent not starting in latest PPC build (aonishuk)

Posted by jl...@apache.org.
AMBARI-21409. Ambari agent not starting in latest PPC build (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 6832ed93a156b33178e62d6f8279faea8e414cba
Parents: 7029e7f
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Jul 7 11:04:22 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Jul 7 11:04:22 2017 +0300

----------------------------------------------------------------------
 .../src/main/python/ambari_commons/resources/os_family.json       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6832ed93/ambari-common/src/main/python/ambari_commons/resources/os_family.json
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/ambari_commons/resources/os_family.json b/ambari-common/src/main/python/ambari_commons/resources/os_family.json
index b9cdbf6..5579378 100644
--- a/ambari-common/src/main/python/ambari_commons/resources/os_family.json
+++ b/ambari-common/src/main/python/ambari_commons/resources/os_family.json
@@ -29,7 +29,8 @@
           "centos-ppc"
         ],
         "versions": [
-          6
+          6,
+          7
         ]
       },
       "debian": {


[19/52] [abbrv] ambari git commit: AMBARI-21387 Log Feeder input config attribute "tail" should be clearer (mgergely)

Posted by jl...@apache.org.
AMBARI-21387 Log Feeder input config attribute "tail" should be clearer (mgergely)

Change-Id: I0ca164df6b5b91d237f1503bc4b9e45a0df4b685


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 8d9fd451d5ad348d073d4adbe73970586ab71c37
Parents: 78ebbef
Author: Miklos Gergely <mg...@hortonworks.com>
Authored: Thu Jul 6 10:17:52 2017 +0200
Committer: Miklos Gergely <mg...@hortonworks.com>
Committed: Thu Jul 6 10:17:52 2017 +0200

----------------------------------------------------------------------
 .../config/zookeeper/LogSearchConfigZK.java     |  12 +-
 .../logfeeder/input/AbstractInputFile.java      | 105 +++++++++--------
 .../apache/ambari/logfeeder/input/Input.java    |   4 -
 .../ambari/logfeeder/input/InputFile.java       |  23 ++--
 .../ambari/logfeeder/input/InputManager.java    | 113 +++++++++++--------
 .../ambari/logfeeder/input/InputS3File.java     |  11 +-
 .../logfeeder/input/InputManagerTest.java       |   1 -
 7 files changed, 152 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8d9fd451/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
index 1926efa..827101c 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
@@ -22,6 +22,7 @@ package org.apache.ambari.logsearch.config.zookeeper;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.TreeMap;
 
 import org.apache.ambari.logsearch.config.api.LogSearchConfig;
@@ -53,6 +54,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableSet;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonArray;
@@ -175,10 +177,14 @@ public class LogSearchConfigZK implements LogSearchConfig {
       globalConfigNode.add(globalConfigJson.getAsJsonObject().get("global"));
     }
     
-    createGlobalConfigNode(globalConfigNode);
-    
     TreeCacheListener listener = new TreeCacheListener() {
+      private final Set<Type> nodeEvents = ImmutableSet.of(Type.NODE_ADDED, Type.NODE_UPDATED, Type.NODE_REMOVED);
+      
       public void childEvent(CuratorFramework client, TreeCacheEvent event) throws Exception {
+        if (!nodeEvents.contains(event.getType())) {
+          return;
+        }
+        
         String nodeName = ZKPaths.getNodeFromPath(event.getData().getPath());
         String nodeData = new String(event.getData().getData());
         Type eventType = event.getType();
@@ -265,6 +271,8 @@ public class LogSearchConfigZK implements LogSearchConfig {
     };
     cache.getListenable().addListener(listener);
     cache.start();
+
+    createGlobalConfigNode(globalConfigNode);
   }
 
   private void createGlobalConfigNode(JsonArray globalConfigNode) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d9fd451/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java
index ab50eb7..2359256 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java
@@ -31,7 +31,6 @@ import java.util.Map;
 import org.apache.ambari.logfeeder.util.FileUtil;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.InputFileBaseDescriptor;
-import org.apache.commons.lang.BooleanUtils;
 import org.apache.commons.lang.ObjectUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -48,11 +47,12 @@ public abstract class AbstractInputFile extends Input {
   protected boolean isReady;
 
   private String checkPointExtension;
-  private File checkPointFile;
-  private long lastCheckPointTimeMS;
   private int checkPointIntervalMS;
-  private Map<String, Object> jsonCheckPoint;
-  private InputMarker lastCheckPointInputMarker;
+  
+  private Map<String, File> checkPointFiles = new HashMap<>();
+  private Map<String, Long> lastCheckPointTimeMSs = new HashMap<>();
+  private Map<String, Map<String, Object>> jsonCheckPoints = new HashMap<>();
+  private Map<String, InputMarker> lastCheckPointInputMarkers = new HashMap<>();
 
   @Override
   protected String getStatMetricName() {
@@ -73,7 +73,6 @@ public abstract class AbstractInputFile extends Input {
     // Let's close the file and set it to true after we start monitoring it
     setClosed(true);
     logPath = inputDescriptor.getPath();
-    tail = BooleanUtils.toBooleanDefaultIfNull(inputDescriptor.isTail(), tail);
     checkPointIntervalMS = (int) ObjectUtils.defaultIfNull(((InputFileBaseDescriptor)inputDescriptor).getCheckpointIntervalMs(), DEFAULT_CHECKPOINT_INTERVAL_MS);
 
     if (StringUtils.isEmpty(logPath)) {
@@ -89,11 +88,9 @@ public abstract class AbstractInputFile extends Input {
     super.init();
   }
 
-  protected void processFile(File logPathFile) throws FileNotFoundException, IOException {
+  protected void processFile(File logPathFile, boolean follow) throws FileNotFoundException, IOException {
     LOG.info("Monitoring logPath=" + logPath + ", logPathFile=" + logPathFile);
     BufferedReader br = null;
-    checkPointFile = null;
-    jsonCheckPoint = null;
 
     int lineCount = 0;
     try {
@@ -125,7 +122,7 @@ public abstract class AbstractInputFile extends Input {
             sleepIteration++;
             if (sleepIteration == 2) {
               flush();
-              if (!tail) {
+              if (!follow) {
                 LOG.info("End of file. Done with filePath=" + logPathFile.getAbsolutePath() + ", lineCount=" + lineCount);
                 break;
               }
@@ -204,47 +201,50 @@ public abstract class AbstractInputFile extends Input {
   private int getResumeFromLineNumber() {
     int resumeFromLineNumber = 0;
     
-    if (tail) {
-      try {
-        LOG.info("Checking existing checkpoint file. " + getShortDescription());
+    File checkPointFile = null;
+    try {
+      LOG.info("Checking existing checkpoint file. " + getShortDescription());
 
-        String checkPointFileName = base64FileKey + checkPointExtension;
-        File checkPointFolder = inputManager.getCheckPointFolderFile();
-        checkPointFile = new File(checkPointFolder, checkPointFileName);
-        if (!checkPointFile.exists()) {
-          LOG.info("Checkpoint file for log file " + filePath + " doesn't exist, starting to read it from the beginning");
-        } else {
-          try (RandomAccessFile checkPointWriter = new RandomAccessFile(checkPointFile, "rw")) {
-            int contentSize = checkPointWriter.readInt();
-            byte b[] = new byte[contentSize];
-            int readSize = checkPointWriter.read(b, 0, contentSize);
-            if (readSize != contentSize) {
-              LOG.error("Couldn't read expected number of bytes from checkpoint file. expected=" + contentSize + ", read=" +
-                  readSize + ", checkPointFile=" + checkPointFile + ", input=" + getShortDescription());
-            } else {
-              String jsonCheckPointStr = new String(b, 0, readSize);
-              jsonCheckPoint = LogFeederUtil.toJSONObject(jsonCheckPointStr);
+      String checkPointFileName = base64FileKey + checkPointExtension;
+      File checkPointFolder = inputManager.getCheckPointFolderFile();
+      checkPointFile = new File(checkPointFolder, checkPointFileName);
+      checkPointFiles.put(base64FileKey, checkPointFile);
+      Map<String, Object> jsonCheckPoint = null;
+      if (!checkPointFile.exists()) {
+        LOG.info("Checkpoint file for log file " + filePath + " doesn't exist, starting to read it from the beginning");
+      } else {
+        try (RandomAccessFile checkPointWriter = new RandomAccessFile(checkPointFile, "rw")) {
+          int contentSize = checkPointWriter.readInt();
+          byte b[] = new byte[contentSize];
+          int readSize = checkPointWriter.read(b, 0, contentSize);
+          if (readSize != contentSize) {
+            LOG.error("Couldn't read expected number of bytes from checkpoint file. expected=" + contentSize + ", read=" +
+                readSize + ", checkPointFile=" + checkPointFile + ", input=" + getShortDescription());
+          } else {
+            String jsonCheckPointStr = new String(b, 0, readSize);
+            jsonCheckPoint = LogFeederUtil.toJSONObject(jsonCheckPointStr);
 
-              resumeFromLineNumber = LogFeederUtil.objectToInt(jsonCheckPoint.get("line_number"), 0, "line_number");
+            resumeFromLineNumber = LogFeederUtil.objectToInt(jsonCheckPoint.get("line_number"), 0, "line_number");
 
-              LOG.info("CheckPoint. checkPointFile=" + checkPointFile + ", json=" + jsonCheckPointStr +
-                  ", resumeFromLineNumber=" + resumeFromLineNumber);
-           }
-          } catch (EOFException eofEx) {
-            LOG.info("EOFException. Will reset checkpoint file " + checkPointFile.getAbsolutePath() + " for " +
-                getShortDescription(), eofEx);
-          }
-        }
-        if (jsonCheckPoint == null) {
-          // This seems to be first time, so creating the initial checkPoint object
-          jsonCheckPoint = new HashMap<String, Object>();
-          jsonCheckPoint.put("file_path", filePath);
-          jsonCheckPoint.put("file_key", base64FileKey);
+            LOG.info("CheckPoint. checkPointFile=" + checkPointFile + ", json=" + jsonCheckPointStr +
+                ", resumeFromLineNumber=" + resumeFromLineNumber);
+         }
+        } catch (EOFException eofEx) {
+          LOG.info("EOFException. Will reset checkpoint file " + checkPointFile.getAbsolutePath() + " for " +
+              getShortDescription(), eofEx);
         }
-
-      } catch (Throwable t) {
-        LOG.error("Error while configuring checkpoint file. Will reset file. checkPointFile=" + checkPointFile, t);
       }
+      if (jsonCheckPoint == null) {
+        // This seems to be first time, so creating the initial checkPoint object
+        jsonCheckPoint = new HashMap<String, Object>();
+        jsonCheckPoint.put("file_path", filePath);
+        jsonCheckPoint.put("file_key", base64FileKey);
+      }
+      
+      jsonCheckPoints.put(base64FileKey, jsonCheckPoint);
+
+    } catch (Throwable t) {
+      LOG.error("Error while configuring checkpoint file. Will reset file. checkPointFile=" + checkPointFile, t);
     }
     
     return resumeFromLineNumber;
@@ -253,6 +253,9 @@ public abstract class AbstractInputFile extends Input {
   @Override
   public synchronized void checkIn(InputMarker inputMarker) {
     try {
+      Map<String, Object> jsonCheckPoint = jsonCheckPoints.get(inputMarker.base64FileKey);
+      File checkPointFile = checkPointFiles.get(inputMarker.base64FileKey);
+      
       int lineNumber = LogFeederUtil.objectToInt(jsonCheckPoint.get("line_number"), 0, "line_number");
       if (lineNumber > inputMarker.lineNumber) {
         // Already wrote higher line number for this input
@@ -260,12 +263,14 @@ public abstract class AbstractInputFile extends Input {
       }
       // If interval is greater than last checkPoint time, then write
       long currMS = System.currentTimeMillis();
-      if (!isClosed() && (currMS - lastCheckPointTimeMS) < checkPointIntervalMS) {
+      long lastCheckPointTimeMs = lastCheckPointTimeMSs.containsKey(inputMarker.base64FileKey) ?
+          lastCheckPointTimeMSs.get(inputMarker.base64FileKey) : 0;
+      if (!isClosed() && (currMS - lastCheckPointTimeMs < checkPointIntervalMS)) {
         // Let's save this one so we can update the check point file on flush
-        lastCheckPointInputMarker = inputMarker;
+        lastCheckPointInputMarkers.put(inputMarker.base64FileKey, inputMarker);
         return;
       }
-      lastCheckPointTimeMS = currMS;
+      lastCheckPointTimeMSs.put(inputMarker.base64FileKey, currMS);
 
       jsonCheckPoint.put("line_number", "" + new Integer(inputMarker.lineNumber));
       jsonCheckPoint.put("last_write_time_ms", "" + new Long(currMS));
@@ -299,7 +304,7 @@ public abstract class AbstractInputFile extends Input {
 
   @Override
   public void lastCheckIn() {
-    if (lastCheckPointInputMarker != null) {
+    for (InputMarker lastCheckPointInputMarker : lastCheckPointInputMarkers.values()) {
       checkIn(lastCheckPointInputMarker);
     }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d9fd451/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java
index c36f96b..49151e7 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java
@@ -270,10 +270,6 @@ public abstract class Input extends ConfigItem implements Runnable {
     }
   }
 
-  public boolean isTail() {
-    return tail;
-  }
-
   public boolean isUseEventMD5() {
     return useEventMD5;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d9fd451/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputFile.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputFile.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputFile.java
index fc40ca4..e24a7aa 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputFile.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputFile.java
@@ -22,6 +22,8 @@ import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileFilter;
 import java.io.FileNotFoundException;
+import java.util.Arrays;
+import java.util.Comparator;
 
 import org.apache.ambari.logfeeder.input.reader.LogsearchReaderFactory;
 import org.apache.ambari.logfeeder.util.FileUtil;
@@ -41,7 +43,7 @@ public class InputFile extends AbstractInputFile {
       if (!ArrayUtils.isEmpty(logFiles) && logFiles[0].isFile()) {
         if (tail && logFiles.length > 1) {
           LOG.warn("Found multiple files (" + logFiles.length + ") for the file filter " + filePath +
-              ". Will use only the first one. Using " + logFiles[0].getAbsolutePath());
+              ". Will follow only the first one. Using " + logFiles[0].getAbsolutePath());
         }
         LOG.info("File filter " + filePath + " expanded to " + logFiles[0].getAbsolutePath());
         isReady = true;
@@ -58,7 +60,15 @@ public class InputFile extends AbstractInputFile {
       return new File[]{searchFile};
     } else {
       FileFilter fileFilter = new WildcardFileFilter(searchFile.getName());
-      return searchFile.getParentFile().listFiles(fileFilter);
+      File[] logFiles = searchFile.getParentFile().listFiles(fileFilter);
+      Arrays.sort(logFiles,
+          new Comparator<File>() {
+            @Override
+            public int compare(File o1, File o2) {
+              return o1.getName().compareTo(o2.getName());
+            }
+      });
+      return logFiles;
     }
   }
 
@@ -66,12 +76,11 @@ public class InputFile extends AbstractInputFile {
   void start() throws Exception {
     boolean isProcessFile = BooleanUtils.toBooleanDefaultIfNull(((InputFileDescriptor)inputDescriptor).getProcessFile(), true);
     if (isProcessFile) {
-      if (tail) {
-        processFile(logFiles[0]);
-      } else {
-        for (File file : logFiles) {
+      for (int i = logFiles.length - 1; i >= 0; i--) {
+        File file = logFiles[i];
+        if (i == 0 || !tail) {
           try {
-            processFile(file);
+            processFile(file, i == 0);
             if (isClosed() || isDrain()) {
               LOG.info("isClosed or isDrain. Now breaking loop.");
               break;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d9fd451/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java
index 19894ae..01a11ec 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java
@@ -197,13 +197,9 @@ public class InputManager {
         if (input.isReady()) {
           input.monitor();
         } else {
-          if (input.isTail()) {
-            LOG.info("Adding input to not ready list. Note, it is possible this component is not run on this host. " +
-                "So it might not be an issue. " + input.getShortDescription());
-            notReadyList.add(input);
-          } else {
-            LOG.info("Input is not ready, so going to ignore it " + input.getShortDescription());
-          }
+          LOG.info("Adding input to not ready list. Note, it is possible this component is not run on this host. " +
+              "So it might not be an issue. " + input.getShortDescription());
+          notReadyList.add(input);
         }
       } catch (Exception e) {
         LOG.error("Error initializing input. " + input.getShortDescription(), e);
@@ -279,46 +275,8 @@ public class InputManager {
       File[] checkPointFiles = checkPointFolderFile.listFiles(fileFilter);
       int totalCheckFilesDeleted = 0;
       for (File checkPointFile : checkPointFiles) {
-        try (RandomAccessFile checkPointReader = new RandomAccessFile(checkPointFile, "r")) {
-          int contentSize = checkPointReader.readInt();
-          byte b[] = new byte[contentSize];
-          int readSize = checkPointReader.read(b, 0, contentSize);
-          if (readSize != contentSize) {
-            LOG.error("Couldn't read expected number of bytes from checkpoint file. expected=" + contentSize + ", read="
-              + readSize + ", checkPointFile=" + checkPointFile);
-          } else {
-            String jsonCheckPointStr = new String(b, 0, readSize);
-            Map<String, Object> jsonCheckPoint = LogFeederUtil.toJSONObject(jsonCheckPointStr);
-
-            String logFilePath = (String) jsonCheckPoint.get("file_path");
-            String logFileKey = (String) jsonCheckPoint.get("file_key");
-            if (logFilePath != null && logFileKey != null) {
-              boolean deleteCheckPointFile = false;
-              File logFile = new File(logFilePath);
-              if (logFile.exists()) {
-                Object fileKeyObj = FileUtil.getFileKey(logFile);
-                String fileBase64 = Base64.byteArrayToBase64(fileKeyObj.toString().getBytes());
-                if (!logFileKey.equals(fileBase64)) {
-                  deleteCheckPointFile = true;
-                  LOG.info("CheckPoint clean: File key has changed. old=" + logFileKey + ", new=" + fileBase64 + ", filePath=" +
-                      logFilePath + ", checkPointFile=" + checkPointFile.getAbsolutePath());
-                }
-              } else {
-                LOG.info("CheckPoint clean: Log file doesn't exist. filePath=" + logFilePath + ", checkPointFile=" +
-                    checkPointFile.getAbsolutePath());
-                deleteCheckPointFile = true;
-              }
-              if (deleteCheckPointFile) {
-                LOG.info("Deleting CheckPoint file=" + checkPointFile.getAbsolutePath() + ", logFile=" + logFilePath);
-                checkPointFile.delete();
-                totalCheckFilesDeleted++;
-              }
-            }
-          }
-        } catch (EOFException eof) {
-          LOG.warn("Caught EOFException. Ignoring reading existing checkPoint file. " + checkPointFile);
-        } catch (Throwable t) {
-          LOG.error("Error while checking checkPoint file. " + checkPointFile, t);
+        if (checkCheckPointFile(checkPointFile)) {
+          totalCheckFilesDeleted++;
         }
       }
       LOG.info("Deleted " + totalCheckFilesDeleted + " checkPoint file(s). checkPointFolderFile=" +
@@ -329,6 +287,67 @@ public class InputManager {
     }
   }
 
+  private boolean checkCheckPointFile(File checkPointFile) {
+    boolean deleted = false;
+    try (RandomAccessFile checkPointReader = new RandomAccessFile(checkPointFile, "r")) {
+      int contentSize = checkPointReader.readInt();
+      byte b[] = new byte[contentSize];
+      int readSize = checkPointReader.read(b, 0, contentSize);
+      if (readSize != contentSize) {
+        LOG.error("Couldn't read expected number of bytes from checkpoint file. expected=" + contentSize + ", read="
+          + readSize + ", checkPointFile=" + checkPointFile);
+      } else {
+        String jsonCheckPointStr = new String(b, 0, readSize);
+        Map<String, Object> jsonCheckPoint = LogFeederUtil.toJSONObject(jsonCheckPointStr);
+
+        String logFilePath = (String) jsonCheckPoint.get("file_path");
+        String logFileKey = (String) jsonCheckPoint.get("file_key");
+        if (logFilePath != null && logFileKey != null) {
+          boolean deleteCheckPointFile = false;
+          File logFile = new File(logFilePath);
+          if (logFile.exists()) {
+            Object fileKeyObj = FileUtil.getFileKey(logFile);
+            String fileBase64 = Base64.byteArrayToBase64(fileKeyObj.toString().getBytes());
+            if (!logFileKey.equals(fileBase64)) {
+              LOG.info("CheckPoint clean: File key has changed. old=" + logFileKey + ", new=" + fileBase64 + ", filePath=" +
+                  logFilePath + ", checkPointFile=" + checkPointFile.getAbsolutePath());
+              deleteCheckPointFile = !wasFileRenamed(logFile.getParentFile(), logFileKey);
+            }
+          } else {
+            LOG.info("CheckPoint clean: Log file doesn't exist. filePath=" + logFilePath + ", checkPointFile=" +
+                checkPointFile.getAbsolutePath());
+            deleteCheckPointFile = !wasFileRenamed(logFile.getParentFile(), logFileKey);
+          }
+          if (deleteCheckPointFile) {
+            LOG.info("Deleting CheckPoint file=" + checkPointFile.getAbsolutePath() + ", logFile=" + logFilePath);
+            checkPointFile.delete();
+            deleted = true;
+          }
+        }
+      }
+    } catch (EOFException eof) {
+      LOG.warn("Caught EOFException. Ignoring reading existing checkPoint file. " + checkPointFile);
+    } catch (Throwable t) {
+      LOG.error("Error while checking checkPoint file. " + checkPointFile, t);
+    }
+    
+    return deleted;
+  }
+  
+  private boolean wasFileRenamed(File folder, String searchFileBase64) {
+    for (File file : folder.listFiles()) {
+      Object fileKeyObj = FileUtil.getFileKey(file);
+      String fileBase64 = Base64.byteArrayToBase64(fileKeyObj.toString().getBytes());
+      if (searchFileBase64.equals(fileBase64)) {
+        // even though the file name in the checkpoint file is different from the one it was renamed to, checkpoint files are
+        // identified by their name, which is generated from the file key, which would be the same for the renamed file
+        LOG.info("CheckPoint clean: File key matches file " + file.getAbsolutePath() + ", it must have been renamed");
+        return true;
+      }
+    }
+    return false;
+  }
+  
   public void waitOnAllInputs() {
     //wait on inputs
     for (List<Input> inputList : inputs.values()) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d9fd451/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputS3File.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputS3File.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputS3File.java
index 2b19503..69d053a 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputS3File.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputS3File.java
@@ -59,18 +59,17 @@ public class InputS3File extends AbstractInputFile {
       return;
     }
 
-    if (tail) {
-      processFile(logFiles[0]);
-    } else {
-      for (File s3FilePath : logFiles) {
+    for (int i = logFiles.length - 1; i >= 0; i--) {
+      File file = logFiles[i];
+      if (i == 0 || !tail) {
         try {
-          processFile(s3FilePath);
+          processFile(file, i == 0);
           if (isClosed() || isDrain()) {
             LOG.info("isClosed or isDrain. Now breaking loop.");
             break;
           }
         } catch (Throwable t) {
-          LOG.error("Error processing file=" + s3FilePath, t);
+          LOG.error("Error processing file=" + file.getAbsolutePath(), t);
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d9fd451/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java
index e9bbe7e..625e362 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java
@@ -73,7 +73,6 @@ public class InputManagerTest {
     
     expect(input1.monitor()).andReturn(false);
     expect(input2.monitor()).andReturn(false);
-    expect(input3.isTail()).andReturn(false);
     expect(input3.getShortDescription()).andReturn("").once();
     
     replay(input1, input2, input3);


[43/52] [abbrv] ambari git commit: AMBARI-20950. HdfsResource can not handle S3 URL when hbase.rootdir is set to S3 URL (aonishuk)

Posted by jl...@apache.org.
AMBARI-20950. HdfsResource can not handle S3 URL when hbase.rootdir is set to S3 URL (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 7f3d3b21a961581678cb7c072ec71e5eb15d7da9
Parents: d0f7a51
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Jul 10 12:58:10 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Jul 10 12:58:10 2017 +0300

----------------------------------------------------------------------
 .../HBASE/0.96.0.2.0/package/scripts/hbase.py           | 12 +++++++-----
 .../HBASE/0.96.0.2.0/package/scripts/params_linux.py    |  3 +++
 2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f3d3b21/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py
index 8ad802e..cec6b2a 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py
@@ -17,6 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 """
+from urlparse import urlparse
 import os
 import sys
 from resource_management.libraries.script.script import Script
@@ -200,11 +201,12 @@ def hbase(name=None):
       owner=params.hbase_user
     )
   if name == "master":
-    params.HdfsResource(params.hbase_hdfs_root_dir,
-                         type="directory",
-                         action="create_on_execute",
-                         owner=params.hbase_user
-    )
+    if not params.hbase_hdfs_root_dir_protocol or params.hbase_hdfs_root_dir_protocol == urlparse(params.default_fs).scheme:
+      params.HdfsResource(params.hbase_hdfs_root_dir,
+                           type="directory",
+                           action="create_on_execute",
+                           owner=params.hbase_user
+      )
     params.HdfsResource(params.hbase_staging_dir,
                          type="directory",
                          action="create_on_execute",

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f3d3b21/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index d45aea6..e05da06 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -17,6 +17,8 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 """
+from urlparse import urlparse
+
 import status_params
 import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
 
@@ -237,6 +239,7 @@ else:
 hbase_env_sh_template = config['configurations']['hbase-env']['content']
 
 hbase_hdfs_root_dir = config['configurations']['hbase-site']['hbase.rootdir']
+hbase_hdfs_root_dir_protocol = urlparse(hbase_hdfs_root_dir).scheme
 hbase_staging_dir = "/apps/hbase/staging"
 #for create_hdfs_directory
 hostname = config["hostname"]


[06/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/service_advisor.py
new file mode 100644
index 0000000..f37261f
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/service_advisor.py
@@ -0,0 +1,774 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+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.
+"""
+
+# Python imports
+import imp
+import os
+import traceback
+import re
+import socket
+import fnmatch
+
+
+from resource_management.core.logger import Logger
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+  with open(PARENT_FILE, 'rb') as fp:
+    service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+  traceback.print_exc()
+  print "Failed to load parent"
+
+DB_TYPE_DEFAULT_PORT_MAP = {"MYSQL":"3306", "ORACLE":"1521", "POSTGRES":"5432", "MSSQL":"1433", "SQLA":"2638"}
+
+class RangerServiceAdvisor(service_advisor.ServiceAdvisor):
+
+  def __init__(self, *args, **kwargs):
+    self.as_super = super(RangerServiceAdvisor, self)
+    self.as_super.__init__(*args, **kwargs)
+
+    # Always call these methods
+    self.modifyMastersWithMultipleInstances()
+    self.modifyCardinalitiesDict()
+    self.modifyHeapSizeProperties()
+    self.modifyNotValuableComponents()
+    self.modifyComponentsNotPreferableOnServer()
+    self.modifyComponentLayoutSchemes()
+
+  def modifyMastersWithMultipleInstances(self):
+    """
+    Modify the set of masters with multiple instances.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def modifyCardinalitiesDict(self):
+    """
+    Modify the dictionary of cardinalities.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def modifyHeapSizeProperties(self):
+    """
+    Modify the dictionary of heap size properties.
+    Must be overriden in child class.
+    """
+    pass
+
+  def modifyNotValuableComponents(self):
+    """
+    Modify the set of components whose host assignment is based on other services.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def modifyComponentsNotPreferableOnServer(self):
+    """
+    Modify the set of components that are not preferable on the server.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def modifyComponentLayoutSchemes(self):
+    """
+    Modify layout scheme dictionaries for components.
+    The scheme dictionary basically maps the number of hosts to
+    host index where component should exist.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def getServiceComponentLayoutValidations(self, services, hosts):
+    """
+    Get a list of errors.
+    Must be overriden in child class.
+    """
+
+    return []
+
+  def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts):
+    """
+    Entry point.
+    Must be overriden in child class.
+    """
+    # Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
+    #            (self.__class__.__name__, inspect.stack()[0][3]))
+
+    recommender = RangerRecommender()
+    recommender.recommendRangerConfigurationsFromHDP206(configurations, clusterData, services, hosts)
+    recommender.recommendRangerConfigurationsFromHDP22(configurations, clusterData, services, hosts)
+    recommender.recommendRangerConfigurationsFromHDP23(configurations, clusterData, services, hosts)
+    recommender.recommendRangerConfigurationsFromHDP25(configurations, clusterData, services, hosts)
+    recommender.recommendRangerConfigurationsFromHDP26(configurations, clusterData, services, hosts)
+
+  def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
+    """
+    Entry point.
+    Validate configurations for the service. Return a list of errors.
+    The code for this function should be the same for each Service Advisor.
+    """
+    # Logger.info("Class: %s, Method: %s. Validating Configurations." %
+    #            (self.__class__.__name__, inspect.stack()[0][3]))
+
+    validator = RangerValidator()
+    # Calls the methods of the validator using arguments,
+    # method(siteProperties, siteRecommendations, configurations, services, hosts)
+    return validator.validateListOfConfigUsingMethod(configurations, recommendedDefaults, services, hosts, validator.validators)
+
+class RangerRecommender(service_advisor.ServiceAdvisor):
+  """
+  Ranger Recommender suggests properties when adding the service for the first time or modifying configs via the UI.
+  """
+
+  def __init__(self, *args, **kwargs):
+    self.as_super = super(RangerRecommender, self)
+    self.as_super.__init__(*args, **kwargs)
+
+  def recommendRangerConfigurationsFromHDP206(self, configurations, clusterData, services, hosts):
+
+    putRangerAdminProperty = self.putProperty(configurations, "admin-properties", services)
+
+    # Build policymgr_external_url
+    protocol = 'http'
+    ranger_admin_host = 'localhost'
+    port = '6080'
+
+    # Check if http is disabled. For HDP-2.3 this can be checked in ranger-admin-site/ranger.service.http.enabled
+    # For Ranger-0.4.0 this can be checked in ranger-site/http.enabled
+    if ('ranger-site' in services['configurations'] and 'http.enabled' in services['configurations']['ranger-site']['properties'] \
+          and services['configurations']['ranger-site']['properties']['http.enabled'].lower() == 'false') or \
+            ('ranger-admin-site' in services['configurations'] and 'ranger.service.http.enabled' in services['configurations']['ranger-admin-site']['properties'] \
+               and services['configurations']['ranger-admin-site']['properties']['ranger.service.http.enabled'].lower() == 'false'):
+      # HTTPS protocol is used
+      protocol = 'https'
+      # Starting Ranger-0.5.0.2.3 port stored in ranger-admin-site ranger.service.https.port
+      if 'ranger-admin-site' in services['configurations'] and \
+                      'ranger.service.https.port' in services['configurations']['ranger-admin-site']['properties']:
+        port = services['configurations']['ranger-admin-site']['properties']['ranger.service.https.port']
+      # In Ranger-0.4.0 port stored in ranger-site https.service.port
+      elif 'ranger-site' in services['configurations'] and \
+                      'https.service.port' in services['configurations']['ranger-site']['properties']:
+        port = services['configurations']['ranger-site']['properties']['https.service.port']
+    else:
+      # HTTP protocol is used
+      # Starting Ranger-0.5.0.2.3 port stored in ranger-admin-site ranger.service.http.port
+      if 'ranger-admin-site' in services['configurations'] and \
+                      'ranger.service.http.port' in services['configurations']['ranger-admin-site']['properties']:
+        port = services['configurations']['ranger-admin-site']['properties']['ranger.service.http.port']
+      # In Ranger-0.4.0 port stored in ranger-site http.service.port
+      elif 'ranger-site' in services['configurations'] and \
+                      'http.service.port' in services['configurations']['ranger-site']['properties']:
+        port = services['configurations']['ranger-site']['properties']['http.service.port']
+
+    ranger_admin_hosts = self.getComponentHostNames(services, "RANGER", "RANGER_ADMIN")
+    if ranger_admin_hosts:
+      if len(ranger_admin_hosts) > 1 \
+        and services['configurations'] \
+        and 'admin-properties' in services['configurations'] and 'policymgr_external_url' in services['configurations']['admin-properties']['properties'] \
+        and services['configurations']['admin-properties']['properties']['policymgr_external_url'] \
+        and services['configurations']['admin-properties']['properties']['policymgr_external_url'].strip():
+
+        # in case of HA deployment keep the policymgr_external_url specified in the config
+        policymgr_external_url = services['configurations']['admin-properties']['properties']['policymgr_external_url']
+      else:
+
+        ranger_admin_host = ranger_admin_hosts[0]
+        policymgr_external_url = "%s://%s:%s" % (protocol, ranger_admin_host, port)
+
+      putRangerAdminProperty('policymgr_external_url', policymgr_external_url)
+
+    rangerServiceVersion = [service['StackServices']['service_version'] for service in services["services"] if service['StackServices']['service_name'] == 'RANGER'][0]
+    if rangerServiceVersion == '0.4.0':
+      # Recommend ldap settings based on ambari.properties configuration
+      # If 'ambari.ldap.isConfigured' == true
+      # For Ranger version 0.4.0
+      if 'ambari-server-properties' in services and \
+                      'ambari.ldap.isConfigured' in services['ambari-server-properties'] and \
+                      services['ambari-server-properties']['ambari.ldap.isConfigured'].lower() == "true":
+        putUserSyncProperty = self.putProperty(configurations, "usersync-properties", services)
+        serverProperties = services['ambari-server-properties']
+        if 'authentication.ldap.managerDn' in serverProperties:
+          putUserSyncProperty('SYNC_LDAP_BIND_DN', serverProperties['authentication.ldap.managerDn'])
+        if 'authentication.ldap.primaryUrl' in serverProperties:
+          ldap_protocol =  'ldap://'
+          if 'authentication.ldap.useSSL' in serverProperties and serverProperties['authentication.ldap.useSSL'] == 'true':
+            ldap_protocol =  'ldaps://'
+          ldapUrl = ldap_protocol + serverProperties['authentication.ldap.primaryUrl'] if serverProperties['authentication.ldap.primaryUrl'] else serverProperties['authentication.ldap.primaryUrl']
+          putUserSyncProperty('SYNC_LDAP_URL', ldapUrl)
+        if 'authentication.ldap.userObjectClass' in serverProperties:
+          putUserSyncProperty('SYNC_LDAP_USER_OBJECT_CLASS', serverProperties['authentication.ldap.userObjectClass'])
+        if 'authentication.ldap.usernameAttribute' in serverProperties:
+          putUserSyncProperty('SYNC_LDAP_USER_NAME_ATTRIBUTE', serverProperties['authentication.ldap.usernameAttribute'])
+
+
+      # Set Ranger Admin Authentication method
+      if 'admin-properties' in services['configurations'] and 'usersync-properties' in services['configurations'] and \
+                      'SYNC_SOURCE' in services['configurations']['usersync-properties']['properties']:
+        rangerUserSyncSource = services['configurations']['usersync-properties']['properties']['SYNC_SOURCE']
+        authenticationMethod = rangerUserSyncSource.upper()
+        if authenticationMethod != 'FILE':
+          putRangerAdminProperty('authentication_method', authenticationMethod)
+
+      # Recommend xasecure.audit.destination.hdfs.dir
+      # For Ranger version 0.4.0
+      servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+      putRangerEnvProperty = self.putProperty(configurations, "ranger-env", services)
+      include_hdfs = "HDFS" in servicesList
+      if include_hdfs:
+        if 'core-site' in services['configurations'] and ('fs.defaultFS' in services['configurations']['core-site']['properties']):
+          default_fs = services['configurations']['core-site']['properties']['fs.defaultFS']
+          default_fs += '/ranger/audit/%app-type%/%time:yyyyMMdd%'
+          putRangerEnvProperty('xasecure.audit.destination.hdfs.dir', default_fs)
+
+      # Recommend Ranger Audit properties for ranger supported services
+      # For Ranger version 0.4.0
+      ranger_services = [
+        {'service_name': 'HDFS', 'audit_file': 'ranger-hdfs-plugin-properties'},
+        {'service_name': 'HBASE', 'audit_file': 'ranger-hbase-plugin-properties'},
+        {'service_name': 'HIVE', 'audit_file': 'ranger-hive-plugin-properties'},
+        {'service_name': 'KNOX', 'audit_file': 'ranger-knox-plugin-properties'},
+        {'service_name': 'STORM', 'audit_file': 'ranger-storm-plugin-properties'}
+      ]
+
+      for item in range(len(ranger_services)):
+        if ranger_services[item]['service_name'] in servicesList:
+          component_audit_file =  ranger_services[item]['audit_file']
+          if component_audit_file in services["configurations"]:
+            ranger_audit_dict = [
+              {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.db', 'target_configname': 'XAAUDIT.DB.IS_ENABLED'},
+              {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.hdfs', 'target_configname': 'XAAUDIT.HDFS.IS_ENABLED'},
+              {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.hdfs.dir', 'target_configname': 'XAAUDIT.HDFS.DESTINATION_DIRECTORY'}
+            ]
+            putRangerAuditProperty = self.putProperty(configurations, component_audit_file, services)
+
+            for item in ranger_audit_dict:
+              if item['filename'] in services["configurations"] and item['configname'] in  services["configurations"][item['filename']]["properties"]:
+                if item['filename'] in configurations and item['configname'] in  configurations[item['filename']]["properties"]:
+                  rangerAuditProperty = configurations[item['filename']]["properties"][item['configname']]
+                else:
+                  rangerAuditProperty = services["configurations"][item['filename']]["properties"][item['configname']]
+                putRangerAuditProperty(item['target_configname'], rangerAuditProperty)
+
+  def recommendRangerConfigurationsFromHDP22(self, configurations, clusterData, services, hosts):
+    putRangerEnvProperty = self.putProperty(configurations, "ranger-env")
+    cluster_env = self.getServicesSiteProperties(services, "cluster-env")
+    security_enabled = cluster_env is not None and "security_enabled" in cluster_env and \
+                       cluster_env["security_enabled"].lower() == "true"
+    if "ranger-env" in configurations and not security_enabled:
+      putRangerEnvProperty("ranger-storm-plugin-enabled", "No")
+
+  def getDBConnectionHostPort(self, db_type, db_host):
+    connection_string = ""
+    if db_type is None or db_type == "":
+      return connection_string
+    else:
+      colon_count = db_host.count(':')
+      if colon_count == 0:
+        if DB_TYPE_DEFAULT_PORT_MAP.has_key(db_type):
+          connection_string = db_host + ":" + DB_TYPE_DEFAULT_PORT_MAP[db_type]
+        else:
+          connection_string = db_host
+      elif colon_count == 1:
+        connection_string = db_host
+      elif colon_count == 2:
+        connection_string = db_host
+
+    return connection_string
+
+  def getOracleDBConnectionHostPort(self, db_type, db_host, rangerDbName):
+    connection_string = self.getDBConnectionHostPort(db_type, db_host)
+    colon_count = db_host.count(':')
+    if colon_count == 1 and '/' in db_host:
+      connection_string = "//" + connection_string
+    elif colon_count == 0 or colon_count == 1:
+      connection_string = "//" + connection_string + "/" + rangerDbName if rangerDbName else "//" + connection_string
+
+    return connection_string
+
+  def recommendRangerUrlConfigurations(self, configurations, services, requiredServices):
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+
+    policymgr_external_url = ""
+    if 'admin-properties' in services['configurations'] and 'policymgr_external_url' in services['configurations']['admin-properties']['properties']:
+      if 'admin-properties' in configurations and 'policymgr_external_url' in configurations['admin-properties']['properties']:
+        policymgr_external_url = configurations['admin-properties']['properties']['policymgr_external_url']
+      else:
+        policymgr_external_url = services['configurations']['admin-properties']['properties']['policymgr_external_url']
+
+    for index in range(len(requiredServices)):
+      if requiredServices[index]['service_name'] in servicesList:
+        component_config_type = requiredServices[index]['config_type']
+        component_name = requiredServices[index]['service_name']
+        component_config_property = 'ranger.plugin.{0}.policy.rest.url'.format(component_name.lower())
+        if requiredServices[index]['service_name'] == 'RANGER_KMS':
+          component_config_property = 'ranger.plugin.kms.policy.rest.url'
+        putRangerSecurityProperty = self.putProperty(configurations, component_config_type, services)
+        if component_config_type in services["configurations"] and component_config_property in services["configurations"][component_config_type]["properties"]:
+          putRangerSecurityProperty(component_config_property, policymgr_external_url)
+
+  def recommendRangerConfigurationsFromHDP23(self, configurations, clusterData, services, hosts):
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+    putRangerAdminProperty = self.putProperty(configurations, "ranger-admin-site", services)
+    putRangerEnvProperty = self.putProperty(configurations, "ranger-env", services)
+    putRangerUgsyncSite = self.putProperty(configurations, "ranger-ugsync-site", services)
+
+    if 'admin-properties' in services['configurations'] and ('DB_FLAVOR' in services['configurations']['admin-properties']['properties'])\
+      and ('db_host' in services['configurations']['admin-properties']['properties']) and ('db_name' in services['configurations']['admin-properties']['properties']):
+
+      rangerDbFlavor = services['configurations']["admin-properties"]["properties"]["DB_FLAVOR"]
+      rangerDbHost =   services['configurations']["admin-properties"]["properties"]["db_host"]
+      rangerDbName =   services['configurations']["admin-properties"]["properties"]["db_name"]
+      ranger_db_url_dict = {
+        'MYSQL': {'ranger.jpa.jdbc.driver': 'com.mysql.jdbc.Driver',
+                  'ranger.jpa.jdbc.url': 'jdbc:mysql://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + '/' + rangerDbName},
+        'ORACLE': {'ranger.jpa.jdbc.driver': 'oracle.jdbc.driver.OracleDriver',
+                   'ranger.jpa.jdbc.url': 'jdbc:oracle:thin:@' + self.getOracleDBConnectionHostPort(rangerDbFlavor, rangerDbHost, rangerDbName)},
+        'POSTGRES': {'ranger.jpa.jdbc.driver': 'org.postgresql.Driver',
+                     'ranger.jpa.jdbc.url': 'jdbc:postgresql://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + '/' + rangerDbName},
+        'MSSQL': {'ranger.jpa.jdbc.driver': 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
+                  'ranger.jpa.jdbc.url': 'jdbc:sqlserver://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + ';databaseName=' + rangerDbName},
+        'SQLA': {'ranger.jpa.jdbc.driver': 'sap.jdbc4.sqlanywhere.IDriver',
+                 'ranger.jpa.jdbc.url': 'jdbc:sqlanywhere:host=' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + ';database=' + rangerDbName}
+      }
+      rangerDbProperties = ranger_db_url_dict.get(rangerDbFlavor, ranger_db_url_dict['MYSQL'])
+      for key in rangerDbProperties:
+        putRangerAdminProperty(key, rangerDbProperties.get(key))
+
+      if 'admin-properties' in services['configurations'] and ('DB_FLAVOR' in services['configurations']['admin-properties']['properties']) \
+        and ('db_host' in services['configurations']['admin-properties']['properties']):
+
+        rangerDbFlavor = services['configurations']["admin-properties"]["properties"]["DB_FLAVOR"]
+        rangerDbHost =   services['configurations']["admin-properties"]["properties"]["db_host"]
+        ranger_db_privelege_url_dict = {
+          'MYSQL': {'ranger_privelege_user_jdbc_url': 'jdbc:mysql://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost)},
+          'ORACLE': {'ranger_privelege_user_jdbc_url': 'jdbc:oracle:thin:@' + self.getOracleDBConnectionHostPort(rangerDbFlavor, rangerDbHost, None)},
+          'POSTGRES': {'ranger_privelege_user_jdbc_url': 'jdbc:postgresql://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + '/postgres'},
+          'MSSQL': {'ranger_privelege_user_jdbc_url': 'jdbc:sqlserver://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + ';'},
+          'SQLA': {'ranger_privelege_user_jdbc_url': 'jdbc:sqlanywhere:host=' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + ';'}
+        }
+        rangerPrivelegeDbProperties = ranger_db_privelege_url_dict.get(rangerDbFlavor, ranger_db_privelege_url_dict['MYSQL'])
+        for key in rangerPrivelegeDbProperties:
+          putRangerEnvProperty(key, rangerPrivelegeDbProperties.get(key))
+
+    # Recommend ldap settings based on ambari.properties configuration
+    if 'ambari-server-properties' in services and \
+        'ambari.ldap.isConfigured' in services['ambari-server-properties'] and \
+        services['ambari-server-properties']['ambari.ldap.isConfigured'].lower() == "true":
+      serverProperties = services['ambari-server-properties']
+      if 'authentication.ldap.baseDn' in serverProperties:
+        putRangerUgsyncSite('ranger.usersync.ldap.searchBase', serverProperties['authentication.ldap.baseDn'])
+      if 'authentication.ldap.groupMembershipAttr' in serverProperties:
+        putRangerUgsyncSite('ranger.usersync.group.memberattributename', serverProperties['authentication.ldap.groupMembershipAttr'])
+      if 'authentication.ldap.groupNamingAttr' in serverProperties:
+        putRangerUgsyncSite('ranger.usersync.group.nameattribute', serverProperties['authentication.ldap.groupNamingAttr'])
+      if 'authentication.ldap.groupObjectClass' in serverProperties:
+        putRangerUgsyncSite('ranger.usersync.group.objectclass', serverProperties['authentication.ldap.groupObjectClass'])
+      if 'authentication.ldap.managerDn' in serverProperties:
+        putRangerUgsyncSite('ranger.usersync.ldap.binddn', serverProperties['authentication.ldap.managerDn'])
+      if 'authentication.ldap.primaryUrl' in serverProperties:
+        ldap_protocol =  'ldap://'
+        if 'authentication.ldap.useSSL' in serverProperties and serverProperties['authentication.ldap.useSSL'] == 'true':
+          ldap_protocol =  'ldaps://'
+        ldapUrl = ldap_protocol + serverProperties['authentication.ldap.primaryUrl'] if serverProperties['authentication.ldap.primaryUrl'] else serverProperties['authentication.ldap.primaryUrl']
+        putRangerUgsyncSite('ranger.usersync.ldap.url', ldapUrl)
+      if 'authentication.ldap.userObjectClass' in serverProperties:
+        putRangerUgsyncSite('ranger.usersync.ldap.user.objectclass', serverProperties['authentication.ldap.userObjectClass'])
+      if 'authentication.ldap.usernameAttribute' in serverProperties:
+        putRangerUgsyncSite('ranger.usersync.ldap.user.nameattribute', serverProperties['authentication.ldap.usernameAttribute'])
+
+    # Recommend Ranger Authentication method
+    authMap = {
+      'org.apache.ranger.unixusersync.process.UnixUserGroupBuilder': 'UNIX',
+      'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder': 'LDAP'
+    }
+
+    if 'ranger-ugsync-site' in services['configurations'] and 'ranger.usersync.source.impl.class' in services['configurations']["ranger-ugsync-site"]["properties"]:
+      rangerUserSyncClass = services['configurations']["ranger-ugsync-site"]["properties"]["ranger.usersync.source.impl.class"]
+      if rangerUserSyncClass in authMap:
+        rangerSqlConnectorProperty = authMap.get(rangerUserSyncClass)
+        putRangerAdminProperty('ranger.authentication.method', rangerSqlConnectorProperty)
+
+
+    if 'ranger-env' in services['configurations'] and 'is_solrCloud_enabled' in services['configurations']["ranger-env"]["properties"]:
+      isSolrCloudEnabled = services['configurations']["ranger-env"]["properties"]["is_solrCloud_enabled"]  == "true"
+    else:
+      isSolrCloudEnabled = False
+
+    if isSolrCloudEnabled:
+      zookeeper_host_port = self.getZKHostPortString(services)
+      ranger_audit_zk_port = ''
+      if zookeeper_host_port:
+        ranger_audit_zk_port = '{0}/{1}'.format(zookeeper_host_port, 'ranger_audits')
+        putRangerAdminProperty('ranger.audit.solr.zookeepers', ranger_audit_zk_port)
+    else:
+      putRangerAdminProperty('ranger.audit.solr.zookeepers', 'NONE')
+
+    # Recommend ranger.audit.solr.zookeepers and xasecure.audit.destination.hdfs.dir
+    include_hdfs = "HDFS" in servicesList
+    if include_hdfs:
+      if 'core-site' in services['configurations'] and ('fs.defaultFS' in services['configurations']['core-site']['properties']):
+        default_fs = services['configurations']['core-site']['properties']['fs.defaultFS']
+        putRangerEnvProperty('xasecure.audit.destination.hdfs.dir', '{0}/{1}/{2}'.format(default_fs,'ranger','audit'))
+
+    # Recommend Ranger supported service's audit properties
+    ranger_services = [
+      {'service_name': 'HDFS', 'audit_file': 'ranger-hdfs-audit'},
+      {'service_name': 'YARN', 'audit_file': 'ranger-yarn-audit'},
+      {'service_name': 'HBASE', 'audit_file': 'ranger-hbase-audit'},
+      {'service_name': 'HIVE', 'audit_file': 'ranger-hive-audit'},
+      {'service_name': 'KNOX', 'audit_file': 'ranger-knox-audit'},
+      {'service_name': 'KAFKA', 'audit_file': 'ranger-kafka-audit'},
+      {'service_name': 'STORM', 'audit_file': 'ranger-storm-audit'}
+    ]
+
+    for item in range(len(ranger_services)):
+      if ranger_services[item]['service_name'] in servicesList:
+        component_audit_file =  ranger_services[item]['audit_file']
+        if component_audit_file in services["configurations"]:
+          ranger_audit_dict = [
+            {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.db', 'target_configname': 'xasecure.audit.destination.db'},
+            {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.hdfs', 'target_configname': 'xasecure.audit.destination.hdfs'},
+            {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.hdfs.dir', 'target_configname': 'xasecure.audit.destination.hdfs.dir'},
+            {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.solr', 'target_configname': 'xasecure.audit.destination.solr'},
+            {'filename': 'ranger-admin-site', 'configname': 'ranger.audit.solr.urls', 'target_configname': 'xasecure.audit.destination.solr.urls'},
+            {'filename': 'ranger-admin-site', 'configname': 'ranger.audit.solr.zookeepers', 'target_configname': 'xasecure.audit.destination.solr.zookeepers'}
+          ]
+          putRangerAuditProperty = self.putProperty(configurations, component_audit_file, services)
+
+          for item in ranger_audit_dict:
+            if item['filename'] in services["configurations"] and item['configname'] in  services["configurations"][item['filename']]["properties"]:
+              if item['filename'] in configurations and item['configname'] in  configurations[item['filename']]["properties"]:
+                rangerAuditProperty = configurations[item['filename']]["properties"][item['configname']]
+              else:
+                rangerAuditProperty = services["configurations"][item['filename']]["properties"][item['configname']]
+              putRangerAuditProperty(item['target_configname'], rangerAuditProperty)
+
+    audit_solr_flag = 'false'
+    audit_db_flag = 'false'
+    ranger_audit_source_type = 'solr'
+    if 'ranger-env' in services['configurations'] and 'xasecure.audit.destination.solr' in services['configurations']["ranger-env"]["properties"]:
+      audit_solr_flag = services['configurations']["ranger-env"]["properties"]['xasecure.audit.destination.solr']
+    if 'ranger-env' in services['configurations'] and 'xasecure.audit.destination.db' in services['configurations']["ranger-env"]["properties"]:
+      audit_db_flag = services['configurations']["ranger-env"]["properties"]['xasecure.audit.destination.db']
+
+    if audit_db_flag == 'true' and audit_solr_flag == 'false':
+      ranger_audit_source_type = 'db'
+    putRangerAdminProperty('ranger.audit.source.type',ranger_audit_source_type)
+
+    knox_host = 'localhost'
+    knox_port = '8443'
+    if 'KNOX' in servicesList:
+      knox_hosts = self.getComponentHostNames(services, "KNOX", "KNOX_GATEWAY")
+      if len(knox_hosts) > 0:
+        knox_hosts.sort()
+        knox_host = knox_hosts[0]
+      if 'gateway-site' in services['configurations'] and 'gateway.port' in services['configurations']["gateway-site"]["properties"]:
+        knox_port = services['configurations']["gateway-site"]["properties"]['gateway.port']
+      putRangerAdminProperty('ranger.sso.providerurl', 'https://{0}:{1}/gateway/knoxsso/api/v1/websso'.format(knox_host, knox_port))
+
+    required_services = [
+      {'service_name': 'HDFS', 'config_type': 'ranger-hdfs-security'},
+      {'service_name': 'YARN', 'config_type': 'ranger-yarn-security'},
+      {'service_name': 'HBASE', 'config_type': 'ranger-hbase-security'},
+      {'service_name': 'HIVE', 'config_type': 'ranger-hive-security'},
+      {'service_name': 'KNOX', 'config_type': 'ranger-knox-security'},
+      {'service_name': 'KAFKA', 'config_type': 'ranger-kafka-security'},
+      {'service_name': 'RANGER_KMS','config_type': 'ranger-kms-security'},
+      {'service_name': 'STORM', 'config_type': 'ranger-storm-security'}
+    ]
+
+    # recommendation for ranger url for ranger-supported plugins
+    self.recommendRangerUrlConfigurations(configurations, services, required_services)
+
+  def recommendRangerConfigurationsFromHDP25(self, configurations, clusterData, services, hosts):
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+    has_ranger_tagsync = False
+
+    putTagsyncAppProperty = self.putProperty(configurations, "tagsync-application-properties", services)
+    putTagsyncSiteProperty = self.putProperty(configurations, "ranger-tagsync-site", services)
+    putRangerAdminProperty = self.putProperty(configurations, "ranger-admin-site", services)
+    putRangerEnvProperty = self.putProperty(configurations, "ranger-env", services)
+
+    application_properties = self.getServicesSiteProperties(services, "application-properties")
+
+    ranger_tagsync_host = self.getHostsForComponent(services, "RANGER", "RANGER_TAGSYNC")
+    has_ranger_tagsync = len(ranger_tagsync_host) > 0
+
+    if 'ATLAS' in servicesList and has_ranger_tagsync:
+      atlas_hosts = self.getHostNamesWithComponent("ATLAS", "ATLAS_SERVER", services)
+      atlas_host = 'localhost' if len(atlas_hosts) == 0 else atlas_hosts[0]
+      protocol = 'http'
+      atlas_port = '21000'
+
+      if application_properties and 'atlas.enableTLS' in application_properties and application_properties['atlas.enableTLS'].lower() == 'true':
+        protocol = 'https'
+        if 'atlas.server.https.port' in application_properties:
+          atlas_port = application_properties['atlas.server.https.port']
+      else:
+        protocol = 'http'
+        if application_properties and 'atlas.server.http.port' in application_properties:
+          atlas_port = application_properties['atlas.server.http.port']
+
+      atlas_rest_endpoint = '{0}://{1}:{2}'.format(protocol, atlas_host, atlas_port)
+
+      putTagsyncSiteProperty('ranger.tagsync.source.atlas', 'true')
+      putTagsyncSiteProperty('ranger.tagsync.source.atlasrest.endpoint', atlas_rest_endpoint)
+
+    zookeeper_host_port = self.getZKHostPortString(services)
+    if zookeeper_host_port and has_ranger_tagsync:
+      putTagsyncAppProperty('atlas.kafka.zookeeper.connect', zookeeper_host_port)
+
+    if 'KAFKA' in servicesList and has_ranger_tagsync:
+      kafka_hosts = self.getHostNamesWithComponent("KAFKA", "KAFKA_BROKER", services)
+      kafka_port = '6667'
+      if 'kafka-broker' in services['configurations'] and (
+          'port' in services['configurations']['kafka-broker']['properties']):
+        kafka_port = services['configurations']['kafka-broker']['properties']['port']
+      kafka_host_port = []
+      for i in range(len(kafka_hosts)):
+        kafka_host_port.append(kafka_hosts[i] + ':' + kafka_port)
+
+      final_kafka_host = ",".join(kafka_host_port)
+      putTagsyncAppProperty('atlas.kafka.bootstrap.servers', final_kafka_host)
+
+    is_solr_cloud_enabled = False
+    if 'ranger-env' in services['configurations'] and 'is_solrCloud_enabled' in services['configurations']['ranger-env']['properties']:
+      is_solr_cloud_enabled = services['configurations']['ranger-env']['properties']['is_solrCloud_enabled']  == 'true'
+
+    is_external_solr_cloud_enabled = False
+    if 'ranger-env' in services['configurations'] and 'is_external_solrCloud_enabled' in services['configurations']['ranger-env']['properties']:
+      is_external_solr_cloud_enabled = services['configurations']['ranger-env']['properties']['is_external_solrCloud_enabled']  == 'true'
+
+    ranger_audit_zk_port = ''
+
+    if 'AMBARI_INFRA' in servicesList and zookeeper_host_port and is_solr_cloud_enabled and not is_external_solr_cloud_enabled:
+      zookeeper_host_port = zookeeper_host_port.split(',')
+      zookeeper_host_port.sort()
+      zookeeper_host_port = ",".join(zookeeper_host_port)
+      infra_solr_znode = '/infra-solr'
+
+      if 'infra-solr-env' in services['configurations'] and \
+        ('infra_solr_znode' in services['configurations']['infra-solr-env']['properties']):
+        infra_solr_znode = services['configurations']['infra-solr-env']['properties']['infra_solr_znode']
+        ranger_audit_zk_port = '{0}{1}'.format(zookeeper_host_port, infra_solr_znode)
+      putRangerAdminProperty('ranger.audit.solr.zookeepers', ranger_audit_zk_port)
+    elif zookeeper_host_port and is_solr_cloud_enabled and is_external_solr_cloud_enabled:
+      ranger_audit_zk_port = '{0}/{1}'.format(zookeeper_host_port, 'ranger_audits')
+      putRangerAdminProperty('ranger.audit.solr.zookeepers', ranger_audit_zk_port)
+    else:
+      putRangerAdminProperty('ranger.audit.solr.zookeepers', 'NONE')
+
+    ranger_services = [
+      {'service_name': 'HDFS', 'audit_file': 'ranger-hdfs-audit'},
+      {'service_name': 'YARN', 'audit_file': 'ranger-yarn-audit'},
+      {'service_name': 'HBASE', 'audit_file': 'ranger-hbase-audit'},
+      {'service_name': 'HIVE', 'audit_file': 'ranger-hive-audit'},
+      {'service_name': 'KNOX', 'audit_file': 'ranger-knox-audit'},
+      {'service_name': 'KAFKA', 'audit_file': 'ranger-kafka-audit'},
+      {'service_name': 'STORM', 'audit_file': 'ranger-storm-audit'},
+      {'service_name': 'RANGER_KMS', 'audit_file': 'ranger-kms-audit'},
+      {'service_name': 'ATLAS', 'audit_file': 'ranger-atlas-audit'}
+    ]
+
+    for item in range(len(ranger_services)):
+      if ranger_services[item]['service_name'] in servicesList:
+        component_audit_file =  ranger_services[item]['audit_file']
+        if component_audit_file in services["configurations"]:
+          ranger_audit_dict = [
+            {'filename': 'ranger-admin-site', 'configname': 'ranger.audit.solr.urls', 'target_configname': 'xasecure.audit.destination.solr.urls'},
+            {'filename': 'ranger-admin-site', 'configname': 'ranger.audit.solr.zookeepers', 'target_configname': 'xasecure.audit.destination.solr.zookeepers'}
+          ]
+          putRangerAuditProperty = self.putProperty(configurations, component_audit_file, services)
+
+          for item in ranger_audit_dict:
+            if item['filename'] in services["configurations"] and item['configname'] in  services["configurations"][item['filename']]["properties"]:
+              if item['filename'] in configurations and item['configname'] in  configurations[item['filename']]["properties"]:
+                rangerAuditProperty = configurations[item['filename']]["properties"][item['configname']]
+              else:
+                rangerAuditProperty = services["configurations"][item['filename']]["properties"][item['configname']]
+              putRangerAuditProperty(item['target_configname'], rangerAuditProperty)
+
+    if "HDFS" in servicesList:
+      hdfs_user = None
+      if "hadoop-env" in services["configurations"] and "hdfs_user" in services["configurations"]["hadoop-env"]["properties"]:
+        hdfs_user = services["configurations"]["hadoop-env"]["properties"]["hdfs_user"]
+        putRangerAdminProperty('ranger.kms.service.user.hdfs', hdfs_user)
+
+    if "HIVE" in servicesList:
+      hive_user = None
+      if "hive-env" in services["configurations"] and "hive_user" in services["configurations"]["hive-env"]["properties"]:
+        hive_user = services["configurations"]["hive-env"]["properties"]["hive_user"]
+        putRangerAdminProperty('ranger.kms.service.user.hive', hive_user)
+
+    ranger_plugins_serviceuser = [
+      {'service_name': 'HDFS', 'file_name': 'hadoop-env', 'config_name': 'hdfs_user', 'target_configname': 'ranger.plugins.hdfs.serviceuser'},
+      {'service_name': 'HIVE', 'file_name': 'hive-env', 'config_name': 'hive_user', 'target_configname': 'ranger.plugins.hive.serviceuser'},
+      {'service_name': 'YARN', 'file_name': 'yarn-env', 'config_name': 'yarn_user', 'target_configname': 'ranger.plugins.yarn.serviceuser'},
+      {'service_name': 'HBASE', 'file_name': 'hbase-env', 'config_name': 'hbase_user', 'target_configname': 'ranger.plugins.hbase.serviceuser'},
+      {'service_name': 'KNOX', 'file_name': 'knox-env', 'config_name': 'knox_user', 'target_configname': 'ranger.plugins.knox.serviceuser'},
+      {'service_name': 'STORM', 'file_name': 'storm-env', 'config_name': 'storm_user', 'target_configname': 'ranger.plugins.storm.serviceuser'},
+      {'service_name': 'KAFKA', 'file_name': 'kafka-env', 'config_name': 'kafka_user', 'target_configname': 'ranger.plugins.kafka.serviceuser'},
+      {'service_name': 'RANGER_KMS', 'file_name': 'kms-env', 'config_name': 'kms_user', 'target_configname': 'ranger.plugins.kms.serviceuser'},
+      {'service_name': 'ATLAS', 'file_name': 'atlas-env', 'config_name': 'metadata_user', 'target_configname': 'ranger.plugins.atlas.serviceuser'}
+    ]
+
+    for item in range(len(ranger_plugins_serviceuser)):
+      if ranger_plugins_serviceuser[item]['service_name'] in servicesList:
+        file_name = ranger_plugins_serviceuser[item]['file_name']
+        config_name = ranger_plugins_serviceuser[item]['config_name']
+        target_configname = ranger_plugins_serviceuser[item]['target_configname']
+        if file_name in services["configurations"] and config_name in services["configurations"][file_name]["properties"]:
+          service_user = services["configurations"][file_name]["properties"][config_name]
+          putRangerAdminProperty(target_configname, service_user)
+
+    if "ATLAS" in servicesList:
+      if "ranger-env" in services["configurations"]:
+        putAtlasRangerAuditProperty = self.putProperty(configurations, 'ranger-atlas-audit', services)
+        xasecure_audit_destination_hdfs = ''
+        xasecure_audit_destination_hdfs_dir = ''
+        xasecure_audit_destination_solr = ''
+        if 'xasecure.audit.destination.hdfs' in configurations['ranger-env']['properties']:
+          xasecure_audit_destination_hdfs = configurations['ranger-env']['properties']['xasecure.audit.destination.hdfs']
+        else:
+          xasecure_audit_destination_hdfs = services['configurations']['ranger-env']['properties']['xasecure.audit.destination.hdfs']
+
+        if 'core-site' in services['configurations'] and ('fs.defaultFS' in services['configurations']['core-site']['properties']):
+          xasecure_audit_destination_hdfs_dir = '{0}/{1}/{2}'.format(services['configurations']['core-site']['properties']['fs.defaultFS'] ,'ranger','audit')
+
+        if 'xasecure.audit.destination.solr' in configurations['ranger-env']['properties']:
+          xasecure_audit_destination_solr = configurations['ranger-env']['properties']['xasecure.audit.destination.solr']
+        else:
+          xasecure_audit_destination_solr = services['configurations']['ranger-env']['properties']['xasecure.audit.destination.solr']
+
+        putAtlasRangerAuditProperty('xasecure.audit.destination.hdfs',xasecure_audit_destination_hdfs)
+        putAtlasRangerAuditProperty('xasecure.audit.destination.hdfs.dir',xasecure_audit_destination_hdfs_dir)
+        putAtlasRangerAuditProperty('xasecure.audit.destination.solr',xasecure_audit_destination_solr)
+    required_services = [
+      {'service_name': 'ATLAS', 'config_type': 'ranger-atlas-security'}
+    ]
+
+    # recommendation for ranger url for ranger-supported plugins
+    self.recommendRangerUrlConfigurations(configurations, services, required_services)
+
+  def recommendRangerConfigurationsFromHDP26(self, configurations, clusterData, services, hosts):
+
+    putRangerUgsyncSite = self.putProperty(configurations, 'ranger-ugsync-site', services)
+
+    delta_sync_enabled = False
+    if 'ranger-ugsync-site' in services['configurations'] and 'ranger.usersync.ldap.deltasync' in services['configurations']['ranger-ugsync-site']['properties']:
+      delta_sync_enabled = services['configurations']['ranger-ugsync-site']['properties']['ranger.usersync.ldap.deltasync'] == "true"
+
+    if delta_sync_enabled:
+      putRangerUgsyncSite("ranger.usersync.group.searchenabled", "true")
+    else:
+      putRangerUgsyncSite("ranger.usersync.group.searchenabled", "false")
+
+class RangerValidator(service_advisor.ServiceAdvisor):
+  """
+  Ranger Validator checks the correctness of properties whenever the service is first added or the user attempts to
+  change configs via the UI.
+  """
+
+  def __init__(self, *args, **kwargs):
+    self.as_super = super(RangerValidator, self)
+    self.as_super.__init__(*args, **kwargs)
+
+    self.validators = [("ranger-env", self.validateRangerConfigurationsEnvFromHDP22),
+                       ("admin-properties", self.validateRangerAdminConfigurationsFromHDP23),
+                       ("ranger-env", self.validateRangerConfigurationsEnvFromHDP23),
+                       ("ranger-tagsync-site", self.validateRangerTagsyncConfigurationsFromHDP25),
+                       ("ranger-ugsync-site", self.validateRangerUsersyncConfigurationsFromHDP26)]
+
+  def validateRangerConfigurationsEnvFromHDP22(self, properties, recommendedDefaults, configurations, services, hosts):
+    ranger_env_properties = properties
+    validationItems = []
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+    if "ranger-storm-plugin-enabled" in ranger_env_properties and ranger_env_properties['ranger-storm-plugin-enabled'].lower() == 'yes' and not 'KERBEROS' in servicesList:
+      validationItems.append({"config-name": "ranger-storm-plugin-enabled",
+                              "item": self.getWarnItem("Ranger Storm plugin should not be enabled in non-kerberos environment.")})
+    return self.toConfigurationValidationProblems(validationItems, "ranger-env")
+
+  def validateRangerAdminConfigurationsFromHDP23(self, properties, recommendedDefaults, configurations, services, hosts):
+    ranger_site = properties
+    validationItems = []
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+    if 'RANGER' in servicesList and 'policymgr_external_url' in ranger_site:
+      policymgr_mgr_url = ranger_site['policymgr_external_url']
+      if policymgr_mgr_url.endswith('/'):
+        validationItems.append({'config-name':'policymgr_external_url',
+                                'item':self.getWarnItem('Ranger External URL should not contain trailing slash "/"')})
+    return self.toConfigurationValidationProblems(validationItems,'admin-properties')
+
+  def validateRangerConfigurationsEnvFromHDP23(self, properties, recommendedDefaults, configurations, services, hosts):
+    ranger_env_properties = properties
+    validationItems = []
+    security_enabled = self.isSecurityEnabled(services)
+
+    if "ranger-kafka-plugin-enabled" in ranger_env_properties and ranger_env_properties["ranger-kafka-plugin-enabled"].lower() == 'yes' and not security_enabled:
+      validationItems.append({"config-name": "ranger-kafka-plugin-enabled",
+                              "item": self.getWarnItem(
+                                "Ranger Kafka plugin should not be enabled in non-kerberos environment.")})
+
+    validationProblems = self.toConfigurationValidationProblems(validationItems, "ranger-env")
+    return validationProblems
+
+  def validateRangerTagsyncConfigurationsFromHDP25(self, properties, recommendedDefaults, configurations, services, hosts):
+    ranger_tagsync_properties = properties
+    validationItems = []
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+
+    has_atlas = False
+    if "RANGER" in servicesList:
+      has_atlas = not "ATLAS" in servicesList
+
+      if has_atlas and 'ranger.tagsync.source.atlas' in ranger_tagsync_properties and \
+                      ranger_tagsync_properties['ranger.tagsync.source.atlas'].lower() == 'true':
+        validationItems.append({"config-name": "ranger.tagsync.source.atlas",
+                                "item": self.getWarnItem(
+                                  "Need to Install ATLAS service to set ranger.tagsync.source.atlas as true.")})
+
+    return self.toConfigurationValidationProblems(validationItems, "ranger-tagsync-site")
+
+  def validateRangerUsersyncConfigurationsFromHDP26(self, properties, recommendedDefaults, configurations, services, hosts):
+    ranger_usersync_properties = properties
+    validationItems = []
+
+    delta_sync_enabled = 'ranger.usersync.ldap.deltasync' in ranger_usersync_properties \
+      and ranger_usersync_properties['ranger.usersync.ldap.deltasync'].lower() == 'true'
+    group_sync_enabled = 'ranger.usersync.group.searchenabled' in ranger_usersync_properties \
+      and ranger_usersync_properties['ranger.usersync.group.searchenabled'].lower() == 'true'
+    usersync_source_ldap_enabled = 'ranger.usersync.source.impl.class' in ranger_usersync_properties \
+      and ranger_usersync_properties['ranger.usersync.source.impl.class'] == 'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder'
+
+    if usersync_source_ldap_enabled and delta_sync_enabled and not group_sync_enabled:
+      validationItems.append({"config-name": "ranger.usersync.group.searchenabled",
+                            "item": self.getWarnItem(
+                            "Need to set ranger.usersync.group.searchenabled as true, as ranger.usersync.ldap.deltasync is enabled")})
+
+    return self.toConfigurationValidationProblems(validationItems, "ranger-ugsync-site")
\ No newline at end of file


[14/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger_xml.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger_xml.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger_xml.py
deleted file mode 100644
index 26e6578..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger_xml.py
+++ /dev/null
@@ -1,853 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-import os
-import re
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions.default import default
-from resource_management.core.logger import Logger
-from resource_management.core.resources.system import File, Directory, Execute, Link
-from resource_management.core.source import DownloadSource, InlineTemplate, Template
-from resource_management.libraries.resources.xml_config import XmlConfig
-from resource_management.libraries.resources.modify_properties_file import ModifyPropertiesFile
-from resource_management.libraries.resources.properties_file import PropertiesFile
-from resource_management.core.exceptions import Fail
-from resource_management.libraries.functions.decorator import retry
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.is_empty import is_empty
-from resource_management.core.utils import PasswordString
-from resource_management.core.shell import as_sudo
-from resource_management.libraries.functions import solr_cloud_util
-from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING
-from resource_management.core.exceptions import ExecutionFailed
-
-# This file contains functions used for setup/configure of Ranger Admin and Ranger Usersync.
-# The design is to mimic what is done by the setup.sh script bundled by Ranger component currently.
-
-def ranger(name=None, upgrade_type=None):
-  """
-  parameter name: name of ranger service component
-  """
-  if name == 'ranger_admin':
-    setup_ranger_admin(upgrade_type=upgrade_type)
-
-  if name == 'ranger_usersync':
-    setup_usersync(upgrade_type=upgrade_type)
-
-  if name == 'ranger_tagsync':
-    setup_tagsync(upgrade_type=upgrade_type)
-
-def setup_ranger_admin(upgrade_type=None):
-  import params
-
-  if upgrade_type is None:
-    upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
-
-  ranger_home = params.ranger_home
-  ranger_conf = params.ranger_conf
-
-  Directory(ranger_conf,
-    owner = params.unix_user,
-    group = params.unix_group,
-    create_parents = True
-  )
-
-  copy_jdbc_connector()
-
-  File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
-    content = DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),
-    mode = 0644,
-  )
-
-  cp = format("{check_db_connection_jar}")
-  if params.db_flavor.lower() == 'sqla':
-    cp = cp + os.pathsep + format("{ranger_home}/ews/lib/sajdbc4.jar")
-  else:
-    cp = cp + os.pathsep + format("{driver_curl_target}")
-  cp = cp + os.pathsep + format("{ranger_home}/ews/lib/*")
-
-  db_connection_check_command = format(
-    "{java_home}/bin/java -cp {cp} org.apache.ambari.server.DBConnectionVerification '{ranger_jdbc_connection_url}' {ranger_db_user} {ranger_db_password!p} {ranger_jdbc_driver}")
-
-  env_dict = {}
-  if params.db_flavor.lower() == 'sqla':
-    env_dict = {'LD_LIBRARY_PATH':params.ld_lib_path}
-
-  Execute(db_connection_check_command, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', tries=5, try_sleep=10, environment=env_dict)
-
-  Execute(('ln','-sf', format('{ranger_home}/ews/webapp/WEB-INF/classes/conf'), format('{ranger_home}/conf')),
-    not_if=format("ls {ranger_home}/conf"),
-    only_if=format("ls {ranger_home}/ews/webapp/WEB-INF/classes/conf"),
-    sudo=True)
-
-  if upgrade_type is not None:
-    src_file = format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/ranger-admin-default-site.xml')
-    dst_file = format('{ranger_home}/conf/ranger-admin-default-site.xml')
-    Execute(('cp', '-f', src_file, dst_file), sudo=True)
-
-    src_file = format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/security-applicationContext.xml')
-    dst_file = format('{ranger_home}/conf/security-applicationContext.xml')
-
-    Execute(('cp', '-f', src_file, dst_file), sudo=True)
-
-  Directory(format('{ranger_home}/'),
-            owner = params.unix_user,
-            group = params.unix_group,
-            recursive_ownership = True,
-  )
-
-  Directory(params.ranger_pid_dir,
-    mode=0755,
-    owner = params.unix_user,
-    group = params.user_group,
-    cd_access = "a",
-    create_parents=True
-  )
-
-  if params.stack_supports_pid:
-    File(format('{ranger_conf}/ranger-admin-env-piddir.sh'),
-      content = format("export RANGER_PID_DIR_PATH={ranger_pid_dir}\nexport RANGER_USER={unix_user}"),
-      owner = params.unix_user,
-      group = params.unix_group,
-      mode=0755
-    )
-
-  Directory(params.admin_log_dir,
-    owner = params.unix_user,
-    group = params.unix_group,
-    create_parents = True,
-    cd_access='a',
-    mode=0755
-  )
-
-  File(format('{ranger_conf}/ranger-admin-env-logdir.sh'),
-    content = format("export RANGER_ADMIN_LOG_DIR={admin_log_dir}"),
-    owner = params.unix_user,
-    group = params.unix_group,
-    mode=0755
-  )
-
-  if os.path.isfile(params.ranger_admin_default_file):
-    File(params.ranger_admin_default_file, owner=params.unix_user, group=params.unix_group)
-  else:
-    Logger.warning('Required file {0} does not exist, copying the file to {1} path'.format(params.ranger_admin_default_file, ranger_conf))
-    src_file = format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/ranger-admin-default-site.xml')
-    dst_file = format('{ranger_home}/conf/ranger-admin-default-site.xml')
-    Execute(('cp', '-f', src_file, dst_file), sudo=True)
-    File(params.ranger_admin_default_file, owner=params.unix_user, group=params.unix_group)
-
-  if os.path.isfile(params.security_app_context_file):
-    File(params.security_app_context_file, owner=params.unix_user, group=params.unix_group)
-  else:
-    Logger.warning('Required file {0} does not exist, copying the file to {1} path'.format(params.security_app_context_file, ranger_conf))
-    src_file = format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/security-applicationContext.xml')
-    dst_file = format('{ranger_home}/conf/security-applicationContext.xml')
-    Execute(('cp', '-f', src_file, dst_file), sudo=True)
-    File(params.security_app_context_file, owner=params.unix_user, group=params.unix_group)
-
-  if upgrade_type is not None and params.stack_supports_config_versioning:
-    if os.path.islink('/usr/bin/ranger-admin'):
-      Link('/usr/bin/ranger-admin', action="delete")
-
-    Link('/usr/bin/ranger-admin',
-    to=format('{ranger_home}/ews/ranger-admin-services.sh'))
-  
-  if default("/configurations/ranger-admin-site/ranger.authentication.method", "") == 'PAM':
-    d = '/etc/pam.d'
-    if os.path.isdir(d):
-      if os.path.isfile(os.path.join(d, 'ranger-admin')):
-        Logger.info('ranger-admin PAM file already exists.')
-      else:
-        File(format('{d}/ranger-admin'),
-            content=Template('ranger_admin_pam.j2'),
-            owner = params.unix_user,
-            group = params.unix_group,
-            mode=0644
-            )
-      if os.path.isfile(os.path.join(d, 'ranger-remote')):
-        Logger.info('ranger-remote PAM file already exists.')
-      else:
-        File(format('{d}/ranger-remote'),
-            content=Template('ranger_remote_pam.j2'),
-            owner = params.unix_user,
-            group = params.unix_group,
-            mode=0644
-            )
-    else:
-    	Logger.error("Unable to use PAM authentication, /etc/pam.d/ directory does not exist.")
-
-  Execute(('ln','-sf', format('{ranger_home}/ews/ranger-admin-services.sh'),'/usr/bin/ranger-admin'),
-    not_if=format("ls /usr/bin/ranger-admin"),
-    only_if=format("ls {ranger_home}/ews/ranger-admin-services.sh"),
-    sudo=True)
-
-  # remove plain-text password from xml configs
-
-  ranger_admin_site_copy = {}
-  ranger_admin_site_copy.update(params.config['configurations']['ranger-admin-site'])
-  for prop in params.ranger_admin_password_properties:
-    if prop in ranger_admin_site_copy:
-      ranger_admin_site_copy[prop] = "_"
-
-  XmlConfig("ranger-admin-site.xml",
-    conf_dir=ranger_conf,
-    configurations=ranger_admin_site_copy,
-    configuration_attributes=params.config['configuration_attributes']['ranger-admin-site'],
-    owner=params.unix_user,
-    group=params.unix_group,
-    mode=0644)
-
-  Directory(os.path.join(ranger_conf,'ranger_jaas'),
-    mode=0700,
-    owner=params.unix_user,
-    group=params.unix_group,
-  )
-
-  if params.stack_supports_ranger_log4j:
-    File(format('{ranger_home}/ews/webapp/WEB-INF/log4j.properties'),
-      owner=params.unix_user,
-      group=params.unix_group,
-      content=InlineTemplate(params.admin_log4j),
-      mode=0644
-    )
-
-  do_keystore_setup(upgrade_type=upgrade_type)
-
-  create_core_site_xml(ranger_conf)
-
-  if params.stack_supports_ranger_kerberos and params.security_enabled:
-    if params.is_hbase_ha_enabled and params.ranger_hbase_plugin_enabled:
-      XmlConfig("hbase-site.xml",
-        conf_dir=ranger_conf,
-        configurations=params.config['configurations']['hbase-site'],
-        configuration_attributes=params.config['configuration_attributes']['hbase-site'],
-        owner=params.unix_user,
-        group=params.unix_group,
-        mode=0644
-      )
-
-    if params.is_namenode_ha_enabled and params.ranger_hdfs_plugin_enabled:
-      XmlConfig("hdfs-site.xml",
-        conf_dir=ranger_conf,
-        configurations=params.config['configurations']['hdfs-site'],
-        configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
-        owner=params.unix_user,
-        group=params.unix_group,
-        mode=0644
-      )
-
-def setup_ranger_db(stack_version=None):
-  import params
-  
-  ranger_home = params.ranger_home
-  version = params.version
-  if stack_version is not None:
-    ranger_home = format("{stack_root}/{stack_version}/ranger-admin")
-    version = stack_version
-
-  copy_jdbc_connector(stack_version=version)
-
-  ModifyPropertiesFile(format("{ranger_home}/install.properties"),
-    properties = {'audit_store': params.ranger_audit_source_type},
-    owner = params.unix_user,
-  )
-
-  env_dict = {'RANGER_ADMIN_HOME':ranger_home, 'JAVA_HOME':params.java_home}
-  if params.db_flavor.lower() == 'sqla':
-    env_dict = {'RANGER_ADMIN_HOME':ranger_home, 'JAVA_HOME':params.java_home, 'LD_LIBRARY_PATH':params.ld_lib_path}
-
-  # User wants us to setup the DB user and DB?
-  if params.create_db_dbuser:
-    Logger.info('Setting up Ranger DB and DB User')
-    dba_setup = format('ambari-python-wrap {ranger_home}/dba_script.py -q')
-    Execute(dba_setup, 
-            environment=env_dict,
-            logoutput=True,
-            user=params.unix_user,
-    )
-  else:
-    Logger.info('Separate DBA property not set. Assuming Ranger DB and DB User exists!')
-
-  db_setup = format('ambari-python-wrap {ranger_home}/db_setup.py')
-  Execute(db_setup, 
-          environment=env_dict,
-          logoutput=True,
-          user=params.unix_user,
-  )
-
-
-def setup_java_patch(stack_version=None):
-  import params
-
-  ranger_home = params.ranger_home
-  if stack_version is not None:
-    ranger_home = format("{stack_root}/{stack_version}/ranger-admin")
-
-  env_dict = {'RANGER_ADMIN_HOME':ranger_home, 'JAVA_HOME':params.java_home}
-  if params.db_flavor.lower() == 'sqla':
-    env_dict = {'RANGER_ADMIN_HOME':ranger_home, 'JAVA_HOME':params.java_home, 'LD_LIBRARY_PATH':params.ld_lib_path}
-
-  setup_java_patch = format('ambari-python-wrap {ranger_home}/db_setup.py -javapatch')
-  Execute(setup_java_patch, 
-          environment=env_dict,
-          logoutput=True,
-          user=params.unix_user,
-  )
-
-
-def do_keystore_setup(upgrade_type=None):
-  import params
-
-  ranger_home = params.ranger_home
-  cred_lib_path = params.cred_lib_path
-
-  if not is_empty(params.ranger_credential_provider_path):
-    ranger_credential_helper(cred_lib_path, params.ranger_jpa_jdbc_credential_alias, params.ranger_ambari_db_password, params.ranger_credential_provider_path)
-
-    File(params.ranger_credential_provider_path,
-      owner = params.unix_user,
-      group = params.unix_group,
-      mode = 0640
-    )
-
-  if not is_empty(params.ranger_credential_provider_path) and (params.ranger_audit_source_type).lower() == 'db' and not is_empty(params.ranger_ambari_audit_db_password):
-    ranger_credential_helper(cred_lib_path, params.ranger_jpa_audit_jdbc_credential_alias, params.ranger_ambari_audit_db_password, params.ranger_credential_provider_path)
-
-    File(params.ranger_credential_provider_path,
-      owner = params.unix_user,
-      group = params.unix_group,
-      mode = 0640
-    )
-
-  if params.ranger_auth_method.upper() == "LDAP":
-    ranger_credential_helper(params.cred_lib_path, params.ranger_ldap_password_alias, params.ranger_usersync_ldap_ldapbindpassword, params.ranger_credential_provider_path)
-
-    File(params.ranger_credential_provider_path,
-      owner = params.unix_user,
-      group = params.unix_group,
-      mode = 0640
-    )
-
-  if params.ranger_auth_method.upper() == "ACTIVE_DIRECTORY":
-    ranger_credential_helper(params.cred_lib_path, params.ranger_ad_password_alias, params.ranger_usersync_ldap_ldapbindpassword, params.ranger_credential_provider_path)
-
-    File(params.ranger_credential_provider_path,
-      owner = params.unix_user,
-      group = params.unix_group,
-      mode = 0640
-    )
-
-  if params.stack_supports_secure_ssl_password:
-    ranger_credential_helper(params.cred_lib_path, params.ranger_truststore_alias, params.truststore_password, params.ranger_credential_provider_path)
-
-    if params.https_enabled and not params.http_enabled:
-      ranger_credential_helper(params.cred_lib_path, params.ranger_https_keystore_alias, params.https_keystore_password, params.ranger_credential_provider_path)
-
-    File(params.ranger_credential_provider_path,
-      owner = params.unix_user,
-      group = params.unix_group,
-      mode = 0640
-    )
-
-def password_validation(password):
-  import params
-  if password.strip() == "":
-    raise Fail("Blank password is not allowed for Bind user. Please enter valid password.")
-  if re.search("[\\\`'\"]",password):
-    raise Fail("LDAP/AD bind password contains one of the unsupported special characters like \" ' \ `")
-  else:
-    Logger.info("password validated")
-
-def copy_jdbc_connector(stack_version=None):
-  import params
-
-  if params.jdbc_jar_name is None and params.driver_curl_source.endswith("/None"):
-    error_message = format("{db_flavor} jdbc driver cannot be downloaded from {jdk_location}\nPlease run 'ambari-server setup --jdbc-db={db_flavor} --jdbc-driver={{path_to_jdbc}}' on ambari-server host.")
-    raise Fail(error_message)
-
-  if params.driver_curl_source and not params.driver_curl_source.endswith("/None"):
-    if params.previous_jdbc_jar and os.path.isfile(params.previous_jdbc_jar):
-      File(params.previous_jdbc_jar, action='delete')
-
-  File(params.downloaded_custom_connector,
-    content = DownloadSource(params.driver_curl_source),
-    mode = 0644
-  )
-
-  ranger_home = params.ranger_home
-  if stack_version is not None:
-    ranger_home = format("{stack_root}/{stack_version}/ranger-admin")
-
-  driver_curl_target = format("{ranger_home}/ews/lib/{jdbc_jar_name}")
-
-  if params.db_flavor.lower() == 'sqla':
-    Execute(('tar', '-xvf', params.downloaded_custom_connector, '-C', params.tmp_dir), sudo = True)
-
-    Execute(('cp', '--remove-destination', params.jar_path_in_archive, os.path.join(ranger_home, 'ews', 'lib')),
-      path=["/bin", "/usr/bin/"],
-      sudo=True)
-
-    File(os.path.join(ranger_home, 'ews', 'lib', 'sajdbc4.jar'), mode=0644)
-
-    Directory(params.jdbc_libs_dir,
-      cd_access="a",
-      create_parents=True)
-
-    Execute(as_sudo(['yes', '|', 'cp', params.libs_path_in_archive, params.jdbc_libs_dir], auto_escape=False),
-            path=["/bin", "/usr/bin/"])
-  else:
-    Execute(('cp', '--remove-destination', params.downloaded_custom_connector, os.path.join(ranger_home, 'ews', 'lib')),
-      path=["/bin", "/usr/bin/"],
-      sudo=True)
-
-    File(os.path.join(ranger_home, 'ews', 'lib',params.jdbc_jar_name), mode=0644)
-
-  ModifyPropertiesFile(format("{ranger_home}/install.properties"),
-    properties = params.config['configurations']['admin-properties'],
-    owner = params.unix_user,
-  )
-
-  if params.db_flavor.lower() == 'sqla':
-    ModifyPropertiesFile(format("{ranger_home}/install.properties"),
-      properties = {'SQL_CONNECTOR_JAR': format('{ranger_home}/ews/lib/sajdbc4.jar')},
-      owner = params.unix_user,
-    )
-  else:
-    ModifyPropertiesFile(format("{ranger_home}/install.properties"),
-      properties = {'SQL_CONNECTOR_JAR': format('{driver_curl_target}')},
-       owner = params.unix_user,
-    )
- 
-def setup_usersync(upgrade_type=None):
-  import params
-
-  usersync_home = params.usersync_home
-  ranger_home = params.ranger_home
-  ranger_ugsync_conf = params.ranger_ugsync_conf
-
-  if not is_empty(params.ranger_usersync_ldap_ldapbindpassword) and params.ug_sync_source == 'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder':
-    password_validation(params.ranger_usersync_ldap_ldapbindpassword)
-
-  Directory(params.ranger_pid_dir,
-    mode=0755,
-    owner = params.unix_user,
-    group = params.user_group,
-    cd_access = "a",
-    create_parents=True
-  )
-
-  if params.stack_supports_pid:
-    File(format('{ranger_ugsync_conf}/ranger-usersync-env-piddir.sh'),
-      content = format("export USERSYNC_PID_DIR_PATH={ranger_pid_dir}\nexport UNIX_USERSYNC_USER={unix_user}"),
-      owner = params.unix_user,
-      group = params.unix_group,
-      mode=0755
-    )
-
-  Directory(params.usersync_log_dir,
-    owner = params.unix_user,
-    group = params.unix_group,
-    cd_access = 'a',
-    create_parents=True,
-    mode=0755,
-    recursive_ownership = True
-  )
-
-  File(format('{ranger_ugsync_conf}/ranger-usersync-env-logdir.sh'),
-    content = format("export logdir={usersync_log_dir}"),
-    owner = params.unix_user,
-    group = params.unix_group,
-    mode=0755
-  )
-  
-  Directory(format("{ranger_ugsync_conf}/"),
-    owner = params.unix_user
-  )
-
-  if upgrade_type is not None:
-    src_file = format('{usersync_home}/conf.dist/ranger-ugsync-default.xml')
-    dst_file = format('{usersync_home}/conf/ranger-ugsync-default.xml')
-    Execute(('cp', '-f', src_file, dst_file), sudo=True)
-
-  if params.stack_supports_ranger_log4j:
-    File(format('{usersync_home}/conf/log4j.properties'),
-      owner=params.unix_user,
-      group=params.unix_group,
-      content=InlineTemplate(params.usersync_log4j),
-      mode=0644
-    )
-  elif upgrade_type is not None and not params.stack_supports_ranger_log4j:
-    src_file = format('{usersync_home}/conf.dist/log4j.xml')
-    dst_file = format('{usersync_home}/conf/log4j.xml')
-    Execute(('cp', '-f', src_file, dst_file), sudo=True)
-
-  # remove plain-text password from xml configs
-  ranger_ugsync_site_copy = {}
-  ranger_ugsync_site_copy.update(params.config['configurations']['ranger-ugsync-site'])
-  for prop in params.ranger_usersync_password_properties:
-    if prop in ranger_ugsync_site_copy:
-      ranger_ugsync_site_copy[prop] = "_"
-
-  XmlConfig("ranger-ugsync-site.xml",
-    conf_dir=ranger_ugsync_conf,
-    configurations=ranger_ugsync_site_copy,
-    configuration_attributes=params.config['configuration_attributes']['ranger-ugsync-site'],
-    owner=params.unix_user,
-    group=params.unix_group,
-    mode=0644)
-
-  if os.path.isfile(params.ranger_ugsync_default_file):
-    File(params.ranger_ugsync_default_file, owner=params.unix_user, group=params.unix_group)
-
-  if os.path.isfile(params.usgsync_log4j_file):
-    File(params.usgsync_log4j_file, owner=params.unix_user, group=params.unix_group)
-
-  if os.path.isfile(params.cred_validator_file):
-    File(params.cred_validator_file, group=params.unix_group, mode=04555)
-
-  ranger_credential_helper(params.ugsync_cred_lib, 'usersync.ssl.key.password', params.ranger_usersync_keystore_password, params.ugsync_jceks_path)
-
-  if not is_empty(params.ranger_usersync_ldap_ldapbindpassword) and params.ug_sync_source == 'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder':
-    ranger_credential_helper(params.ugsync_cred_lib, 'ranger.usersync.ldap.bindalias', params.ranger_usersync_ldap_ldapbindpassword, params.ugsync_jceks_path)
-
-  ranger_credential_helper(params.ugsync_cred_lib, 'usersync.ssl.truststore.password', params.ranger_usersync_truststore_password, params.ugsync_jceks_path)
-
-  File(params.ugsync_jceks_path,
-       owner = params.unix_user,
-       group = params.unix_group,
-       mode = 0640
-  )
-  
-  File([params.usersync_start, params.usersync_stop],
-       owner = params.unix_user,
-       group = params.unix_group
-  )
-
-  File(params.usersync_services_file,
-    mode = 0755,
-  )
-
-  Execute(('ln','-sf', format('{usersync_services_file}'),'/usr/bin/ranger-usersync'),
-    not_if=format("ls /usr/bin/ranger-usersync"),
-    only_if=format("ls {usersync_services_file}"),
-    sudo=True)
-
-  if not os.path.isfile(params.ranger_usersync_keystore_file):
-    cmd = format("{java_home}/bin/keytool -genkeypair -keyalg RSA -alias selfsigned -keystore '{ranger_usersync_keystore_file}' -keypass {ranger_usersync_keystore_password!p} -storepass {ranger_usersync_keystore_password!p} -validity 3600 -keysize 2048 -dname '{default_dn_name}'")
-
-    Execute(cmd, logoutput=True, user = params.unix_user)
-
-    File(params.ranger_usersync_keystore_file,
-        owner = params.unix_user,
-        group = params.unix_group,
-        mode = 0640
-    )
-
-  create_core_site_xml(ranger_ugsync_conf)
-
-def setup_tagsync(upgrade_type=None):
-  import params
-
-  ranger_tagsync_home = params.ranger_tagsync_home
-  ranger_home = params.ranger_home
-  ranger_tagsync_conf = params.ranger_tagsync_conf
-
-  Directory(format("{ranger_tagsync_conf}"),
-    owner = params.unix_user,
-    group = params.unix_group,
-    create_parents = True
-  )
-
-  Directory(params.ranger_pid_dir,
-    mode=0755,
-    create_parents=True,
-    owner = params.unix_user,
-    group = params.user_group,
-    cd_access = "a",
-  )
-
-  if params.stack_supports_pid:
-    File(format('{ranger_tagsync_conf}/ranger-tagsync-env-piddir.sh'),
-      content = format("export TAGSYNC_PID_DIR_PATH={ranger_pid_dir}\nexport UNIX_TAGSYNC_USER={unix_user}"),
-      owner = params.unix_user,
-      group = params.unix_group,
-      mode=0755
-    )
-
-  Directory(params.tagsync_log_dir,
-    create_parents = True,
-    owner = params.unix_user,
-    group = params.unix_group,
-    cd_access = "a",
-    mode=0755
-  )
-
-  File(format('{ranger_tagsync_conf}/ranger-tagsync-env-logdir.sh'),
-    content = format("export RANGER_TAGSYNC_LOG_DIR={tagsync_log_dir}"),
-    owner = params.unix_user,
-    group = params.unix_group,
-    mode=0755
-  )
-
-  XmlConfig("ranger-tagsync-site.xml",
-    conf_dir=ranger_tagsync_conf,
-    configurations=params.config['configurations']['ranger-tagsync-site'],
-    configuration_attributes=params.config['configuration_attributes']['ranger-tagsync-site'],
-    owner=params.unix_user,
-    group=params.unix_group,
-    mode=0644)
-  if params.stack_supports_ranger_tagsync_ssl_xml_support:
-    Logger.info("Stack supports tagsync-ssl configurations, performing the same.")
-    setup_tagsync_ssl_configs()
-  else:
-    Logger.info("Stack doesnt support tagsync-ssl configurations, skipping the same.")
-
-  PropertiesFile(format('{ranger_tagsync_conf}/atlas-application.properties'),
-    properties = params.tagsync_application_properties,
-    mode=0755,
-    owner=params.unix_user,
-    group=params.unix_group
-  )
-
-  File(format('{ranger_tagsync_conf}/log4j.properties'),
-    owner=params.unix_user,
-    group=params.unix_group,
-    content=InlineTemplate(params.tagsync_log4j),
-    mode=0644
-  )
-
-  File(params.tagsync_services_file,
-    mode = 0755,
-  )
-
-  Execute(('ln','-sf', format('{tagsync_services_file}'),'/usr/bin/ranger-tagsync'),
-    not_if=format("ls /usr/bin/ranger-tagsync"),
-    only_if=format("ls {tagsync_services_file}"),
-    sudo=True)
-
-  create_core_site_xml(ranger_tagsync_conf)
-
-def ranger_credential_helper(lib_path, alias_key, alias_value, file_path):
-  import params
-
-  java_bin = format('{java_home}/bin/java')
-  file_path = format('jceks://file{file_path}')
-  cmd = (java_bin, '-cp', lib_path, 'org.apache.ranger.credentialapi.buildks', 'create', alias_key, '-value', PasswordString(alias_value), '-provider', file_path)
-  Execute(cmd, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
-
-def create_core_site_xml(conf_dir):
-  import params
-
-  if params.stack_supports_ranger_kerberos:
-    if params.has_namenode:
-      XmlConfig("core-site.xml",
-                conf_dir=conf_dir,
-                configurations=params.config['configurations']['core-site'],
-                configuration_attributes=params.config['configuration_attributes']['core-site'],
-                owner=params.unix_user,
-                group=params.unix_group,
-                mode=0644
-      )
-    else:
-      Logger.warning('HDFS service not installed. Creating core-site.xml file.')
-      XmlConfig("core-site.xml",
-        conf_dir=conf_dir,
-        configurations=params.core_site_property,
-        configuration_attributes={},
-        owner=params.unix_user,
-        group=params.unix_group,
-        mode=0644
-      )
-
-def setup_ranger_audit_solr():
-  import params
-
-  if params.security_enabled and params.stack_supports_ranger_kerberos:
-
-    if params.solr_jaas_file is not None:
-      File(format("{solr_jaas_file}"),
-        content=Template("ranger_solr_jaas_conf.j2"),
-        owner=params.unix_user
-      )
-  try:
-    check_znode()
-
-    if params.stack_supports_ranger_solr_configs:
-      Logger.info('Solr configrations supported,creating solr-configurations.')
-      File(format("{ranger_solr_conf}/solrconfig.xml"),
-           content=InlineTemplate(params.ranger_solr_config_content),
-           owner=params.unix_user,
-           group=params.unix_group,
-           mode=0644
-      )
-
-      solr_cloud_util.upload_configuration_to_zk(
-        zookeeper_quorum = params.zookeeper_quorum,
-        solr_znode = params.solr_znode,
-        config_set = params.ranger_solr_config_set,
-        config_set_dir = params.ranger_solr_conf,
-        tmp_dir = params.tmp_dir,
-        java64_home = params.java_home,
-        solrconfig_content = InlineTemplate(params.ranger_solr_config_content),
-        jaas_file=params.solr_jaas_file,
-        retry=30, interval=5
-      )
-
-    else:
-      Logger.info('Solr configrations not supported, skipping solr-configurations.')
-      solr_cloud_util.upload_configuration_to_zk(
-        zookeeper_quorum = params.zookeeper_quorum,
-        solr_znode = params.solr_znode,
-        config_set = params.ranger_solr_config_set,
-        config_set_dir = params.ranger_solr_conf,
-        tmp_dir = params.tmp_dir,
-        java64_home = params.java_home,
-        jaas_file=params.solr_jaas_file,
-        retry=30, interval=5)
-
-    if params.security_enabled and params.has_infra_solr \
-      and not params.is_external_solrCloud_enabled and params.stack_supports_ranger_kerberos:
-
-      solr_cloud_util.add_solr_roles(params.config,
-                                     roles = [params.infra_solr_role_ranger_admin, params.infra_solr_role_ranger_audit, params.infra_solr_role_dev],
-                                     new_service_principals = [params.ranger_admin_jaas_principal])
-      service_default_principals_map = [('hdfs', 'nn'), ('hbase', 'hbase'), ('hive', 'hive'), ('kafka', 'kafka'), ('kms', 'rangerkms'),
-                                                    ('knox', 'knox'), ('nifi', 'nifi'), ('storm', 'storm'), ('yanr', 'yarn')]
-      service_principals = get_ranger_plugin_principals(service_default_principals_map)
-      solr_cloud_util.add_solr_roles(params.config,
-                                     roles = [params.infra_solr_role_ranger_audit, params.infra_solr_role_dev],
-                                     new_service_principals = service_principals)
-
-
-    solr_cloud_util.create_collection(
-      zookeeper_quorum = params.zookeeper_quorum,
-      solr_znode = params.solr_znode,
-      collection = params.ranger_solr_collection_name,
-      config_set = params.ranger_solr_config_set,
-      java64_home = params.java_home,
-      shards = params.ranger_solr_shards,
-      replication_factor = int(params.replication_factor),
-      jaas_file = params.solr_jaas_file)
-
-    if params.security_enabled and params.has_infra_solr \
-      and not params.is_external_solrCloud_enabled and params.stack_supports_ranger_kerberos:
-      secure_znode(format('{solr_znode}/configs/{ranger_solr_config_set}'), params.solr_jaas_file)
-      secure_znode(format('{solr_znode}/collections/{ranger_solr_collection_name}'), params.solr_jaas_file)
-  except ExecutionFailed as execution_exception:
-    Logger.error('Error when configuring Solr for Ranger, Kindly check Solr/Zookeeper services to be up and running:\n {0}'.format(execution_exception))
-
-def setup_ranger_admin_passwd_change():
-  import params
-
-  if params.admin_password != params.default_admin_password:
-    cmd = format('ambari-python-wrap {ranger_home}/db_setup.py -changepassword {admin_username} {default_admin_password!p} {admin_password!p}')
-    Logger.info('Updating admin password')
-    Execute(cmd, environment={'JAVA_HOME': params.java_home, 'RANGER_ADMIN_HOME': params.ranger_home}, user=params.unix_user)
-
-@retry(times=10, sleep_time=5, err_class=Fail)
-def check_znode():
-  import params
-  solr_cloud_util.check_znode(
-    zookeeper_quorum=params.zookeeper_quorum,
-    solr_znode=params.solr_znode,
-    java64_home=params.java_home)
-
-def secure_znode(znode, jaasFile):
-  import params
-  solr_cloud_util.secure_znode(config=params.config, zookeeper_quorum=params.zookeeper_quorum,
-                               solr_znode=znode,
-                               jaas_file=jaasFile,
-                               java64_home=params.java_home, sasl_users=[params.ranger_admin_jaas_principal])
-
-def get_ranger_plugin_principals(services_defaults_tuple_list):
-  """
-  Get ranger plugin user principals from service-default value maps using ranger-*-audit configurations
-  """
-  import params
-  user_principals = []
-  if len(services_defaults_tuple_list) < 1:
-    raise Exception("Services - defaults map parameter is missing.")
-
-  for (service, default_value) in services_defaults_tuple_list:
-    user_principal = default(format("configurations/ranger-{service}-audit/xasecure.audit.jaas.Client.option.principal"), default_value)
-    user_principals.append(user_principal)
-  return user_principals
-
-
-def setup_tagsync_ssl_configs():
-  import params
-  Directory(params.security_store_path,
-            cd_access="a",
-            create_parents=True)
-
-  Directory(params.tagsync_etc_path,
-            cd_access="a",
-            owner=params.unix_user,
-            group=params.unix_group,
-            mode=0775,
-            create_parents=True)
-
-  # remove plain-text password from xml configs
-  ranger_tagsync_policymgr_ssl_copy = {}
-  ranger_tagsync_policymgr_ssl_copy.update(params.config['configurations']['ranger-tagsync-policymgr-ssl'])
-  for prop in params.ranger_tagsync_password_properties:
-    if prop in ranger_tagsync_policymgr_ssl_copy:
-      ranger_tagsync_policymgr_ssl_copy[prop] = "_"
-
-  XmlConfig("ranger-policymgr-ssl.xml",
-            conf_dir=params.ranger_tagsync_conf,
-            configurations=ranger_tagsync_policymgr_ssl_copy,
-            configuration_attributes=params.config['configuration_attributes']['ranger-tagsync-policymgr-ssl'],
-            owner=params.unix_user,
-            group=params.unix_group,
-            mode=0644)
-
-  ranger_credential_helper(params.tagsync_cred_lib, 'sslKeyStore', params.ranger_tagsync_keystore_password, params.ranger_tagsync_credential_file)
-  ranger_credential_helper(params.tagsync_cred_lib, 'sslTrustStore', params.ranger_tagsync_truststore_password, params.ranger_tagsync_credential_file)
-
-  File(params.ranger_tagsync_credential_file,
-       owner = params.unix_user,
-       group = params.unix_group,
-       mode = 0640
-       )
-
-  # remove plain-text password from xml configs
-  atlas_tagsync_ssl_copy = {}
-  atlas_tagsync_ssl_copy.update(params.config['configurations']['atlas-tagsync-ssl'])
-  for prop in params.ranger_tagsync_password_properties:
-    if prop in atlas_tagsync_ssl_copy:
-      atlas_tagsync_ssl_copy[prop] = "_"
-
-  XmlConfig("atlas-tagsync-ssl.xml",
-            conf_dir=params.ranger_tagsync_conf,
-            configurations=atlas_tagsync_ssl_copy,
-            configuration_attributes=params.config['configuration_attributes']['atlas-tagsync-ssl'],
-            owner=params.unix_user,
-            group=params.unix_group,
-            mode=0644)
-
-  ranger_credential_helper(params.tagsync_cred_lib, 'sslKeyStore', params.atlas_tagsync_keystore_password, params.atlas_tagsync_credential_file)
-  ranger_credential_helper(params.tagsync_cred_lib, 'sslTrustStore', params.atlas_tagsync_truststore_password, params.atlas_tagsync_credential_file)
-
-  File(params.atlas_tagsync_credential_file,
-       owner = params.unix_user,
-       group = params.unix_group,
-       mode = 0640
-       )
-  Logger.info("Configuring tagsync-ssl configurations done successfully.")

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/status_params.py
deleted file mode 100644
index 842430b..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/status_params.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.default import default
-from resource_management.libraries.functions.version import format_stack_version
-from resource_management.libraries.functions.stack_features import check_stack_feature
-from resource_management.libraries.functions import StackFeature
-
-config  = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-
-upgrade_marker_file = format("{tmp_dir}/rangeradmin_ru.inprogress")
-ranger_pid_dir = config['configurations']['ranger-env']['ranger_pid_dir']
-tagsync_pid_file = format('{ranger_pid_dir}/tagsync.pid')
-stack_name = default("/hostLevelParams/stack_name", None)
-stack_version_unformatted = config['hostLevelParams']['stack_version']
-stack_version_formatted = format_stack_version(stack_version_unformatted)
-ranger_admin_pid_file = format('{ranger_pid_dir}/rangeradmin.pid')
-ranger_usersync_pid_file = format('{ranger_pid_dir}/usersync.pid')
-stack_supports_pid = stack_version_formatted and check_stack_feature(StackFeature.RANGER_PID_SUPPORT, stack_version_formatted)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/upgrade.py
deleted file mode 100644
index a07a1fd..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/upgrade.py
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#!/usr/bin/env python
-"""
-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.
-
-"""
-from resource_management.core.resources.system import Execute
-from resource_management.libraries.functions import conf_select
-from resource_management.libraries.functions import stack_select
-from resource_management.libraries.functions.format import format
-
-def prestart(env, stack_component):
-  import params
-
-  if params.version and params.stack_supports_rolling_upgrade:
-    conf_select.select(params.stack_name, stack_component, params.version)
-    stack_select.select(stack_component, params.version)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/input.config-ranger.json.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/input.config-ranger.json.j2 b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/input.config-ranger.json.j2
deleted file mode 100644
index 6c5bb1f..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/input.config-ranger.json.j2
+++ /dev/null
@@ -1,79 +0,0 @@
-{#
- # 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.
- #}
-{
-  "input":[
-    {
-      "type":"ranger_admin",
-      "rowtype":"service",
-      "path":"{{default('/configurations/ranger-env/ranger_admin_log_dir', '/var/log/ranger/admin')}}/xa_portal.log"
-    },
-    {
-      "type":"ranger_dbpatch",
-      "is_enabled":"true",
-      "path":"{{default('/configurations/ranger-env/ranger_admin_log_dir', '/var/log/ranger/admin')}}/ranger_db_patch.log"
-    },
-    {
-      "type":"ranger_usersync",
-      "rowtype":"service",
-      "path":"{{default('/configurations/ranger-env/ranger_usersync_log_dir', '/var/log/ranger/usersync')}}/usersync.log"
-    }
-  ],
-  "filter":[
-    {
-      "filter":"grok",
-      "conditions":{
-        "fields":{
-          "type":[
-            "ranger_admin",
-            "ranger_dbpatch"
-          ]
-        }
-      },
-      "log4j_format":"%d [%t] %-5p %C{6} (%F:%L) - %m%n",
-      "multiline_pattern":"^(%{TIMESTAMP_ISO8601:logtime})",
-      "message_pattern":"(?m)^%{TIMESTAMP_ISO8601:logtime}%{SPACE}\\[%{DATA:thread_name}\\]%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVACLASS:logger_name}%{SPACE}\\(%{JAVAFILE:file}:%{INT:line_number}\\)%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}",
-      "post_map_values":{
-        "logtime":{
-          "map_date":{
-            "target_date_pattern":"yyyy-MM-dd HH:mm:ss,SSS"
-          }
-        }
-      }
-    },
-    {
-      "filter":"grok",
-      "conditions":{
-        "fields":{
-          "type":[
-            "ranger_usersync"
-          ]
-        }
-      },
-      "log4j_format":"%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n",
-      "multiline_pattern":"^(%{USER_SYNC_DATE:logtime})",
-      "message_pattern":"(?m)^%{USER_SYNC_DATE:logtime}%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVACLASS:logger_name}%{SPACE}\\[%{DATA:thread_name}\\]%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}",
-      "post_map_values":{
-        "logtime":{
-          "map_date":{
-            "target_date_pattern":"dd MMM yyyy HH:mm:ss"
-          }
-        }
-      }
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_admin_pam.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_admin_pam.j2 b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_admin_pam.j2
deleted file mode 100644
index d69ad6c..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_admin_pam.j2
+++ /dev/null
@@ -1,22 +0,0 @@
-{#
- # 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.
- #}
-#%PAM-1.0
-auth    sufficient        pam_unix.so
-auth    sufficient        pam_sss.so
-account sufficient        pam_unix.so
-account sufficient        pam_sss.so

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_remote_pam.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_remote_pam.j2 b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_remote_pam.j2
deleted file mode 100644
index d69ad6c..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_remote_pam.j2
+++ /dev/null
@@ -1,22 +0,0 @@
-{#
- # 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.
- #}
-#%PAM-1.0
-auth    sufficient        pam_unix.so
-auth    sufficient        pam_sss.so
-account sufficient        pam_unix.so
-account sufficient        pam_sss.so

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_solr_jaas_conf.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_solr_jaas_conf.j2 b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_solr_jaas_conf.j2
deleted file mode 100644
index a456688..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/templates/ranger_solr_jaas_conf.j2
+++ /dev/null
@@ -1,26 +0,0 @@
-{#
-# 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.
-#}
-
-Client {
-  com.sun.security.auth.module.Krb5LoginModule required
-  useKeyTab=true
-  storeKey=true
-  useTicketCache=false
-  keyTab="{{solr_kerberos_keytab}}"
-  principal="{{solr_kerberos_principal}}";
-};
\ No newline at end of file


[04/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-site.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-site.xml
deleted file mode 100644
index 1e6f7b5..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-site.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>hadoop.kms.key.provider.uri</name>
-    <value>dbks://http@localhost:9292/kms</value>
-    <description>URI of the backing KeyProvider for the KMS.</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.security.keystore.JavaKeyStoreProvider.password</name>
-    <value>none</value>
-    <description>If using the JavaKeyStoreProvider, the password for the keystore file.</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.cache.enable</name>
-    <value>true</value>
-    <description>Whether the KMS will act as a cache for the backing KeyProvider. When the cache is enabled, operations like getKeyVersion, getMetadata, and getCurrentKey will sometimes return cached data without consulting the backing KeyProvider. Cached values are flushed when keys are deleted or modified.
-    </description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.cache.timeout.ms</name>
-    <value>600000</value>
-    <description>Expiry time for the KMS key version and key metadata cache, in milliseconds. This affects getKeyVersion and getMetadata.
-    </description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.current.key.cache.timeout.ms</name>
-    <value>30000</value>
-    <description>Expiry time for the KMS current key cache, in milliseconds. This affects getCurrentKey operations.</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.audit.aggregation.window.ms</name>
-    <value>10000</value>
-    <description>Duplicate audit log events within the aggregation window (specified in ms) are quashed to reduce log traffic. A single message for aggregated events is printed at the end of the window, along with a count of the number of aggregated events.</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.type</name>
-    <value>simple</value>
-    <description>Authentication type for the KMS. Can be either "simple" or "kerberos".
-    </description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.kerberos.keytab</name>
-    <value>${user.home}/kms.keytab</value>
-    <description>Path to the keytab with credentials for the configured Kerberos principal.</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.kerberos.principal</name>
-    <value>HTTP/localhost</value>
-    <description>The Kerberos principal to use for the HTTP endpoint. The principal must start with 'HTTP/' as per the Kerberos HTTP SPNEGO specification.</description>
-    <property-type>KERBEROS_PRINCIPAL</property-type>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.kerberos.name.rules</name>
-    <value>DEFAULT</value>
-    <description>Rules used to resolve Kerberos principal names.</description>
-    <value-attributes>
-      <type>multiLine</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.signer.secret.provider</name>
-    <value>random</value>
-    <description>Indicates how the secret to sign the authentication cookies will be stored. Options are 'random' (default), 'string' and 'zookeeper'. If using a setup with multiple KMS instances, 'zookeeper' should be used.
-    </description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.path</name>
-    <value>/hadoop-kms/hadoop-auth-signature-secret</value>
-    <description>The Zookeeper ZNode path where the KMS instances will store and retrieve the secret from.</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.connection.string</name>
-    <value>#HOSTNAME#:#PORT#,...</value>
-    <description>The Zookeeper connection string, a list of hostnames and port comma separated.</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.auth.type</name>
-    <value>kerberos</value>
-    <description>The Zookeeper authentication type, 'none' or 'sasl' (Kerberos).</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab</name>
-    <value>/etc/hadoop/conf/kms.keytab</value>
-    <description>The absolute path for the Kerberos keytab with the credentials to connect to Zookeeper.</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal</name>
-    <value>kms/#HOSTNAME#</value>
-    <description>The Kerberos service principal used to connect to Zookeeper.</description>
-    <property-type>KERBEROS_PRINCIPAL</property-type>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hadoop.kms.security.authorization.manager</name>
-    <value>org.apache.ranger.authorization.kms.authorizer.RangerKmsAuthorizer</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-audit.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-audit.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-audit.xml
deleted file mode 100644
index 526794e..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-audit.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>xasecure.audit.is.enabled</name>
-    <value>true</value>
-    <description>Is Audit enabled?</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.hdfs</name>
-    <value>true</value>
-    <display-name>Audit to HDFS</display-name>
-    <description>Is Audit to HDFS enabled?</description>
-    <value-attributes>
-      <type>boolean</type>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>core-site</type>
-        <name>fs.defaultFS</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.hdfs.dir</name>
-    <value>hdfs://NAMENODE_HOSTNAME:8020/ranger/audit</value>
-    <description>HDFS folder to write audit to, make sure the service user has requried permissions</description>
-    <depends-on>
-      <property>
-        <type>core-site</type>
-        <name>fs.defaultFS</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.hdfs.batch.filespool.dir</name>
-    <value>/var/log/ranger/kms/audit/hdfs/spool</value>
-    <description>/var/log/ranger/kms/audit/hdfs/spool</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.solr</name>
-    <value>true</value>
-    <display-name>Audit to SOLR</display-name>
-    <description>Is Solr audit enabled?</description>
-    <value-attributes>
-      <type>boolean</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.solr.batch.filespool.dir</name>
-    <value>/var/log/ranger/kms/audit/solr/spool</value>
-    <description>/var/log/ranger/kms/audit/solr/spool</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.provider.summary.enabled</name>
-    <value>false</value>
-    <display-name>Audit provider summary enabled</display-name>
-    <description>Enable Summary audit?</description>
-    <value-attributes>
-      <type>boolean</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.solr.urls</name>
-    <value>{{ranger_audit_solr_urls}}</value>
-    <description>Solr URL</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>ranger-admin-site</type>
-        <name>ranger.audit.solr.urls</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.audit.destination.solr.zookeepers</name>
-    <value>none</value>
-    <description>Solr Zookeeper string</description>
-    <depends-on>
-      <property>
-        <type>ranger-admin-site</type>
-        <name>ranger.audit.solr.zookeepers</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.plugin.kms.ambari.cluster.name</name>
-    <value>{{cluster_name}}</value>
-    <description>Capture cluster name from where Ranger kms plugin is enabled.</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-policymgr-ssl.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-policymgr-ssl.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-policymgr-ssl.xml
deleted file mode 100644
index 9eedc73..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-policymgr-ssl.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.keystore.password</name>
-    <value>myKeyFilePassword</value>
-    <property-type>PASSWORD</property-type>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <description>password for keystore</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>xasecure.policymgr.clientssl.truststore.password</name>
-    <value>changeit</value>
-    <property-type>PASSWORD</property-type>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <description>java truststore password</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.policymgr.clientssl.keystore.credential.file</name>
-    <value>jceks://file{{credential_file}}</value>
-    <description>java keystore credential file</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.policymgr.clientssl.truststore.credential.file</name>
-    <value>jceks://file{{credential_file}}</value>
-    <description>java truststore credential file</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.policymgr.clientssl.keystore</name>
-    <value>/usr/hdp/current/ranger-kms/conf/ranger-plugin-keystore.jks</value>
-    <description>Java Keystore files</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xasecure.policymgr.clientssl.truststore</name>
-    <value>/usr/hdp/current/ranger-kms/conf/ranger-plugin-truststore.jks</value>
-    <description>java truststore file</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-security.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-security.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-security.xml
deleted file mode 100644
index 13adcb4..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-security.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>ranger.plugin.kms.service.name</name>
-    <value>{{repo_name}}</value>
-    <description>Name of the Ranger service containing policies for this kms instance</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.plugin.kms.policy.source.impl</name>
-    <value>org.apache.ranger.admin.client.RangerAdminRESTClient</value>
-    <description>Class to retrieve policies from the source</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.plugin.kms.policy.rest.url</name>
-    <value>{{policymgr_mgr_url}}</value>
-    <description>URL to Ranger Admin</description>
-    <on-ambari-upgrade add="false"/>
-    <depends-on>
-      <property>
-        <type>admin-properties</type>
-        <name>policymgr_external_url</name>
-      </property>
-    </depends-on>
-  </property>
-  <property>
-    <name>ranger.plugin.kms.policy.rest.ssl.config.file</name>
-    <value>/etc/ranger/kms/conf/ranger-policymgr-ssl.xml</value>
-    <description>Path to the file containing SSL details to contact Ranger Admin</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.plugin.kms.policy.pollIntervalMs</name>
-    <value>30000</value>
-    <description>How often to poll for changes in policies?</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.plugin.kms.policy.cache.dir</name>
-    <value>/etc/ranger/{{repo_name}}/policycache</value>
-    <description>Directory where Ranger policies are cached after successful retrieval from the source</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-site.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-site.xml
deleted file mode 100644
index 1d32f72..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-site.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>ranger.service.host</name>
-    <value>{{kms_host}}</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.http.port</name>
-    <value>{{kms_port}}</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.https.port</name>
-    <value>9393</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.shutdown.port</name>
-    <value>7085</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.contextName</name>
-    <value>/kms</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>xa.webapp.dir</name>
-    <value>./webapp</value>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.ssl.enabled</name>
-    <value>false</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.keystore.file</name>
-    <value>/etc/security/serverKeys/ranger-kms-keystore.jks</value>
-    <on-ambari-upgrade add="false"/>
-    <description/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.client.auth</name>
-    <value>want</value>
-    <on-ambari-upgrade add="false"/>
-    <description/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.keystore.keyalias</name>
-    <value>rangerkms</value>
-    <on-ambari-upgrade add="false"/>
-    <description/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.keystore.pass</name>
-    <value>rangerkms</value>
-    <property-type>PASSWORD</property-type>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-    <description/>
-  </property>
-  <property>
-    <name>ranger.credential.provider.path</name>
-    <value>/etc/ranger/kms/rangerkms.jceks</value>
-    <on-ambari-upgrade add="false"/>
-    <description/>
-  </property>
-  <property>
-    <name>ranger.service.https.attrib.keystore.credential.alias</name>
-    <value>keyStoreCredentialAlias</value>
-    <on-ambari-upgrade add="false"/>
-    <description/>
-  </property>
-  <property>
-    <name>ajp.enabled</name>
-    <value>false</value>
-    <on-ambari-upgrade add="false"/>
-    <description/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/kerberos.json b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/kerberos.json
deleted file mode 100644
index a54783e..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/kerberos.json
+++ /dev/null
@@ -1,84 +0,0 @@
-{
-  "services": [
-    {
-      "name": "RANGER_KMS",
-      "identities": [
-        {
-          "name": "/spnego",
-          "keytab": {
-            "configuration": "kms-site/hadoop.kms.authentication.kerberos.keytab"
-          }
-        },
-        {
-          "name": "/smokeuser"
-        }
-      ],
-      "auth_to_local_properties" : [
-        "kms-site/hadoop.kms.authentication.kerberos.name.rules"
-      ],
-      "configurations": [
-        {
-          "kms-site": {
-            "hadoop.kms.authentication.type": "kerberos",
-            "hadoop.kms.authentication.kerberos.principal": "*"
-          }
-        },
-        {
-          "ranger-kms-audit": {
-            "xasecure.audit.jaas.Client.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
-            "xasecure.audit.jaas.Client.loginModuleControlFlag": "required",
-            "xasecure.audit.jaas.Client.option.useKeyTab": "true",
-            "xasecure.audit.jaas.Client.option.storeKey": "false",
-            "xasecure.audit.jaas.Client.option.serviceName": "solr",
-            "xasecure.audit.destination.solr.force.use.inmemory.jaas.config": "true"
-          }
-        }
-      ],
-      "components": [
-        {
-          "name": "RANGER_KMS_SERVER",
-          "identities": [
-            {
-              "name": "/spnego",
-              "principal": {
-                "configuration": "kms-site/hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal"
-              },
-              "keytab": {
-                "configuration": "kms-site/hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab"
-              }
-            },
-            {
-              "name": "/smokeuser"
-            },
-            {
-              "name": "rangerkms",
-              "principal": {
-                "value": "rangerkms/_HOST@${realm}",
-                "type" : "service",
-                "configuration": "dbks-site/ranger.ks.kerberos.principal",
-                "local_username" : "keyadmin"
-              },
-              "keytab": {
-                "file": "${keytab_dir}/rangerkms.service.keytab",
-                "owner": {
-                  "name": "${kms-env/kms_user}",
-                  "access": "r"
-                },
-                "configuration": "dbks-site/ranger.ks.kerberos.keytab"
-              }
-            },
-            {
-              "name": "/RANGER_KMS/RANGER_KMS_SERVER/rangerkms",
-              "principal": {
-                "configuration": "ranger-kms-audit/xasecure.audit.jaas.Client.option.principal"
-              },
-              "keytab": {
-                "configuration": "ranger-kms-audit/xasecure.audit.jaas.Client.option.keyTab"
-              }
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/metainfo.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/metainfo.xml
deleted file mode 100644
index 24ac51f..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/metainfo.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * 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.
- */
--->
-<metainfo>
-  <schemaVersion>2.0</schemaVersion>
-  <services>
-    <service>
-      <name>RANGER_KMS</name>
-      <displayName>Ranger KMS</displayName>
-      <comment>Key Management Server</comment>
-      <version>0.5.0.3.0</version>
-      <components>
-          
-        <component>
-          <name>RANGER_KMS_SERVER</name>
-          <displayName>Ranger KMS Server</displayName>
-          <category>MASTER</category>
-          <cardinality>1+</cardinality>
-          <versionAdvertised>true</versionAdvertised>
-          <commandScript>
-            <script>scripts/kms_server.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-          <logs>
-            <log>
-              <logId>ranger_kms</logId>
-              <primary>true</primary>
-            </log>
-          </logs>
-          <dependencies>
-            <dependency>
-              <name>HDFS/HDFS_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-          </dependencies>
-        </component>
-      </components>
-
-
-      <osSpecifics>
-        <osSpecific>
-          <osFamily>redhat7,amazon2015,redhat6,suse11,suse12</osFamily>
-          <packages>
-            <package>
-              <name>ranger_${stack_version}-kms</name>
-            </package>
-          </packages>
-        </osSpecific>
-        <osSpecific>
-          <osFamily>debian7,ubuntu12,ubuntu14,ubuntu16</osFamily>
-          <packages>
-            <package>
-              <name>ranger-${stack_version}-kms</name>
-            </package>
-          </packages>
-        </osSpecific>
-      </osSpecifics>
-
-      <configuration-dependencies>
-        <config-type>kms-properties</config-type>
-        <config-type>kms-site</config-type>
-        <config-type>kms-log4j</config-type>
-        <config-type>dbks-site</config-type>
-        <config-type>ranger-kms-site</config-type>
-        <config-type>ranger-kms-audit</config-type>
-        <config-type>ranger-kms-policymgr-ssl</config-type>
-        <config-type>ranger-kms-security</config-type>
-      </configuration-dependencies>
-
-      <commandScript>
-        <script>scripts/service_check.py</script>
-        <scriptType>PYTHON</scriptType>
-        <timeout>300</timeout>
-      </commandScript>
-
-      <requiredServices>
-        <service>RANGER</service>
-        <service>HDFS</service>
-      </requiredServices>
-
-      <themes>
-        <theme>
-          <fileName>theme_version_1.json</fileName>
-          <default>true</default>
-        </theme>
-        <theme>
-          <fileName>theme_version_2.json</fileName>
-          <default>true</default>
-        </theme>
-      </themes>
-      
-    </service>
-  </services>
-</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms.py
deleted file mode 100755
index 5a25b92..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms.py
+++ /dev/null
@@ -1,677 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-
-import sys
-import fileinput
-import os
-import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
-import urllib2, base64, httplib
-from StringIO import StringIO as BytesIO
-from datetime import datetime
-from resource_management.core.resources.system import File, Directory, Execute
-from resource_management.libraries.resources.xml_config import XmlConfig
-from resource_management.libraries.resources.modify_properties_file import ModifyPropertiesFile
-from resource_management.core.source import DownloadSource, InlineTemplate
-from resource_management.core.exceptions import Fail
-from resource_management.core.logger import Logger
-from resource_management.libraries.functions.is_empty import is_empty
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.ranger_functions import Rangeradmin
-from resource_management.libraries.functions.ranger_functions_v2 import RangeradminV2
-from resource_management.libraries.functions.decorator import safe_retry
-from resource_management.core.utils import PasswordString
-from resource_management.core.shell import as_sudo
-import re
-import time
-import socket
-
-def password_validation(password, key):
-  import params
-  if password.strip() == "":
-    raise Fail("Blank password is not allowed for {0} property. Please enter valid password.".format(key))
-  if re.search("[\\\`'\"]",password):
-    raise Fail("{0} password contains one of the unsupported special characters like \" ' \ `".format(key))
-  else:
-    Logger.info("Password validated")
-
-def setup_kms_db(stack_version=None):
-  import params
-
-  if params.has_ranger_admin:
-
-    kms_home = params.kms_home
-    version = params.version
-    if stack_version is not None:
-      kms_home = format("{stack_root}/{stack_version}/ranger-kms")
-      version = stack_version
-
-    password_validation(params.kms_master_key_password, 'KMS master key')
-
-    copy_jdbc_connector(stack_version=version)
-
-    env_dict = {'RANGER_KMS_HOME':kms_home, 'JAVA_HOME': params.java_home}
-    if params.db_flavor.lower() == 'sqla':
-      env_dict = {'RANGER_KMS_HOME':kms_home, 'JAVA_HOME': params.java_home, 'LD_LIBRARY_PATH':params.ld_library_path}
-
-    dba_setup = format('ambari-python-wrap {kms_home}/dba_script.py -q')
-    db_setup = format('ambari-python-wrap {kms_home}/db_setup.py')
-
-    if params.create_db_user:
-      Logger.info('Setting up Ranger KMS DB and DB User')
-      Execute(dba_setup, environment=env_dict, logoutput=True, user=params.kms_user, tries=5, try_sleep=10)
-    else:
-      Logger.info('Separate DBA property not set. Assuming Ranger KMS DB and DB User exists!')
-    Execute(db_setup, environment=env_dict, logoutput=True, user=params.kms_user, tries=5, try_sleep=10)
-
-def setup_java_patch():
-  import params
-
-  if params.has_ranger_admin:
-
-    kms_home = params.kms_home
-    setup_java_patch = format('ambari-python-wrap {kms_home}/db_setup.py -javapatch')
-
-    env_dict = {'RANGER_KMS_HOME':kms_home, 'JAVA_HOME': params.java_home}
-    if params.db_flavor.lower() == 'sqla':
-      env_dict = {'RANGER_KMS_HOME':kms_home, 'JAVA_HOME': params.java_home, 'LD_LIBRARY_PATH':params.ld_library_path}
-
-    Execute(setup_java_patch, environment=env_dict, logoutput=True, user=params.kms_user, tries=5, try_sleep=10)
-
-    kms_lib_path = format('{kms_home}/ews/webapp/lib/')
-    files = os.listdir(kms_lib_path)
-    hadoop_jar_files = []
-
-    for x in files:
-      if x.startswith('hadoop-common') and x.endswith('.jar'):
-        hadoop_jar_files.append(x)
-
-    if len(hadoop_jar_files) != 0:
-      for f in hadoop_jar_files:
-        Execute((format('{java_home}/bin/jar'),'-uf', format('{kms_home}/ews/webapp/lib/{f}'), format('{kms_home}/ews/webapp/META-INF/services/org.apache.hadoop.crypto.key.KeyProviderFactory')),
-          user=params.kms_user)
-
-        File(format('{kms_home}/ews/webapp/lib/{f}'), owner=params.kms_user, group=params.kms_group)
-
-
-def do_keystore_setup(cred_provider_path, credential_alias, credential_password): 
-  import params
-
-  if cred_provider_path is not None:
-    java_bin = format('{java_home}/bin/java')
-    file_path = format('jceks://file{cred_provider_path}')
-    cmd = (java_bin, '-cp', params.cred_lib_path, 'org.apache.ranger.credentialapi.buildks', 'create', credential_alias, '-value', PasswordString(credential_password), '-provider', file_path)
-    Execute(cmd,
-            environment={'JAVA_HOME': params.java_home}, 
-            logoutput=True, 
-            sudo=True,
-    )
-
-    File(cred_provider_path,
-      owner = params.kms_user,
-      group = params.kms_group,
-      mode = 0640
-    )
-
-def kms(upgrade_type=None):
-  import params
-
-  if params.has_ranger_admin:
-
-    Directory(params.kms_conf_dir,
-      owner = params.kms_user,
-      group = params.kms_group,
-      create_parents = True
-    )
-
-    Directory("/etc/security/serverKeys",
-      create_parents = True,
-      cd_access = "a"
-    )
-
-    Directory("/etc/ranger/kms",
-      create_parents = True,
-      cd_access = "a"
-    )
-
-    copy_jdbc_connector()
-
-    File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
-      content = DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),
-      mode = 0644,
-    )
-
-    cp = format("{check_db_connection_jar}")
-    if params.db_flavor.lower() == 'sqla':
-      cp = cp + os.pathsep + format("{kms_home}/ews/webapp/lib/sajdbc4.jar")
-    else:
-      path_to_jdbc = format("{kms_home}/ews/webapp/lib/{jdbc_jar_name}")
-      if not os.path.isfile(path_to_jdbc):
-        path_to_jdbc = format("{kms_home}/ews/webapp/lib/") + \
-                       params.default_connectors_map[params.db_flavor.lower()] if params.db_flavor.lower() in params.default_connectors_map else None
-        if not os.path.isfile(path_to_jdbc):
-          path_to_jdbc = format("{kms_home}/ews/webapp/lib/") + "*"
-          error_message = "Error! Sorry, but we can't find jdbc driver with default name " + params.default_connectors_map[params.db_flavor] + \
-                " in ranger kms lib dir. So, db connection check can fail. Please run 'ambari-server setup --jdbc-db={db_name} --jdbc-driver={path_to_jdbc} on server host.'"
-          Logger.error(error_message)
-
-      cp = cp + os.pathsep + path_to_jdbc
-
-    db_connection_check_command = format(
-      "{java_home}/bin/java -cp {cp} org.apache.ambari.server.DBConnectionVerification '{ranger_kms_jdbc_connection_url}' {db_user} {db_password!p} {ranger_kms_jdbc_driver}")
-    
-    env_dict = {}
-    if params.db_flavor.lower() == 'sqla':
-      env_dict = {'LD_LIBRARY_PATH':params.ld_library_path}
-
-    Execute(db_connection_check_command, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', tries=5, try_sleep=10, environment=env_dict)
-
-    if params.xa_audit_db_is_enabled and params.driver_source is not None and not params.driver_source.endswith("/None"):
-      if params.xa_previous_jdbc_jar and os.path.isfile(params.xa_previous_jdbc_jar):
-        File(params.xa_previous_jdbc_jar, action='delete')
-
-      File(params.downloaded_connector_path,
-        content = DownloadSource(params.driver_source),
-        mode = 0644
-      )
-
-      Execute(('cp', '--remove-destination', params.downloaded_connector_path, params.driver_target),
-          path=["/bin", "/usr/bin/"],
-          sudo=True)
-
-      File(params.driver_target, mode=0644)
-
-    Directory(os.path.join(params.kms_home, 'ews', 'webapp', 'WEB-INF', 'classes', 'lib'),
-        mode=0755,
-        owner=params.kms_user,
-        group=params.kms_group        
-      )
-
-    Execute(('cp',format('{kms_home}/ranger-kms-initd'),'/etc/init.d/ranger-kms'),
-    not_if=format('ls /etc/init.d/ranger-kms'),
-    only_if=format('ls {kms_home}/ranger-kms-initd'),
-    sudo=True)
-
-    File('/etc/init.d/ranger-kms',
-      mode = 0755
-    )
-
-    Directory(format('{kms_home}/'),
-              owner = params.kms_user,
-              group = params.kms_group,
-              recursive_ownership = True,
-    )
-
-    Directory(params.ranger_kms_pid_dir,
-      mode=0755,
-      owner = params.kms_user,
-      group = params.user_group,
-      cd_access = "a",
-      create_parents=True
-    )
-
-    if params.stack_supports_pid:
-      File(format('{kms_conf_dir}/ranger-kms-env-piddir.sh'),
-        content = format("export RANGER_KMS_PID_DIR_PATH={ranger_kms_pid_dir}\nexport KMS_USER={kms_user}"),
-        owner = params.kms_user,
-        group = params.kms_group,
-        mode=0755
-      )
-
-    Directory(params.kms_log_dir,
-      owner = params.kms_user,
-      group = params.kms_group,
-      cd_access = 'a',
-      create_parents=True,
-      mode=0755
-    )
-
-    File(format('{kms_conf_dir}/ranger-kms-env-logdir.sh'),
-      content = format("export RANGER_KMS_LOG_DIR={kms_log_dir}"),
-      owner = params.kms_user,
-      group = params.kms_group,
-      mode=0755
-    )
-
-    Execute(('ln','-sf', format('{kms_home}/ranger-kms'),'/usr/bin/ranger-kms'),
-      not_if=format('ls /usr/bin/ranger-kms'),
-      only_if=format('ls {kms_home}/ranger-kms'),
-      sudo=True)
-
-    File('/usr/bin/ranger-kms', mode = 0755)
-
-    Execute(('ln','-sf', format('{kms_home}/ranger-kms'),'/usr/bin/ranger-kms-services.sh'),
-      not_if=format('ls /usr/bin/ranger-kms-services.sh'),
-      only_if=format('ls {kms_home}/ranger-kms'),
-      sudo=True)
-
-    File('/usr/bin/ranger-kms-services.sh', mode = 0755)
-
-    Execute(('ln','-sf', format('{kms_home}/ranger-kms-initd'),format('{kms_home}/ranger-kms-services.sh')),
-      not_if=format('ls {kms_home}/ranger-kms-services.sh'),
-      only_if=format('ls {kms_home}/ranger-kms-initd'),
-      sudo=True)
-
-    File(format('{kms_home}/ranger-kms-services.sh'), mode = 0755)
-
-    Directory(params.kms_log_dir,
-      owner = params.kms_user,
-      group = params.kms_group,
-      mode = 0775
-    )
-
-    do_keystore_setup(params.credential_provider_path, params.jdbc_alias, params.db_password)
-    do_keystore_setup(params.credential_provider_path, params.masterkey_alias, params.kms_master_key_password)
-    if params.stack_support_kms_hsm and params.enable_kms_hsm:
-      do_keystore_setup(params.credential_provider_path, params.hms_partition_alias, unicode(params.hms_partition_passwd))
-    if params.stack_supports_ranger_kms_ssl and params.ranger_kms_ssl_enabled:
-      do_keystore_setup(params.ranger_kms_cred_ssl_path, params.ranger_kms_ssl_keystore_alias, params.ranger_kms_ssl_passwd)
-
-    # remove plain-text password from xml configs
-    dbks_site_copy = {}
-    dbks_site_copy.update(params.config['configurations']['dbks-site'])
-
-    for prop in params.dbks_site_password_properties:
-      if prop in dbks_site_copy:
-        dbks_site_copy[prop] = "_"
-
-    XmlConfig("dbks-site.xml",
-      conf_dir=params.kms_conf_dir,
-      configurations=dbks_site_copy,
-      configuration_attributes=params.config['configuration_attributes']['dbks-site'],
-      owner=params.kms_user,
-      group=params.kms_group,
-      mode=0644
-    )
-
-    ranger_kms_site_copy = {}
-    ranger_kms_site_copy.update(params.config['configurations']['ranger-kms-site'])
-    if params.stack_supports_ranger_kms_ssl:
-      # remove plain-text password from xml configs
-      for prop in params.ranger_kms_site_password_properties:
-        if prop in ranger_kms_site_copy:
-          ranger_kms_site_copy[prop] = "_"
-
-    XmlConfig("ranger-kms-site.xml",
-      conf_dir=params.kms_conf_dir,
-      configurations=ranger_kms_site_copy,
-      configuration_attributes=params.config['configuration_attributes']['ranger-kms-site'],
-      owner=params.kms_user,
-      group=params.kms_group,
-      mode=0644
-    )
-
-    XmlConfig("kms-site.xml",
-      conf_dir=params.kms_conf_dir,
-      configurations=params.config['configurations']['kms-site'],
-      configuration_attributes=params.config['configuration_attributes']['kms-site'],
-      owner=params.kms_user,
-      group=params.kms_group,
-      mode=0644
-    )
-
-    File(os.path.join(params.kms_conf_dir, "kms-log4j.properties"),
-      owner=params.kms_user,
-      group=params.kms_group,
-      content=InlineTemplate(params.kms_log4j),
-      mode=0644
-    )
-    if params.security_enabled:
-      # core-site.xml linking required by setup for HDFS encryption
-      XmlConfig("core-site.xml",
-        conf_dir=params.kms_conf_dir,
-        configurations=params.config['configurations']['core-site'],
-        configuration_attributes=params.config['configuration_attributes']['core-site'],
-        owner=params.kms_user,
-        group=params.kms_group,
-        mode=0644
-      )
-    else:
-      File(format('{kms_conf_dir}/core-site.xml'), action="delete")
-
-def copy_jdbc_connector(stack_version=None):
-  import params
-
-  if params.jdbc_jar_name is None and params.driver_curl_source.endswith("/None"):
-    error_message = "Error! Sorry, but we can't find jdbc driver related to {0} database to download from {1}. \
-    Please run 'ambari-server setup --jdbc-db={db_name} --jdbc-driver={path_to_jdbc} on server host.'".format(params.db_flavor, params.jdk_location)
-    Logger.error(error_message)
-
-  if params.driver_curl_source and not params.driver_curl_source.endswith("/None"):
-    if params.previous_jdbc_jar and os.path.isfile(params.previous_jdbc_jar):
-      File(params.previous_jdbc_jar, action='delete')
-
-  kms_home = params.kms_home
-  if stack_version is not None:
-    kms_home = format("{stack_root}/{stack_version}/ranger-kms")
-
-  driver_curl_target = format("{kms_home}/ews/webapp/lib/{jdbc_jar_name}")
-
-  File(params.downloaded_custom_connector,
-    content = DownloadSource(params.driver_curl_source),
-    mode = 0644
-  )
-
-  Directory(os.path.join(kms_home, 'ews', 'lib'),
-    mode=0755
-  )
-
-  if params.db_flavor.lower() == 'sqla':
-    Execute(('tar', '-xvf', params.downloaded_custom_connector, '-C', params.tmp_dir), sudo = True)
-
-    Execute(('cp', '--remove-destination', params.jar_path_in_archive, os.path.join(kms_home, 'ews', 'webapp', 'lib')),
-      path=["/bin", "/usr/bin/"],
-      sudo=True)
-
-    Directory(params.jdbc_libs_dir,
-      cd_access="a",
-      create_parents=True)
-
-    Execute(as_sudo(['yes', '|', 'cp', params.libs_path_in_archive, params.jdbc_libs_dir], auto_escape=False),
-      path=["/bin", "/usr/bin/"])
-
-    File(os.path.join(kms_home, 'ews', 'webapp', 'lib', 'sajdbc4.jar'), mode=0644)
-  else:
-    Execute(('cp', '--remove-destination', params.downloaded_custom_connector, os.path.join(kms_home, 'ews', 'webapp', 'lib')),
-      path=["/bin", "/usr/bin/"],
-      sudo=True)
-
-    File(os.path.join(kms_home, 'ews', 'webapp', 'lib', params.jdbc_jar_name), mode=0644)
-
-  ModifyPropertiesFile(format("{kms_home}/install.properties"),
-    properties = params.config['configurations']['kms-properties'],
-    owner = params.kms_user
-  )
-
-  if params.db_flavor.lower() == 'sqla':
-    ModifyPropertiesFile(format("{kms_home}/install.properties"),
-      properties = {'SQL_CONNECTOR_JAR': format('{kms_home}/ews/webapp/lib/sajdbc4.jar')},
-      owner = params.kms_user,
-    )
-  else:
-    ModifyPropertiesFile(format("{kms_home}/install.properties"),
-      properties = {'SQL_CONNECTOR_JAR': format('{driver_curl_target}')},
-      owner = params.kms_user,
-    )
-
-def enable_kms_plugin():
-
-  import params
-
-  if params.has_ranger_admin:
-
-    ranger_flag = False
-
-    if params.stack_supports_ranger_kerberos and params.security_enabled:
-      if not is_empty(params.rangerkms_principal) and params.rangerkms_principal != '':
-        ranger_flag = check_ranger_service_support_kerberos(params.kms_user, params.rangerkms_keytab, params.rangerkms_principal)
-      else:
-        ranger_flag = check_ranger_service_support_kerberos(params.kms_user, params.spengo_keytab, params.spnego_principal)
-    else:
-      ranger_flag = check_ranger_service()
-
-    if not ranger_flag:
-      Logger.error('Error in Get/Create service for Ranger Kms.')
-
-    current_datetime = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
-
-    File(format('{kms_conf_dir}/ranger-security.xml'),
-      owner = params.kms_user,
-      group = params.kms_group,
-      mode = 0644,
-      content = format('<ranger>\n<enabled>{current_datetime}</enabled>\n</ranger>')
-    )
-
-    Directory([os.path.join('/etc', 'ranger', params.repo_name), os.path.join('/etc', 'ranger', params.repo_name, 'policycache')],
-      owner = params.kms_user,
-      group = params.kms_group,
-      mode=0775,
-      create_parents = True
-    )
-    
-    File(os.path.join('/etc', 'ranger', params.repo_name, 'policycache',format('kms_{repo_name}.json')),
-      owner = params.kms_user,
-      group = params.kms_group,
-      mode = 0644        
-    )
-
-    # remove plain-text password from xml configs
-    plugin_audit_properties_copy = {}
-    plugin_audit_properties_copy.update(params.config['configurations']['ranger-kms-audit'])
-
-    if params.plugin_audit_password_property in plugin_audit_properties_copy:
-      plugin_audit_properties_copy[params.plugin_audit_password_property] = "crypted"
-
-    XmlConfig("ranger-kms-audit.xml",
-      conf_dir=params.kms_conf_dir,
-      configurations=plugin_audit_properties_copy,
-      configuration_attributes=params.config['configuration_attributes']['ranger-kms-audit'],
-      owner=params.kms_user,
-      group=params.kms_group,
-      mode=0744)
-
-    XmlConfig("ranger-kms-security.xml",
-      conf_dir=params.kms_conf_dir,
-      configurations=params.config['configurations']['ranger-kms-security'],
-      configuration_attributes=params.config['configuration_attributes']['ranger-kms-security'],
-      owner=params.kms_user,
-      group=params.kms_group,
-      mode=0744)
-
-    # remove plain-text password from xml configs
-    ranger_kms_policymgr_ssl_copy = {}
-    ranger_kms_policymgr_ssl_copy.update(params.config['configurations']['ranger-kms-policymgr-ssl'])
-
-    for prop in params.kms_plugin_password_properties:
-      if prop in ranger_kms_policymgr_ssl_copy:
-        ranger_kms_policymgr_ssl_copy[prop] = "crypted"
-
-    XmlConfig("ranger-policymgr-ssl.xml",
-      conf_dir=params.kms_conf_dir,
-      configurations=ranger_kms_policymgr_ssl_copy,
-      configuration_attributes=params.config['configuration_attributes']['ranger-kms-policymgr-ssl'],
-      owner=params.kms_user,
-      group=params.kms_group,
-      mode=0744)
-
-    if params.xa_audit_db_is_enabled:
-      cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'auditDBCred', '-v', PasswordString(params.xa_audit_db_password), '-c', '1')
-      Execute(cred_setup, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
-
-    cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'sslKeyStore', '-v', PasswordString(params.ssl_keystore_password), '-c', '1')
-    Execute(cred_setup, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
-
-    cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'sslTrustStore', '-v', PasswordString(params.ssl_truststore_password), '-c', '1')
-    Execute(cred_setup, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
-
-    File(params.credential_file,
-      owner = params.kms_user,
-      group = params.kms_group,
-      mode = 0640
-      )
-
-    # create ranger kms audit directory
-    if params.xa_audit_hdfs_is_enabled and params.has_namenode and params.has_hdfs_client_on_node:
-      params.HdfsResource("/ranger/audit",
-                        type="directory",
-                        action="create_on_execute",
-                        owner=params.hdfs_user,
-                        group=params.hdfs_user,
-                        mode=0755,
-                        recursive_chmod=True
-      )
-      params.HdfsResource("/ranger/audit/kms",
-                        type="directory",
-                        action="create_on_execute",
-                        owner=params.kms_user,
-                        group=params.kms_group,
-                        mode=0750,
-                        recursive_chmod=True
-      )
-      params.HdfsResource(None, action="execute")
-
-    if params.xa_audit_hdfs_is_enabled and len(params.namenode_host) > 1:
-      Logger.info('Audit to Hdfs enabled in NameNode HA environment, creating hdfs-site.xml')
-      XmlConfig("hdfs-site.xml",
-        conf_dir=params.kms_conf_dir,
-        configurations=params.config['configurations']['hdfs-site'],
-        configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
-        owner=params.kms_user,
-        group=params.kms_group,
-        mode=0644
-      )
-    else:
-      File(format('{kms_conf_dir}/hdfs-site.xml'), action="delete")
-
-def setup_kms_jce():
-  import params
-
-  if params.jce_name is not None:
-    Directory(params.jce_source_dir,
-      create_parents = True
-    )
-
-    jce_target = format('{jce_source_dir}/{jce_name}')
-
-    File(jce_target,
-      content = DownloadSource(format('{jdk_location}/{jce_name}')),
-      mode = 0644,
-    )
-
-    File([format("{java_home}/jre/lib/security/local_policy.jar"), format("{java_home}/jre/lib/security/US_export_policy.jar")],
-      action = "delete",
-    )
-
-    unzip_cmd = ("unzip", "-o", "-j", "-q", jce_target, "-d", format("{java_home}/jre/lib/security"))
-
-    Execute(unzip_cmd,
-      only_if = format("test -e {java_home}/jre/lib/security && test -f {jce_target}"),
-      path = ['/bin/','/usr/bin'],
-      sudo = True
-    )
-  else:
-    Logger.warning("Required jce policy zip is not available, need to setup manually")
-
-  
-def check_ranger_service():
-  import params
-
-  policymgr_mgr_url = params.policymgr_mgr_url
-  if policymgr_mgr_url.endswith('/'):
-    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
-  ranger_adm_obj = Rangeradmin(url=policymgr_mgr_url)
-  ambari_username_password_for_ranger = format("{ambari_ranger_admin}:{ambari_ranger_password}")
-  response_code = ranger_adm_obj.check_ranger_login_urllib2(policymgr_mgr_url)
-
-  if response_code is not None and response_code == 200:
-    user_resp_code = ranger_adm_obj.create_ambari_admin_user(params.ambari_ranger_admin, params.ambari_ranger_password, params.admin_uname_password)
-    if user_resp_code is not None and user_resp_code == 200:
-      get_repo_flag = get_repo(policymgr_mgr_url, params.repo_name, ambari_username_password_for_ranger)
-      if not get_repo_flag:
-        return create_repo(policymgr_mgr_url, json.dumps(params.kms_ranger_plugin_repo), ambari_username_password_for_ranger)
-      else:
-        return True
-    else:
-      return False
-  else:
-    Logger.error('Ranger service is not reachable')
-    return False
-
-@safe_retry(times=5, sleep_time=8, backoff_factor=1.5, err_class=Fail, return_on_fail=False)
-def create_repo(url, data, usernamepassword):
-  try:
-    base_url = url + '/service/public/v2/api/service'
-    base64string = base64.encodestring('{0}'.format(usernamepassword)).replace('\n', '')
-    headers = {
-      'Accept': 'application/json',
-      "Content-Type": "application/json"
-    }
-    request = urllib2.Request(base_url, data, headers)
-    request.add_header("Authorization", "Basic {0}".format(base64string))
-    result = urllib2.urlopen(request, timeout=20)
-    response_code = result.getcode()
-    response = json.loads(json.JSONEncoder().encode(result.read()))
-    if response_code == 200:
-      Logger.info('Repository created Successfully')
-      return True
-    else:
-      Logger.info('Repository not created')
-      return False
-  except urllib2.URLError, e:
-    if isinstance(e, urllib2.HTTPError):
-      raise Fail("Error creating service. Http status code - {0}. \n {1}".format(e.code, e.read()))
-    else:
-      raise Fail("Error creating service. Reason - {0}.".format(e.reason))
-  except socket.timeout as e:
-    raise Fail("Error creating service. Reason - {0}".format(e))
-
-@safe_retry(times=5, sleep_time=8, backoff_factor=1.5, err_class=Fail, return_on_fail=False)
-def get_repo(url, name, usernamepassword):
-  try:
-    base_url = url + '/service/public/v2/api/service?serviceName=' + name + '&serviceType=kms&isEnabled=true'
-    request = urllib2.Request(base_url)
-    base64string = base64.encodestring(usernamepassword).replace('\n', '')
-    request.add_header("Content-Type", "application/json")
-    request.add_header("Accept", "application/json")
-    request.add_header("Authorization", "Basic {0}".format(base64string))
-    result = urllib2.urlopen(request, timeout=20)
-    response_code = result.getcode()
-    response = json.loads(result.read())
-    if response_code == 200 and len(response) > 0:
-      for repo in response:
-        if repo.get('name').lower() == name.lower() and repo.has_key('name'):
-          Logger.info('KMS repository exist')
-          return True
-        else:
-          Logger.info('KMS repository doesnot exist')
-          return False
-    else:
-      Logger.info('KMS repository doesnot exist')
-      return False
-  except urllib2.URLError, e:
-    if isinstance(e, urllib2.HTTPError):
-      raise Fail("Error getting {0} service. Http status code - {1}. \n {2}".format(name, e.code, e.read()))
-    else:
-      raise Fail("Error getting {0} service. Reason - {1}.".format(name, e.reason))
-  except socket.timeout as e:
-    raise Fail("Error creating service. Reason - {0}".format(e))
-
-def check_ranger_service_support_kerberos(user, keytab, principal):
-  import params
-
-  policymgr_mgr_url = params.policymgr_mgr_url
-  if policymgr_mgr_url.endswith('/'):
-    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
-  ranger_adm_obj = RangeradminV2(url=policymgr_mgr_url)
-  response_code = ranger_adm_obj.check_ranger_login_curl(user, keytab, principal, policymgr_mgr_url, True)
-
-  if response_code is not None and response_code[0] == 200:
-    get_repo_name_response = ranger_adm_obj.get_repository_by_name_curl(user, keytab, principal, params.repo_name, 'kms', 'true', is_keyadmin = True)
-    if get_repo_name_response is not None:
-      Logger.info('KMS repository {0} exist'.format(get_repo_name_response['name']))
-      return True
-    else:
-      create_repo_response = ranger_adm_obj.create_repository_curl(user, keytab, principal, params.repo_name, json.dumps(params.kms_ranger_plugin_repo), None, is_keyadmin = True)
-      if create_repo_response is not None and len(create_repo_response) > 0:
-        return True
-      else:
-        return False
-  else:
-    Logger.error('Ranger service is not reachable')
-    return False

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms_server.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms_server.py
deleted file mode 100755
index 44d61da..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms_server.py
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-from resource_management.core.exceptions import Fail
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.functions import stack_select
-from resource_management.libraries.script import Script
-from resource_management.core.resources.system import Execute, File
-from resource_management.core.exceptions import ComponentIsNotRunning
-from resource_management.libraries.functions.format import format
-from resource_management.core.logger import Logger
-from resource_management.core import shell
-from resource_management.libraries.functions.default import default
-from kms import kms, setup_kms_db, setup_java_patch, enable_kms_plugin, setup_kms_jce
-from kms_service import kms_service
-import upgrade
-
-class KmsServer(Script):
-
-  def get_component_name(self):
-    return "ranger-kms"
-
-  def install(self, env):
-    self.install_packages(env)
-    import params
-    env.set_params(params)
-
-    setup_kms_db()
-    self.configure(env)
-    setup_java_patch()
-
-  def stop(self, env, upgrade_type=None):
-    import params
-
-    env.set_params(params)
-    kms_service(action = 'stop', upgrade_type=upgrade_type)
-    if params.stack_supports_pid:
-      File(params.ranger_kms_pid_file,
-        action = "delete"
-      )
-
-  def start(self, env, upgrade_type=None):
-    import params
-
-    env.set_params(params)
-    self.configure(env)
-    enable_kms_plugin()
-    setup_kms_jce()
-    kms_service(action = 'start', upgrade_type=upgrade_type)
-
-  def status(self, env):
-    import status_params
-    env.set_params(status_params)
-
-    if status_params.stack_supports_pid:
-      check_process_status(status_params.ranger_kms_pid_file)
-      return
-
-    cmd = 'ps -ef | grep proc_rangerkms | grep -v grep'
-    code, output = shell.call(cmd, timeout=20)
-    if code != 0:
-      Logger.debug('KMS process not running')
-      raise ComponentIsNotRunning()
-    pass
-
-  def configure(self, env):
-    import params
-
-    env.set_params(params)
-    kms()
-
-  def pre_upgrade_restart(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    upgrade.prestart(env, "ranger-kms")
-    kms(upgrade_type=upgrade_type)
-    setup_java_patch()
-
-  def setup_ranger_kms_database(self, env):
-    import params
-    env.set_params(params)
-
-    upgrade_stack = stack_select._get_upgrade_stack()
-    if upgrade_stack is None:
-      raise Fail('Unable to determine the stack and stack version')
-
-    stack_version = upgrade_stack[1]
-    Logger.info(format('Setting Ranger KMS database schema, using version {stack_version}'))
-    setup_kms_db(stack_version=stack_version)
-    
-  def get_log_folder(self):
-    import params
-    return params.kms_log_dir
-  
-  def get_user(self):
-    import params
-    return params.kms_user
-
-if __name__ == "__main__":
-  KmsServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms_service.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms_service.py
deleted file mode 100644
index 2ff48c3..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/kms_service.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-
-from resource_management.core.resources.system import Execute, File
-from resource_management.core import shell
-from resource_management.libraries.functions.format import format
-from resource_management.core.exceptions import ComponentIsNotRunning
-from resource_management.core.logger import Logger
-from resource_management.libraries.functions.show_logs import show_logs
-from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING
-from resource_management.libraries.functions.constants import Direction
-import os
-
-def kms_service(action='start', upgrade_type=None):
-  import params
-
-  env_dict = {'JAVA_HOME': params.java_home}
-  if params.db_flavor.lower() == 'sqla':
-    env_dict = {'JAVA_HOME': params.java_home, 'LD_LIBRARY_PATH': params.ld_library_path}
-
-  if action == 'start':
-    no_op_test = format('ps -ef | grep proc_rangerkms | grep -v grep')
-    cmd = format('{kms_home}/ranger-kms start')
-    try:
-      Execute(cmd, not_if=no_op_test, environment=env_dict, user=format('{kms_user}'))
-    except:
-      show_logs(params.kms_log_dir, params.kms_user)
-      raise
-  elif action == 'stop':
-    if upgrade_type == UPGRADE_TYPE_NON_ROLLING and params.upgrade_direction == Direction.UPGRADE:
-      if os.path.isfile(format('{kms_home}/ranger-kms')):
-        File(format('{kms_home}/ranger-kms'),
-          owner=params.kms_user,
-          group = params.kms_group
-        )
-    cmd = format('{kms_home}/ranger-kms stop')
-    try:
-      Execute(cmd, environment=env_dict, user=format('{kms_user}'))
-    except:
-      show_logs(params.kms_log_dir, params.kms_user)
-      raise

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/params.py
deleted file mode 100755
index 2445f2e..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/params.py
+++ /dev/null
@@ -1,331 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-import os
-from resource_management.libraries.functions import conf_select
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions.version import format_stack_version
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.default import default
-from resource_management.libraries.functions.stack_features import check_stack_feature
-from resource_management.libraries.functions.stack_features import get_stack_feature_version
-from resource_management.libraries.functions import StackFeature
-from resource_management.libraries.functions.get_bare_principal import get_bare_principal
-from resource_management.libraries.functions.is_empty import is_empty
-from resource_management.libraries.functions.setup_ranger_plugin_xml import generate_ranger_service_config
-from resource_management.libraries.resources.hdfs_resource import HdfsResource
-from resource_management.libraries.functions import stack_select
-from resource_management.libraries.functions import get_kinit_path
-
-config  = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-stack_root = Script.get_stack_root()
-
-stack_name = default("/hostLevelParams/stack_name", None)
-version = default("/commandParams/version", None)
-upgrade_direction = default("/commandParams/upgrade_direction", None)
-
-stack_version_unformatted = config['hostLevelParams']['stack_version']
-stack_version_formatted = format_stack_version(stack_version_unformatted)
-
-# get the correct version to use for checking stack features
-version_for_stack_feature_checks = get_stack_feature_version(config)
-
-stack_supports_config_versioning = check_stack_feature(StackFeature.CONFIG_VERSIONING, version_for_stack_feature_checks)
-stack_support_kms_hsm = check_stack_feature(StackFeature.RANGER_KMS_HSM_SUPPORT, version_for_stack_feature_checks)
-stack_supports_ranger_kerberos = check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, version_for_stack_feature_checks)
-stack_supports_pid = check_stack_feature(StackFeature.RANGER_KMS_PID_SUPPORT, version_for_stack_feature_checks)
-stack_supports_ranger_audit_db = check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, version_for_stack_feature_checks)
-stack_supports_ranger_kms_ssl = check_stack_feature(StackFeature.RANGER_KMS_SSL, version_for_stack_feature_checks)
-
-hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
-security_enabled = config['configurations']['cluster-env']['security_enabled']
-
-if stack_supports_config_versioning:
-  kms_home = format('{stack_root}/current/ranger-kms')
-  kms_conf_dir = format('{stack_root}/current/ranger-kms/conf')
-
-kms_log_dir = default("/configurations/kms-env/kms_log_dir", "/var/log/ranger/kms")
-java_home = config['hostLevelParams']['java_home']
-kms_user  = default("/configurations/kms-env/kms_user", "kms")
-kms_group = default("/configurations/kms-env/kms_group", "kms")
-
-ranger_kms_audit_log_maxfilesize = default('/configurations/kms-log4j/ranger_kms_audit_log_maxfilesize',256)
-ranger_kms_audit_log_maxbackupindex = default('/configurations/kms-log4j/ranger_kms_audit_log_maxbackupindex',20)
-ranger_kms_log_maxfilesize = default('/configurations/kms-log4j/ranger_kms_log_maxfilesize',256)
-ranger_kms_log_maxbackupindex = default('/configurations/kms-log4j/ranger_kms_log_maxbackupindex',20)
-
-jdk_location = config['hostLevelParams']['jdk_location']
-kms_log4j = config['configurations']['kms-log4j']['content']
-
-# ranger host
-ranger_admin_hosts = config['clusterHostInfo']['ranger_admin_hosts'][0]
-has_ranger_admin = len(ranger_admin_hosts) > 0
-kms_host = config['clusterHostInfo']['ranger_kms_server_hosts'][0]
-kms_port = config['configurations']['kms-env']['kms_port']
-
-create_db_user = config['configurations']['kms-env']['create_db_user']
-
-#kms properties
-db_flavor = (config['configurations']['kms-properties']['DB_FLAVOR']).lower()
-db_host = config['configurations']['kms-properties']['db_host']
-db_name = config['configurations']['kms-properties']['db_name']
-db_user = config['configurations']['kms-properties']['db_user']
-db_password = unicode(config['configurations']['kms-properties']['db_password'])
-kms_master_key_password = unicode(config['configurations']['kms-properties']['KMS_MASTER_KEY_PASSWD'])
-credential_provider_path = config['configurations']['dbks-site']['ranger.ks.jpa.jdbc.credential.provider.path']
-jdbc_alias = config['configurations']['dbks-site']['ranger.ks.jpa.jdbc.credential.alias']
-masterkey_alias = config['configurations']['dbks-site']['ranger.ks.masterkey.credential.alias']
-repo_name = str(config['clusterName']) + '_kms'
-repo_name_value = config['configurations']['ranger-kms-security']['ranger.plugin.kms.service.name']
-if not is_empty(repo_name_value) and repo_name_value != "{{repo_name}}":
-  repo_name = repo_name_value
-cred_lib_path = os.path.join(kms_home,"cred","lib","*")
-cred_setup_prefix = (format('{kms_home}/ranger_credential_helper.py'), '-l', cred_lib_path)
-credential_file = format('/etc/ranger/{repo_name}/cred.jceks')
-
-if has_ranger_admin:
-  policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
-  if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
-    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
-  xa_audit_db_flavor = (config['configurations']['admin-properties']['DB_FLAVOR']).lower()
-  xa_audit_db_name = default('/configurations/admin-properties/audit_db_name', 'ranger_audits')
-  xa_audit_db_user = default('/configurations/admin-properties/audit_db_user', 'rangerlogger')
-  xa_audit_db_password = ''
-  if not is_empty(config['configurations']['admin-properties']['audit_db_password']) and stack_supports_ranger_audit_db:
-    xa_audit_db_password = config['configurations']['admin-properties']['audit_db_password']
-  xa_db_host = config['configurations']['admin-properties']['db_host']
-
-  admin_uname = config['configurations']['ranger-env']['admin_username']
-  admin_password = config['configurations']['ranger-env']['admin_password']
-  ambari_ranger_admin = config['configurations']['ranger-env']['ranger_admin_username']
-  ambari_ranger_password = config['configurations']['ranger-env']['ranger_admin_password']
-  admin_uname_password = format("{admin_uname}:{admin_password}")
-  ranger_audit_solr_urls = config['configurations']['ranger-admin-site']['ranger.audit.solr.urls']
-
-default_connectors_map = { "mssql":"sqljdbc4.jar",
-                           "mysql":"mysql-connector-java.jar",
-                           "postgres":"postgresql-jdbc.jar",
-                           "oracle":"ojdbc.jar",
-                           "sqla":"sajdbc4.jar"}
-
-java_share_dir = '/usr/share/java'
-jdbc_jar_name = None
-previous_jdbc_jar_name = None
-if db_flavor == 'mysql':
-  jdbc_jar_name = default("/hostLevelParams/custom_mysql_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mysql_jdbc_name", None)
-  db_jdbc_url = format('jdbc:log4jdbc:mysql://{db_host}/{db_name}')
-  db_jdbc_driver = "com.mysql.jdbc.Driver"
-  jdbc_dialect = "org.eclipse.persistence.platform.database.MySQLPlatform"
-elif db_flavor == 'oracle':
-  jdbc_jar_name = default("/hostLevelParams/custom_oracle_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_oracle_jdbc_name", None)
-  colon_count = db_host.count(':')
-  if colon_count == 2 or colon_count == 0:
-    db_jdbc_url = format('jdbc:oracle:thin:@{db_host}')
-  else:
-    db_jdbc_url = format('jdbc:oracle:thin:@//{db_host}')
-  db_jdbc_driver = "oracle.jdbc.OracleDriver"
-  jdbc_dialect = "org.eclipse.persistence.platform.database.OraclePlatform"
-elif db_flavor == 'postgres':
-  jdbc_jar_name = default("/hostLevelParams/custom_postgres_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_postgres_jdbc_name", None)
-  db_jdbc_url = format('jdbc:postgresql://{db_host}/{db_name}')
-  db_jdbc_driver = "org.postgresql.Driver"
-  jdbc_dialect = "org.eclipse.persistence.platform.database.PostgreSQLPlatform"
-elif db_flavor == 'mssql':
-  jdbc_jar_name = default("/hostLevelParams/custom_mssql_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mssql_jdbc_name", None)
-  db_jdbc_url = format('jdbc:sqlserver://{db_host};databaseName={db_name}')
-  db_jdbc_driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-  jdbc_dialect = "org.eclipse.persistence.platform.database.SQLServerPlatform"
-elif db_flavor == 'sqla':
-  jdbc_jar_name = default("/hostLevelParams/custom_sqlanywhere_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_sqlanywhere_jdbc_name", None)
-  db_jdbc_url = format('jdbc:sqlanywhere:database={db_name};host={db_host}')
-  db_jdbc_driver = "sap.jdbc4.sqlanywhere.IDriver"
-  jdbc_dialect = "org.eclipse.persistence.platform.database.SQLAnywherePlatform"
-
-downloaded_custom_connector = format("{tmp_dir}/{jdbc_jar_name}")
-
-driver_curl_source = format("{jdk_location}/{jdbc_jar_name}")
-driver_curl_target = format("{kms_home}/ews/webapp/lib/{jdbc_jar_name}")
-previous_jdbc_jar = format("{kms_home}/ews/webapp/lib/{previous_jdbc_jar_name}")
-ews_lib_jar_path = format("{kms_home}/ews/webapp/lib/{jdbc_jar_name}")
-
-if db_flavor == 'sqla':
-  downloaded_custom_connector = format("{tmp_dir}/sqla-client-jdbc.tar.gz")
-  jar_path_in_archive = format("{tmp_dir}/sqla-client-jdbc/java/sajdbc4.jar")
-  libs_path_in_archive = format("{tmp_dir}/sqla-client-jdbc/native/lib64/*")
-  jdbc_libs_dir = format("{kms_home}/native/lib64")
-  ld_library_path = format("{jdbc_libs_dir}")
-
-if has_ranger_admin:
-  xa_previous_jdbc_jar_name = None
-  if stack_supports_ranger_audit_db:
-    if xa_audit_db_flavor == 'mysql':
-      jdbc_jar = default("/hostLevelParams/custom_mysql_jdbc_name", None)
-      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mysql_jdbc_name", None)
-      audit_jdbc_url = format('jdbc:mysql://{xa_db_host}/{xa_audit_db_name}')
-      jdbc_driver = "com.mysql.jdbc.Driver"
-    elif xa_audit_db_flavor == 'oracle':
-      jdbc_jar = default("/hostLevelParams/custom_oracle_jdbc_name", None)
-      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_oracle_jdbc_name", None)
-      colon_count = xa_db_host.count(':')
-      if colon_count == 2 or colon_count == 0:
-        audit_jdbc_url = format('jdbc:oracle:thin:@{xa_db_host}')
-      else:
-        audit_jdbc_url = format('jdbc:oracle:thin:@//{xa_db_host}')
-      jdbc_driver = "oracle.jdbc.OracleDriver"
-    elif xa_audit_db_flavor == 'postgres':
-      jdbc_jar = default("/hostLevelParams/custom_postgres_jdbc_name", None)
-      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_postgres_jdbc_name", None)
-      audit_jdbc_url = format('jdbc:postgresql://{xa_db_host}/{xa_audit_db_name}')
-      jdbc_driver = "org.postgresql.Driver"
-    elif xa_audit_db_flavor == 'mssql':
-      jdbc_jar = default("/hostLevelParams/custom_mssql_jdbc_name", None)
-      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mssql_jdbc_name", None)
-      audit_jdbc_url = format('jdbc:sqlserver://{xa_db_host};databaseName={xa_audit_db_name}')
-      jdbc_driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-    elif xa_audit_db_flavor == 'sqla':
-      jdbc_jar = default("/hostLevelParams/custom_sqlanywhere_jdbc_name", None)
-      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_sqlanywhere_jdbc_name", None)
-      audit_jdbc_url = format('jdbc:sqlanywhere:database={xa_audit_db_name};host={xa_db_host}')
-      jdbc_driver = "sap.jdbc4.sqlanywhere.IDriver"
-
-  downloaded_connector_path = format("{tmp_dir}/{jdbc_jar}") if stack_supports_ranger_audit_db else None
-  driver_source = format("{jdk_location}/{jdbc_jar}") if stack_supports_ranger_audit_db else None
-  driver_target = format("{kms_home}/ews/webapp/lib/{jdbc_jar}") if stack_supports_ranger_audit_db else None
-  xa_previous_jdbc_jar = format("{kms_home}/ews/webapp/lib/{previous_jdbc_jar_name}") if stack_supports_ranger_audit_db else None
-
-repo_config_username = config['configurations']['kms-properties']['REPOSITORY_CONFIG_USERNAME']
-repo_config_password = unicode(config['configurations']['kms-properties']['REPOSITORY_CONFIG_PASSWORD'])
-
-kms_plugin_config = {
-  'username' : repo_config_username,
-  'password' : repo_config_password,
-  'provider' : format('kms://http@{kms_host}:{kms_port}/kms') 
-}
-
-xa_audit_db_is_enabled = False
-if stack_supports_ranger_audit_db:
-  xa_audit_db_is_enabled = config['configurations']['ranger-kms-audit']['xasecure.audit.destination.db']
-ssl_keystore_password = unicode(config['configurations']['ranger-kms-policymgr-ssl']['xasecure.policymgr.clientssl.keystore.password'])
-ssl_truststore_password = unicode(config['configurations']['ranger-kms-policymgr-ssl']['xasecure.policymgr.clientssl.truststore.password'])
-
-#For SQLA explicitly disable audit to DB for Ranger
-if xa_audit_db_flavor == 'sqla':
-  xa_audit_db_is_enabled = False
-
-current_host = config['hostname']
-ranger_kms_hosts = config['clusterHostInfo']['ranger_kms_server_hosts']
-if current_host in ranger_kms_hosts:
-  kms_host = current_host
-
-check_db_connection_jar_name = "DBConnectionVerification.jar"
-check_db_connection_jar = format("/usr/lib/ambari-agent/{check_db_connection_jar_name}")
-ranger_kms_jdbc_connection_url = config['configurations']['dbks-site']['ranger.ks.jpa.jdbc.url']
-ranger_kms_jdbc_driver = config['configurations']['dbks-site']['ranger.ks.jpa.jdbc.driver']
-
-jce_name = default("/hostLevelParams/jce_name", None)
-jce_source_dir = format('{tmp_dir}/jce_dir')
-
-#kms hsm support
-enable_kms_hsm = default("/configurations/dbks-site/ranger.ks.hsm.enabled", False)
-hms_partition_alias = default("/configurations/dbks-site/ranger.ks.hsm.partition.password.alias", "ranger.kms.hsm.partition.password")
-hms_partition_passwd = default("/configurations/kms-env/hsm_partition_password", None)
-
-# kms kerberos from stack 2.5 onward
-rangerkms_bare_principal = 'rangerkms'
-
-if stack_supports_ranger_kerberos:
-  if security_enabled:
-    rangerkms_principal = config['configurations']['dbks-site']['ranger.ks.kerberos.principal']
-    rangerkms_keytab = config['configurations']['dbks-site']['ranger.ks.kerberos.keytab']
-    if not is_empty(rangerkms_principal) and rangerkms_principal != '':
-      rangerkms_bare_principal = get_bare_principal(rangerkms_principal)
-      rangerkms_principal = rangerkms_principal.replace('_HOST', kms_host.lower())
-  kms_plugin_config['policy.download.auth.users'] = format('keyadmin,{rangerkms_bare_principal}')
-
-custom_ranger_service_config = generate_ranger_service_config(config['configurations']['kms-properties'])
-if len(custom_ranger_service_config) > 0:
-  kms_plugin_config.update(custom_ranger_service_config)
-
-kms_ranger_plugin_repo = {
-  'isEnabled' : 'true',
-  'configs' : kms_plugin_config,
-  'description' : 'kms repo',
-  'name' : repo_name,
-  'type' : 'kms'
-}
-
-# ranger kms pid
-user_group = config['configurations']['cluster-env']['user_group']
-ranger_kms_pid_dir = default("/configurations/kms-env/ranger_kms_pid_dir", "/var/run/ranger_kms")
-ranger_kms_pid_file = format('{ranger_kms_pid_dir}/rangerkms.pid')
-
-if security_enabled:
-  spengo_keytab = config['configurations']['kms-site']['hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab']
-  spnego_principal = config['configurations']['kms-site']['hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal']
-  spnego_principal = spnego_principal.replace('_HOST', current_host.lower())
-
-plugin_audit_password_property = 'xasecure.audit.destination.db.password'
-kms_plugin_password_properties = ['xasecure.policymgr.clientssl.keystore.password', 'xasecure.policymgr.clientssl.truststore.password']
-dbks_site_password_properties = ['ranger.db.encrypt.key.password', 'ranger.ks.jpa.jdbc.password', 'ranger.ks.hsm.partition.password']
-ranger_kms_site_password_properties = ['ranger.service.https.attrib.keystore.pass']
-ranger_kms_cred_ssl_path = config['configurations']['ranger-kms-site']['ranger.credential.provider.path']
-ranger_kms_ssl_keystore_alias = config['configurations']['ranger-kms-site']['ranger.service.https.attrib.keystore.credential.alias']
-ranger_kms_ssl_passwd = config['configurations']['ranger-kms-site']['ranger.service.https.attrib.keystore.pass']
-ranger_kms_ssl_enabled = config['configurations']['ranger-kms-site']['ranger.service.https.attrib.ssl.enabled']
-
-xa_audit_hdfs_is_enabled = default("/configurations/ranger-kms-audit/xasecure.audit.destination.hdfs", False)
-namenode_host = default("/clusterHostInfo/namenode_host", [])
-
-# need this to capture cluster name from where ranger kms plugin is enabled
-cluster_name = config['clusterName']
-
-has_namenode = len(namenode_host) > 0
-
-hdfs_user = default("/configurations/hadoop-env/hdfs_user", None)
-hdfs_user_keytab = default("/configurations/hadoop-env/hdfs_user_keytab", None)
-hdfs_principal_name = default("/configurations/hadoop-env/hdfs_principal_name", None)
-default_fs = default("/configurations/core-site/fs.defaultFS", None)
-hdfs_site = config['configurations']['hdfs-site'] if has_namenode else None
-hadoop_bin_dir = stack_select.get_hadoop_dir("bin") if has_namenode else None
-kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
-
-import functools
-# create partial functions with common arguments for every HdfsResource call
-# to create/delete hdfs directory/file/copyfromlocal we need to call params.HdfsResource in code
-HdfsResource = functools.partial(
-  HdfsResource,
-  user=hdfs_user,
-  security_enabled = security_enabled,
-  keytab = hdfs_user_keytab,
-  kinit_path_local = kinit_path_local,
-  hadoop_bin_dir = hadoop_bin_dir,
-  hadoop_conf_dir = hadoop_conf_dir,
-  principal_name = hdfs_principal_name,
-  hdfs_site = hdfs_site,
-  default_fs = default_fs
-)
-
-local_component_list = default("/localComponents", [])
-has_hdfs_client_on_node = 'HDFS_CLIENT' in local_component_list
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/service_check.py
deleted file mode 100644
index 84e4e73..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/service_check.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-
-from resource_management.libraries.script import Script
-from resource_management.core.logger import Logger
-from resource_management.core import shell
-from resource_management.core.exceptions import ComponentIsNotRunning
-
-
-class KmsServiceCheck(Script):
-  def service_check(self, env):
-    import params
-
-    env.set_params(params)
-    cmd = 'ps -ef | grep proc_rangerkms | grep -v grep'
-    code, output = shell.call(cmd, timeout=20)
-    if code == 0:
-      Logger.info('KMS process up and running')
-    else:
-      Logger.debug('KMS process not running')
-      raise ComponentIsNotRunning()
-
-if __name__ == "__main__":
-  KmsServiceCheck().execute()


[26/52] [abbrv] ambari git commit: AMBARI-21413 Move the Log Search ZK config root to the connect string (mgergely)

Posted by jl...@apache.org.
AMBARI-21413 Move the Log Search ZK config root to the connect string (mgergely)

Change-Id: Ia50439cf278556b5bf862c996644f60f3a826b32


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 8e719f79402c10d529d2006702148acb085bccfe
Parents: 4256067
Author: Miklos Gergely <mg...@hortonworks.com>
Authored: Fri Jul 7 01:54:18 2017 +0200
Committer: Miklos Gergely <mg...@hortonworks.com>
Committed: Fri Jul 7 01:54:18 2017 +0200

----------------------------------------------------------------------
 .../config/zookeeper/LogSearchConfigZK.java     | 39 ++++++++++----------
 1 file changed, 19 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8e719f79/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
index 6d36203..fdd8ed6 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
@@ -97,7 +97,6 @@ public class LogSearchConfigZK implements LogSearchConfig {
   private static final String ZK_ROOT_NODE_PROPERTY = "logsearch.config.zk_root";
 
   private Map<String, String> properties;
-  private String root;
   private CuratorFramework client;
   private TreeCache cache;
   private Gson gson;
@@ -106,29 +105,29 @@ public class LogSearchConfigZK implements LogSearchConfig {
   public void init(Component component, Map<String, String> properties, String clusterName) throws Exception {
     this.properties = properties;
     
-    LOG.info("Connecting to ZooKeeper at " + properties.get(ZK_CONNECT_STRING_PROPERTY));
+    String root = MapUtils.getString(properties, ZK_ROOT_NODE_PROPERTY, DEFAULT_ZK_ROOT);
+    LOG.info("Connecting to ZooKeeper at " + properties.get(ZK_CONNECT_STRING_PROPERTY) + root);
     client = CuratorFrameworkFactory.builder()
-        .connectString(properties.get(ZK_CONNECT_STRING_PROPERTY))
+        .connectString(properties.get(ZK_CONNECT_STRING_PROPERTY) + root)
         .retryPolicy(new ExponentialBackoffRetry(1000, 3))
         .connectionTimeoutMs(CONNECTION_TIMEOUT)
         .sessionTimeoutMs(SESSION_TIMEOUT)
         .build();
     client.start();
 
-    root = MapUtils.getString(properties, ZK_ROOT_NODE_PROPERTY, DEFAULT_ZK_ROOT);
 
     if (component == Component.SERVER) {
-      if (client.checkExists().forPath(root) == null) {
-        client.create().creatingParentContainersIfNeeded().forPath(root);
+      if (client.checkExists().forPath("/") == null) {
+        client.create().creatingParentContainersIfNeeded().forPath("/");
       }
-      cache = new TreeCache(client, root);
+      cache = new TreeCache(client, "/");
       cache.start();
     } else {
-      while (client.checkExists().forPath(root) == null) {
+      while (client.checkExists().forPath("/") == null) {
         LOG.info("Root node is not present yet, going to sleep for " + WAIT_FOR_ROOT_SLEEP_SECONDS + " seconds");
         Thread.sleep(WAIT_FOR_ROOT_SLEEP_SECONDS * 1000);
       }
-      cache = new TreeCache(client, String.format("%s/%s", root, clusterName));
+      cache = new TreeCache(client, String.format("/%s", clusterName));
     }
     
     gson = new GsonBuilder().setDateFormat(DATE_FORMAT).create();
@@ -136,13 +135,13 @@ public class LogSearchConfigZK implements LogSearchConfig {
 
   @Override
   public boolean inputConfigExists(String clusterName, String serviceName) throws Exception {
-    String nodePath = root + "/" + clusterName + "/input/" + serviceName;
+    String nodePath = String.format("/%s/input/%s", clusterName, serviceName);
     return cache.getCurrentData(nodePath) != null;
   }
 
   @Override
   public void createInputConfig(String clusterName, String serviceName, String inputConfig) throws Exception {
-    String nodePath = String.format("%s/%s/input/%s", root, clusterName, serviceName);
+    String nodePath = String.format("/%s/input/%s", clusterName, serviceName);
     try {
       client.create().creatingParentContainersIfNeeded().withACL(getAcls()).forPath(nodePath, inputConfig.getBytes());
       LOG.info("Uploaded input config for the service " + serviceName + " for cluster " + clusterName);
@@ -153,7 +152,7 @@ public class LogSearchConfigZK implements LogSearchConfig {
 
   @Override
   public void setInputConfig(String clusterName, String serviceName, String inputConfig) throws Exception {
-    String nodePath = String.format("%s/%s/input/%s", root, clusterName, serviceName);
+    String nodePath = String.format("/%s/input/%s", clusterName, serviceName);
     client.setData().forPath(nodePath, inputConfig.getBytes());
     LOG.info("Set input config for the service " + serviceName + " for cluster " + clusterName);
   }
@@ -182,7 +181,7 @@ public class LogSearchConfigZK implements LogSearchConfig {
         String nodeData = new String(event.getData().getData());
         Type eventType = event.getType();
         
-        String configPathStab = String.format("%s/%s/", root, clusterName);
+        String configPathStab = String.format("/%s/", clusterName);
         
         if (event.getData().getPath().startsWith(configPathStab + "input/")) {
           handleInputConfigChange(eventType, nodeName, nodeData);
@@ -267,7 +266,7 @@ public class LogSearchConfigZK implements LogSearchConfig {
   }
 
   private void createGlobalConfigNode(JsonArray globalConfigNode, String clusterName) {
-    String globalConfigNodePath = String.format("%s/%s/global", root, clusterName);
+    String globalConfigNodePath = String.format("/%s/global", clusterName);
     String data = InputConfigGson.gson.toJson(globalConfigNode);
     
     try {
@@ -283,14 +282,14 @@ public class LogSearchConfigZK implements LogSearchConfig {
 
   @Override
   public List<String> getServices(String clusterName) {
-    String parentPath = String.format("%s/%s/input", root, clusterName);
+    String parentPath = String.format("/%s/input", clusterName);
     Map<String, ChildData> serviceNodes = cache.getCurrentChildren(parentPath);
     return new ArrayList<String>(serviceNodes.keySet());
   }
 
   @Override
   public String getGlobalConfigs(String clusterName) {
-    String globalConfigNodePath = String.format("%s/%s/global", root, clusterName);
+    String globalConfigNodePath = String.format("/%s/global", clusterName);
     return new String(cache.getCurrentData(globalConfigNodePath).getData());
   }
 
@@ -300,13 +299,13 @@ public class LogSearchConfigZK implements LogSearchConfig {
     JsonArray globalConfigs = (JsonArray) new JsonParser().parse(globalConfigData);
     InputAdapter.setGlobalConfigs(globalConfigs);
     
-    ChildData childData = cache.getCurrentData(String.format("%s/%s/input/%s", root, clusterName, serviceName));
+    ChildData childData = cache.getCurrentData(String.format("/%s/input/%s", clusterName, serviceName));
     return childData == null ? null : InputConfigGson.gson.fromJson(new String(childData.getData()), InputConfigImpl.class);
   }
 
   @Override
   public void createLogLevelFilter(String clusterName, String logId, LogLevelFilter filter) throws Exception {
-    String nodePath = String.format("%s/%s/loglevelfilter/%s", root, clusterName, logId);
+    String nodePath = String.format("/%s/loglevelfilter/%s", clusterName, logId);
     String logLevelFilterJson = gson.toJson(filter);
     try {
       client.create().creatingParentContainersIfNeeded().withACL(getAcls()).forPath(nodePath, logLevelFilterJson.getBytes());
@@ -319,7 +318,7 @@ public class LogSearchConfigZK implements LogSearchConfig {
   @Override
   public void setLogLevelFilters(String clusterName, LogLevelFilterMap filters) throws Exception {
     for (Map.Entry<String, LogLevelFilter> e : filters.getFilter().entrySet()) {
-      String nodePath = String.format("%s/%s/loglevelfilter/%s", root, clusterName, e.getKey());
+      String nodePath = String.format("/%s/loglevelfilter/%s", clusterName, e.getKey());
       String logLevelFilterJson = gson.toJson(e.getValue());
       String currentLogLevelFilterJson = new String(cache.getCurrentData(nodePath).getData());
       if (!logLevelFilterJson.equals(currentLogLevelFilterJson)) {
@@ -331,7 +330,7 @@ public class LogSearchConfigZK implements LogSearchConfig {
 
   @Override
   public LogLevelFilterMap getLogLevelFilters(String clusterName) {
-    String parentPath = String.format("%s/%s/loglevelfilter", root, clusterName);
+    String parentPath = String.format("/%s/loglevelfilter", clusterName);
     Map<String, ChildData> logLevelFilterNodes = cache.getCurrentChildren(parentPath);
     TreeMap<String, LogLevelFilter> filters = new TreeMap<>();
     for (Map.Entry<String, ChildData> e : logLevelFilterNodes.entrySet()) {


[03/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/status_params.py
deleted file mode 100644
index 34d0082..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/status_params.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.default import default
-from resource_management.libraries.functions.version import format_stack_version
-from resource_management.libraries.functions.stack_features import check_stack_feature
-from resource_management.libraries.functions import StackFeature
-
-config  = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-
-stack_name = default("/hostLevelParams/stack_name", None)
-stack_version_unformatted = config['hostLevelParams']['stack_version']
-stack_version_formatted = format_stack_version(stack_version_unformatted)
-stack_supports_pid = stack_version_formatted and check_stack_feature(StackFeature.RANGER_KMS_PID_SUPPORT, stack_version_formatted)
-ranger_kms_pid_dir = default("/configurations/kms-env/ranger_kms_pid_dir", "/var/run/ranger_kms")
-ranger_kms_pid_file = format('{ranger_kms_pid_dir}/rangerkms.pid')
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/upgrade.py
deleted file mode 100644
index 8478bb8..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/upgrade.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-from resource_management.core.resources.system import Execute
-from resource_management.libraries.functions import conf_select
-from resource_management.libraries.functions import stack_select
-from resource_management.libraries.functions.format import format
-
-def prestart(env, stack_component):
-  import params
-
-  if params.version and params.stack_supports_config_versioning:
-    conf_select.select(params.stack_name, stack_component, params.version)
-    stack_select.select(stack_component, params.version)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/templates/input.config-ranger-kms.json.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/templates/input.config-ranger-kms.json.j2 b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/templates/input.config-ranger-kms.json.j2
deleted file mode 100644
index 306fade..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/templates/input.config-ranger-kms.json.j2
+++ /dev/null
@@ -1,48 +0,0 @@
-{#
- # 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.
- #}
-{
-  "input":[
-    {
-      "type":"ranger_kms",
-      "rowtype":"service",
-      "path":"{{default('/configurations/kms-env/kms_log_dir', '/var/log/ranger/kms')}}/kms.log"
-    }
-  ],
-  "filter":[
-    {
-      "filter":"grok",
-      "conditions":{
-        "fields":{
-          "type":[
-            "ranger_kms"
-          ]
-        }
-      },
-      "log4j_format":"%d{ISO8601} %-5p %c{1} - %m%n",
-      "multiline_pattern":"^(%{TIMESTAMP_ISO8601:logtime})",
-      "message_pattern":"(?m)^%{TIMESTAMP_ISO8601:logtime}%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVACLASS:logger_name}%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}",
-      "post_map_values":{
-        "logtime":{
-          "map_date":{
-            "target_date_pattern":"yyyy-MM-dd HH:mm:ss,SSS"
-          }
-        }
-      }
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/role_command_order.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/role_command_order.json b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/role_command_order.json
deleted file mode 100644
index 7ddab41..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/role_command_order.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "general_deps" : {
-    "_comment" : "dependencies for RANGER-KMS",
-    "RANGER_KMS_SERVER-START" : ["RANGER_ADMIN-START", "NAMENODE-START"],
-    "RANGER_KMS_SERVICE_CHECK-SERVICE_CHECK" : ["RANGER_KMS_SERVER-START"]
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/service_advisor.py
deleted file mode 100644
index 9c33218..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/service_advisor.py
+++ /dev/null
@@ -1,281 +0,0 @@
-#!/usr/bin/env ambari-python-wrap
-"""
-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.
-"""
-
-# Python imports
-import imp
-import os
-import traceback
-import re
-import socket
-import fnmatch
-
-
-from resource_management.core.logger import Logger
-
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/')
-PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
-
-try:
-  with open(PARENT_FILE, 'rb') as fp:
-    service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
-except Exception as e:
-  traceback.print_exc()
-  print "Failed to load parent"
-
-class RangerKMSServiceAdvisor(service_advisor.ServiceAdvisor):
-
-  def __init__(self, *args, **kwargs):
-    self.as_super = super(RangerKMSServiceAdvisor, self)
-    self.as_super.__init__(*args, **kwargs)
-
-    # Always call these methods
-    self.modifyMastersWithMultipleInstances()
-    self.modifyCardinalitiesDict()
-    self.modifyHeapSizeProperties()
-    self.modifyNotValuableComponents()
-    self.modifyComponentsNotPreferableOnServer()
-    self.modifyComponentLayoutSchemes()
-
-  def modifyMastersWithMultipleInstances(self):
-    """
-    Modify the set of masters with multiple instances.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def modifyCardinalitiesDict(self):
-    """
-    Modify the dictionary of cardinalities.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def modifyHeapSizeProperties(self):
-    """
-    Modify the dictionary of heap size properties.
-    Must be overriden in child class.
-    """
-    pass
-
-  def modifyNotValuableComponents(self):
-    """
-    Modify the set of components whose host assignment is based on other services.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def modifyComponentsNotPreferableOnServer(self):
-    """
-    Modify the set of components that are not preferable on the server.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def modifyComponentLayoutSchemes(self):
-    """
-    Modify layout scheme dictionaries for components.
-    The scheme dictionary basically maps the number of hosts to
-    host index where component should exist.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def getServiceComponentLayoutValidations(self, services, hosts):
-    """
-    Get a list of errors.
-    Must be overriden in child class.
-    """
-
-    return []
-
-  def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts):
-    """
-    Entry point.
-    Must be overriden in child class.
-    """
-    #Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
-    #            (self.__class__.__name__, inspect.stack()[0][3]))
-
-    recommender = RangerKMSRecommender()
-    recommender.recommendRangerKMSConfigurationsFromHDP23(configurations, clusterData, services, hosts)
-    recommender.recommendRangerKMSConfigurationsFromHDP25(configurations, clusterData, services, hosts)
-
-
-
-  def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
-    """
-    Entry point.
-    Validate configurations for the service. Return a list of errors.
-    The code for this function should be the same for each Service Advisor.
-    """
-    #Logger.info("Class: %s, Method: %s. Validating Configurations." %
-    #            (self.__class__.__name__, inspect.stack()[0][3]))
-
-    validator = RangerKMSValidator()
-    # Calls the methods of the validator using arguments,
-    # method(siteProperties, siteRecommendations, configurations, services, hosts)
-    return validator.validateListOfConfigUsingMethod(configurations, recommendedDefaults, services, hosts, validator.validators)
-
-
-
-class RangerKMSRecommender(service_advisor.ServiceAdvisor):
-  """
-  RangerKMS Recommender suggests properties when adding the service for the first time or modifying configs via the UI.
-  """
-
-  def __init__(self, *args, **kwargs):
-    self.as_super = super(RangerKMSRecommender, self)
-    self.as_super.__init__(*args, **kwargs)
-
-
-  def recommendRangerKMSConfigurationsFromHDP23(self, configurations, clusterData, services, hosts):
-    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
-    putRangerKmsDbksProperty = self.putProperty(configurations, "dbks-site", services)
-    putRangerKmsProperty = self.putProperty(configurations, "kms-properties", services)
-    kmsEnvProperties = self.getSiteProperties(services['configurations'], 'kms-env')
-    putCoreSiteProperty = self.putProperty(configurations, "core-site", services)
-    putCoreSitePropertyAttribute = self.putPropertyAttribute(configurations, "core-site")
-    putRangerKmsAuditProperty = self.putProperty(configurations, "ranger-kms-audit", services)
-    security_enabled = self.isSecurityEnabled(services)
-    putRangerKmsSiteProperty = self.putProperty(configurations, "kms-site", services)
-    putRangerKmsSitePropertyAttribute = self.putPropertyAttribute(configurations, "kms-site")
-
-    if 'kms-properties' in services['configurations'] and ('DB_FLAVOR' in services['configurations']['kms-properties']['properties']):
-
-      rangerKmsDbFlavor = services['configurations']["kms-properties"]["properties"]["DB_FLAVOR"]
-
-      if ('db_host' in services['configurations']['kms-properties']['properties']) and ('db_name' in services['configurations']['kms-properties']['properties']):
-
-        rangerKmsDbHost =   services['configurations']["kms-properties"]["properties"]["db_host"]
-        rangerKmsDbName =   services['configurations']["kms-properties"]["properties"]["db_name"]
-
-        ranger_kms_db_url_dict = {
-          'MYSQL': {'ranger.ks.jpa.jdbc.driver': 'com.mysql.jdbc.Driver',
-                    'ranger.ks.jpa.jdbc.url': 'jdbc:mysql://' + self.getDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost) + '/' + rangerKmsDbName},
-          'ORACLE': {'ranger.ks.jpa.jdbc.driver': 'oracle.jdbc.driver.OracleDriver',
-                     'ranger.ks.jpa.jdbc.url': 'jdbc:oracle:thin:@' + self.getOracleDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost, rangerKmsDbName)},
-          'POSTGRES': {'ranger.ks.jpa.jdbc.driver': 'org.postgresql.Driver',
-                       'ranger.ks.jpa.jdbc.url': 'jdbc:postgresql://' + self.getDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost) + '/' + rangerKmsDbName},
-          'MSSQL': {'ranger.ks.jpa.jdbc.driver': 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
-                    'ranger.ks.jpa.jdbc.url': 'jdbc:sqlserver://' + self.getDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost) + ';databaseName=' + rangerKmsDbName},
-          'SQLA': {'ranger.ks.jpa.jdbc.driver': 'sap.jdbc4.sqlanywhere.IDriver',
-                   'ranger.ks.jpa.jdbc.url': 'jdbc:sqlanywhere:host=' + self.getDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost) + ';database=' + rangerKmsDbName}
-        }
-
-        rangerKmsDbProperties = ranger_kms_db_url_dict.get(rangerKmsDbFlavor, ranger_kms_db_url_dict['MYSQL'])
-        for key in rangerKmsDbProperties:
-          putRangerKmsDbksProperty(key, rangerKmsDbProperties.get(key))
-
-    if kmsEnvProperties and self.checkSiteProperties(kmsEnvProperties, 'kms_user') and 'KERBEROS' in servicesList:
-      kmsUser = kmsEnvProperties['kms_user']
-      kmsUserOld = self.getOldValue(services, 'kms-env', 'kms_user')
-      self.put_proxyuser_value(kmsUser, '*', is_groups=True, services=services, configurations=configurations, put_function=putCoreSiteProperty)
-      if kmsUserOld is not None and kmsUser != kmsUserOld:
-        putCoreSitePropertyAttribute("hadoop.proxyuser.{0}.groups".format(kmsUserOld), 'delete', 'true')
-        services["forced-configurations"].append({"type" : "core-site", "name" : "hadoop.proxyuser.{0}.groups".format(kmsUserOld)})
-        services["forced-configurations"].append({"type" : "core-site", "name" : "hadoop.proxyuser.{0}.groups".format(kmsUser)})
-
-    if "HDFS" in servicesList:
-      if 'core-site' in services['configurations'] and ('fs.defaultFS' in services['configurations']['core-site']['properties']):
-        default_fs = services['configurations']['core-site']['properties']['fs.defaultFS']
-        putRangerKmsAuditProperty('xasecure.audit.destination.hdfs.dir', '{0}/{1}/{2}'.format(default_fs,'ranger','audit'))
-
-    required_services = [{'service' : 'YARN', 'config-type': 'yarn-env', 'property-name': 'yarn_user', 'proxy-category': ['hosts', 'users', 'groups']},
-                         {'service' : 'SPARK', 'config-type': 'livy-env', 'property-name': 'livy_user', 'proxy-category': ['hosts', 'users', 'groups']}]
-
-    required_services_for_secure = [{'service' : 'HIVE', 'config-type': 'hive-env', 'property-name': 'hive_user', 'proxy-category': ['hosts', 'users']},
-                                    {'service' : 'OOZIE', 'config-type': 'oozie-env', 'property-name': 'oozie_user', 'proxy-category': ['hosts', 'users']}]
-
-    if security_enabled:
-      required_services.extend(required_services_for_secure)
-
-    # recommendations for kms proxy related properties
-    self.recommendKMSProxyUsers(configurations, services, hosts, required_services)
-
-    ambari_user = self.getAmbariUser(services)
-    if security_enabled:
-      # adding for ambari user
-      putRangerKmsSiteProperty('hadoop.kms.proxyuser.{0}.users'.format(ambari_user), '*')
-      putRangerKmsSiteProperty('hadoop.kms.proxyuser.{0}.hosts'.format(ambari_user), '*')
-      # adding for HTTP
-      putRangerKmsSiteProperty('hadoop.kms.proxyuser.HTTP.users', '*')
-      putRangerKmsSiteProperty('hadoop.kms.proxyuser.HTTP.hosts', '*')
-    else:
-      self.deleteKMSProxyUsers(configurations, services, hosts, required_services_for_secure)
-      # deleting ambari user proxy properties
-      putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.hosts'.format(ambari_user), 'delete', 'true')
-      putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.users'.format(ambari_user), 'delete', 'true')
-      # deleting HTTP proxy properties
-      putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.HTTP.hosts', 'delete', 'true')
-      putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.HTTP.users', 'delete', 'true')
-
-
-  def recommendRangerKMSConfigurationsFromHDP25(self, configurations, clusterData, services, hosts):
-
-    security_enabled = self.isSecurityEnabled(services)
-    required_services = [{'service' : 'RANGER', 'config-type': 'ranger-env', 'property-name': 'ranger_user', 'proxy-category': ['hosts', 'users', 'groups']}]
-
-    if security_enabled:
-      # recommendations for kms proxy related properties
-      self.recommendKMSProxyUsers(configurations, services, hosts, required_services)
-    else:
-      self.deleteKMSProxyUsers(configurations, services, hosts, required_services)
-
-
-
-  def recommendRangerKMSConfigurations(self, configurations, clusterData, services, hosts):
-    putRangerKmsEnvProperty = self.putProperty(configurations, "kms-env", services)
-
-    ranger_kms_ssl_enabled = False
-    ranger_kms_ssl_port = "9393"
-    if 'ranger-kms-site' in services['configurations'] and 'ranger.service.https.attrib.ssl.enabled' in services['configurations']['ranger-kms-site']['properties']:
-      ranger_kms_ssl_enabled = services['configurations']['ranger-kms-site']['properties']['ranger.service.https.attrib.ssl.enabled'].lower() == "true"
-
-    if 'ranger-kms-site' in services['configurations'] and 'ranger.service.https.port' in services['configurations']['ranger-kms-site']['properties']:
-      ranger_kms_ssl_port = services['configurations']['ranger-kms-site']['properties']['ranger.service.https.port']
-
-    if ranger_kms_ssl_enabled:
-      putRangerKmsEnvProperty("kms_port", ranger_kms_ssl_port)
-    else:
-      putRangerKmsEnvProperty("kms_port", "9292")
-
-
-
-class RangerKMSValidator(service_advisor.ServiceAdvisor):
-  """
-  RangerKMS Validator checks the correctness of properties whenever the service is first added or the user attempts to
-  change configs via the UI.
-  """
-
-  def __init__(self, *args, **kwargs):
-    self.as_super = super(RangerKMSValidator, self)
-    self.as_super.__init__(*args, **kwargs)
-
-    self.validators = []
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/themes/theme_version_1.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/themes/theme_version_1.json b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/themes/theme_version_1.json
deleted file mode 100644
index c08a56c..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/themes/theme_version_1.json
+++ /dev/null
@@ -1,303 +0,0 @@
-{
-  "name": "default",
-  "description": "Default theme for Ranger KMS service",
-  "configuration": {
-    "layouts": [
-    {
-        "name": "default",
-        "tabs": [
-          {
-            "name": "db_settings",
-            "display-name": "Settings",
-            "layout": {
-              "tab-columns": "2",
-              "tab-rows": "2",
-              "sections": [
-                {
-                  "name": "section-db-settings",
-                  "display-name": "",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "4",
-                  "column-span": "2",
-                  "section-columns": "2",
-                  "section-rows": "4",
-                  "subsections": [
-                    {
-                      "name": "subsection-kms-db-row1-col1",
-                      "display-name": "Ranger KMS DB",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-kms-db-row1-col2",
-                      "row-index": "0",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-kms-create-db-user-row2-col",
-                      "display-name": "Setup Database and Database User",
-                      "row-index": "1",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "2"
-                    },
-                    {
-                      "name": "subsection-kms-db-root-user-row3-col1",
-                      "display-name": "Ranger KMS Root DB",
-                      "row-index": "2",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1",
-                      "depends-on": [
-                        {
-                          "configs":[
-                            "kms-env/create_db_user"
-                          ],
-                          "if": "${kms-env/create_db_user}",
-                          "then": {
-                            "property_value_attributes": {
-                              "visible": true
-                            }
-                          },
-                          "else": {
-                            "property_value_attributes": {
-                              "visible": false
-                            }
-                          }
-                        }
-                      ]
-                    },
-                    {
-                      "name": "subsection-kms-db-root-user-row3-col2",
-                      "row-index": "2",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1",
-                      "depends-on": [
-                        {
-                          "configs":[
-                            "kms-env/create_db_user"
-                          ],
-                          "if": "${kms-env/create_db_user}",
-                          "then": {
-                            "property_value_attributes": {
-                              "visible": true
-                            }
-                          },
-                          "else": {
-                            "property_value_attributes": {
-                              "visible": false
-                            }
-                          }
-                        }
-                      ]
-                    },
-                    {
-                      "name": "subsection-kms-master-row4-col",
-                      "display-name": "KMS Master Secret Password",
-                      "row-index": "3",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "2"
-                    }
-                  ]
-                }
-              ]
-            }
-          }
-        ]
-      }
-    ],
-    "placement": {
-      "configuration-layout": "default",
-      "configs": [
-        {
-          "config": "kms-properties/DB_FLAVOR",
-          "subsection-name": "subsection-kms-db-row1-col1"
-        },
-        {
-          "config": "kms-properties/db_name",
-          "subsection-name": "subsection-kms-db-row1-col1"
-        },
-        {
-          "config": "dbks-site/ranger.ks.jpa.jdbc.url",
-          "subsection-name": "subsection-kms-db-row1-col1"
-        },
-        {
-          "config": "kms-properties/db_user",
-          "subsection-name": "subsection-kms-db-row1-col1"
-        },
-        {
-          "config": "kms-properties/db_host",
-          "subsection-name": "subsection-kms-db-row1-col2"
-        },
-        {
-          "config": "kms-properties/SQL_CONNECTOR_JAR",
-          "subsection-name": "subsection-kms-db-row1-col2",
-          "depends-on" : [
-            {
-              "configs":[
-                "kms-properties/DB_FLAVOR"
-              ],
-              "if": "${kms-properties/DB_FLAVOR} === SQLA",
-              "then": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "dbks-site/ranger.ks.jpa.jdbc.driver",
-          "subsection-name": "subsection-kms-db-row1-col2"
-        },
-        {
-          "config": "kms-properties/db_password",
-          "subsection-name": "subsection-kms-db-row1-col2"
-        },
-        {
-          "config": "kms-properties/db_root_user",
-          "subsection-name": "subsection-kms-db-root-user-row3-col1"
-        },
-        {
-          "config": "kms-properties/db_root_password",
-          "subsection-name": "subsection-kms-db-root-user-row3-col2"
-        },
-        {
-          "config": "kms-properties/KMS_MASTER_KEY_PASSWD",
-          "subsection-name": "subsection-kms-master-row4-col"
-        },
-        {
-          "config" : "kms-env/create_db_user",
-          "subsection-name": "subsection-kms-create-db-user-row2-col"
-        },
-        {
-          "config": "kms-env/test_db_kms_connection",
-          "subsection-name": "subsection-kms-create-db-user-row2-col",
-          "property_value_attributes": {
-            "ui_only_property": true
-          },
-          "depends-on": [
-            {
-              "configs":[
-                "kms-env/create_db_user"
-              ],
-              "if": "${kms-env/create_db_user}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              }
-            }
-          ]
-        }
-      ]
-    },
-    "widgets": [
-      {
-        "config": "kms-properties/DB_FLAVOR",
-        "widget": {
-          "type": "combo"
-        }
-      },
-      {
-        "config": "kms-properties/db_user",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "kms-properties/db_name",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "kms-properties/SQL_CONNECTOR_JAR",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "kms-properties/db_root_user",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "kms-properties/db_host",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "kms-properties/db_password",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "kms-properties/db_root_password",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "kms-properties/KMS_MASTER_KEY_PASSWD",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "kms-env/create_db_user",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "kms-env/test_db_kms_connection",
-        "widget": {
-          "type": "test-db-connection",
-          "display-name": "Test Connection",
-          "required-properties": {
-            "jdbc.driver.class": "dbks-site/ranger.ks.jpa.jdbc.driver",
-            "jdbc.driver.url": "dbks-site/ranger.ks.jpa.jdbc.url",
-            "db.connection.source.host": "ranger_kms-site/ranger_kms_server_hosts",
-            "db.type": "kms-properties/DB_FLAVOR",
-            "db.connection.destination.host": "kms-properties/db_host",
-            "db.connection.user": "kms-properties/db_user",
-            "db.connection.password": "kms-properties/db_password"
-          }
-        }
-      },
-      {
-        "config": "dbks-site/ranger.ks.jpa.jdbc.driver",
-        "widget" : {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "dbks-site/ranger.ks.jpa.jdbc.url",
-        "widget": {
-          "type": "text-field"
-        }
-      }
-    ]
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/themes/theme_version_2.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/themes/theme_version_2.json b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/themes/theme_version_2.json
deleted file mode 100644
index be50dad..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/themes/theme_version_2.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
-  "configuration": {
-    "layouts": [
-      {
-        "name": "default",
-        "tabs": [
-          {
-            "name": "kms_hsm",
-            "display-name": "KMS HSM",
-            "layout": {
-              "tab-columns": "1",
-              "tab-rows": "1",
-              "sections": [
-                {
-                  "name": "section-kms-hms",
-                  "display-name": "",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "2",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "2",
-                  "subsections": [
-                    {
-                      "name": "subsection-kms-hsm-row1-col1",
-                      "display-name": "Ranger KMS HSM Enabled",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-kms-hsm-row2-col1",
-                      "display-name": "Configuration Settings",
-                      "row-index": "1",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1",
-                      "depends-on": [
-                        {
-                          "configs": [
-                            "dbks-site/ranger.ks.hsm.enabled"
-                          ],
-                          "if": "${dbks-site/ranger.ks.hsm.enabled}",
-                          "then": {
-                            "property_value_attributes": {
-                              "visible": true
-                            }
-                          },
-                          "else": {
-                            "property_value_attributes": {
-                              "visible": false
-                            }
-                          }
-                        }
-                      ]
-                    }
-                  ]
-                }
-              ]
-            }
-          }
-        ]
-      }
-    ],
-    "placement": {
-      "configuration-layout": "default",
-      "configs": [
-        {
-          "config": "dbks-site/ranger.ks.hsm.enabled",
-          "subsection-name": "subsection-kms-hsm-row1-col1"
-        },
-        {
-          "config": "dbks-site/ranger.ks.hsm.type",
-          "subsection-name": "subsection-kms-hsm-row2-col1"
-        },
-        {
-          "config": "dbks-site/ranger.ks.hsm.partition.name",
-          "subsection-name": "subsection-kms-hsm-row2-col1"
-        },
-        {
-          "config": "dbks-site/ranger.ks.hsm.partition.password.alias",
-          "subsection-name": "subsection-kms-hsm-row2-col1"
-        },
-        {
-          "config": "kms-env/hsm_partition_password",
-          "subsection-name": "subsection-kms-hsm-row2-col1"
-        }
-      ]
-    },
-    "widgets": [
-      {
-        "config": "dbks-site/ranger.ks.hsm.enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "dbks-site/ranger.ks.hsm.type",
-        "widget": {
-          "type": "combo"
-        }
-      },
-      {
-        "config": "dbks-site/ranger.ks.hsm.partition.name",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "dbks-site/ranger.ks.hsm.partition.password.alias",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "kms-env/hsm_partition_password",
-        "widget": {
-          "type": "password"
-        }
-      }
-    ]
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/alerts.json b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/alerts.json
new file mode 100644
index 0000000..05c3fe6
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/alerts.json
@@ -0,0 +1,32 @@
+{
+  "RANGER_KMS": {
+    "service": [],
+    "RANGER_KMS_SERVER": [
+      {
+        "name": "ranger_kms_server_process",
+        "label": "Ranger KMS Server Process",
+        "description": "This host-level alert is triggered if the Ranger KMS Server cannot be determined to be up.",
+        "interval": 1,
+        "scope": "HOST",
+        "source": {
+          "type": "PORT",
+          "uri": "{{kms-env/kms_port}}",
+          "default_port": 9292,
+          "reporting": {
+            "ok": {
+              "text": "TCP OK - {0:.3f}s response on port {1}"
+            },
+            "warning": {
+              "text": "TCP OK - {0:.3f}s response on port {1}",
+              "value": 1.5
+            },
+            "critical": {
+              "text": "Connection failed: {0} to {1}:{2}",
+              "value": 5.0
+            }
+          }
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/dbks-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/dbks-site.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/dbks-site.xml
new file mode 100644
index 0000000..4ac20b3
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/dbks-site.xml
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>hadoop.kms.blacklist.DECRYPT_EEK</name>
+    <value>hdfs</value>
+    <description>Blacklist for decrypt EncryptedKey CryptoExtension operations</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.db.encrypt.key.password</name>
+    <value>_</value>
+    <property-type>PASSWORD</property-type>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <description>Password used for encrypting Master Key</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.jpa.jdbc.url</name>
+    <display-name>JDBC connect string</display-name>
+    <value>jdbc:mysql://localhost</value>
+    <description>URL for Database</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>kms-properties</type>
+        <name>DB_FLAVOR</name>
+      </property>
+      <property>
+        <type>kms-properties</type>
+        <name>db_host</name>
+      </property>
+      <property>
+        <type>kms-properties</type>
+        <name>db_name</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.jpa.jdbc.user</name>
+    <value>{{db_user}}</value>
+    <description>Database username used for operation</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.jpa.jdbc.password</name>
+    <value>_</value>
+    <property-type>PASSWORD</property-type>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <description>Database user's password</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.jpa.jdbc.credential.provider.path</name>
+    <value>/etc/ranger/kms/rangerkms.jceks</value>
+    <description>Credential provider path</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.jpa.jdbc.credential.alias</name>
+    <value>ranger.ks.jdbc.password</value>
+    <description>Credential alias used for password</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.masterkey.credential.alias</name>
+    <value>ranger.ks.masterkey.password</value>
+    <description>Credential alias used for masterkey</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.jpa.jdbc.dialect</name>
+    <value>{{jdbc_dialect}}</value>
+    <description>Dialect used for database</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.jpa.jdbc.driver</name>
+    <display-name>Driver class name for a JDBC Ranger KMS database</display-name>
+    <value>com.mysql.jdbc.Driver</value>
+    <description>Driver used for database</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>kms-properties</type>
+        <name>DB_FLAVOR</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.jdbc.sqlconnectorjar</name>
+    <value>{{ews_lib_jar_path}}</value>
+    <description>Driver used for database</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.hsm.type</name>
+    <display-name>HSM Type</display-name>
+    <value>LunaProvider</value>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>LunaProvider</value>
+          <label>Luna Provider</label>
+        </entry>
+      </entries>
+    </value-attributes>
+    <description>HSM type</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.hsm.enabled</name>
+    <display-name>HSM Enabled</display-name>
+    <value>false</value>
+    <description>Enable HSM ?</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.hsm.partition.name</name>
+    <display-name>HSM partition name. In case of HSM HA enter the group name</display-name>
+    <value>par19</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.hsm.partition.password</name>
+    <value>_</value>
+    <property-type>PASSWORD</property-type>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <description>HSM partition password</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.hsm.partition.password.alias</name>
+    <display-name>HSM partition password alias</display-name>
+    <value>ranger.kms.hsm.partition.password</value>
+    <description>HSM partition password alias</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.kerberos.principal</name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ks.kerberos.keytab</name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-env.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-env.xml
new file mode 100644
index 0000000..acecdfe
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-env.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_adding_forbidden="true">
+  <property>
+    <name>kms_user</name>
+    <display-name>Kms User</display-name>
+    <value>kms</value>
+    <property-type>USER</property-type>
+    <description>Kms username</description>
+    <value-attributes>
+      <type>user</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>kms_group</name>
+    <display-name>Kms group</display-name>
+    <value>kms</value>
+    <property-type>GROUP</property-type>
+    <description>Kms group</description>
+    <value-attributes>
+      <type>user</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>kms_log_dir</name>
+    <value>/var/log/ranger/kms</value>
+    <description/>
+    <value-attributes>
+      <type>directory</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>kms_port</name>
+    <value>9292</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+    <depends-on>
+      <property>
+        <type>ranger-kms-site</type>
+        <name>ranger.service.https.port</name>
+      </property>
+      <property>
+        <type>ranger-kms-site</type>
+        <name>ranger.service.https.attrib.ssl.enabled</name>
+      </property>
+    </depends-on>
+  </property>
+  <property>
+    <name>create_db_user</name>
+    <display-name>Setup Database and Database User</display-name>
+    <value>true</value>
+    <description>If set to Yes, Ambari will create and setup Ranger Database and Database User. This will require to specify Database Admin user and password</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hsm_partition_password</name>
+    <display-name>HSM partition password</display-name>
+    <value/>
+    <property-type>PASSWORD</property-type>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <description>HSM partition password</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_kms_pid_dir</name>
+    <value>/var/run/ranger_kms</value>
+    <description/>
+    <value-attributes>
+      <type>directory</type>
+      <overridable>false</overridable>
+      <editable-only-at-install>true</editable-only-at-install>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-log4j.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-log4j.xml
new file mode 100644
index 0000000..daae579
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-log4j.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_adding_forbidden="false">
+   <property>
+    <name>ranger_kms_log_maxfilesize</name>
+    <value>256</value>
+    <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>Ranger-kms Log: backup file size</display-name>
+    <value-attributes>
+      <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+   </property>
+   <property>
+    <name>ranger_kms_log_maxbackupindex</name>
+    <value>20</value>
+    <description>The number of backup files</description>
+    <display-name>Ranger-kms Log: # of backup files</display-name>
+    <value-attributes>
+      <type>int</type>
+      <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_kms_audit_log_maxfilesize</name>
+    <value>256</value>
+    <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>Ranger-kms Audit Log: backup file size</display-name>
+    <value-attributes>
+      <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+   </property>
+   <property>
+    <name>ranger_kms_audit_log_maxbackupindex</name>
+    <value>20</value>
+    <description>The number of backup files</description>
+    <display-name>Ranger-kms Audit Log: # of backup files</display-name>
+    <value-attributes>
+      <type>int</type>
+      <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>content</name>
+    <display-name>kms-log4j template</display-name>
+    <description>kms-log4j.properties</description>
+    <value>
+#
+# Licensed 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. See accompanying LICENSE file.
+#
+
+# If the Java System property 'kms.log.dir' is not defined at KMS start up time
+# Setup sets its value to '${kms.home}/logs'
+
+log4j.appender.kms=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.kms.DatePattern='.'yyyy-MM-dd
+log4j.appender.kms.File=${kms.log.dir}/kms.log
+log4j.appender.kms.Append=true
+log4j.appender.kms.layout=org.apache.log4j.PatternLayout
+log4j.appender.kms.layout.ConversionPattern=%d{ISO8601} %-5p %c{1} - %m%n
+log4j.appender.kms.MaxFileSize = {{ranger_kms_log_maxfilesize}}MB
+log4j.appender.kms.MaxBackupIndex = {{ranger_kms_log_maxbackupindex}}
+
+log4j.appender.kms-audit=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.kms-audit.DatePattern='.'yyyy-MM-dd
+log4j.appender.kms-audit.File=${kms.log.dir}/kms-audit.log
+log4j.appender.kms-audit.Append=true
+log4j.appender.kms-audit.layout=org.apache.log4j.PatternLayout
+log4j.appender.kms-audit.layout.ConversionPattern=%d{ISO8601} %m%n
+log4j.appender.kms-audit.MaxFileSize = {{ranger_kms_audit_log_maxfilesize}}MB
+log4j.appender.kms-audit.MaxBackupIndex = {{ranger_kms_audit_log_maxbackupindex}}
+
+log4j.logger.kms-audit=INFO, kms-audit
+log4j.additivity.kms-audit=false
+
+log4j.logger=INFO, kms
+log4j.additivity.kms=false
+log4j.rootLogger=INFO, kms
+log4j.logger.org.apache.hadoop.conf=ERROR
+log4j.logger.org.apache.hadoop=INFO
+log4j.logger.com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator=OFF
+    </value>
+    <value-attributes>
+      <type>content</type>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-properties.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-properties.xml
new file mode 100644
index 0000000..d2d4da5
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-properties.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>REPOSITORY_CONFIG_USERNAME</name>
+    <display-name>Repository config username</display-name>
+    <value>keyadmin</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>REPOSITORY_CONFIG_PASSWORD</name>
+    <display-name>Repository config password</display-name>
+    <value>keyadmin</value>
+    <property-type>PASSWORD</property-type>
+    <description/>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>DB_FLAVOR</name>
+    <display-name>DB FLAVOR</display-name>
+    <value>MYSQL</value>
+    <description>The database type to be used</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>MYSQL</value>
+          <label>MYSQL</label>
+        </entry>
+        <entry>
+          <value>ORACLE</value>
+          <label>ORACLE</label>
+        </entry>
+        <entry>
+          <value>POSTGRES</value>
+          <label>POSTGRES</label>
+        </entry>
+        <entry>
+          <value>MSSQL</value>
+          <label>MSSQL</label>
+        </entry>
+        <entry>
+          <value>SQLA</value>
+          <label>SQL Anywhere</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>SQL_CONNECTOR_JAR</name>
+    <display-name>SQL connector jar</display-name>
+    <value>{{driver_curl_target}}</value>
+    <description>Location of DB client library (please check the location of the jar file)</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>kms-properties</type>
+        <name>DB_FLAVOR</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false" update="false"/>
+  </property>
+  <property>
+    <name>db_root_user</name>
+    <display-name>Database Administrator (DBA) username</display-name>
+    <value>root</value>
+    <description>Database admin user. This user should have DBA permission to create the Ranger Database and Ranger Database User</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>db_root_password</name>
+    <display-name>Database Administrator (DBA) password</display-name>
+    <value/>
+    <property-type>PASSWORD</property-type>
+    <description>Database password for the database admin username</description>
+    <value-attributes>
+      <type>password</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>db_host</name>
+    <display-name>Ranger KMS DB host</display-name>
+    <value/>
+    <description>Database host</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>db_name</name>
+    <display-name>Ranger KMS DB name</display-name>
+    <value>rangerkms</value>
+    <description>Database name</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>db_user</name>
+    <display-name>Ranger KMS DB username</display-name>
+    <value>rangerkms</value>
+    <description>Database username used for the Ranger KMS schema</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>db_password</name>
+    <display-name>Ranger KMS DB password</display-name>
+    <value/>
+    <property-type>PASSWORD</property-type>
+    <description>Database password for the Ranger KMS schema</description>
+    <value-attributes>
+      <type>password</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>KMS_MASTER_KEY_PASSWD</name>
+    <display-name>KMS master key password</display-name>
+    <value/>
+    <property-type>PASSWORD</property-type>
+    <description/>
+    <value-attributes>
+      <type>password</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-site.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-site.xml
new file mode 100644
index 0000000..1e6f7b5
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-site.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>hadoop.kms.key.provider.uri</name>
+    <value>dbks://http@localhost:9292/kms</value>
+    <description>URI of the backing KeyProvider for the KMS.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.security.keystore.JavaKeyStoreProvider.password</name>
+    <value>none</value>
+    <description>If using the JavaKeyStoreProvider, the password for the keystore file.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.cache.enable</name>
+    <value>true</value>
+    <description>Whether the KMS will act as a cache for the backing KeyProvider. When the cache is enabled, operations like getKeyVersion, getMetadata, and getCurrentKey will sometimes return cached data without consulting the backing KeyProvider. Cached values are flushed when keys are deleted or modified.
+    </description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.cache.timeout.ms</name>
+    <value>600000</value>
+    <description>Expiry time for the KMS key version and key metadata cache, in milliseconds. This affects getKeyVersion and getMetadata.
+    </description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.current.key.cache.timeout.ms</name>
+    <value>30000</value>
+    <description>Expiry time for the KMS current key cache, in milliseconds. This affects getCurrentKey operations.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.audit.aggregation.window.ms</name>
+    <value>10000</value>
+    <description>Duplicate audit log events within the aggregation window (specified in ms) are quashed to reduce log traffic. A single message for aggregated events is printed at the end of the window, along with a count of the number of aggregated events.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.type</name>
+    <value>simple</value>
+    <description>Authentication type for the KMS. Can be either "simple" or "kerberos".
+    </description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.kerberos.keytab</name>
+    <value>${user.home}/kms.keytab</value>
+    <description>Path to the keytab with credentials for the configured Kerberos principal.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.kerberos.principal</name>
+    <value>HTTP/localhost</value>
+    <description>The Kerberos principal to use for the HTTP endpoint. The principal must start with 'HTTP/' as per the Kerberos HTTP SPNEGO specification.</description>
+    <property-type>KERBEROS_PRINCIPAL</property-type>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.kerberos.name.rules</name>
+    <value>DEFAULT</value>
+    <description>Rules used to resolve Kerberos principal names.</description>
+    <value-attributes>
+      <type>multiLine</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.signer.secret.provider</name>
+    <value>random</value>
+    <description>Indicates how the secret to sign the authentication cookies will be stored. Options are 'random' (default), 'string' and 'zookeeper'. If using a setup with multiple KMS instances, 'zookeeper' should be used.
+    </description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.path</name>
+    <value>/hadoop-kms/hadoop-auth-signature-secret</value>
+    <description>The Zookeeper ZNode path where the KMS instances will store and retrieve the secret from.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.connection.string</name>
+    <value>#HOSTNAME#:#PORT#,...</value>
+    <description>The Zookeeper connection string, a list of hostnames and port comma separated.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.auth.type</name>
+    <value>kerberos</value>
+    <description>The Zookeeper authentication type, 'none' or 'sasl' (Kerberos).</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab</name>
+    <value>/etc/hadoop/conf/kms.keytab</value>
+    <description>The absolute path for the Kerberos keytab with the credentials to connect to Zookeeper.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal</name>
+    <value>kms/#HOSTNAME#</value>
+    <description>The Kerberos service principal used to connect to Zookeeper.</description>
+    <property-type>KERBEROS_PRINCIPAL</property-type>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>hadoop.kms.security.authorization.manager</name>
+    <value>org.apache.ranger.authorization.kms.authorizer.RangerKmsAuthorizer</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-audit.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-audit.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-audit.xml
new file mode 100644
index 0000000..518120c
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-audit.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>xasecure.audit.is.enabled</name>
+    <value>true</value>
+    <description>Is Audit enabled?</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.hdfs</name>
+    <value>true</value>
+    <display-name>Audit to HDFS</display-name>
+    <description>Is Audit to HDFS enabled?</description>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.hdfs.dir</name>
+    <value>hdfs://NAMENODE_HOSTNAME:8020/ranger/audit</value>
+    <description>HDFS folder to write audit to, make sure the service user has requried permissions</description>
+    <depends-on>
+      <property>
+        <type>core-site</type>
+        <name>fs.defaultFS</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.hdfs.batch.filespool.dir</name>
+    <value>/var/log/ranger/kms/audit/hdfs/spool</value>
+    <description>/var/log/ranger/kms/audit/hdfs/spool</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.solr</name>
+    <value>true</value>
+    <display-name>Audit to SOLR</display-name>
+    <description>Is Solr audit enabled?</description>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.solr.batch.filespool.dir</name>
+    <value>/var/log/ranger/kms/audit/solr/spool</value>
+    <description>/var/log/ranger/kms/audit/solr/spool</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.provider.summary.enabled</name>
+    <value>false</value>
+    <display-name>Audit provider summary enabled</display-name>
+    <description>Enable Summary audit?</description>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.solr.urls</name>
+    <value>{{ranger_audit_solr_urls}}</value>
+    <description>Solr URL</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>ranger-admin-site</type>
+        <name>ranger.audit.solr.urls</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.solr.zookeepers</name>
+    <value>none</value>
+    <description>Solr Zookeeper string</description>
+    <depends-on>
+      <property>
+        <type>ranger-admin-site</type>
+        <name>ranger.audit.solr.zookeepers</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.plugin.kms.ambari.cluster.name</name>
+    <value>{{cluster_name}}</value>
+    <description>Capture cluster name from where Ranger kms plugin is enabled.</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-policymgr-ssl.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-policymgr-ssl.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-policymgr-ssl.xml
new file mode 100644
index 0000000..a89a1a7
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-policymgr-ssl.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.keystore.password</name>
+    <value>myKeyFilePassword</value>
+    <property-type>PASSWORD</property-type>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <description>password for keystore</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.truststore.password</name>
+    <value>changeit</value>
+    <property-type>PASSWORD</property-type>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <description>java truststore password</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.policymgr.clientssl.keystore.credential.file</name>
+    <value>jceks://file{{credential_file}}</value>
+    <description>java keystore credential file</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.policymgr.clientssl.truststore.credential.file</name>
+    <value>jceks://file{{credential_file}}</value>
+    <description>java truststore credential file</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.policymgr.clientssl.keystore</name>
+    <value>/etc/security/serverKeys/ranger-plugin-keystore.jks</value>
+    <description>Java Keystore files</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.policymgr.clientssl.truststore</name>
+    <value>/etc/security/serverKeys/ranger-plugin-truststore.jks</value>
+    <description>java truststore file</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-security.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-security.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-security.xml
new file mode 100644
index 0000000..13adcb4
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-security.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>ranger.plugin.kms.service.name</name>
+    <value>{{repo_name}}</value>
+    <description>Name of the Ranger service containing policies for this kms instance</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.plugin.kms.policy.source.impl</name>
+    <value>org.apache.ranger.admin.client.RangerAdminRESTClient</value>
+    <description>Class to retrieve policies from the source</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.plugin.kms.policy.rest.url</name>
+    <value>{{policymgr_mgr_url}}</value>
+    <description>URL to Ranger Admin</description>
+    <on-ambari-upgrade add="false"/>
+    <depends-on>
+      <property>
+        <type>admin-properties</type>
+        <name>policymgr_external_url</name>
+      </property>
+    </depends-on>
+  </property>
+  <property>
+    <name>ranger.plugin.kms.policy.rest.ssl.config.file</name>
+    <value>/etc/ranger/kms/conf/ranger-policymgr-ssl.xml</value>
+    <description>Path to the file containing SSL details to contact Ranger Admin</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.plugin.kms.policy.pollIntervalMs</name>
+    <value>30000</value>
+    <description>How often to poll for changes in policies?</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.plugin.kms.policy.cache.dir</name>
+    <value>/etc/ranger/{{repo_name}}/policycache</value>
+    <description>Directory where Ranger policies are cached after successful retrieval from the source</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-site.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-site.xml
new file mode 100644
index 0000000..8d0a351
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/ranger-kms-site.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>ranger.service.host</name>
+    <value>{{kms_host}}</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.http.port</name>
+    <value>{{kms_port}}</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.https.port</name>
+    <value>9393</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.shutdown.port</name>
+    <value>7085</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.contextName</name>
+    <value>/kms</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xa.webapp.dir</name>
+    <value>./webapp</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.ssl.enabled</name>
+    <value>false</value>
+    <description/>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.keystore.file</name>
+    <value>/etc/security/serverKeys/ranger-kms-keystore.jks</value>
+    <on-ambari-upgrade add="false"/>
+    <description/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.client.auth</name>
+    <value>want</value>
+    <on-ambari-upgrade add="false"/>
+    <description/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.keystore.keyalias</name>
+    <value>rangerkms</value>
+    <on-ambari-upgrade add="false"/>
+    <description/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.keystore.pass</name>
+    <value>rangerkms</value>
+    <property-type>PASSWORD</property-type>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+    <description/>
+  </property>
+  <property>
+    <name>ranger.credential.provider.path</name>
+    <value>/etc/ranger/kms/rangerkms.jceks</value>
+    <on-ambari-upgrade add="false"/>
+    <description/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.keystore.credential.alias</name>
+    <value>keyStoreCredentialAlias</value>
+    <on-ambari-upgrade add="false"/>
+    <description/>
+  </property>
+  <property>
+    <name>ajp.enabled</name>
+    <value>false</value>
+    <on-ambari-upgrade add="false"/>
+    <description/>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/kerberos.json b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/kerberos.json
new file mode 100644
index 0000000..a54783e
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/kerberos.json
@@ -0,0 +1,84 @@
+{
+  "services": [
+    {
+      "name": "RANGER_KMS",
+      "identities": [
+        {
+          "name": "/spnego",
+          "keytab": {
+            "configuration": "kms-site/hadoop.kms.authentication.kerberos.keytab"
+          }
+        },
+        {
+          "name": "/smokeuser"
+        }
+      ],
+      "auth_to_local_properties" : [
+        "kms-site/hadoop.kms.authentication.kerberos.name.rules"
+      ],
+      "configurations": [
+        {
+          "kms-site": {
+            "hadoop.kms.authentication.type": "kerberos",
+            "hadoop.kms.authentication.kerberos.principal": "*"
+          }
+        },
+        {
+          "ranger-kms-audit": {
+            "xasecure.audit.jaas.Client.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
+            "xasecure.audit.jaas.Client.loginModuleControlFlag": "required",
+            "xasecure.audit.jaas.Client.option.useKeyTab": "true",
+            "xasecure.audit.jaas.Client.option.storeKey": "false",
+            "xasecure.audit.jaas.Client.option.serviceName": "solr",
+            "xasecure.audit.destination.solr.force.use.inmemory.jaas.config": "true"
+          }
+        }
+      ],
+      "components": [
+        {
+          "name": "RANGER_KMS_SERVER",
+          "identities": [
+            {
+              "name": "/spnego",
+              "principal": {
+                "configuration": "kms-site/hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal"
+              },
+              "keytab": {
+                "configuration": "kms-site/hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab"
+              }
+            },
+            {
+              "name": "/smokeuser"
+            },
+            {
+              "name": "rangerkms",
+              "principal": {
+                "value": "rangerkms/_HOST@${realm}",
+                "type" : "service",
+                "configuration": "dbks-site/ranger.ks.kerberos.principal",
+                "local_username" : "keyadmin"
+              },
+              "keytab": {
+                "file": "${keytab_dir}/rangerkms.service.keytab",
+                "owner": {
+                  "name": "${kms-env/kms_user}",
+                  "access": "r"
+                },
+                "configuration": "dbks-site/ranger.ks.kerberos.keytab"
+              }
+            },
+            {
+              "name": "/RANGER_KMS/RANGER_KMS_SERVER/rangerkms",
+              "principal": {
+                "configuration": "ranger-kms-audit/xasecure.audit.jaas.Client.option.principal"
+              },
+              "keytab": {
+                "configuration": "ranger-kms-audit/xasecure.audit.jaas.Client.option.keyTab"
+              }
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file


[33/52] [abbrv] ambari git commit: AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/utils/RMFTestCase.py b/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
index 282b542..2f3794d 100644
--- a/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
+++ b/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
@@ -102,8 +102,12 @@ class RMFTestCase(TestCase):
     else:
       raise RuntimeError("Please specify either config_file_path or config_dict parameter")
 
-    self.config_dict["configurations"]["cluster-env"]["stack_tools"] = RMFTestCase.get_stack_tools()
-    self.config_dict["configurations"]["cluster-env"]["stack_features"] = RMFTestCase.get_stack_features()
+    # add the stack tools & features from the stack if the test case's JSON file didn't have them
+    if "stack_tools" not in self.config_dict["configurations"]["cluster-env"]:
+      self.config_dict["configurations"]["cluster-env"]["stack_tools"] = RMFTestCase.get_stack_tools()
+
+    if "stack_features" not in self.config_dict["configurations"]["cluster-env"]:
+      self.config_dict["configurations"]["cluster-env"]["stack_features"] = RMFTestCase.get_stack_features()
 
     if config_overrides:
       for key, value in config_overrides.iteritems():


[15/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/params.py
deleted file mode 100644
index 094d239..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/params.py
+++ /dev/null
@@ -1,448 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-
-import os
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions.version import format_stack_version
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.default import default
-from resource_management.libraries.functions.is_empty import is_empty
-from resource_management.libraries.functions.constants import Direction
-from resource_management.libraries.functions.stack_features import check_stack_feature
-from resource_management.libraries.functions.stack_features import get_stack_feature_version
-from resource_management.libraries.functions import StackFeature
-from resource_management.libraries.functions.get_bare_principal import get_bare_principal
-
-# a map of the Ambari role to the component name
-# for use with <stack-root>/current/<component>
-SERVER_ROLE_DIRECTORY_MAP = {
-  'RANGER_ADMIN' : 'ranger-admin',
-  'RANGER_USERSYNC' : 'ranger-usersync',
-  'RANGER_TAGSYNC' : 'ranger-tagsync'
-}
-
-component_directory = Script.get_component_from_role(SERVER_ROLE_DIRECTORY_MAP, "RANGER_ADMIN")
-
-config  = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-stack_root = Script.get_stack_root()
-
-stack_name = default("/hostLevelParams/stack_name", None)
-version = default("/commandParams/version", None)
-
-stack_version_unformatted = config['hostLevelParams']['stack_version']
-stack_version_formatted = format_stack_version(stack_version_unformatted)
-
-upgrade_marker_file = format("{tmp_dir}/rangeradmin_ru.inprogress")
-
-xml_configurations_supported = config['configurations']['ranger-env']['xml_configurations_supported']
-
-create_db_dbuser = config['configurations']['ranger-env']['create_db_dbuser']
-
-# get the correct version to use for checking stack features
-version_for_stack_feature_checks = get_stack_feature_version(config)
-
-stack_supports_rolling_upgrade = check_stack_feature(StackFeature.ROLLING_UPGRADE, version_for_stack_feature_checks)
-stack_supports_config_versioning = check_stack_feature(StackFeature.CONFIG_VERSIONING, version_for_stack_feature_checks)
-stack_supports_usersync_non_root = check_stack_feature(StackFeature.RANGER_USERSYNC_NON_ROOT, version_for_stack_feature_checks)
-stack_supports_ranger_tagsync = check_stack_feature(StackFeature.RANGER_TAGSYNC_COMPONENT, version_for_stack_feature_checks)
-stack_supports_ranger_audit_db = check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, version_for_stack_feature_checks)
-stack_supports_ranger_log4j = check_stack_feature(StackFeature.RANGER_LOG4J_SUPPORT, version_for_stack_feature_checks)
-stack_supports_ranger_kerberos = check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, version_for_stack_feature_checks)
-stack_supports_usersync_passwd = check_stack_feature(StackFeature.RANGER_USERSYNC_PASSWORD_JCEKS, version_for_stack_feature_checks)
-stack_supports_infra_client = check_stack_feature(StackFeature.RANGER_INSTALL_INFRA_CLIENT, version_for_stack_feature_checks)
-stack_supports_pid = check_stack_feature(StackFeature.RANGER_PID_SUPPORT, version_for_stack_feature_checks)
-stack_supports_ranger_admin_password_change = check_stack_feature(StackFeature.RANGER_ADMIN_PASSWD_CHANGE, version_for_stack_feature_checks)
-stack_supports_ranger_setup_db_on_start = check_stack_feature(StackFeature.RANGER_SETUP_DB_ON_START, version_for_stack_feature_checks)
-stack_supports_ranger_tagsync_ssl_xml_support = check_stack_feature(StackFeature.RANGER_TAGSYNC_SSL_XML_SUPPORT, version_for_stack_feature_checks)
-stack_supports_ranger_solr_configs = check_stack_feature(StackFeature.RANGER_SOLR_CONFIG_SUPPORT, version_for_stack_feature_checks)
-stack_supports_secure_ssl_password = check_stack_feature(StackFeature.SECURE_RANGER_SSL_PASSWORD, version_for_stack_feature_checks)
-
-downgrade_from_version = default("/commandParams/downgrade_from_version", None)
-upgrade_direction = default("/commandParams/upgrade_direction", None)
-
-ranger_conf    = '/etc/ranger/admin/conf'
-ranger_ugsync_conf = '/etc/ranger/usersync/conf'
-ranger_tagsync_home  = format('{stack_root}/current/ranger-tagsync')
-ranger_tagsync_conf = format('{stack_root}/current/ranger-tagsync/conf')
-tagsync_bin = '/usr/bin/ranger-tagsync'
-tagsync_services_file = format('{stack_root}/current/ranger-tagsync/ranger-tagsync-services.sh')
-security_store_path = '/etc/security/serverKeys'
-tagsync_etc_path = '/etc/ranger/tagsync/'
-ranger_tagsync_credential_file= os.path.join(tagsync_etc_path,'rangercred.jceks')
-atlas_tagsync_credential_file= os.path.join(tagsync_etc_path,'atlascred.jceks')
-ranger_tagsync_keystore_password = config['configurations']['ranger-tagsync-policymgr-ssl']['xasecure.policymgr.clientssl.keystore.password']
-ranger_tagsync_truststore_password = config['configurations']['ranger-tagsync-policymgr-ssl']['xasecure.policymgr.clientssl.truststore.password']
-atlas_tagsync_keystore_password = config['configurations']['atlas-tagsync-ssl']['xasecure.policymgr.clientssl.keystore.password']
-atlas_tagsync_truststore_password = config['configurations']['atlas-tagsync-ssl']['xasecure.policymgr.clientssl.truststore.password']
-
-if upgrade_direction == Direction.DOWNGRADE and version and not check_stack_feature(StackFeature.CONFIG_VERSIONING, version):
-  stack_supports_rolling_upgrade = True
-  stack_supports_config_versioning = False
-
-if upgrade_direction == Direction.DOWNGRADE and version and not check_stack_feature(StackFeature.RANGER_USERSYNC_NON_ROOT, version):
-  stack_supports_usersync_non_root = False
-
-if stack_supports_rolling_upgrade:
-  ranger_home    = format('{stack_root}/current/ranger-admin')
-  ranger_conf    = '/etc/ranger/admin/conf'
-  ranger_stop    = '/usr/bin/ranger-admin-stop'
-  ranger_start   = '/usr/bin/ranger-admin-start'
-  usersync_home  = format('{stack_root}/current/ranger-usersync')
-  usersync_start = '/usr/bin/ranger-usersync-start'
-  usersync_stop  = '/usr/bin/ranger-usersync-stop'
-  ranger_ugsync_conf = '/etc/ranger/usersync/conf'
-
-if stack_supports_config_versioning:
-  ranger_conf = format('{stack_root}/current/ranger-admin/conf')
-  ranger_ugsync_conf = format('{stack_root}/current/ranger-usersync/conf')
-
-if stack_supports_ranger_tagsync:
-  ranger_tagsync_home  = format('{stack_root}/current/ranger-tagsync')
-  tagsync_bin = '/usr/bin/ranger-tagsync'
-  ranger_tagsync_conf = format('{stack_root}/current/ranger-tagsync/conf')
-  tagsync_services_file = format('{stack_root}/current/ranger-tagsync/ranger-tagsync-services.sh')
-
-usersync_services_file = format('{stack_root}/current/ranger-usersync/ranger-usersync-services.sh')
-
-java_home = config['hostLevelParams']['java_home']
-unix_user  = config['configurations']['ranger-env']['ranger_user']
-unix_group = config['configurations']['ranger-env']['ranger_group']
-ranger_pid_dir = default("/configurations/ranger-env/ranger_pid_dir", "/var/run/ranger")
-usersync_log_dir = default("/configurations/ranger-env/ranger_usersync_log_dir", "/var/log/ranger/usersync")
-admin_log_dir = default("/configurations/ranger-env/ranger_admin_log_dir", "/var/log/ranger/admin")
-ranger_admin_default_file = format('{ranger_conf}/ranger-admin-default-site.xml')
-security_app_context_file = format('{ranger_conf}/security-applicationContext.xml')
-ranger_ugsync_default_file = format('{ranger_ugsync_conf}/ranger-ugsync-default.xml')
-usgsync_log4j_file = format('{ranger_ugsync_conf}/log4j.xml')
-if stack_supports_ranger_log4j:
-  usgsync_log4j_file = format('{ranger_ugsync_conf}/log4j.properties')
-cred_validator_file = format('{usersync_home}/native/credValidator.uexe')
-
-ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
-
-db_flavor =  (config['configurations']['admin-properties']['DB_FLAVOR']).lower()
-usersync_exturl =  config['configurations']['admin-properties']['policymgr_external_url']
-if usersync_exturl.endswith('/'):
-  usersync_exturl = usersync_exturl.rstrip('/')
-ranger_host = config['clusterHostInfo']['ranger_admin_hosts'][0]
-ugsync_host = 'localhost'
-usersync_host_info = config['clusterHostInfo']['ranger_usersync_hosts']
-if not is_empty(usersync_host_info) and len(usersync_host_info) > 0:
-  ugsync_host = config['clusterHostInfo']['ranger_usersync_hosts'][0]
-ranger_external_url = config['configurations']['admin-properties']['policymgr_external_url']
-if ranger_external_url.endswith('/'):
-  ranger_external_url = ranger_external_url.rstrip('/')
-ranger_db_name = config['configurations']['admin-properties']['db_name']
-ranger_auditdb_name = default('/configurations/admin-properties/audit_db_name', 'ranger_audits')
-
-sql_command_invoker = config['configurations']['admin-properties']['SQL_COMMAND_INVOKER']
-db_root_user = config['configurations']['admin-properties']['db_root_user']
-db_root_password = unicode(config['configurations']['admin-properties']['db_root_password'])
-db_host =  config['configurations']['admin-properties']['db_host']
-ranger_db_user = config['configurations']['admin-properties']['db_user']
-ranger_audit_db_user = default('/configurations/admin-properties/audit_db_user', 'rangerlogger')
-ranger_db_password = unicode(config['configurations']['admin-properties']['db_password'])
-
-#ranger-env properties
-oracle_home = default("/configurations/ranger-env/oracle_home", "-")
-
-#For curl command in ranger to get db connector
-jdk_location = config['hostLevelParams']['jdk_location'] 
-java_share_dir = '/usr/share/java'
-jdbc_jar_name = None
-previous_jdbc_jar_name = None
-if db_flavor.lower() == 'mysql':
-  jdbc_jar_name = default("/hostLevelParams/custom_mysql_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mysql_jdbc_name", None)
-  audit_jdbc_url = format('jdbc:mysql://{db_host}/{ranger_auditdb_name}') if stack_supports_ranger_audit_db else None
-  jdbc_dialect = "org.eclipse.persistence.platform.database.MySQLPlatform"
-elif db_flavor.lower() == 'oracle':
-  jdbc_jar_name = default("/hostLevelParams/custom_oracle_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_oracle_jdbc_name", None)
-  jdbc_dialect = "org.eclipse.persistence.platform.database.OraclePlatform"
-  colon_count = db_host.count(':')
-  if colon_count == 2 or colon_count == 0:
-    audit_jdbc_url = format('jdbc:oracle:thin:@{db_host}') if stack_supports_ranger_audit_db else None
-  else:
-    audit_jdbc_url = format('jdbc:oracle:thin:@//{db_host}') if stack_supports_ranger_audit_db else None
-elif db_flavor.lower() == 'postgres':
-  jdbc_jar_name = default("/hostLevelParams/custom_postgres_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_postgres_jdbc_name", None)
-  audit_jdbc_url = format('jdbc:postgresql://{db_host}/{ranger_auditdb_name}') if stack_supports_ranger_audit_db else None
-  jdbc_dialect = "org.eclipse.persistence.platform.database.PostgreSQLPlatform"
-elif db_flavor.lower() == 'mssql':
-  jdbc_jar_name = default("/hostLevelParams/custom_mssql_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mssql_jdbc_name", None)
-  audit_jdbc_url = format('jdbc:sqlserver://{db_host};databaseName={ranger_auditdb_name}') if stack_supports_ranger_audit_db else None
-  jdbc_dialect = "org.eclipse.persistence.platform.database.SQLServerPlatform"
-elif db_flavor.lower() == 'sqla':
-  jdbc_jar_name = default("/hostLevelParams/custom_sqlanywhere_jdbc_name", None)
-  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_sqlanywhere_jdbc_name", None)
-  audit_jdbc_url = format('jdbc:sqlanywhere:database={ranger_auditdb_name};host={db_host}') if stack_supports_ranger_audit_db else None
-  jdbc_dialect = "org.eclipse.persistence.platform.database.SQLAnywherePlatform"
-
-downloaded_custom_connector = format("{tmp_dir}/{jdbc_jar_name}")
-
-driver_curl_source = format("{jdk_location}/{jdbc_jar_name}")
-driver_curl_target = format("{java_share_dir}/{jdbc_jar_name}")
-previous_jdbc_jar = format("{java_share_dir}/{previous_jdbc_jar_name}")
-if stack_supports_config_versioning:
-  driver_curl_target = format("{ranger_home}/ews/lib/{jdbc_jar_name}")
-  previous_jdbc_jar = format("{ranger_home}/ews/lib/{previous_jdbc_jar_name}")
-
-if db_flavor.lower() == 'sqla':
-  downloaded_custom_connector = format("{tmp_dir}/sqla-client-jdbc.tar.gz")
-  jar_path_in_archive = format("{tmp_dir}/sqla-client-jdbc/java/sajdbc4.jar")
-  libs_path_in_archive = format("{tmp_dir}/sqla-client-jdbc/native/lib64/*")
-  jdbc_libs_dir = format("{ranger_home}/native/lib64")
-  ld_lib_path = format("{jdbc_libs_dir}")
-
-#for db connection
-check_db_connection_jar_name = "DBConnectionVerification.jar"
-check_db_connection_jar = format("/usr/lib/ambari-agent/{check_db_connection_jar_name}")
-ranger_jdbc_connection_url = config["configurations"]["ranger-admin-site"]["ranger.jpa.jdbc.url"]
-ranger_jdbc_driver = config["configurations"]["ranger-admin-site"]["ranger.jpa.jdbc.driver"]
-
-ranger_credential_provider_path = config["configurations"]["ranger-admin-site"]["ranger.credential.provider.path"]
-ranger_jpa_jdbc_credential_alias = config["configurations"]["ranger-admin-site"]["ranger.jpa.jdbc.credential.alias"]
-ranger_ambari_db_password = unicode(config["configurations"]["admin-properties"]["db_password"])
-
-ranger_jpa_audit_jdbc_credential_alias = default('/configurations/ranger-admin-site/ranger.jpa.audit.jdbc.credential.alias', 'rangeraudit')
-ranger_ambari_audit_db_password = ''
-if not is_empty(config["configurations"]["admin-properties"]["audit_db_password"]) and stack_supports_ranger_audit_db:
-  ranger_ambari_audit_db_password = unicode(config["configurations"]["admin-properties"]["audit_db_password"])
-
-ugsync_jceks_path = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.credstore.filename"]
-ugsync_cred_lib = os.path.join(usersync_home,"lib","*")
-cred_lib_path = os.path.join(ranger_home,"cred","lib","*")
-cred_setup_prefix = (format('{ranger_home}/ranger_credential_helper.py'), '-l', cred_lib_path)
-ranger_audit_source_type = config["configurations"]["ranger-admin-site"]["ranger.audit.source.type"]
-
-if xml_configurations_supported:
-  ranger_usersync_keystore_password = unicode(config["configurations"]["ranger-ugsync-site"]["ranger.usersync.keystore.password"])
-  ranger_usersync_ldap_ldapbindpassword = unicode(config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.ldapbindpassword"])
-  ranger_usersync_truststore_password = unicode(config["configurations"]["ranger-ugsync-site"]["ranger.usersync.truststore.password"])
-  ranger_usersync_keystore_file = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.keystore.file"]
-  default_dn_name = 'cn=unixauthservice,ou=authenticator,o=mycompany,c=US'
-
-ranger_admin_hosts = config['clusterHostInfo']['ranger_admin_hosts']
-is_ranger_ha_enabled = True if len(ranger_admin_hosts) > 1 else False
-ranger_ug_ldap_url = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.url"]
-ranger_ug_ldap_bind_dn = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.binddn"]
-ranger_ug_ldap_user_searchfilter = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.user.searchfilter"]
-ranger_ug_ldap_group_searchbase = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.group.searchbase"]
-ranger_ug_ldap_group_searchfilter = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.group.searchfilter"]
-ug_sync_source = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.source.impl.class"]
-current_host = config['hostname']
-if current_host in ranger_admin_hosts:
-  ranger_host = current_host
-
-# ranger-tagsync
-ranger_tagsync_hosts = default("/clusterHostInfo/ranger_tagsync_hosts", [])
-has_ranger_tagsync = len(ranger_tagsync_hosts) > 0
-
-tagsync_log_dir = default("/configurations/ranger-tagsync-site/ranger.tagsync.logdir", "/var/log/ranger/tagsync")
-tagsync_jceks_path = config["configurations"]["ranger-tagsync-site"]["ranger.tagsync.keystore.filename"]
-atlas_tagsync_jceks_path = config["configurations"]["ranger-tagsync-site"]["ranger.tagsync.source.atlasrest.keystore.filename"]
-tagsync_application_properties = dict(config["configurations"]["tagsync-application-properties"]) if has_ranger_tagsync else None
-tagsync_pid_file = format('{ranger_pid_dir}/tagsync.pid')
-tagsync_cred_lib = os.path.join(ranger_tagsync_home, "lib", "*")
-
-ranger_usersync_log_maxfilesize = default('/configurations/usersync-log4j/ranger_usersync_log_maxfilesize',256) 
-ranger_usersync_log_maxbackupindex = default('/configurations/usersync-log4j/ranger_usersync_log_maxbackupindex',20)
-ranger_tagsync_log_maxfilesize = default('/configurations/tagsync-log4j/ranger_tagsync_log_maxfilesize',256)
-ranger_tagsync_log_number_of_backup_files = default('/configurations/tagsync-log4j/ranger_tagsync_log_number_of_backup_files',20)
-ranger_xa_log_maxfilesize = default('/configurations/admin-log4j/ranger_xa_log_maxfilesize',256)
-ranger_xa_log_maxbackupindex = default('/configurations/admin-log4j/ranger_xa_log_maxbackupindex',20)
-
-# ranger log4j.properties
-admin_log4j = config['configurations']['admin-log4j']['content']
-usersync_log4j = config['configurations']['usersync-log4j']['content']
-tagsync_log4j = config['configurations']['tagsync-log4j']['content']
-
-# ranger kerberos
-security_enabled = config['configurations']['cluster-env']['security_enabled']
-namenode_hosts = default("/clusterHostInfo/namenode_host", [])
-has_namenode = len(namenode_hosts) > 0
-
-ugsync_policymgr_alias = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.policymgr.alias"]
-ugsync_policymgr_keystore = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.policymgr.keystore"]
-
-# ranger solr
-audit_solr_enabled = default('/configurations/ranger-env/xasecure.audit.destination.solr', False)
-ranger_solr_config_set = config['configurations']['ranger-env']['ranger_solr_config_set']
-ranger_solr_collection_name = config['configurations']['ranger-env']['ranger_solr_collection_name']
-ranger_solr_shards = config['configurations']['ranger-env']['ranger_solr_shards']
-replication_factor = config['configurations']['ranger-env']['ranger_solr_replication_factor']
-ranger_solr_conf = format('{ranger_home}/contrib/solr_for_audit_setup/conf')
-infra_solr_hosts = default("/clusterHostInfo/infra_solr_hosts", [])
-has_infra_solr = len(infra_solr_hosts) > 0
-is_solrCloud_enabled = default('/configurations/ranger-env/is_solrCloud_enabled', False)
-is_external_solrCloud_enabled = default('/configurations/ranger-env/is_external_solrCloud_enabled', False)
-solr_znode = '/ranger_audits'
-if stack_supports_infra_client and is_solrCloud_enabled:
-  solr_znode = default('/configurations/ranger-admin-site/ranger.audit.solr.zookeepers', 'NONE')
-  if solr_znode != '' and solr_znode.upper() != 'NONE':
-    solr_znode = solr_znode.split('/')
-    if len(solr_znode) > 1 and len(solr_znode) == 2:
-      solr_znode = solr_znode[1]
-      solr_znode = format('/{solr_znode}')
-  if has_infra_solr and not is_external_solrCloud_enabled:
-    solr_znode = config['configurations']['infra-solr-env']['infra_solr_znode']
-solr_user = unix_user
-if has_infra_solr and not is_external_solrCloud_enabled:
-  solr_user = default('/configurations/infra-solr-env/infra_solr_user', unix_user)
-  infra_solr_role_ranger_admin = default('configurations/infra-solr-security-json/infra_solr_role_ranger_admin', 'ranger_user')
-  infra_solr_role_ranger_audit = default('configurations/infra-solr-security-json/infra_solr_role_ranger_audit', 'ranger_audit_user')
-  infra_solr_role_dev = default('configurations/infra-solr-security-json/infra_solr_role_dev', 'dev')
-custom_log4j = has_infra_solr and not is_external_solrCloud_enabled
-
-ranger_audit_max_retention_days = config['configurations']['ranger-solr-configuration']['ranger_audit_max_retention_days']
-ranger_audit_logs_merge_factor = config['configurations']['ranger-solr-configuration']['ranger_audit_logs_merge_factor']
-ranger_solr_config_content = config['configurations']['ranger-solr-configuration']['content']
-
-# get comma separated list of zookeeper hosts
-zookeeper_port = default('/configurations/zoo.cfg/clientPort', None)
-zookeeper_hosts = default("/clusterHostInfo/zookeeper_hosts", [])
-index = 0
-zookeeper_quorum = ""
-for host in zookeeper_hosts:
-  zookeeper_quorum += host + ":" + str(zookeeper_port)
-  index += 1
-  if index < len(zookeeper_hosts):
-    zookeeper_quorum += ","
-
-# solr kerberised
-solr_jaas_file = None
-is_external_solrCloud_kerberos = default('/configurations/ranger-env/is_external_solrCloud_kerberos', False)
-
-if security_enabled:
-  if has_ranger_tagsync:
-    ranger_tagsync_principal = config['configurations']['ranger-tagsync-site']['ranger.tagsync.kerberos.principal']
-    if not is_empty(ranger_tagsync_principal) and ranger_tagsync_principal != '':
-      tagsync_jaas_principal = ranger_tagsync_principal.replace('_HOST', current_host.lower())
-    tagsync_keytab_path = config['configurations']['ranger-tagsync-site']['ranger.tagsync.kerberos.keytab']
-
-  if stack_supports_ranger_kerberos:
-    ranger_admin_keytab = config['configurations']['ranger-admin-site']['ranger.admin.kerberos.keytab']
-    ranger_admin_principal = config['configurations']['ranger-admin-site']['ranger.admin.kerberos.principal']
-    if not is_empty(ranger_admin_principal) and ranger_admin_principal != '':
-      ranger_admin_jaas_principal = ranger_admin_principal.replace('_HOST', ranger_host.lower())
-      if stack_supports_infra_client and is_solrCloud_enabled and is_external_solrCloud_enabled and is_external_solrCloud_kerberos:
-        solr_jaas_file = format('{ranger_home}/conf/ranger_solr_jaas.conf')
-        solr_kerberos_principal = ranger_admin_jaas_principal
-        solr_kerberos_keytab = ranger_admin_keytab
-      if stack_supports_infra_client and is_solrCloud_enabled and not is_external_solrCloud_enabled and not is_external_solrCloud_kerberos:
-        solr_jaas_file = format('{ranger_home}/conf/ranger_solr_jaas.conf')
-        solr_kerberos_principal = ranger_admin_jaas_principal
-        solr_kerberos_keytab = ranger_admin_keytab
-
-# logic to create core-site.xml if hdfs not installed
-if stack_supports_ranger_kerberos and not has_namenode:
-  core_site_property = {
-    'hadoop.security.authentication': 'kerberos' if security_enabled else 'simple'
-  }
-
-  if security_enabled:
-    realm = 'EXAMPLE.COM'
-    ranger_admin_bare_principal = 'rangeradmin'
-    ranger_usersync_bare_principal = 'rangerusersync'
-    ranger_tagsync_bare_principal = 'rangertagsync'
-
-    ranger_usersync_principal = config['configurations']['ranger-ugsync-site']['ranger.usersync.kerberos.principal']
-    if not is_empty(ranger_admin_principal) and ranger_admin_principal != '':
-      ranger_admin_bare_principal = get_bare_principal(ranger_admin_principal)
-    if not is_empty(ranger_usersync_principal) and ranger_usersync_principal != '':
-      ranger_usersync_bare_principal = get_bare_principal(ranger_usersync_principal)
-    realm = config['configurations']['kerberos-env']['realm']
-
-    rule_dict = [
-      {'principal': ranger_admin_bare_principal, 'user': unix_user},
-      {'principal': ranger_usersync_bare_principal, 'user': 'rangerusersync'},
-    ]
-
-    if has_ranger_tagsync:
-      if not is_empty(ranger_tagsync_principal) and ranger_tagsync_principal != '':
-        ranger_tagsync_bare_principal = get_bare_principal(ranger_tagsync_principal)
-      rule_dict.append({'principal': ranger_tagsync_bare_principal, 'user': 'rangertagsync'})
-
-    core_site_auth_to_local_property = ''
-    for item in range(len(rule_dict)):
-      rule_line = 'RULE:[2:$1@$0]({0}@{1})s/.*/{2}/\n'.format(rule_dict[item]['principal'], realm, rule_dict[item]['user'])
-      core_site_auth_to_local_property = rule_line + core_site_auth_to_local_property
-
-    core_site_auth_to_local_property = core_site_auth_to_local_property + 'DEFAULT'
-    core_site_property['hadoop.security.auth_to_local'] = core_site_auth_to_local_property
-
-upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
-
-# ranger service pid
-user_group = config['configurations']['cluster-env']['user_group']
-ranger_admin_pid_file = format('{ranger_pid_dir}/rangeradmin.pid')
-ranger_usersync_pid_file = format('{ranger_pid_dir}/usersync.pid')
-
-# admin credential
-admin_username = config['configurations']['ranger-env']['admin_username']
-admin_password = config['configurations']['ranger-env']['admin_password']
-default_admin_password = 'admin'
-
-ranger_is_solr_kerberised = "false"
-if audit_solr_enabled and is_solrCloud_enabled:
-  # Check internal solrCloud
-  if security_enabled and not is_external_solrCloud_enabled:
-    ranger_is_solr_kerberised = "true"
-  # Check external solrCloud
-  if is_external_solrCloud_enabled and is_external_solrCloud_kerberos:
-    ranger_is_solr_kerberised = "true"
-
-hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
-is_hbase_ha_enabled = True if len(hbase_master_hosts) > 1 else False
-is_namenode_ha_enabled = True if len(namenode_hosts) > 1 else False
-ranger_hbase_plugin_enabled = False
-ranger_hdfs_plugin_enabled = False
-
-
-if is_hbase_ha_enabled:
-  if not is_empty(config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled']):
-    ranger_hbase_plugin_enabled = config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled'].lower() == 'yes'
-if is_namenode_ha_enabled:
-  if not is_empty(config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled']):
-    ranger_hdfs_plugin_enabled = config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled'].lower() == 'yes'
-
-ranger_admin_password_properties = ['ranger.jpa.jdbc.password', 'ranger.jpa.audit.jdbc.password', 'ranger.ldap.bind.password', 'ranger.ldap.ad.bind.password']
-ranger_usersync_password_properties = ['ranger.usersync.ldap.ldapbindpassword']
-ranger_tagsync_password_properties = ['xasecure.policymgr.clientssl.keystore.password', 'xasecure.policymgr.clientssl.truststore.password']
-if stack_supports_secure_ssl_password:
-  ranger_admin_password_properties.extend(['ranger.service.https.attrib.keystore.pass', 'ranger.truststore.password'])
-  ranger_usersync_password_properties.extend(['ranger.usersync.keystore.password', 'ranger.usersync.truststore.password'])
-
-ranger_auth_method = config['configurations']['ranger-admin-site']['ranger.authentication.method']
-ranger_ldap_password_alias = default('/configurations/ranger-admin-site/ranger.ldap.binddn.credential.alias', 'ranger.ldap.bind.password')
-ranger_ad_password_alias = default('/configurations/ranger-admin-site/ranger.ldap.ad.binddn.credential.alias', 'ranger.ldap.ad.bind.password')
-ranger_https_keystore_alias = default('/configurations/ranger-admin-site/ranger.service.https.attrib.keystore.credential.alias', 'keyStoreCredentialAlias')
-ranger_truststore_alias = default('/configurations/ranger-admin-site/ranger.truststore.alias', 'trustStoreAlias')
-https_enabled = config['configurations']['ranger-admin-site']['ranger.service.https.attrib.ssl.enabled']
-http_enabled = config['configurations']['ranger-admin-site']['ranger.service.http.enabled']
-https_keystore_password = config['configurations']['ranger-admin-site']['ranger.service.https.attrib.keystore.pass']
-truststore_password = config['configurations']['ranger-admin-site']['ranger.truststore.password']
-
-# need this to capture cluster name for ranger tagsync
-cluster_name = config['clusterName']
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_admin.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_admin.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_admin.py
deleted file mode 100644
index b849d58..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_admin.py
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-from resource_management.core.exceptions import Fail
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.functions import stack_select
-from resource_management.libraries.functions import conf_select
-from resource_management.libraries.functions.constants import Direction
-from resource_management.libraries.script import Script
-from resource_management.core.resources.system import Execute, File
-from resource_management.core.exceptions import ComponentIsNotRunning
-from resource_management.libraries.functions.format import format
-from resource_management.core.logger import Logger
-from resource_management.core import shell
-from ranger_service import ranger_service
-from setup_ranger_xml import setup_ranger_audit_solr, setup_ranger_admin_passwd_change
-from resource_management.libraries.functions import solr_cloud_util
-from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING
-from resource_management.libraries.functions.constants import Direction
-import upgrade
-import os, errno
-
-class RangerAdmin(Script):
-
-  def get_component_name(self):
-    return "ranger-admin"
-
-  def install(self, env):
-    self.install_packages(env)
-    import params
-    env.set_params(params)
-    # call config and setup db only in case of HDP version < 2.6
-    if not params.stack_supports_ranger_setup_db_on_start:
-      self.configure(env, setup_db=True)
-
-  def stop(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    if upgrade_type == UPGRADE_TYPE_NON_ROLLING and params.upgrade_direction == Direction.UPGRADE:
-      if params.stack_supports_rolling_upgrade and not params.stack_supports_config_versioning and os.path.isfile(format('{ranger_home}/ews/stop-ranger-admin.sh')):
-        File(format('{ranger_home}/ews/stop-ranger-admin.sh'),
-          owner=params.unix_user,
-          group = params.unix_group
-        )
-
-    Execute(format('{params.ranger_stop}'), environment={'JAVA_HOME': params.java_home}, user=params.unix_user)
-    if params.stack_supports_pid:
-      File(params.ranger_admin_pid_file,
-        action = "delete"
-      )
-
-  def pre_upgrade_restart(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    upgrade.prestart(env, "ranger-admin")
-
-    self.set_ru_rangeradmin_in_progress(params.upgrade_marker_file)
-
-  def post_upgrade_restart(self,env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    if os.path.isfile(params.upgrade_marker_file):
-      os.remove(params.upgrade_marker_file)
-
-  def start(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    # setup db only if in case HDP version is > 2.6
-    self.configure(env, upgrade_type=upgrade_type, setup_db=params.stack_supports_ranger_setup_db_on_start)
-
-    if params.stack_supports_infra_client and params.audit_solr_enabled and params.is_solrCloud_enabled:
-      solr_cloud_util.setup_solr_client(params.config, custom_log4j = params.custom_log4j)
-      setup_ranger_audit_solr()
-
-    ranger_service('ranger_admin')
-
-
-  def status(self, env):
-    import status_params
-
-    env.set_params(status_params)
-
-    if status_params.stack_supports_pid:
-      check_process_status(status_params.ranger_admin_pid_file)
-      return
-
-    cmd = 'ps -ef | grep proc_rangeradmin | grep -v grep'
-    code, output = shell.call(cmd, timeout=20)
-
-    if code != 0:
-      if self.is_ru_rangeradmin_in_progress(status_params.upgrade_marker_file):
-        Logger.info('Ranger admin process not running - skipping as stack upgrade is in progress')
-      else:
-        Logger.debug('Ranger admin process not running')
-        raise ComponentIsNotRunning()
-    pass
-
-  def configure(self, env, upgrade_type=None, setup_db=False):
-    import params
-    env.set_params(params)
-    if params.xml_configurations_supported:
-      from setup_ranger_xml import ranger
-    else:
-      from setup_ranger import ranger
-
-    # set up db if we are not upgrading and setup_db is true
-    if setup_db and upgrade_type is None:
-      if params.xml_configurations_supported:
-        from setup_ranger_xml import setup_ranger_db
-        setup_ranger_db()
-
-    ranger('ranger_admin', upgrade_type=upgrade_type)
-
-    # set up java patches if we are not upgrading and setup_db is true
-    if setup_db and upgrade_type is None:
-      if params.xml_configurations_supported:
-        from setup_ranger_xml import setup_java_patch
-        setup_java_patch()
-
-      if params.stack_supports_ranger_admin_password_change:
-        setup_ranger_admin_passwd_change()
-
-  def set_ru_rangeradmin_in_progress(self, upgrade_marker_file):
-    config_dir = os.path.dirname(upgrade_marker_file)
-    try:
-      msg = "Starting Upgrade"
-      if (not os.path.exists(config_dir)):
-        os.makedirs(config_dir)
-      ofp = open(upgrade_marker_file, 'w')
-      ofp.write(msg)
-      ofp.close()
-    except OSError as exc:
-      if exc.errno == errno.EEXIST and os.path.isdir(config_dir):
-        pass
-      else:
-        raise
-
-  def is_ru_rangeradmin_in_progress(self, upgrade_marker_file):
-    return os.path.isfile(upgrade_marker_file)
-
-  def setup_ranger_database(self, env):
-    import params
-    env.set_params(params)
-
-    upgrade_stack = stack_select._get_upgrade_stack()
-    if upgrade_stack is None:
-      raise Fail('Unable to determine the stack and stack version')
-
-    stack_version = upgrade_stack[1]
-
-    if params.xml_configurations_supported and params.upgrade_direction == Direction.UPGRADE:
-      Logger.info(format('Setting Ranger database schema, using version {stack_version}'))
-
-      from setup_ranger_xml import setup_ranger_db
-      setup_ranger_db(stack_version=stack_version)
-
-  def setup_ranger_java_patches(self, env):
-    import params
-    env.set_params(params)
-
-    upgrade_stack = stack_select._get_upgrade_stack()
-    if upgrade_stack is None:
-      raise Fail('Unable to determine the stack and stack version')
-
-    stack_version = upgrade_stack[1]
-
-    if params.xml_configurations_supported and params.upgrade_direction == Direction.UPGRADE:
-      Logger.info(format('Applying Ranger java patches, using version {stack_version}'))
-
-      from setup_ranger_xml import setup_java_patch
-      setup_java_patch(stack_version=stack_version)
-
-  def set_pre_start(self, env):
-    import params
-    env.set_params(params)
-
-    upgrade_stack = stack_select._get_upgrade_stack()
-    if upgrade_stack is None:
-      raise Fail('Unable to determine the stack and stack version')
-
-    stack_name = upgrade_stack[0]
-    stack_version = upgrade_stack[1]
-
-    stack_select.select("ranger-admin", stack_version)
-    conf_select.select(stack_name, "ranger-admin", stack_version)
-
-  def get_log_folder(self):
-    import params
-    return params.admin_log_dir
-  
-  def get_user(self):
-    import params
-    return params.unix_user
-
-if __name__ == "__main__":
-  RangerAdmin().execute()
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_service.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_service.py
deleted file mode 100644
index 0355049..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_service.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.show_logs import show_logs
-from resource_management.core.resources.system import Execute
-
-def ranger_service(name, action=None):
-  import params
-
-  env_dict = {'JAVA_HOME': params.java_home}
-  if params.db_flavor.lower() == 'sqla':
-    env_dict = {'JAVA_HOME': params.java_home, 'LD_LIBRARY_PATH': params.ld_lib_path}
-  
-  if name == 'ranger_admin':
-    no_op_test = format('ps -ef | grep proc_rangeradmin | grep -v grep')
-    try:
-      Execute(params.ranger_start, environment=env_dict, user=params.unix_user, not_if=no_op_test)
-    except:
-      show_logs(params.admin_log_dir, params.unix_user)
-      raise
-  elif name == 'ranger_usersync':
-    no_op_test = format('ps -ef | grep proc_rangerusersync | grep -v grep')
-    if params.stack_supports_usersync_non_root:
-      try:
-        Execute(params.usersync_start,
-                environment=env_dict,
-                not_if=no_op_test,
-                user=params.unix_user
-        )
-      except:
-        show_logs(params.usersync_log_dir, params.unix_user)
-        raise
-    else:
-      # Usersync requires to be run as root for 2.2
-      Execute((params.usersync_start,),
-              environment={'JAVA_HOME': params.java_home},
-              not_if=no_op_test,
-              sudo=True
-      )
-  elif name == 'ranger_tagsync' and params.stack_supports_ranger_tagsync:
-    no_op_test = format('ps -ef | grep proc_rangertagsync | grep -v grep')
-    cmd = format('{tagsync_services_file} start')
-    try:
-      Execute(cmd,
-        environment=env_dict,
-        user=params.unix_user,
-        not_if=no_op_test
-      )
-    except:
-      show_logs(params.tagsync_log_dir, params.unix_user)
-      raise
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_tagsync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_tagsync.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_tagsync.py
deleted file mode 100644
index 008fb99..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_tagsync.py
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions import conf_select
-from resource_management.libraries.functions import stack_select
-from resource_management.core.resources.system import Execute, File
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.core.exceptions import ComponentIsNotRunning
-from resource_management.libraries.functions.format import format
-from resource_management.core.logger import Logger
-from resource_management.core import shell
-from ranger_service import ranger_service
-from setup_ranger_xml import ranger, ranger_credential_helper
-from resource_management.core.exceptions import Fail
-import upgrade
-
-class RangerTagsync(Script):
-
-  def install(self, env):
-    self.install_packages(env)
-    import params
-    env.set_params(params)
-
-    ranger_credential_helper(params.tagsync_cred_lib, 'tagadmin.user.password', 'rangertagsync', params.tagsync_jceks_path)
-    File(params.tagsync_jceks_path,
-       owner = params.unix_user,
-       group = params.unix_group,
-       mode = 0640
-    )
-    if params.stack_supports_ranger_tagsync_ssl_xml_support:
-      Logger.info("Stack support Atlas user for Tagsync, creating keystore for same.")
-      self.create_atlas_user_keystore(env)
-    else:
-      Logger.info("Stack does not support Atlas user for Tagsync, skipping keystore creation for same.")
-
-    self.configure(env)
-
-  def configure(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-    ranger('ranger_tagsync', upgrade_type=upgrade_type)
-
-  def start(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    self.configure(env, upgrade_type=upgrade_type)
-    ranger_service('ranger_tagsync')
-
-  def stop(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    Execute(format('{tagsync_services_file} stop'), environment={'JAVA_HOME': params.java_home}, user=params.unix_user)
-    File(params.tagsync_pid_file,
-      action = "delete"
-    )
-
-  def status(self, env):
-    import status_params
-    env.set_params(status_params)
-
-    check_process_status(status_params.tagsync_pid_file)
-
-  def pre_upgrade_restart(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    if params.stack_supports_ranger_tagsync:
-      Logger.info("Executing Ranger Tagsync Stack Upgrade pre-restart")
-      conf_select.select(params.stack_name, "ranger-tagsync", params.version)
-      stack_select.select("ranger-tagsync", params.version)
-
-  def get_component_name(self):
-    return "ranger-tagsync"
-
-  def get_log_folder(self):
-    import params
-    return params.tagsync_log_dir
-  
-  def get_user(self):
-    import params
-    return params.unix_user
-
-  def get_pid_files(self):
-    import status_params
-    return [status_params.tagsync_pid_file]
-
-  def configure_atlas_user_for_tagsync(self, env):
-    Logger.info("Configuring Atlas user for Tagsync service.")
-    import params
-    env.set_params(params)
-
-    upgrade_stack = stack_select._get_upgrade_stack()
-    if upgrade_stack is None:
-      raise Fail('Unable to determine the stack and stack version')
-
-    stack_name = upgrade_stack[0]
-    stack_version = upgrade_stack[1]
-
-    stack_select.select("ranger-tagsync", stack_version)
-    conf_select.select(stack_name, "ranger-tagsync", stack_version)
-    if params.stack_supports_ranger_tagsync_ssl_xml_support:
-      Logger.info("Upgrading Tagsync, stack support Atlas user for Tagsync, creating keystore for same.")
-      self.create_atlas_user_keystore(env)
-    else:
-      Logger.info("Upgrading Tagsync, stack does not support Atlas user for Tagsync, skipping keystore creation for same.")
-
-    Logger.info("Configuring Atlas user for Tagsync service done.")
-
-  def create_atlas_user_keystore(self,env):
-    import params
-    env.set_params(params)
-    ranger_credential_helper(params.tagsync_cred_lib, 'atlas.user.password', 'admin', params.atlas_tagsync_jceks_path)
-    File(params.atlas_tagsync_jceks_path,
-         owner = params.unix_user,
-         group = params.unix_group,
-         mode = 0640
-    )
-
-if __name__ == "__main__":
-  RangerTagsync().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_usersync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_usersync.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_usersync.py
deleted file mode 100644
index b9366f6..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/ranger_usersync.py
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.script import Script
-from resource_management.core.resources.system import Execute, File
-from resource_management.core.exceptions import ComponentIsNotRunning
-from resource_management.libraries.functions.format import format
-from resource_management.core.logger import Logger
-from resource_management.core import shell
-from ranger_service import ranger_service
-from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING
-from resource_management.libraries.functions.constants import Direction
-import upgrade
-import os
-
-class RangerUsersync(Script):
-  
-  def install(self, env):
-    self.install_packages(env)
-    import params
-    env.set_params(params)
-
-    if params.stack_supports_usersync_passwd:
-      from setup_ranger_xml import ranger_credential_helper
-      ranger_credential_helper(params.ugsync_cred_lib, params.ugsync_policymgr_alias, 'rangerusersync', params.ugsync_policymgr_keystore)
-
-      File(params.ugsync_policymgr_keystore,
-        owner = params.unix_user,
-        group = params.unix_group,
-        mode = 0640
-      )
-
-    self.configure(env)
-    
-  def configure(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    if params.xml_configurations_supported:
-      from setup_ranger_xml import ranger
-    else:
-      from setup_ranger import ranger    
-    
-    ranger('ranger_usersync', upgrade_type=upgrade_type)
-    
-  def start(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-    
-    self.configure(env, upgrade_type=upgrade_type)
-    ranger_service('ranger_usersync')
-    
-  def stop(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    if upgrade_type == UPGRADE_TYPE_NON_ROLLING and params.upgrade_direction == Direction.UPGRADE:
-      if params.stack_supports_usersync_non_root and os.path.isfile(params.usersync_services_file):
-        File(params.usersync_services_file,
-          mode = 0755
-        )
-        Execute(('ln','-sf', format('{usersync_services_file}'),'/usr/bin/ranger-usersync'),
-          not_if=format("ls /usr/bin/ranger-usersync"),
-          only_if=format("ls {usersync_services_file}"),
-          sudo=True
-        )
-
-    Execute((params.usersync_stop,), environment={'JAVA_HOME': params.java_home}, sudo=True)
-    if params.stack_supports_pid:
-      File(params.ranger_usersync_pid_file,
-        action = "delete"
-      )
-    
-  def status(self, env):
-    import status_params
-    env.set_params(status_params)
-
-    if status_params.stack_supports_pid:
-      check_process_status(status_params.ranger_usersync_pid_file)
-      return
-
-    cmd = 'ps -ef | grep proc_rangerusersync | grep -v grep'
-    code, output = shell.call(cmd, timeout=20)
-
-    if code != 0:
-      Logger.debug('Ranger usersync process not running')
-      raise ComponentIsNotRunning()
-    pass
-
-  def pre_upgrade_restart(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-    upgrade.prestart(env, "ranger-usersync")
-
-  def get_component_name(self):
-    return "ranger-usersync"
-
-  def get_log_folder(self):
-    import params
-    return params.usersync_log_dir
-  
-  def get_user(self):
-    import params
-    return params.unix_user
-
-if __name__ == "__main__":
-  RangerUsersync().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/service_check.py
deleted file mode 100644
index fb6af95..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/service_check.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""
-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.
-
-"""
-
-from resource_management.libraries.script import Script
-from resource_management.core.resources.system import Execute
-from resource_management.core.exceptions import ComponentIsNotRunning
-from resource_management.libraries.functions.format import format
-from resource_management.core.logger import Logger
-import os
-
-
-class RangerServiceCheck(Script):
-
-  def service_check(self, env):
-    import params
-
-    env.set_params(params)
-    self.check_ranger_admin_service(params.ranger_external_url, params.upgrade_marker_file)
-
-  def check_ranger_admin_service(self, ranger_external_url, upgrade_marker_file):
-    if (self.is_ru_rangeradmin_in_progress(upgrade_marker_file)):
-      Logger.info('Ranger admin process not running - skipping as stack upgrade is in progress')
-    else:
-      Execute(format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {ranger_external_url}/login.jsp | grep 200"),
-        tries = 10,
-        try_sleep=3,
-        logoutput=True)
-
-  def is_ru_rangeradmin_in_progress(self, upgrade_marker_file):
-    return os.path.isfile(upgrade_marker_file)
-
-if __name__ == "__main__":
-  RangerServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger.py
deleted file mode 100644
index b0e8bad..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger.py
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-import sys
-import fileinput
-import os
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.resources.properties_file import PropertiesFile
-from resource_management.libraries.resources.modify_properties_file import ModifyPropertiesFile
-from resource_management.core.source import DownloadSource
-from resource_management.core.logger import Logger
-from resource_management.core.shell import as_sudo
-from resource_management.core.exceptions import Fail
-from resource_management.core.resources.system import Directory, Execute, File
-
-
-def ranger(name=None, upgrade_type=None):
-  if name == 'ranger_admin':
-    setup_ranger_admin(upgrade_type=upgrade_type)
-
-  if name == 'ranger_usersync':
-    setup_usersync(upgrade_type=upgrade_type)
-
-def setup_ranger_admin(upgrade_type=None):
-  import params
-
-  check_db_connnection()
-
-  if params.driver_curl_source and not params.driver_curl_source.endswith("/None"):
-    if params.previous_jdbc_jar and os.path.isfile(params.previous_jdbc_jar):
-      File(params.previous_jdbc_jar, action='delete')
-
-  File(params.downloaded_custom_connector,
-      content = DownloadSource(params.driver_curl_source),
-      mode = 0644
-  )
-
-  Execute(('cp', '--remove-destination', params.downloaded_custom_connector, params.driver_curl_target),
-          path=["/bin", "/usr/bin/"],
-          sudo=True)
-
-  File(params.driver_curl_target, mode=0644)
-
-  ModifyPropertiesFile(format("{ranger_home}/install.properties"),
-    properties = params.config['configurations']['admin-properties']
-  )
-
-  custom_config = dict()
-  custom_config['unix_user'] = params.unix_user
-  custom_config['unix_group'] = params.unix_group
-
-  ModifyPropertiesFile(format("{ranger_home}/install.properties"),
-    properties=custom_config
-  )
-
-  ModifyPropertiesFile(format("{ranger_home}/install.properties"),
-    properties = {'SQL_CONNECTOR_JAR': format('{driver_curl_target}')}
-  )
-
-  ##if db flavor == oracle - set oracle home env variable
-  if params.db_flavor.lower() == 'oracle' and params.oracle_home:
-    env_dict = {'JAVA_HOME': params.java_home, 'ORACLE_HOME':params.oracle_home, 'LD_LIBRARY_PATH':params.oracle_home} 
-  else: 
-    env_dict = {'JAVA_HOME': params.java_home}
-  
-  setup_sh = format("cd {ranger_home} && ") + as_sudo([format('{ranger_home}/setup.sh')])
-  Execute(setup_sh, 
-          environment=env_dict, 
-          logoutput=True,
-  )
-  
-  ModifyPropertiesFile(format("{ranger_conf}/xa_system.properties"),
-       properties = params.config['configurations']['ranger-site'],
-  )
-
-  ModifyPropertiesFile(format("{ranger_conf}/ranger_webserver.properties"),
-    properties = params.config['configurations']['ranger-site'],
-    mode=0744
-  )
-
-  Directory(params.admin_log_dir,
-    owner = params.unix_user,
-    group = params.unix_group
-  )
-
-def setup_usersync(upgrade_type=None):
-  import params
-
-  PropertiesFile(format("{usersync_home}/install.properties"),
-    properties = params.config['configurations']['usersync-properties'],
-  )
-
-  custom_config = dict()
-  custom_config['unix_user'] = params.unix_user
-  custom_config['unix_group'] = params.unix_group
-
-  ModifyPropertiesFile(format("{usersync_home}/install.properties"),
-    properties=custom_config
-  )
-
-  cmd = format("cd {usersync_home} && ") + as_sudo([format('{usersync_home}/setup.sh')])
-  Execute(cmd, environment={'JAVA_HOME': params.java_home}, logoutput=True)
-  
-  File([params.usersync_start, params.usersync_stop],
-       owner = params.unix_user
-  )
-  File(params.usersync_services_file,
-    mode = 0755,
-  )
-
-  Directory(params.usersync_log_dir,
-    owner = params.unix_user,
-    group = params.unix_group
-  )
-
-def check_db_connnection():
-  import params
-
-  Logger.info('Checking DB connection')
-  env_dict = {}
-  if params.db_flavor.lower() == 'mysql':
-    cmd = format('{sql_command_invoker} -u {db_root_user} --password={db_root_password!p} -h {db_host}  -s -e "select version();"')
-  elif params.db_flavor.lower() == 'oracle':
-    cmd = format("{sql_command_invoker} '{db_root_user}/\"{db_root_password}\"@{db_host}' AS SYSDBA")
-    env_dict = {'ORACLE_HOME':params.oracle_home, 'LD_LIBRARY_PATH':params.oracle_home}
-  elif params.db_flavor.lower() == 'postgres':
-    cmd = 'true'
-  elif params.db_flavor.lower() == 'mssql':
-    cmd = 'true'
-
-  try:
-    Execute(cmd,
-      environment=env_dict,
-      logoutput=True)
-  except Fail as ex:
-    Logger.error(str(ex))
-    raise Fail('Ranger Database connection check failed')


[25/52] [abbrv] ambari git commit: AMBARI-21370: Support VIPs instead of Host Names - addendum (jluniya)

Posted by jl...@apache.org.
AMBARI-21370: Support VIPs instead of Host Names - addendum (jluniya)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 425606769e15589a9a51ab2fc89e56bbf158d638
Parents: 88cba7f
Author: Jayush Luniya <jl...@hortonworks.com>
Authored: Thu Jul 6 12:33:47 2017 -0700
Committer: Jayush Luniya <jl...@hortonworks.com>
Committed: Thu Jul 6 12:33:47 2017 -0700

----------------------------------------------------------------------
 .../server/controller/internal/ClientConfigResourceProvider.java   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/42560676/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 bd445eb..15c2d81 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
@@ -225,6 +225,7 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
         String serviceName = response.getServiceName();
         String componentName = response.getComponentName();
         String hostName = response.getHostname();
+        String publicHostName = response.getPublicHostname();
         ComponentInfo componentInfo = null;
         String packageFolder = null;
 
@@ -441,6 +442,7 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
         jsonContent.put("clusterHostInfo", clusterHostInfo);
         jsonContent.put("hostLevelParams", hostLevelParams);
         jsonContent.put("hostname", hostName);
+        jsonContent.put("public_hostname", publicHostName);
         jsonContent.put("clusterName", cluster.getClusterName());
         jsonConfigurations = gson.toJson(jsonContent);
 


[44/52] [abbrv] ambari git commit: AMBARI-21427. Assigning hosts concurrently to same config group may fail with 'org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException: Config group already exist'. (stoader)

Posted by jl...@apache.org.
AMBARI-21427. Assigning hosts concurrently to same config group may fail with 'org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException: Config group already exist'. (stoader)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 3c9f125cc08269558f35a971c321777d331de1ca
Parents: 7f3d3b2
Author: Toader, Sebastian <st...@hortonworks.com>
Authored: Mon Jul 10 13:02:20 2017 +0200
Committer: Toader, Sebastian <st...@hortonworks.com>
Committed: Mon Jul 10 13:02:45 2017 +0200

----------------------------------------------------------------------
 .../ambari/server/topology/AmbariContext.java   | 28 +++++++++++++++++---
 1 file changed, 24 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3c9f125c/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
index 9b64edc..dee0e6c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
@@ -30,6 +30,7 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.concurrent.Callable;
 import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
 
 import javax.annotation.Nullable;
 import javax.inject.Inject;
@@ -81,6 +82,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.Striped;
 import com.google.inject.Provider;
 
 
@@ -121,6 +123,16 @@ public class AmbariContext {
 
   private final static Logger LOG = LoggerFactory.getLogger(AmbariContext.class);
 
+
+  /**
+   * When config groups are created using Blueprints these are created when
+   * hosts join a hostgroup and are added to the corresponding config group.
+   * Since hosts join in parallel there might be a race condition in creating
+   * the config group a host is to be added to. Thus we need to synchronize
+   * the creation of config groups with the same name.
+   */
+  private Striped<Lock> configGroupCreateLock = Striped.lazyWeakLock(1);
+
   public boolean isClusterKerberosEnabled(long clusterId) {
     Cluster cluster;
     try {
@@ -341,11 +353,17 @@ public class AmbariContext {
   }
 
   public void registerHostWithConfigGroup(final String hostName, final ClusterTopology topology, final String groupName) {
+    String qualifiedGroupName = getConfigurationGroupName(topology.getBlueprint().getName(), groupName);
+
+    Lock configGroupLock = configGroupCreateLock.get(qualifiedGroupName);
+
     try {
+      configGroupLock.lock();
+
       boolean hostAdded = RetryHelper.executeWithRetry(new Callable<Boolean>() {
         @Override
         public Boolean call() throws Exception {
-          return addHostToExistingConfigGroups(hostName, topology, groupName);
+          return addHostToExistingConfigGroups(hostName, topology, qualifiedGroupName);
         }
       });
       if (!hostAdded) {
@@ -355,6 +373,9 @@ public class AmbariContext {
       LOG.error("Unable to register config group for host: ", e);
       throw new RuntimeException("Unable to register config group for host: " + hostName);
     }
+    finally {
+      configGroupLock.unlock();
+    }
   }
 
   public RequestStatusResponse installHost(String hostName, String clusterName, Collection<String> skipInstallForComponents, Collection<String> dontSkipInstallForComponents, boolean skipFailure) {
@@ -562,7 +583,7 @@ public class AmbariContext {
   /**
    * Add the new host to an existing config group.
    */
-  private boolean addHostToExistingConfigGroups(String hostName, ClusterTopology topology, String groupName) {
+  private boolean addHostToExistingConfigGroups(String hostName, ClusterTopology topology, String configGroupName) {
     boolean addedHost = false;
     Clusters clusters;
     Cluster cluster;
@@ -576,9 +597,8 @@ public class AmbariContext {
     // I don't know of a method to get config group by name
     //todo: add a method to get config group by name
     Map<Long, ConfigGroup> configGroups = cluster.getConfigGroups();
-    String qualifiedGroupName = getConfigurationGroupName(topology.getBlueprint().getName(), groupName);
     for (ConfigGroup group : configGroups.values()) {
-      if (group.getName().equals(qualifiedGroupName)) {
+      if (group.getName().equals(configGroupName)) {
         try {
           Host host = clusters.getHost(hostName);
           addedHost = true;


[08/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/setup_ranger_xml.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/setup_ranger_xml.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/setup_ranger_xml.py
new file mode 100644
index 0000000..c84ae96
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/setup_ranger_xml.py
@@ -0,0 +1,853 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+import os
+import re
+from resource_management.libraries.script import Script
+from resource_management.libraries.functions.default import default
+from resource_management.core.logger import Logger
+from resource_management.core.resources.system import File, Directory, Execute, Link
+from resource_management.core.source import DownloadSource, InlineTemplate, Template
+from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.libraries.resources.modify_properties_file import ModifyPropertiesFile
+from resource_management.libraries.resources.properties_file import PropertiesFile
+from resource_management.core.exceptions import Fail
+from resource_management.libraries.functions.decorator import retry
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.core.utils import PasswordString
+from resource_management.core.shell import as_sudo
+from resource_management.libraries.functions import solr_cloud_util
+from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING
+from resource_management.core.exceptions import ExecutionFailed
+
+# This file contains functions used for setup/configure of Ranger Admin and Ranger Usersync.
+# The design is to mimic what is done by the setup.sh script bundled by Ranger component currently.
+
+def ranger(name=None, upgrade_type=None):
+  """
+  parameter name: name of ranger service component
+  """
+  if name == 'ranger_admin':
+    setup_ranger_admin(upgrade_type=upgrade_type)
+
+  if name == 'ranger_usersync':
+    setup_usersync(upgrade_type=upgrade_type)
+
+  if name == 'ranger_tagsync':
+    setup_tagsync(upgrade_type=upgrade_type)
+
+def setup_ranger_admin(upgrade_type=None):
+  import params
+
+  if upgrade_type is None:
+    upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
+
+  ranger_home = params.ranger_home
+  ranger_conf = params.ranger_conf
+
+  Directory(ranger_conf,
+    owner = params.unix_user,
+    group = params.unix_group,
+    create_parents = True
+  )
+
+  copy_jdbc_connector()
+
+  File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
+    content = DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),
+    mode = 0644,
+  )
+
+  cp = format("{check_db_connection_jar}")
+  if params.db_flavor.lower() == 'sqla':
+    cp = cp + os.pathsep + format("{ranger_home}/ews/lib/sajdbc4.jar")
+  else:
+    cp = cp + os.pathsep + format("{driver_curl_target}")
+  cp = cp + os.pathsep + format("{ranger_home}/ews/lib/*")
+
+  db_connection_check_command = format(
+    "{java_home}/bin/java -cp {cp} org.apache.ambari.server.DBConnectionVerification '{ranger_jdbc_connection_url}' {ranger_db_user} {ranger_db_password!p} {ranger_jdbc_driver}")
+
+  env_dict = {}
+  if params.db_flavor.lower() == 'sqla':
+    env_dict = {'LD_LIBRARY_PATH':params.ld_lib_path}
+
+  Execute(db_connection_check_command, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', tries=5, try_sleep=10, environment=env_dict)
+
+  Execute(('ln','-sf', format('{ranger_home}/ews/webapp/WEB-INF/classes/conf'), format('{ranger_home}/conf')),
+    not_if=format("ls {ranger_home}/conf"),
+    only_if=format("ls {ranger_home}/ews/webapp/WEB-INF/classes/conf"),
+    sudo=True)
+
+  if upgrade_type is not None:
+    src_file = format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/ranger-admin-default-site.xml')
+    dst_file = format('{ranger_home}/conf/ranger-admin-default-site.xml')
+    Execute(('cp', '-f', src_file, dst_file), sudo=True)
+
+    src_file = format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/security-applicationContext.xml')
+    dst_file = format('{ranger_home}/conf/security-applicationContext.xml')
+
+    Execute(('cp', '-f', src_file, dst_file), sudo=True)
+
+  Directory(format('{ranger_home}/'),
+            owner = params.unix_user,
+            group = params.unix_group,
+            recursive_ownership = True,
+  )
+
+  Directory(params.ranger_pid_dir,
+    mode=0755,
+    owner = params.unix_user,
+    group = params.user_group,
+    cd_access = "a",
+    create_parents=True
+  )
+
+  if params.stack_supports_pid:
+    File(format('{ranger_conf}/ranger-admin-env-piddir.sh'),
+      content = format("export RANGER_PID_DIR_PATH={ranger_pid_dir}\nexport RANGER_USER={unix_user}"),
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode=0755
+    )
+
+  Directory(params.admin_log_dir,
+    owner = params.unix_user,
+    group = params.unix_group,
+    create_parents = True,
+    cd_access='a',
+    mode=0755
+  )
+
+  File(format('{ranger_conf}/ranger-admin-env-logdir.sh'),
+    content = format("export RANGER_ADMIN_LOG_DIR={admin_log_dir}"),
+    owner = params.unix_user,
+    group = params.unix_group,
+    mode=0755
+  )
+
+  if os.path.isfile(params.ranger_admin_default_file):
+    File(params.ranger_admin_default_file, owner=params.unix_user, group=params.unix_group)
+  else:
+    Logger.warning('Required file {0} does not exist, copying the file to {1} path'.format(params.ranger_admin_default_file, ranger_conf))
+    src_file = format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/ranger-admin-default-site.xml')
+    dst_file = format('{ranger_home}/conf/ranger-admin-default-site.xml')
+    Execute(('cp', '-f', src_file, dst_file), sudo=True)
+    File(params.ranger_admin_default_file, owner=params.unix_user, group=params.unix_group)
+
+  if os.path.isfile(params.security_app_context_file):
+    File(params.security_app_context_file, owner=params.unix_user, group=params.unix_group)
+  else:
+    Logger.warning('Required file {0} does not exist, copying the file to {1} path'.format(params.security_app_context_file, ranger_conf))
+    src_file = format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/security-applicationContext.xml')
+    dst_file = format('{ranger_home}/conf/security-applicationContext.xml')
+    Execute(('cp', '-f', src_file, dst_file), sudo=True)
+    File(params.security_app_context_file, owner=params.unix_user, group=params.unix_group)
+
+  if upgrade_type is not None and params.stack_supports_config_versioning:
+    if os.path.islink('/usr/bin/ranger-admin'):
+      Link('/usr/bin/ranger-admin', action="delete")
+
+    Link('/usr/bin/ranger-admin',
+    to=format('{ranger_home}/ews/ranger-admin-services.sh'))
+
+  if default("/configurations/ranger-admin-site/ranger.authentication.method", "") == 'PAM':
+    d = '/etc/pam.d'
+    if os.path.isdir(d):
+      if os.path.isfile(os.path.join(d, 'ranger-admin')):
+        Logger.info('ranger-admin PAM file already exists.')
+      else:
+        File(format('{d}/ranger-admin'),
+            content=Template('ranger_admin_pam.j2'),
+            owner = params.unix_user,
+            group = params.unix_group,
+            mode=0644
+            )
+      if os.path.isfile(os.path.join(d, 'ranger-remote')):
+        Logger.info('ranger-remote PAM file already exists.')
+      else:
+        File(format('{d}/ranger-remote'),
+            content=Template('ranger_remote_pam.j2'),
+            owner = params.unix_user,
+            group = params.unix_group,
+            mode=0644
+            )
+    else:
+        Logger.error("Unable to use PAM authentication, /etc/pam.d/ directory does not exist.")
+
+  Execute(('ln','-sf', format('{ranger_home}/ews/ranger-admin-services.sh'),'/usr/bin/ranger-admin'),
+    not_if=format("ls /usr/bin/ranger-admin"),
+    only_if=format("ls {ranger_home}/ews/ranger-admin-services.sh"),
+    sudo=True)
+
+  # remove plain-text password from xml configs
+
+  ranger_admin_site_copy = {}
+  ranger_admin_site_copy.update(params.config['configurations']['ranger-admin-site'])
+  for prop in params.ranger_admin_password_properties:
+    if prop in ranger_admin_site_copy:
+      ranger_admin_site_copy[prop] = "_"
+
+  XmlConfig("ranger-admin-site.xml",
+    conf_dir=ranger_conf,
+    configurations=ranger_admin_site_copy,
+    configuration_attributes=params.config['configuration_attributes']['ranger-admin-site'],
+    owner=params.unix_user,
+    group=params.unix_group,
+    mode=0644)
+
+  Directory(os.path.join(ranger_conf,'ranger_jaas'),
+    mode=0700,
+    owner=params.unix_user,
+    group=params.unix_group,
+  )
+
+  if params.stack_supports_ranger_log4j:
+    File(format('{ranger_home}/ews/webapp/WEB-INF/log4j.properties'),
+      owner=params.unix_user,
+      group=params.unix_group,
+      content=InlineTemplate(params.admin_log4j),
+      mode=0644
+    )
+
+  do_keystore_setup(upgrade_type=upgrade_type)
+
+  create_core_site_xml(ranger_conf)
+
+  if params.stack_supports_ranger_kerberos and params.security_enabled:
+    if params.is_hbase_ha_enabled and params.ranger_hbase_plugin_enabled:
+      XmlConfig("hbase-site.xml",
+        conf_dir=ranger_conf,
+        configurations=params.config['configurations']['hbase-site'],
+        configuration_attributes=params.config['configuration_attributes']['hbase-site'],
+        owner=params.unix_user,
+        group=params.unix_group,
+        mode=0644
+      )
+
+    if params.is_namenode_ha_enabled and params.ranger_hdfs_plugin_enabled:
+      XmlConfig("hdfs-site.xml",
+        conf_dir=ranger_conf,
+        configurations=params.config['configurations']['hdfs-site'],
+        configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
+        owner=params.unix_user,
+        group=params.unix_group,
+        mode=0644
+      )
+
+def setup_ranger_db(stack_version=None):
+  import params
+
+  ranger_home = params.ranger_home
+  version = params.version
+  if stack_version is not None:
+    ranger_home = format("{stack_root}/{stack_version}/ranger-admin")
+    version = stack_version
+
+  copy_jdbc_connector(stack_version=version)
+
+  ModifyPropertiesFile(format("{ranger_home}/install.properties"),
+    properties = {'audit_store': params.ranger_audit_source_type},
+    owner = params.unix_user,
+  )
+
+  env_dict = {'RANGER_ADMIN_HOME':ranger_home, 'JAVA_HOME':params.java_home}
+  if params.db_flavor.lower() == 'sqla':
+    env_dict = {'RANGER_ADMIN_HOME':ranger_home, 'JAVA_HOME':params.java_home, 'LD_LIBRARY_PATH':params.ld_lib_path}
+
+  # User wants us to setup the DB user and DB?
+  if params.create_db_dbuser:
+    Logger.info('Setting up Ranger DB and DB User')
+    dba_setup = format('ambari-python-wrap {ranger_home}/dba_script.py -q')
+    Execute(dba_setup,
+            environment=env_dict,
+            logoutput=True,
+            user=params.unix_user,
+    )
+  else:
+    Logger.info('Separate DBA property not set. Assuming Ranger DB and DB User exists!')
+
+  db_setup = format('ambari-python-wrap {ranger_home}/db_setup.py')
+  Execute(db_setup,
+          environment=env_dict,
+          logoutput=True,
+          user=params.unix_user,
+  )
+
+
+def setup_java_patch(stack_version=None):
+  import params
+
+  ranger_home = params.ranger_home
+  if stack_version is not None:
+    ranger_home = format("{stack_root}/{stack_version}/ranger-admin")
+
+  env_dict = {'RANGER_ADMIN_HOME':ranger_home, 'JAVA_HOME':params.java_home}
+  if params.db_flavor.lower() == 'sqla':
+    env_dict = {'RANGER_ADMIN_HOME':ranger_home, 'JAVA_HOME':params.java_home, 'LD_LIBRARY_PATH':params.ld_lib_path}
+
+  setup_java_patch = format('ambari-python-wrap {ranger_home}/db_setup.py -javapatch')
+  Execute(setup_java_patch,
+          environment=env_dict,
+          logoutput=True,
+          user=params.unix_user,
+  )
+
+
+def do_keystore_setup(upgrade_type=None):
+  import params
+
+  ranger_home = params.ranger_home
+  cred_lib_path = params.cred_lib_path
+
+  if not is_empty(params.ranger_credential_provider_path):
+    ranger_credential_helper(cred_lib_path, params.ranger_jpa_jdbc_credential_alias, params.ranger_ambari_db_password, params.ranger_credential_provider_path)
+
+    File(params.ranger_credential_provider_path,
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode = 0640
+    )
+
+  if not is_empty(params.ranger_credential_provider_path) and (params.ranger_audit_source_type).lower() == 'db' and not is_empty(params.ranger_ambari_audit_db_password):
+    ranger_credential_helper(cred_lib_path, params.ranger_jpa_audit_jdbc_credential_alias, params.ranger_ambari_audit_db_password, params.ranger_credential_provider_path)
+
+    File(params.ranger_credential_provider_path,
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode = 0640
+    )
+
+  if params.ranger_auth_method.upper() == "LDAP":
+    ranger_credential_helper(params.cred_lib_path, params.ranger_ldap_password_alias, params.ranger_ldap_bind_auth_password, params.ranger_credential_provider_path)
+
+    File(params.ranger_credential_provider_path,
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode = 0640
+    )
+
+  if params.ranger_auth_method.upper() == "ACTIVE_DIRECTORY":
+    ranger_credential_helper(params.cred_lib_path, params.ranger_ad_password_alias, params.ranger_ad_bind_auth_password, params.ranger_credential_provider_path)
+
+    File(params.ranger_credential_provider_path,
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode = 0640
+    )
+
+  if params.stack_supports_secure_ssl_password:
+    ranger_credential_helper(params.cred_lib_path, params.ranger_truststore_alias, params.truststore_password, params.ranger_credential_provider_path)
+
+    if params.https_enabled and not params.http_enabled:
+      ranger_credential_helper(params.cred_lib_path, params.ranger_https_keystore_alias, params.https_keystore_password, params.ranger_credential_provider_path)
+
+    File(params.ranger_credential_provider_path,
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode = 0640
+    )
+
+def password_validation(password):
+  import params
+  if password.strip() == "":
+    raise Fail("Blank password is not allowed for Bind user. Please enter valid password.")
+  if re.search("[\\\`'\"]",password):
+    raise Fail("LDAP/AD bind password contains one of the unsupported special characters like \" ' \ `")
+  else:
+    Logger.info("password validated")
+
+def copy_jdbc_connector(stack_version=None):
+  import params
+
+  if params.jdbc_jar_name is None and params.driver_curl_source.endswith("/None"):
+    error_message = format("{db_flavor} jdbc driver cannot be downloaded from {jdk_location}\nPlease run 'ambari-server setup --jdbc-db={db_flavor} --jdbc-driver={{path_to_jdbc}}' on ambari-server host.")
+    raise Fail(error_message)
+
+  if params.driver_curl_source and not params.driver_curl_source.endswith("/None"):
+    if params.previous_jdbc_jar and os.path.isfile(params.previous_jdbc_jar):
+      File(params.previous_jdbc_jar, action='delete')
+
+  File(params.downloaded_custom_connector,
+    content = DownloadSource(params.driver_curl_source),
+    mode = 0644
+  )
+
+  ranger_home = params.ranger_home
+  if stack_version is not None:
+    ranger_home = format("{stack_root}/{stack_version}/ranger-admin")
+
+  driver_curl_target = format("{ranger_home}/ews/lib/{jdbc_jar_name}")
+
+  if params.db_flavor.lower() == 'sqla':
+    Execute(('tar', '-xvf', params.downloaded_custom_connector, '-C', params.tmp_dir), sudo = True)
+
+    Execute(('cp', '--remove-destination', params.jar_path_in_archive, os.path.join(ranger_home, 'ews', 'lib')),
+      path=["/bin", "/usr/bin/"],
+      sudo=True)
+
+    File(os.path.join(ranger_home, 'ews', 'lib', 'sajdbc4.jar'), mode=0644)
+
+    Directory(params.jdbc_libs_dir,
+      cd_access="a",
+      create_parents=True)
+
+    Execute(as_sudo(['yes', '|', 'cp', params.libs_path_in_archive, params.jdbc_libs_dir], auto_escape=False),
+            path=["/bin", "/usr/bin/"])
+  else:
+    Execute(('cp', '--remove-destination', params.downloaded_custom_connector, os.path.join(ranger_home, 'ews', 'lib')),
+      path=["/bin", "/usr/bin/"],
+      sudo=True)
+
+    File(os.path.join(ranger_home, 'ews', 'lib',params.jdbc_jar_name), mode=0644)
+
+  ModifyPropertiesFile(format("{ranger_home}/install.properties"),
+    properties = params.config['configurations']['admin-properties'],
+    owner = params.unix_user,
+  )
+
+  if params.db_flavor.lower() == 'sqla':
+    ModifyPropertiesFile(format("{ranger_home}/install.properties"),
+      properties = {'SQL_CONNECTOR_JAR': format('{ranger_home}/ews/lib/sajdbc4.jar')},
+      owner = params.unix_user,
+    )
+  else:
+    ModifyPropertiesFile(format("{ranger_home}/install.properties"),
+      properties = {'SQL_CONNECTOR_JAR': format('{driver_curl_target}')},
+       owner = params.unix_user,
+    )
+
+def setup_usersync(upgrade_type=None):
+  import params
+
+  usersync_home = params.usersync_home
+  ranger_home = params.ranger_home
+  ranger_ugsync_conf = params.ranger_ugsync_conf
+
+  if not is_empty(params.ranger_usersync_ldap_ldapbindpassword) and params.ug_sync_source == 'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder':
+    password_validation(params.ranger_usersync_ldap_ldapbindpassword)
+
+  Directory(params.ranger_pid_dir,
+    mode=0755,
+    owner = params.unix_user,
+    group = params.user_group,
+    cd_access = "a",
+    create_parents=True
+  )
+
+  if params.stack_supports_pid:
+    File(format('{ranger_ugsync_conf}/ranger-usersync-env-piddir.sh'),
+      content = format("export USERSYNC_PID_DIR_PATH={ranger_pid_dir}\nexport UNIX_USERSYNC_USER={unix_user}"),
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode=0755
+    )
+
+  Directory(params.usersync_log_dir,
+    owner = params.unix_user,
+    group = params.unix_group,
+    cd_access = 'a',
+    create_parents=True,
+    mode=0755,
+    recursive_ownership = True
+  )
+
+  File(format('{ranger_ugsync_conf}/ranger-usersync-env-logdir.sh'),
+    content = format("export logdir={usersync_log_dir}"),
+    owner = params.unix_user,
+    group = params.unix_group,
+    mode=0755
+  )
+
+  Directory(format("{ranger_ugsync_conf}/"),
+    owner = params.unix_user
+  )
+
+  if upgrade_type is not None:
+    src_file = format('{usersync_home}/conf.dist/ranger-ugsync-default.xml')
+    dst_file = format('{usersync_home}/conf/ranger-ugsync-default.xml')
+    Execute(('cp', '-f', src_file, dst_file), sudo=True)
+
+  if params.stack_supports_ranger_log4j:
+    File(format('{usersync_home}/conf/log4j.properties'),
+      owner=params.unix_user,
+      group=params.unix_group,
+      content=InlineTemplate(params.usersync_log4j),
+      mode=0644
+    )
+  elif upgrade_type is not None and not params.stack_supports_ranger_log4j:
+    src_file = format('{usersync_home}/conf.dist/log4j.xml')
+    dst_file = format('{usersync_home}/conf/log4j.xml')
+    Execute(('cp', '-f', src_file, dst_file), sudo=True)
+
+  # remove plain-text password from xml configs
+  ranger_ugsync_site_copy = {}
+  ranger_ugsync_site_copy.update(params.config['configurations']['ranger-ugsync-site'])
+  for prop in params.ranger_usersync_password_properties:
+    if prop in ranger_ugsync_site_copy:
+      ranger_ugsync_site_copy[prop] = "_"
+
+  XmlConfig("ranger-ugsync-site.xml",
+    conf_dir=ranger_ugsync_conf,
+    configurations=ranger_ugsync_site_copy,
+    configuration_attributes=params.config['configuration_attributes']['ranger-ugsync-site'],
+    owner=params.unix_user,
+    group=params.unix_group,
+    mode=0644)
+
+  if os.path.isfile(params.ranger_ugsync_default_file):
+    File(params.ranger_ugsync_default_file, owner=params.unix_user, group=params.unix_group)
+
+  if os.path.isfile(params.usgsync_log4j_file):
+    File(params.usgsync_log4j_file, owner=params.unix_user, group=params.unix_group)
+
+  if os.path.isfile(params.cred_validator_file):
+    File(params.cred_validator_file, group=params.unix_group, mode=04555)
+
+  ranger_credential_helper(params.ugsync_cred_lib, 'usersync.ssl.key.password', params.ranger_usersync_keystore_password, params.ugsync_jceks_path)
+
+  if not is_empty(params.ranger_usersync_ldap_ldapbindpassword) and params.ug_sync_source == 'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder':
+    ranger_credential_helper(params.ugsync_cred_lib, 'ranger.usersync.ldap.bindalias', params.ranger_usersync_ldap_ldapbindpassword, params.ugsync_jceks_path)
+
+  ranger_credential_helper(params.ugsync_cred_lib, 'usersync.ssl.truststore.password', params.ranger_usersync_truststore_password, params.ugsync_jceks_path)
+
+  File(params.ugsync_jceks_path,
+       owner = params.unix_user,
+       group = params.unix_group,
+       mode = 0640
+  )
+
+  File([params.usersync_start, params.usersync_stop],
+       owner = params.unix_user,
+       group = params.unix_group
+  )
+
+  File(params.usersync_services_file,
+    mode = 0755,
+  )
+
+  Execute(('ln','-sf', format('{usersync_services_file}'),'/usr/bin/ranger-usersync'),
+    not_if=format("ls /usr/bin/ranger-usersync"),
+    only_if=format("ls {usersync_services_file}"),
+    sudo=True)
+
+  if not os.path.isfile(params.ranger_usersync_keystore_file):
+    cmd = format("{java_home}/bin/keytool -genkeypair -keyalg RSA -alias selfsigned -keystore '{ranger_usersync_keystore_file}' -keypass {ranger_usersync_keystore_password!p} -storepass {ranger_usersync_keystore_password!p} -validity 3600 -keysize 2048 -dname '{default_dn_name}'")
+
+    Execute(cmd, logoutput=True, user = params.unix_user)
+
+    File(params.ranger_usersync_keystore_file,
+        owner = params.unix_user,
+        group = params.unix_group,
+        mode = 0640
+    )
+
+  create_core_site_xml(ranger_ugsync_conf)
+
+def setup_tagsync(upgrade_type=None):
+  import params
+
+  ranger_tagsync_home = params.ranger_tagsync_home
+  ranger_home = params.ranger_home
+  ranger_tagsync_conf = params.ranger_tagsync_conf
+
+  Directory(format("{ranger_tagsync_conf}"),
+    owner = params.unix_user,
+    group = params.unix_group,
+    create_parents = True
+  )
+
+  Directory(params.ranger_pid_dir,
+    mode=0755,
+    create_parents=True,
+    owner = params.unix_user,
+    group = params.user_group,
+    cd_access = "a",
+  )
+
+  if params.stack_supports_pid:
+    File(format('{ranger_tagsync_conf}/ranger-tagsync-env-piddir.sh'),
+      content = format("export TAGSYNC_PID_DIR_PATH={ranger_pid_dir}\nexport UNIX_TAGSYNC_USER={unix_user}"),
+      owner = params.unix_user,
+      group = params.unix_group,
+      mode=0755
+    )
+
+  Directory(params.tagsync_log_dir,
+    create_parents = True,
+    owner = params.unix_user,
+    group = params.unix_group,
+    cd_access = "a",
+    mode=0755
+  )
+
+  File(format('{ranger_tagsync_conf}/ranger-tagsync-env-logdir.sh'),
+    content = format("export RANGER_TAGSYNC_LOG_DIR={tagsync_log_dir}"),
+    owner = params.unix_user,
+    group = params.unix_group,
+    mode=0755
+  )
+
+  XmlConfig("ranger-tagsync-site.xml",
+    conf_dir=ranger_tagsync_conf,
+    configurations=params.config['configurations']['ranger-tagsync-site'],
+    configuration_attributes=params.config['configuration_attributes']['ranger-tagsync-site'],
+    owner=params.unix_user,
+    group=params.unix_group,
+    mode=0644)
+  if params.stack_supports_ranger_tagsync_ssl_xml_support:
+    Logger.info("Stack supports tagsync-ssl configurations, performing the same.")
+    setup_tagsync_ssl_configs()
+  else:
+    Logger.info("Stack doesnt support tagsync-ssl configurations, skipping the same.")
+
+  PropertiesFile(format('{ranger_tagsync_conf}/atlas-application.properties'),
+    properties = params.tagsync_application_properties,
+    mode=0755,
+    owner=params.unix_user,
+    group=params.unix_group
+  )
+
+  File(format('{ranger_tagsync_conf}/log4j.properties'),
+    owner=params.unix_user,
+    group=params.unix_group,
+    content=InlineTemplate(params.tagsync_log4j),
+    mode=0644
+  )
+
+  File(params.tagsync_services_file,
+    mode = 0755,
+  )
+
+  Execute(('ln','-sf', format('{tagsync_services_file}'),'/usr/bin/ranger-tagsync'),
+    not_if=format("ls /usr/bin/ranger-tagsync"),
+    only_if=format("ls {tagsync_services_file}"),
+    sudo=True)
+
+  create_core_site_xml(ranger_tagsync_conf)
+
+def ranger_credential_helper(lib_path, alias_key, alias_value, file_path):
+  import params
+
+  java_bin = format('{java_home}/bin/java')
+  file_path = format('jceks://file{file_path}')
+  cmd = (java_bin, '-cp', lib_path, 'org.apache.ranger.credentialapi.buildks', 'create', alias_key, '-value', PasswordString(alias_value), '-provider', file_path)
+  Execute(cmd, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
+
+def create_core_site_xml(conf_dir):
+  import params
+
+  if params.stack_supports_ranger_kerberos:
+    if params.has_namenode:
+      XmlConfig("core-site.xml",
+                conf_dir=conf_dir,
+                configurations=params.config['configurations']['core-site'],
+                configuration_attributes=params.config['configuration_attributes']['core-site'],
+                owner=params.unix_user,
+                group=params.unix_group,
+                mode=0644
+      )
+    else:
+      Logger.warning('HDFS service not installed. Creating core-site.xml file.')
+      XmlConfig("core-site.xml",
+        conf_dir=conf_dir,
+        configurations=params.core_site_property,
+        configuration_attributes={},
+        owner=params.unix_user,
+        group=params.unix_group,
+        mode=0644
+      )
+
+def setup_ranger_audit_solr():
+  import params
+
+  if params.security_enabled and params.stack_supports_ranger_kerberos:
+
+    if params.solr_jaas_file is not None:
+      File(format("{solr_jaas_file}"),
+        content=Template("ranger_solr_jaas_conf.j2"),
+        owner=params.unix_user
+      )
+  try:
+    check_znode()
+
+    if params.stack_supports_ranger_solr_configs:
+      Logger.info('Solr configrations supported,creating solr-configurations.')
+      File(format("{ranger_solr_conf}/solrconfig.xml"),
+           content=InlineTemplate(params.ranger_solr_config_content),
+           owner=params.unix_user,
+           group=params.unix_group,
+           mode=0644
+      )
+
+      solr_cloud_util.upload_configuration_to_zk(
+        zookeeper_quorum = params.zookeeper_quorum,
+        solr_znode = params.solr_znode,
+        config_set = params.ranger_solr_config_set,
+        config_set_dir = params.ranger_solr_conf,
+        tmp_dir = params.tmp_dir,
+        java64_home = params.java_home,
+        solrconfig_content = InlineTemplate(params.ranger_solr_config_content),
+        jaas_file=params.solr_jaas_file,
+        retry=30, interval=5
+      )
+
+    else:
+      Logger.info('Solr configrations not supported, skipping solr-configurations.')
+      solr_cloud_util.upload_configuration_to_zk(
+        zookeeper_quorum = params.zookeeper_quorum,
+        solr_znode = params.solr_znode,
+        config_set = params.ranger_solr_config_set,
+        config_set_dir = params.ranger_solr_conf,
+        tmp_dir = params.tmp_dir,
+        java64_home = params.java_home,
+        jaas_file=params.solr_jaas_file,
+        retry=30, interval=5)
+
+    if params.security_enabled and params.has_infra_solr \
+      and not params.is_external_solrCloud_enabled and params.stack_supports_ranger_kerberos:
+
+      solr_cloud_util.add_solr_roles(params.config,
+                                     roles = [params.infra_solr_role_ranger_admin, params.infra_solr_role_ranger_audit, params.infra_solr_role_dev],
+                                     new_service_principals = [params.ranger_admin_jaas_principal])
+      service_default_principals_map = [('hdfs', 'nn'), ('hbase', 'hbase'), ('hive', 'hive'), ('kafka', 'kafka'), ('kms', 'rangerkms'),
+                                                    ('knox', 'knox'), ('nifi', 'nifi'), ('storm', 'storm'), ('yanr', 'yarn')]
+      service_principals = get_ranger_plugin_principals(service_default_principals_map)
+      solr_cloud_util.add_solr_roles(params.config,
+                                     roles = [params.infra_solr_role_ranger_audit, params.infra_solr_role_dev],
+                                     new_service_principals = service_principals)
+
+
+    solr_cloud_util.create_collection(
+      zookeeper_quorum = params.zookeeper_quorum,
+      solr_znode = params.solr_znode,
+      collection = params.ranger_solr_collection_name,
+      config_set = params.ranger_solr_config_set,
+      java64_home = params.java_home,
+      shards = params.ranger_solr_shards,
+      replication_factor = int(params.replication_factor),
+      jaas_file = params.solr_jaas_file)
+
+    if params.security_enabled and params.has_infra_solr \
+      and not params.is_external_solrCloud_enabled and params.stack_supports_ranger_kerberos:
+      secure_znode(format('{solr_znode}/configs/{ranger_solr_config_set}'), params.solr_jaas_file)
+      secure_znode(format('{solr_znode}/collections/{ranger_solr_collection_name}'), params.solr_jaas_file)
+  except ExecutionFailed as execution_exception:
+    Logger.error('Error when configuring Solr for Ranger, Kindly check Solr/Zookeeper services to be up and running:\n {0}'.format(execution_exception))
+
+def setup_ranger_admin_passwd_change():
+  import params
+
+  if params.admin_password != params.default_admin_password:
+    cmd = format('ambari-python-wrap {ranger_home}/db_setup.py -changepassword {admin_username} {default_admin_password!p} {admin_password!p}')
+    Logger.info('Updating admin password')
+    Execute(cmd, environment={'JAVA_HOME': params.java_home, 'RANGER_ADMIN_HOME': params.ranger_home}, user=params.unix_user)
+
+@retry(times=10, sleep_time=5, err_class=Fail)
+def check_znode():
+  import params
+  solr_cloud_util.check_znode(
+    zookeeper_quorum=params.zookeeper_quorum,
+    solr_znode=params.solr_znode,
+    java64_home=params.java_home)
+
+def secure_znode(znode, jaasFile):
+  import params
+  solr_cloud_util.secure_znode(config=params.config, zookeeper_quorum=params.zookeeper_quorum,
+                               solr_znode=znode,
+                               jaas_file=jaasFile,
+                               java64_home=params.java_home, sasl_users=[params.ranger_admin_jaas_principal])
+
+def get_ranger_plugin_principals(services_defaults_tuple_list):
+  """
+  Get ranger plugin user principals from service-default value maps using ranger-*-audit configurations
+  """
+  import params
+  user_principals = []
+  if len(services_defaults_tuple_list) < 1:
+    raise Exception("Services - defaults map parameter is missing.")
+
+  for (service, default_value) in services_defaults_tuple_list:
+    user_principal = default(format("configurations/ranger-{service}-audit/xasecure.audit.jaas.Client.option.principal"), default_value)
+    user_principals.append(user_principal)
+  return user_principals
+
+
+def setup_tagsync_ssl_configs():
+  import params
+  Directory(params.security_store_path,
+            cd_access="a",
+            create_parents=True)
+
+  Directory(params.tagsync_etc_path,
+            cd_access="a",
+            owner=params.unix_user,
+            group=params.unix_group,
+            mode=0775,
+            create_parents=True)
+
+  # remove plain-text password from xml configs
+  ranger_tagsync_policymgr_ssl_copy = {}
+  ranger_tagsync_policymgr_ssl_copy.update(params.config['configurations']['ranger-tagsync-policymgr-ssl'])
+  for prop in params.ranger_tagsync_password_properties:
+    if prop in ranger_tagsync_policymgr_ssl_copy:
+      ranger_tagsync_policymgr_ssl_copy[prop] = "_"
+
+  XmlConfig("ranger-policymgr-ssl.xml",
+            conf_dir=params.ranger_tagsync_conf,
+            configurations=ranger_tagsync_policymgr_ssl_copy,
+            configuration_attributes=params.config['configuration_attributes']['ranger-tagsync-policymgr-ssl'],
+            owner=params.unix_user,
+            group=params.unix_group,
+            mode=0644)
+
+  ranger_credential_helper(params.tagsync_cred_lib, 'sslKeyStore', params.ranger_tagsync_keystore_password, params.ranger_tagsync_credential_file)
+  ranger_credential_helper(params.tagsync_cred_lib, 'sslTrustStore', params.ranger_tagsync_truststore_password, params.ranger_tagsync_credential_file)
+
+  File(params.ranger_tagsync_credential_file,
+       owner = params.unix_user,
+       group = params.unix_group,
+       mode = 0640
+       )
+
+  # remove plain-text password from xml configs
+  atlas_tagsync_ssl_copy = {}
+  atlas_tagsync_ssl_copy.update(params.config['configurations']['atlas-tagsync-ssl'])
+  for prop in params.ranger_tagsync_password_properties:
+    if prop in atlas_tagsync_ssl_copy:
+      atlas_tagsync_ssl_copy[prop] = "_"
+
+  XmlConfig("atlas-tagsync-ssl.xml",
+            conf_dir=params.ranger_tagsync_conf,
+            configurations=atlas_tagsync_ssl_copy,
+            configuration_attributes=params.config['configuration_attributes']['atlas-tagsync-ssl'],
+            owner=params.unix_user,
+            group=params.unix_group,
+            mode=0644)
+
+  ranger_credential_helper(params.tagsync_cred_lib, 'sslKeyStore', params.atlas_tagsync_keystore_password, params.atlas_tagsync_credential_file)
+  ranger_credential_helper(params.tagsync_cred_lib, 'sslTrustStore', params.atlas_tagsync_truststore_password, params.atlas_tagsync_credential_file)
+
+  File(params.atlas_tagsync_credential_file,
+       owner = params.unix_user,
+       group = params.unix_group,
+       mode = 0640
+       )
+  Logger.info("Configuring tagsync-ssl configurations done successfully.")

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/status_params.py
new file mode 100644
index 0000000..842430b
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/status_params.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management.libraries.script import Script
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.version import format_stack_version
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions import StackFeature
+
+config  = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
+
+upgrade_marker_file = format("{tmp_dir}/rangeradmin_ru.inprogress")
+ranger_pid_dir = config['configurations']['ranger-env']['ranger_pid_dir']
+tagsync_pid_file = format('{ranger_pid_dir}/tagsync.pid')
+stack_name = default("/hostLevelParams/stack_name", None)
+stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+ranger_admin_pid_file = format('{ranger_pid_dir}/rangeradmin.pid')
+ranger_usersync_pid_file = format('{ranger_pid_dir}/usersync.pid')
+stack_supports_pid = stack_version_formatted and check_stack_feature(StackFeature.RANGER_PID_SUPPORT, stack_version_formatted)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/upgrade.py
new file mode 100644
index 0000000..a07a1fd
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/upgrade.py
@@ -0,0 +1,31 @@
+
+#!/usr/bin/env python
+"""
+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.
+
+"""
+from resource_management.core.resources.system import Execute
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions.format import format
+
+def prestart(env, stack_component):
+  import params
+
+  if params.version and params.stack_supports_rolling_upgrade:
+    conf_select.select(params.stack_name, stack_component, params.version)
+    stack_select.select(stack_component, params.version)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/input.config-ranger.json.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/input.config-ranger.json.j2 b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/input.config-ranger.json.j2
new file mode 100644
index 0000000..6c5bb1f
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/input.config-ranger.json.j2
@@ -0,0 +1,79 @@
+{#
+ # 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.
+ #}
+{
+  "input":[
+    {
+      "type":"ranger_admin",
+      "rowtype":"service",
+      "path":"{{default('/configurations/ranger-env/ranger_admin_log_dir', '/var/log/ranger/admin')}}/xa_portal.log"
+    },
+    {
+      "type":"ranger_dbpatch",
+      "is_enabled":"true",
+      "path":"{{default('/configurations/ranger-env/ranger_admin_log_dir', '/var/log/ranger/admin')}}/ranger_db_patch.log"
+    },
+    {
+      "type":"ranger_usersync",
+      "rowtype":"service",
+      "path":"{{default('/configurations/ranger-env/ranger_usersync_log_dir', '/var/log/ranger/usersync')}}/usersync.log"
+    }
+  ],
+  "filter":[
+    {
+      "filter":"grok",
+      "conditions":{
+        "fields":{
+          "type":[
+            "ranger_admin",
+            "ranger_dbpatch"
+          ]
+        }
+      },
+      "log4j_format":"%d [%t] %-5p %C{6} (%F:%L) - %m%n",
+      "multiline_pattern":"^(%{TIMESTAMP_ISO8601:logtime})",
+      "message_pattern":"(?m)^%{TIMESTAMP_ISO8601:logtime}%{SPACE}\\[%{DATA:thread_name}\\]%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVACLASS:logger_name}%{SPACE}\\(%{JAVAFILE:file}:%{INT:line_number}\\)%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}",
+      "post_map_values":{
+        "logtime":{
+          "map_date":{
+            "target_date_pattern":"yyyy-MM-dd HH:mm:ss,SSS"
+          }
+        }
+      }
+    },
+    {
+      "filter":"grok",
+      "conditions":{
+        "fields":{
+          "type":[
+            "ranger_usersync"
+          ]
+        }
+      },
+      "log4j_format":"%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n",
+      "multiline_pattern":"^(%{USER_SYNC_DATE:logtime})",
+      "message_pattern":"(?m)^%{USER_SYNC_DATE:logtime}%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVACLASS:logger_name}%{SPACE}\\[%{DATA:thread_name}\\]%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}",
+      "post_map_values":{
+        "logtime":{
+          "map_date":{
+            "target_date_pattern":"dd MMM yyyy HH:mm:ss"
+          }
+        }
+      }
+    }
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_admin_pam.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_admin_pam.j2 b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_admin_pam.j2
new file mode 100644
index 0000000..d69ad6c
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_admin_pam.j2
@@ -0,0 +1,22 @@
+{#
+ # 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.
+ #}
+#%PAM-1.0
+auth    sufficient        pam_unix.so
+auth    sufficient        pam_sss.so
+account sufficient        pam_unix.so
+account sufficient        pam_sss.so

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_remote_pam.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_remote_pam.j2 b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_remote_pam.j2
new file mode 100644
index 0000000..d69ad6c
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_remote_pam.j2
@@ -0,0 +1,22 @@
+{#
+ # 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.
+ #}
+#%PAM-1.0
+auth    sufficient        pam_unix.so
+auth    sufficient        pam_sss.so
+account sufficient        pam_unix.so
+account sufficient        pam_sss.so

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_solr_jaas_conf.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_solr_jaas_conf.j2 b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_solr_jaas_conf.j2
new file mode 100644
index 0000000..a456688
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/templates/ranger_solr_jaas_conf.j2
@@ -0,0 +1,26 @@
+{#
+# 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.
+#}
+
+Client {
+  com.sun.security.auth.module.Krb5LoginModule required
+  useKeyTab=true
+  storeKey=true
+  useTicketCache=false
+  keyTab="{{solr_kerberos_keytab}}"
+  principal="{{solr_kerberos_principal}}";
+};
\ No newline at end of file


[11/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_2.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_2.json b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_2.json
deleted file mode 100644
index cbd27e4..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_2.json
+++ /dev/null
@@ -1,1470 +0,0 @@
-{
-  "name": "default",
-  "description": "Default theme for Ranger service",
-  "configuration": {
-    "layouts": [
-      {
-        "name": "default",
-        "tabs": [
-          {
-            "name": "ranger_admin_settings",
-            "display-name": "Ranger Admin",
-            "layout": {
-              "tab-columns": "2",
-              "tab-rows": "2",
-              "sections": [
-                {
-                  "name": "section-ranger-admin",
-                  "display-name": "Ranger Admin",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "3",
-                  "column-span": "2",
-                  "section-columns": "2",
-                  "section-rows": "3",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-db-row1-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-ranger-db-row1-col2",
-                      "row-index": "0",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-ranger-db-row2",
-                      "row-index": "1",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "2"
-                    },
-                    {
-                      "name": "subsection-ranger-db-root-user-col1",
-                      "row-index": "2",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1",
-                      "depends-on": [
-                        {
-                          "configs":[
-                            "ranger-env/create_db_dbuser"
-                          ],
-                          "if": "${ranger-env/create_db_dbuser}",
-                          "then": {
-                            "property_value_attributes": {
-                              "visible": true
-                            }
-                          },
-                          "else": {
-                            "property_value_attributes": {
-                              "visible": false
-                            }
-                          }
-                        }
-                      ]
-                    },
-                    {
-                      "name": "subsection-ranger-db-root-user-col2",
-                      "row-index": "2",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1",
-                      "depends-on": [
-                        {
-                          "configs":[
-                            "ranger-env/create_db_dbuser"
-                          ],
-                          "if": "${ranger-env/create_db_dbuser}",
-                          "then": {
-                            "property_value_attributes": {
-                              "visible": true
-                            }
-                          },
-                          "else": {
-                            "property_value_attributes": {
-                              "visible": false
-                            }
-                          }
-                        }
-                      ]
-                    }
-                  ]
-                }
-              ]
-            }
-          },
-          {
-            "name": "ranger_user_info",
-            "display-name": "Ranger User Info",
-            "layout": {
-              "tab-columns": "1",
-              "tab-rows": "1",
-              "sections": [
-                {
-                  "name": "section-user-info",
-                  "display-name": "Ranger User Info",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "2",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "2",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-user-row1-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-ranger-user-row2-col1",
-                      "row-index": "1",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1",
-                      "subsection-tabs": [
-                        {
-                          "name": "ldap-common-configs",
-                          "display-name": "Common Configs",
-                          "depends-on": [
-                            {
-                              "configs": [
-                                "ranger-ugsync-site/ranger.usersync.source.impl.class"
-                              ],
-                              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder",
-                              "then": {
-                                "property_value_attributes": {
-                                  "visible": true
-                                }
-                              },
-                              "else": {
-                                "property_value_attributes": {
-                                  "visible": false
-                                }
-                              }
-                            }
-                          ]
-                        },
-                        {
-                          "name": "ldap-user-configs",
-                          "display-name": "User Configs",
-                          "depends-on": [
-                            {
-                              "configs": [
-                                "ranger-ugsync-site/ranger.usersync.source.impl.class"
-                              ],
-                              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder",
-                              "then": {
-                                "property_value_attributes": {
-                                  "visible": true
-                                }
-                              },
-                              "else": {
-                                "property_value_attributes": {
-                                  "visible": false
-                                }
-                              }
-                            }
-                          ]
-                        },
-                        {
-                          "name": "ldap-group-configs",
-                          "display-name": "Group Configs",
-                          "depends-on": [
-                            {
-                              "configs": [
-                                "ranger-ugsync-site/ranger.usersync.source.impl.class"
-                              ],
-                              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder",
-                              "then": {
-                                "property_value_attributes": {
-                                  "visible": true
-                                }
-                              },
-                              "else": {
-                                "property_value_attributes": {
-                                  "visible": false
-                                }
-                              }
-                            }
-                          ]
-                        }
-                      ],
-                      "depends-on": [
-                        {
-                          "configs": [
-                            "ranger-ugsync-site/ranger.usersync.enabled"
-                          ],
-                          "if": "${ranger-ugsync-site/ranger.usersync.enabled}",
-                          "then": {
-                            "property_value_attributes": {
-                              "visible": true
-                            }
-                          },
-                          "else": {
-                            "property_value_attributes": {
-                              "visible": false
-                            }
-                          }
-                        }
-                      ]
-                    }
-                  ]
-                }
-              ]
-            }
-          },
-          {
-            "name": "ranger_plugin",
-            "display-name": "Ranger Plugin",
-            "layout": {
-              "tab-columns": "1",
-              "tab-rows": "1",
-              "sections": [
-                {
-                  "name": "section-ranger-plugin",
-                  "display-name": "Ranger Plugin",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "1",
-                  "column-span": "3",
-                  "section-columns": "3",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "section-ranger-plugin-row1-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "section-ranger-plugin-row1-col2",
-                      "row-index": "0",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "section-ranger-plugin-row1-col3",
-                      "row-index": "0",
-                      "column-index": "2",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                }
-              ]
-            }
-          },
-          {
-            "name": "ranger_audit_settings",
-            "display-name": "Ranger Audit",
-            "layout": {
-              "tab-columns": "2",
-              "tab-rows": "2",
-              "sections": [
-                {
-                  "name": "section-ranger-audit-solr",
-                  "display-name": "Audit to Solr",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "1",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-solr-row1-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                },
-                {
-                  "name": "section-ranger-audit-hdfs",
-                  "display-name": "Audit to HDFS",
-                  "row-index": "0",
-                  "column-index": "1",
-                  "row-span": "1",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-hdfs-row1-col2",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                },
-                {
-                  "name": "section-ranger-audit-db",
-                  "display-name": "Audit to DB",
-                  "row-index": "1",
-                  "column-index": "0",
-                  "row-span": "1",
-                  "column-span": "2",
-                  "section-columns": "2",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-audit-db-row2-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-ranger-audit-db-row2-col2",
-                      "row-index": "0",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                }
-              ]
-            }
-          }
-        ]
-      }
-    ],
-    "placement": {
-      "configuration-layout": "default",
-      "configs": [
-        {
-          "config": "admin-properties/DB_FLAVOR",
-          "subsection-name": "subsection-ranger-db-row1-col1"
-        },
-        {
-          "config": "admin-properties/db_name",
-          "subsection-name": "subsection-ranger-db-row1-col1"
-        },
-        {
-          "config": "admin-properties/db_user",
-          "subsection-name": "subsection-ranger-db-row1-col1"
-        },
-        {
-          "config": "ranger-admin-site/ranger.jpa.jdbc.url",
-          "subsection-name": "subsection-ranger-db-row1-col1"
-        },
-        {
-          "config": "admin-properties/db_host",
-          "subsection-name": "subsection-ranger-db-row1-col2"
-        },
-        {
-          "config": "ranger-admin-site/ranger.jpa.jdbc.driver",
-          "subsection-name": "subsection-ranger-db-row1-col2"
-        },
-        {
-          "config": "admin-properties/db_password",
-          "subsection-name": "subsection-ranger-db-row1-col2"
-        },
-        {
-          "config": "ranger-env/test_db_connection",
-          "subsection-name": "subsection-ranger-db-row2",
-          "property_value_attributes": {
-            "ui_only_property": true
-          },
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/create_db_dbuser"
-              ],
-              "if": "${ranger-env/create_db_dbuser}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/create_db_dbuser",
-          "subsection-name": "subsection-ranger-db-row2"
-        },
-        {
-          "config": "admin-properties/db_root_user",
-          "subsection-name": "subsection-ranger-db-root-user-col1"
-        },
-        {
-          "config": "ranger-env/ranger_privelege_user_jdbc_url",
-          "subsection-name": "subsection-ranger-db-root-user-col1"
-        },
-        {
-          "config": "admin-properties/db_root_password",
-          "subsection-name": "subsection-ranger-db-root-user-col2"
-        },
-        {
-          "config": "ranger-env/test_root_db_connection",
-          "subsection-name": "subsection-ranger-db-root-user-col1",
-          "property_value_attributes": {
-            "ui_only_property": true
-          }
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.enabled",
-          "subsection-name": "subsection-ranger-user-row1-col1"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.source.impl.class",
-          "subsection-name": "subsection-ranger-user-row2-col1"
-        },
-
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.unix.minUserId",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.source.impl.class"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.unix.password.file",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.source.impl.class"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.unix.group.file",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.source.impl.class"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.filesource.file",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.source.impl.class"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.filesource.text.delimiter",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.source.impl.class"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.url",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-common-configs"
-        },
-        {
-          "config": "ranger-env/bind_anonymous",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-common-configs"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.binddn",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-common-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/bind_anonymous"
-              ],
-              "if": "${ranger-env/bind_anonymous}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.ldapbindpassword",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-common-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/bind_anonymous"
-              ],
-              "if": "${ranger-env/bind_anonymous}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.nameattribute",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.objectclass",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchbase",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchfilter",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchscope",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.groupnameattribute",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.group.usermapsyncenabled",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.group.searchenabled",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-group-configs"
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.group.memberattributename",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-group-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.group.nameattribute",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-group-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.group.objectclass",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-group-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.group.searchbase",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-group-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.group.searchfilter",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-group-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-hdfs-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col1",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "HDFS",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-yarn-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col1",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "YARN",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-hive-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col1",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "HIVE",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-hbase-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col2",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "HBASE",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-storm-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col2",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "STORM",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-knox-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col3",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "KNOX",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-kafka-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col3",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "KAFKA",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.db",
-          "subsection-name": "subsection-ranger-audit-db-row2-col1"
-        },
-        {
-          "config": "admin-properties/audit_db_user",
-          "subsection-name": "subsection-ranger-audit-db-row2-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.db"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.db}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "admin-properties/audit_db_name",
-          "subsection-name": "subsection-ranger-audit-db-row2-col2",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.db"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.db}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "admin-properties/audit_db_password",
-          "subsection-name": "subsection-ranger-audit-db-row2-col2",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.db"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.db}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.solr",
-          "subsection-name": "subsection-ranger-solr-row1-col1"
-        },
-        {
-          "config": "ranger-env/is_solrCloud_enabled",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-admin-site/ranger.audit.solr.urls",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/is_solrCloud_enabled",
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/is_solrCloud_enabled} === false && ${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-admin-site/ranger.audit.solr.zookeepers",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/is_solrCloud_enabled",
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/is_solrCloud_enabled} && ${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-admin-site/ranger.audit.solr.username",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-admin-site/ranger.audit.solr.password",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.hdfs",
-          "subsection-name": "subsection-ranger-hdfs-row1-col2"
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.hdfs.dir",
-          "subsection-name": "subsection-ranger-hdfs-row1-col2",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.hdfs"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.hdfs}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        }
-      ]
-    },
-    "widgets": [
-      {
-        "config": "admin-properties/DB_FLAVOR",
-        "widget": {
-          "type": "combo"
-        }
-      },
-      {
-        "config": "admin-properties/db_user",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/db_name",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.jpa.jdbc.url",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.jpa.jdbc.driver",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/db_host",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/db_password",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "ranger-env/test_db_connection",
-        "widget": {
-          "type": "test-db-connection",
-          "display-name": "Test Connection",
-          "required-properties": {
-            "jdbc.driver.class": "ranger-admin-site/ranger.jpa.jdbc.driver",
-            "jdbc.driver.url": "ranger-admin-site/ranger.jpa.jdbc.url",
-            "db.connection.source.host": "ranger-site/ranger_admin_hosts",
-            "db.type": "admin-properties/DB_FLAVOR",
-            "db.connection.destination.host": "admin-properties/db_host",
-            "db.connection.user": "admin-properties/db_user",
-            "db.connection.password": "admin-properties/db_password"
-          }
-        }
-      },
-      {
-        "config": "ranger-env/create_db_dbuser",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger_privelege_user_jdbc_url",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/db_root_user",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/db_root_password",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "ranger-env/test_root_db_connection",
-        "widget": {
-          "type": "test-db-connection",
-          "display-name": "Test Connection",
-          "required-properties": {
-            "jdbc.driver.class": "ranger-admin-site/ranger.jpa.jdbc.driver",
-            "jdbc.driver.url": "ranger-env/ranger_privelege_user_jdbc_url",
-            "db.connection.source.host": "ranger-site/ranger_admin_hosts",
-            "db.type": "admin-properties/DB_FLAVOR",
-            "db.connection.destination.host": "admin-properties/db_host",
-            "db.connection.user": "admin-properties/db_root_user",
-            "db.connection.password": "admin-properties/db_root_password"
-          }
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.source.impl.class",
-        "widget": {
-          "type": "combo"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.url",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-env/bind_anonymous",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.binddn",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.ldapbindpassword",
-        "widget": {
-          "type": "password"
-        }
-      },
-
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.group.usermapsyncenabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.nameattribute",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.objectclass",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchbase",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchfilter",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchscope",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.groupnameattribute",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.group.searchenabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.group.memberattributename",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.group.nameattribute",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.group.objectclass",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.group.searchbase",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.group.searchfilter",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.unix.minUserId",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.unix.password.file",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.unix.group.file",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.filesource.file",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.filesource.text.delimiter",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-hdfs-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-hive-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-hbase-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-kafka-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-knox-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-storm-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-yarn-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.db",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "admin-properties/audit_db_user",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/audit_db_name",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/audit_db_password",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.solr",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/is_solrCloud_enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.audit.solr.urls",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.audit.solr.zookeepers",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.audit.solr.username",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.audit.solr.password",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.hdfs",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.hdfs.dir",
-        "widget": {
-          "type": "text-field"
-        }
-      }
-    ]
-  }
-}
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_3.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_3.json b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_3.json
deleted file mode 100644
index cbe28a3..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_3.json
+++ /dev/null
@@ -1,692 +0,0 @@
-{
-  "configuration": {
-    "layouts": [
-      {
-        "name": "default",
-        "tabs": [
-          {
-            "name": "ranger_audit_settings",
-            "display-name": "Ranger Audit",
-            "layout": {
-              "tab-columns": "2",
-              "tab-rows": "2",
-              "sections": [
-                {
-                  "name": "section-ranger-audit-solr",
-                  "display-name": "Audit to Solr",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "1",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-solr-row1-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                },
-                {
-                  "name": "section-ranger-audit-hdfs",
-                  "display-name": "Audit to HDFS",
-                  "row-index": "0",
-                  "column-index": "1",
-                  "row-span": "1",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-hdfs-row1-col2",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                }
-              ]
-            }
-          },
-          {
-            "name": "ranger_tagsync",
-            "display-name": "Ranger Tagsync",
-            "layout": {
-              "tab-columns": "2",
-              "tab-rows": "2",
-              "sections": [
-                {
-                  "name": "section-tagsync-atlas",
-                  "display-name": "Atlas Tag Source",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "1",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-tagsync-row1-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                },
-                {
-                  "name": "section-tagsync-atlasrest",
-                  "display-name": "AtlasRest Tag Source",
-                  "row-index": "0",
-                  "column-index": "1",
-                  "row-span": "1",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-tagsync-row1-col2",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                },
-                {
-                  "name": "section-tagsync-file",
-                  "display-name": "File Tag Source",
-                  "row-index": "1",
-                  "column-index": "0",
-                  "row-span": "1",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-tagsync-row2-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                }
-              ]
-            }
-          }
-        ]
-      }
-    ],
-    "placement": {
-      "configuration-layout": "default",
-      "configs": [
-        {
-          "config": "ranger-env/ranger-atlas-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col2",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "ATLAS",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-tagsync-site/ranger.tagsync.source.atlas",
-          "subsection-name": "subsection-ranger-tagsync-row1-col1"
-        },
-        {
-          "config": "tagsync-application-properties/atlas.kafka.bootstrap.servers",
-          "subsection-name": "subsection-ranger-tagsync-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-tagsync-site/ranger.tagsync.source.atlas"
-              ],
-              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlas}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "tagsync-application-properties/atlas.kafka.zookeeper.connect",
-          "subsection-name": "subsection-ranger-tagsync-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-tagsync-site/ranger.tagsync.source.atlas"
-              ],
-              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlas}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "tagsync-application-properties/atlas.kafka.entities.group.id",
-          "subsection-name": "subsection-ranger-tagsync-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-tagsync-site/ranger.tagsync.source.atlas"
-              ],
-              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlas}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest",
-          "subsection-name": "subsection-ranger-tagsync-row1-col2"
-        },
-        {
-          "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest.endpoint",
-          "subsection-name": "subsection-ranger-tagsync-row1-col2",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-tagsync-site/ranger.tagsync.source.atlasrest"
-              ],
-              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlasrest}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest.download.interval.millis",
-          "subsection-name": "subsection-ranger-tagsync-row1-col2",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-tagsync-site/ranger.tagsync.source.atlasrest"
-              ],
-              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlasrest}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-tagsync-site/ranger.tagsync.source.file",
-          "subsection-name": "subsection-ranger-tagsync-row2-col1"
-        },
-        {
-          "config": "ranger-tagsync-site/ranger.tagsync.source.file.check.interval.millis",
-          "subsection-name": "subsection-ranger-tagsync-row2-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-tagsync-site/ranger.tagsync.source.file"
-              ],
-              "if": "${ranger-tagsync-site/ranger.tagsync.source.file}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-tagsync-site/ranger.tagsync.source.file.filename",
-          "subsection-name": "subsection-ranger-tagsync-row2-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-tagsync-site/ranger.tagsync.source.file"
-              ],
-              "if": "${ranger-tagsync-site/ranger.tagsync.source.file}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.user.searchenabled",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.group.search.first.enabled"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.group.search.first.enabled}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.group.search.first.enabled",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-group-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
-              ],
-              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.solr",
-          "subsection-name": "subsection-ranger-solr-row1-col1"
-        },
-        {
-          "config": "ranger-env/is_solrCloud_enabled",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/is_external_solrCloud_enabled",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.solr",
-                "ranger-env/is_solrCloud_enabled"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.solr} && ${ranger-env/is_solrCloud_enabled}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/is_external_solrCloud_kerberos",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.solr",
-                "ranger-env/is_solrCloud_enabled",
-                "ranger-env/is_external_solrCloud_enabled"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.solr} && ${ranger-env/is_solrCloud_enabled} && ${ranger-env/is_external_solrCloud_enabled}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-admin-site/ranger.audit.solr.urls",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/is_solrCloud_enabled",
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/is_solrCloud_enabled} === false && ${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-admin-site/ranger.audit.solr.zookeepers",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/is_solrCloud_enabled",
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/is_solrCloud_enabled} && ${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-admin-site/ranger.audit.solr.username",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-admin-site/ranger.audit.solr.password",
-          "subsection-name": "subsection-ranger-solr-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.solr"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.solr}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.hdfs",
-          "subsection-name": "subsection-ranger-hdfs-row1-col2"
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.hdfs.dir",
-          "subsection-name": "subsection-ranger-hdfs-row1-col2",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.hdfs"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.hdfs}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        }
-      ]
-    },
-    "widgets": [
-      {
-        "config": "ranger-tagsync-site/ranger.tagsync.source.file.check.interval.millis",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-tagsync-site/ranger.tagsync.source.file.filename",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest.download.interval.millis",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest.endpoint",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "tagsync-application-properties/atlas.kafka.entities.group.id",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "tagsync-application-properties/atlas.kafka.bootstrap.servers",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "tagsync-application-properties/atlas.kafka.zookeeper.connect",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-tagsync-site/ranger.tagsync.source.atlas",
-        "widget": {
-          "type": "checkbox"
-        }
-      },
-      {
-        "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest",
-        "widget": {
-          "type": "checkbox"
-        }
-      },
-      {
-        "config": "ranger-tagsync-site/ranger.tagsync.source.file",
-        "widget": {
-          "type": "checkbox"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-atlas-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.user.searchenabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.group.search.first.enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.solr",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/is_solrCloud_enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/is_external_solrCloud_enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/is_external_solrCloud_kerberos",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.audit.solr.urls",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.audit.solr.zookeepers",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.audit.solr.username",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.audit.solr.password",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.hdfs",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.hdfs.dir",
-        "widget": {
-          "type": "text-field"
-        }
-      }
-    ]
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_5.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_5.json b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_5.json
deleted file mode 100644
index 8068a38..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_5.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
-  "configuration": {
-    "placement": {
-      "configuration-layout": "default",
-      "configs": [
-        {
-          "config": "ranger-ugsync-site/ranger.usersync.ldap.deltasync",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-common-configs"
-        },
-        {
-          "config": "ranger-env/ranger-nifi-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col1",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "NIFI",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        }
-      ]
-    },
-    "widgets": [
-      {
-        "config": "ranger-ugsync-site/ranger.usersync.ldap.deltasync",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-nifi-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      }
-    ]
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/alerts.json b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/alerts.json
new file mode 100644
index 0000000..ab473a8
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/alerts.json
@@ -0,0 +1,76 @@
+{
+  "RANGER": {
+    "service": [],
+    "RANGER_ADMIN": [
+      {
+        "name": "ranger_admin_process",
+        "label": "Ranger Admin Process",
+        "description": "This host-level alert is triggered if the Ranger Admin Web UI is unreachable.",
+        "interval": 1,
+        "scope": "ANY",
+        "source": {
+          "type": "WEB",
+          "uri": {
+              "http": "{{admin-properties/policymgr_external_url}}/login.jsp",
+              "https": "{{admin-properties/policymgr_external_url}}/login.jsp",
+              "kerberos_keytab": "{{cluster-env/smokeuser_keytab}}",
+              "kerberos_principal": "{{cluster-env/smokeuser_principal_name}}",
+              "https_property": "{{ranger-admin-site/ranger.service.https.attrib.ssl.enabled}}",
+              "https_property_value": "true",
+              "connection_timeout": 5.0
+            },
+          "reporting": {
+            "ok": {
+              "text": "HTTP {0} response in {2:.3f}s"
+            },
+            "warning": {
+              "text": "HTTP {0} response from {1} in {2:.3f}s ({3})"
+            },
+            "critical": {
+              "text": "Connection failed to {1} ({3})"
+            }
+          }
+        }
+      },
+      {
+        "name": "ranger_admin_password_check",
+        "label": "Ranger Admin password check",
+        "description": "This alert is used to ensure that the Ranger Admin password in Ambari is correct.",
+        "interval": 30,
+        "scope": "ANY",
+        "source": {
+          "type": "SCRIPT",
+          "path": "RANGER/0.4.0/package/alerts/alert_ranger_admin_passwd_check.py",
+          "parameters": []
+        }
+      }
+    ],
+    "RANGER_USERSYNC": [
+      {
+        "name": "ranger_usersync_process",
+        "label": "Ranger Usersync Process",
+        "description": "This host-level alert is triggered if the Ranger Usersync cannot be determined to be up.",
+        "interval": 1,
+        "scope": "HOST",
+        "source": {
+          "type": "PORT",
+          "uri": "{{ranger-ugsync-site/ranger.usersync.port}}",
+          "default_port": 5151,
+          "reporting": {
+            "ok": {
+              "text": "TCP OK - {0:.3f}s response on port {1}"
+            },
+            "warning": {
+              "text": "TCP OK - {0:.3f}s response on port {1}",
+              "value": 1.5
+            },
+            "critical": {
+              "text": "Connection failed: {0} to {1}:{2}",
+              "value": 5.0
+            }
+          }
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/admin-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/admin-log4j.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/admin-log4j.xml
new file mode 100644
index 0000000..281c7ce
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/admin-log4j.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_adding_forbidden="false">
+  <property>
+    <name>ranger_xa_log_maxfilesize</name>
+    <value>256</value>
+   <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>Ranger Log: backup file size</display-name>
+    <value-attributes>
+      <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+   </property>
+   <property>
+    <name>ranger_xa_log_maxbackupindex</name>
+    <value>20</value>
+    <description>The number of backup files</description>
+    <display-name>Ranger Log: # of backup files</display-name>
+    <value-attributes>
+      <type>int</type>
+      <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>content</name>
+    <display-name>admin-log4j template</display-name>
+    <description>admin-log4j.properties</description>
+    <value>
+#
+# 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.
+#
+
+
+log4j.rootLogger = warn,xa_log_appender
+
+
+# xa_logger
+log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.xa_log_appender.file=${logdir}/xa_portal.log
+log4j.appender.xa_log_appender.datePattern='.'yyyy-MM-dd
+log4j.appender.xa_log_appender.append=true
+log4j.appender.xa_log_appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.xa_log_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n
+log4j.appender.xa_log_appender.MaxFileSize={{ranger_xa_log_maxfilesize}}MB
+log4j.appender.xa_log_appender.MaxBackupIndex={{ranger_xa_log_maxbackupindex}}
+
+# xa_log_appender : category and additivity
+log4j.category.org.springframework=warn,xa_log_appender
+log4j.additivity.org.springframework=false
+
+log4j.category.org.apache.ranger=info,xa_log_appender
+log4j.additivity.org.apache.ranger=false
+
+log4j.category.xa=info,xa_log_appender
+log4j.additivity.xa=false
+
+# perf_logger
+log4j.appender.perf_appender=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.perf_appender.file=${logdir}/ranger_admin_perf.log
+log4j.appender.perf_appender.datePattern='.'yyyy-MM-dd
+log4j.appender.perf_appender.append=true
+log4j.appender.perf_appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.perf_appender.layout.ConversionPattern=%d [%t] %m%n
+
+
+# sql_appender
+log4j.appender.sql_appender=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.sql_appender.file=${logdir}/xa_portal_sql.log
+log4j.appender.sql_appender.datePattern='.'yyyy-MM-dd
+log4j.appender.sql_appender.append=true
+log4j.appender.sql_appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.sql_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n
+
+# sql_appender : category and additivity
+log4j.category.org.hibernate.SQL=warn,sql_appender
+log4j.additivity.org.hibernate.SQL=false
+
+log4j.category.jdbc.sqlonly=fatal,sql_appender
+log4j.additivity.jdbc.sqlonly=false
+
+log4j.category.jdbc.sqltiming=warn,sql_appender
+log4j.additivity.jdbc.sqltiming=false
+
+log4j.category.jdbc.audit=fatal,sql_appender
+log4j.additivity.jdbc.audit=false
+
+log4j.category.jdbc.resultset=fatal,sql_appender
+log4j.additivity.jdbc.resultset=false
+
+log4j.category.jdbc.connection=fatal,sql_appender
+log4j.additivity.jdbc.connection=false
+    </value>
+    <value-attributes>
+      <type>content</type>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/admin-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/admin-properties.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/admin-properties.xml
new file mode 100644
index 0000000..e76546f
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/admin-properties.xml
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_final="false">
+  <property>
+    <name>SQL_CONNECTOR_JAR</name>
+    <value>{{driver_curl_target}}</value>
+    <display-name>Location of Sql Connector Jar</display-name>
+    <description>Location of DB client library (please check the location of the jar file)</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>admin-properties</type>
+        <name>DB_FLAVOR</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false" update="false"/>
+  </property>
+  <property>
+    <name>db_root_user</name>
+    <value>root</value>
+    <display-name>Database Administrator (DBA) username</display-name>
+    <description>Database admin user. This user should have DBA permission to create the Ranger Database and Ranger Database User</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property require-input="true">
+    <name>db_root_password</name>
+    <value/>
+    <property-type>PASSWORD</property-type>
+    <display-name>Database Administrator (DBA) password</display-name>
+    <description>Database password for the database admin username</description>
+    <value-attributes>
+      <type>password</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>db_host</name>
+    <value/>
+    <display-name>Ranger DB host</display-name>
+    <description>Database host</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>db_name</name>
+    <value>ranger</value>
+    <display-name>Ranger DB name</display-name>
+    <description>Database name</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>db_user</name>
+    <value>rangeradmin</value>
+    <display-name>Ranger DB username</display-name>
+    <description>Database username used for the Ranger schema</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property require-input="true">
+    <name>db_password</name>
+    <value/>
+    <property-type>PASSWORD</property-type>
+    <display-name>Ranger DB password</display-name>
+    <description>Database password for the Ranger schema</description>
+    <value-attributes>
+      <type>password</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>DB_FLAVOR</name>
+    <value>MYSQL</value>
+    <display-name>DB FLAVOR</display-name>
+    <description>The database type to be used (mysql/oracle)</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>MYSQL</value>
+          <label>MYSQL</label>
+        </entry>
+        <entry>
+          <value>ORACLE</value>
+          <label>ORACLE</label>
+        </entry>
+        <entry>
+          <value>POSTGRES</value>
+          <label>POSTGRES</label>
+        </entry>
+        <entry>
+          <value>MSSQL</value>
+          <label>MSSQL</label>
+        </entry>
+        <entry>
+          <value>SQLA</value>
+          <label>SQL Anywhere</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>policymgr_external_url</name>
+    <value/>
+    <display-name>External URL</display-name>
+    <description>Policy Manager external url eg: http://RANGER_HOST:6080</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>ranger-admin-site</type>
+        <name>ranger.service.http.enabled</name>
+      </property>
+      <property>
+        <type>ranger-admin-site</type>
+        <name>ranger.service.http.port</name>
+      </property>
+      <property>
+        <type>ranger-admin-site</type>
+        <name>ranger.service.https.port</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>


[39/52] [abbrv] ambari git commit: AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-default.json b/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-default.json
index a1d930c..fb77531 100644
--- a/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-default.json
+++ b/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-default.json
@@ -1,150 +1,150 @@
 {
     "localComponents": [
-        "NAMENODE", 
-        "SECONDARY_NAMENODE", 
-        "ZOOKEEPER_SERVER", 
-        "DATANODE", 
-        "HDFS_CLIENT", 
-        "ZOOKEEPER_CLIENT", 
-        "RANGER_USERSYNC", 
-        "RANGER_ADMIN", 
+        "NAMENODE",
+        "SECONDARY_NAMENODE",
+        "ZOOKEEPER_SERVER",
+        "DATANODE",
+        "HDFS_CLIENT",
+        "ZOOKEEPER_CLIENT",
+        "RANGER_USERSYNC",
+        "RANGER_ADMIN",
         "RANGER_TAGSYNC",
         "LOGSEARCH_SOLR",
         "LOGSEARCH_SOLR_CLIENT"
-    ], 
+    ],
     "configuration_attributes": {
-        "ranger-hdfs-audit": {}, 
-        "ssl-client": {}, 
-        "ranger-admin-site": {}, 
-        "ranger-hdfs-policymgr-ssl": {}, 
-        "tagsync-application-properties": {}, 
-        "ranger-env": {}, 
-        "usersync-log4j": {}, 
-        "admin-properties": {}, 
-        "ranger-ugsync-site": {}, 
+        "ranger-hdfs-audit": {},
+        "ssl-client": {},
+        "ranger-admin-site": {},
+        "ranger-hdfs-policymgr-ssl": {},
+        "tagsync-application-properties": {},
+        "ranger-env": {},
+        "usersync-log4j": {},
+        "admin-properties": {},
+        "ranger-ugsync-site": {},
         "hdfs-site": {
             "final": {
-                "dfs.datanode.data.dir": "true", 
-                "dfs.namenode.http-address": "true", 
-                "dfs.datanode.failed.volumes.tolerated": "true", 
-                "dfs.support.append": "true", 
-                "dfs.namenode.name.dir": "true", 
+                "dfs.datanode.data.dir": "true",
+                "dfs.namenode.http-address": "true",
+                "dfs.datanode.failed.volumes.tolerated": "true",
+                "dfs.support.append": "true",
+                "dfs.namenode.name.dir": "true",
                 "dfs.webhdfs.enabled": "true"
             }
-        }, 
-        "ranger-tagsync-site": {}, 
-        "zoo.cfg": {}, 
-        "hadoop-policy": {}, 
-        "hdfs-log4j": {}, 
-        "ranger-hdfs-plugin-properties": {}, 
+        },
+        "ranger-tagsync-site": {},
+        "zoo.cfg": {},
+        "hadoop-policy": {},
+        "hdfs-log4j": {},
+        "ranger-hdfs-plugin-properties": {},
         "core-site": {
             "final": {
                 "fs.defaultFS": "true"
             }
-        }, 
-        "hadoop-env": {}, 
-        "zookeeper-log4j": {}, 
-        "ssl-server": {}, 
-        "ranger-site": {}, 
-        "admin-log4j": {}, 
-        "tagsync-log4j": {}, 
-        "ranger-hdfs-security": {}, 
-        "usersync-properties": {}, 
+        },
+        "hadoop-env": {},
+        "zookeeper-log4j": {},
+        "ssl-server": {},
+        "ranger-site": {},
+        "admin-log4j": {},
+        "tagsync-log4j": {},
+        "ranger-hdfs-security": {},
+        "usersync-properties": {},
         "zookeeper-env": {},
         "infra-solr-env": {},
         "infra-solr-client-log4j": {},
         "cluster-env": {}
-    }, 
-    "public_hostname": "c6401.ambari.apache.org", 
-    "commandId": "11-0", 
-    "hostname": "c6401.ambari.apache.org", 
-    "kerberosCommandParams": [], 
-    "serviceName": "RANGER", 
-    "role": "RANGER_ADMIN", 
-    "forceRefreshConfigTagsBeforeExecution": [], 
-    "requestId": 11, 
+    },
+    "public_hostname": "c6401.ambari.apache.org",
+    "commandId": "11-0",
+    "hostname": "c6401.ambari.apache.org",
+    "kerberosCommandParams": [],
+    "serviceName": "RANGER",
+    "role": "RANGER_ADMIN",
+    "forceRefreshConfigTagsBeforeExecution": [],
+    "requestId": 11,
     "agentConfigParams": {
         "agent": {
             "parallel_execution": 0
         }
-    }, 
-    "clusterName": "c1", 
-    "commandType": "EXECUTION_COMMAND", 
-    "taskId": 31, 
-    "roleParams": {}, 
+    },
+    "clusterName": "c1",
+    "commandType": "EXECUTION_COMMAND",
+    "taskId": 31,
+    "roleParams": {},
     "configurationTags": {
         "ranger-hdfs-audit": {
             "tag": "version1466705299922"
-        }, 
+        },
         "ssl-client": {
             "tag": "version1"
-        }, 
+        },
         "ranger-admin-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
             "tag": "version1466705299922"
-        }, 
+        },
         "tagsync-application-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-env": {
             "tag": "version1466705299949"
-        }, 
+        },
         "usersync-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "admin-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-ugsync-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "hdfs-site": {
             "tag": "version1"
-        }, 
+        },
         "ranger-tagsync-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "zoo.cfg": {
             "tag": "version1"
-        }, 
+        },
         "hadoop-policy": {
             "tag": "version1"
-        }, 
+        },
         "hdfs-log4j": {
             "tag": "version1"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
             "tag": "version1466705299922"
-        }, 
+        },
         "core-site": {
             "tag": "version1"
-        }, 
+        },
         "hadoop-env": {
             "tag": "version1"
-        }, 
+        },
         "zookeeper-log4j": {
             "tag": "version1"
-        }, 
+        },
         "ssl-server": {
             "tag": "version1"
-        }, 
+        },
         "ranger-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "admin-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "tagsync-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-hdfs-security": {
             "tag": "version1466705299922"
-        }, 
+        },
         "usersync-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "zookeeper-env": {
             "tag": "version1"
         },
@@ -157,492 +157,492 @@
         "cluster-env": {
             "tag": "version1"
         }
-    }, 
-    "roleCommand": "START", 
+    },
+    "roleCommand": "START",
     "hostLevelParams": {
-        "agent_stack_retry_on_unavailability": "false", 
-        "stack_name": "HDP", 
-        "package_version": "2_5_0_0_*", 
+        "agent_stack_retry_on_unavailability": "false",
+        "stack_name": "HDP",
+        "package_version": "2_5_0_0_*",
         "custom_mysql_jdbc_name": "mysql-connector-java.jar",
         "previous_custom_mysql_jdbc_name": "mysql-connector-java-old.jar",
-        "host_sys_prepped": "false", 
-        "ambari_db_rca_username": "mapred", 
-        "current_version": "2.5.0.0-801", 
-        "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar", 
-        "agent_stack_retry_count": "5", 
-        "stack_version": "2.5", 
-        "jdk_name": "jdk-8u60-linux-x64.tar.gz", 
-        "ambari_db_rca_driver": "org.postgresql.Driver", 
-        "java_home": "/usr/jdk64/jdk1.7.0_45", 
-        "repository_version_id": "1", 
-        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
-        "not_managed_hdfs_path_list": "[\"/tmp\"]", 
-        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
-        "java_version": "8", 
-        "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.5\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]", 
-        "package_list": "[{\"name\":\"ranger_${stack_version}-admin\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-usersync\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-tagsync\",\"condition\":\"should_install_ranger_tagsync\",\"skipUpgrade\":false},{\"name\":\"ambari-logsearch-solr-client\",\"condition\":\"should_install_logsearch_solr_client\",\"skipUpgrade\":false}]", 
-        "db_name": "ambari", 
-        "group_list": "[\"ranger\",\"hadoop\",\"users\"]", 
-        "agentCacheDir": "/var/lib/ambari-agent/cache", 
-        "ambari_db_rca_password": "mapred", 
-        "jce_name": "jce_policy-8.zip", 
-        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar", 
-        "db_driver_filename": "mysql-connector-java.jar", 
-        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]", 
+        "host_sys_prepped": "false",
+        "ambari_db_rca_username": "mapred",
+        "current_version": "2.5.0.0-801",
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar",
+        "agent_stack_retry_count": "5",
+        "stack_version": "2.5",
+        "jdk_name": "jdk-8u60-linux-x64.tar.gz",
+        "ambari_db_rca_driver": "org.postgresql.Driver",
+        "java_home": "/usr/jdk64/jdk1.7.0_45",
+        "repository_version_id": "1",
+        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/",
+        "not_managed_hdfs_path_list": "[\"/tmp\"]",
+        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+        "java_version": "8",
+        "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.5\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]",
+        "package_list": "[{\"name\":\"ranger_${stack_version}-admin\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-usersync\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-tagsync\",\"condition\":\"should_install_ranger_tagsync\",\"skipUpgrade\":false},{\"name\":\"ambari-logsearch-solr-client\",\"condition\":\"should_install_logsearch_solr_client\",\"skipUpgrade\":false}]",
+        "db_name": "ambari",
+        "group_list": "[\"ranger\",\"hadoop\",\"users\"]",
+        "agentCacheDir": "/var/lib/ambari-agent/cache",
+        "ambari_db_rca_password": "mapred",
+        "jce_name": "jce_policy-8.zip",
+        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar",
+        "db_driver_filename": "mysql-connector-java.jar",
+        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]",
         "clientsToUpdateConfigs": "[\"*\"]"
-    }, 
+    },
     "commandParams": {
-        "service_package_folder": "common-services/RANGER/0.4.0/package", 
-        "script": "scripts/ranger_admin.py", 
-        "hooks_folder": "HDP/2.0.6/hooks", 
-        "version": "2.5.0.0-801", 
-        "max_duration_for_retries": "0", 
-        "command_retry_enabled": "false", 
-        "command_timeout": "600", 
+        "service_package_folder": "common-services/RANGER/0.4.0/package",
+        "script": "scripts/ranger_admin.py",
+        "hooks_folder": "HDP/2.0.6/hooks",
+        "version": "2.5.0.0-801",
+        "max_duration_for_retries": "0",
+        "command_retry_enabled": "false",
+        "command_timeout": "600",
         "script_type": "PYTHON"
-    }, 
-    "forceRefreshConfigTags": [], 
-    "stageId": 0, 
+    },
+    "forceRefreshConfigTags": [],
+    "stageId": 0,
     "clusterHostInfo": {
         "snamenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_use_ssl": [
             "false"
-        ], 
+        ],
         "all_ping_ports": [
             "8670"
-        ], 
+        ],
         "ranger_tagsync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ranger_usersync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "slave_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "namenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_port": [
             "8080"
-        ], 
+        ],
         "ranger_admin_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_racks": [
             "/default-rack"
-        ], 
+        ],
         "all_ipv4_ips": [
             "172.22.83.73"
-        ], 
+        ],
         "ambari_server_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "zookeeper_hosts": [
             "c6401.ambari.apache.org"
         ],
         "infra_solr_hosts": [
             "c6401.ambari.apache.org"
         ]
-    }, 
+    },
     "configurations": {
         "ranger-hdfs-audit": {
-            "xasecure.audit.destination.solr.zookeepers": "NONE", 
-            "xasecure.audit.destination.solr.urls": "", 
-            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool", 
-            "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/hdfs/spool", 
+            "xasecure.audit.destination.solr.zookeepers": "NONE",
+            "xasecure.audit.destination.solr.urls": "",
+            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool",
+            "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/hdfs/spool",
             "xasecure.audit.destination.hdfs": "true",
-            "xasecure.audit.destination.solr": "false", 
+            "xasecure.audit.destination.solr": "false",
             "xasecure.audit.provider.summary.enabled": "false",
             "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
             "xasecure.audit.is.enabled": "true"
-        }, 
+        },
         "ssl-client": {
-            "ssl.client.truststore.reload.interval": "10000", 
-            "ssl.client.keystore.password": "bigdata", 
-            "ssl.client.truststore.type": "jks", 
-            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks", 
-            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks", 
-            "ssl.client.truststore.password": "bigdata", 
+            "ssl.client.truststore.reload.interval": "10000",
+            "ssl.client.keystore.password": "bigdata",
+            "ssl.client.truststore.type": "jks",
+            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks",
+            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks",
+            "ssl.client.truststore.password": "bigdata",
             "ssl.client.keystore.type": "jks"
-        }, 
+        },
         "ranger-admin-site": {
             "ranger.admin.kerberos.cookie.domain": "",
-            "ranger.kms.service.user.hdfs": "hdfs", 
-            "ranger.spnego.kerberos.principal": "", 
-            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.plugins.hive.serviceuser": "hive", 
-            "ranger.lookup.kerberos.keytab": "", 
-            "ranger.plugins.kms.serviceuser": "kms", 
-            "ranger.service.https.attrib.ssl.enabled": "false", 
-            "ranger.sso.browser.useragent": "Mozilla,chrome", 
-            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01", 
-            "ranger.plugins.hbase.serviceuser": "hbase", 
-            "ranger.plugins.hdfs.serviceuser": "hdfs", 
-            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}", 
-            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net", 
-            "ranger.plugins.knox.serviceuser": "knox", 
-            "ranger.ldap.base.dn": "dc=example,dc=com", 
-            "ranger.sso.publicKey": "", 
-            "ranger.admin.kerberos.cookie.path": "/", 
-            "ranger.service.https.attrib.clientAuth": "want", 
-            "ranger.jpa.jdbc.user": "{{ranger_db_user}}", 
-            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})", 
-            "ranger.ldap.group.roleattribute": "cn", 
-            "ranger.plugins.kafka.serviceuser": "kafka", 
-            "ranger.admin.kerberos.principal": "", 
-            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
-            "ranger.credential.provider.path": "/etc/ranger/admin/rangeradmin.jceks", 
-            "ranger.ldap.referral": "ignore", 
-            "ranger.service.http.port": "6080", 
-            "ranger.ldap.user.searchfilter": "(uid={0})", 
-            "ranger.plugins.atlas.serviceuser": "atlas", 
-            "ranger.truststore.password": "changeit", 
-            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.password": "NONE", 
+            "ranger.kms.service.user.hdfs": "hdfs",
+            "ranger.spnego.kerberos.principal": "",
+            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}",
+            "ranger.plugins.hive.serviceuser": "hive",
+            "ranger.lookup.kerberos.keytab": "",
+            "ranger.plugins.kms.serviceuser": "kms",
+            "ranger.service.https.attrib.ssl.enabled": "false",
+            "ranger.sso.browser.useragent": "Mozilla,chrome",
+            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01",
+            "ranger.plugins.hbase.serviceuser": "hbase",
+            "ranger.plugins.hdfs.serviceuser": "hdfs",
+            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}",
+            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net",
+            "ranger.plugins.knox.serviceuser": "knox",
+            "ranger.ldap.base.dn": "dc=example,dc=com",
+            "ranger.sso.publicKey": "",
+            "ranger.admin.kerberos.cookie.path": "/",
+            "ranger.service.https.attrib.clientAuth": "want",
+            "ranger.jpa.jdbc.user": "{{ranger_db_user}}",
+            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})",
+            "ranger.ldap.group.roleattribute": "cn",
+            "ranger.plugins.kafka.serviceuser": "kafka",
+            "ranger.admin.kerberos.principal": "",
+            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
+            "ranger.credential.provider.path": "/etc/ranger/admin/rangeradmin.jceks",
+            "ranger.ldap.referral": "ignore",
+            "ranger.service.http.port": "6080",
+            "ranger.ldap.user.searchfilter": "(uid={0})",
+            "ranger.plugins.atlas.serviceuser": "atlas",
+            "ranger.truststore.password": "changeit",
+            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.password": "NONE",
             "ranger.audit.solr.zookeepers": "c6401.ambari.apache.org:2181/ambari-solr",
-            "ranger.lookup.kerberos.principal": "", 
-            "ranger.service.https.port": "6182", 
-            "ranger.plugins.storm.serviceuser": "storm", 
-            "ranger.externalurl": "{{ranger_external_url}}", 
-            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.kms.service.user.hive": "", 
-            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}", 
-            "ranger.service.host": "{{ranger_host}}", 
-            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin", 
-            "ranger.service.https.attrib.keystore.pass": "xasecure", 
-            "ranger.unixauth.remote.login.enabled": "true", 
-            "ranger.jpa.jdbc.credential.alias": "rangeradmin", 
-            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.username": "ranger_solr", 
-            "ranger.sso.enabled": "false", 
-            "ranger.audit.solr.urls": "", 
-            "ranger.ldap.ad.domain": "", 
-            "ranger.plugins.yarn.serviceuser": "yarn", 
-            "ranger.audit.source.type": "solr", 
-            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
-            "ranger.ldap.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.authentication.method": "UNIX", 
-            "ranger.service.http.enabled": "true", 
-            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}", 
-            "ranger.ldap.ad.referral": "ignore", 
-            "ranger.ldap.ad.base.dn": "dc=example,dc=com", 
-            "ranger.jpa.jdbc.password": "_", 
-            "ranger.spnego.kerberos.keytab": "", 
-            "ranger.sso.providerurl": "", 
-            "ranger.unixauth.service.hostname": "{{ugsync_host}}", 
-            "ranger.admin.kerberos.keytab": "", 
-            "ranger.admin.kerberos.token.valid.seconds": "30", 
-            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver", 
+            "ranger.lookup.kerberos.principal": "",
+            "ranger.service.https.port": "6182",
+            "ranger.plugins.storm.serviceuser": "storm",
+            "ranger.externalurl": "{{ranger_external_url}}",
+            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.kms.service.user.hive": "",
+            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}",
+            "ranger.service.host": "{{ranger_host}}",
+            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin",
+            "ranger.service.https.attrib.keystore.pass": "xasecure",
+            "ranger.unixauth.remote.login.enabled": "true",
+            "ranger.jpa.jdbc.credential.alias": "rangeradmin",
+            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.username": "ranger_solr",
+            "ranger.sso.enabled": "false",
+            "ranger.audit.solr.urls": "",
+            "ranger.ldap.ad.domain": "",
+            "ranger.plugins.yarn.serviceuser": "yarn",
+            "ranger.audit.source.type": "solr",
+            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
+            "ranger.ldap.url": "{{ranger_ug_ldap_url}}",
+            "ranger.authentication.method": "UNIX",
+            "ranger.service.http.enabled": "true",
+            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}",
+            "ranger.ldap.ad.referral": "ignore",
+            "ranger.ldap.ad.base.dn": "dc=example,dc=com",
+            "ranger.jpa.jdbc.password": "_",
+            "ranger.spnego.kerberos.keytab": "",
+            "ranger.sso.providerurl": "",
+            "ranger.unixauth.service.hostname": "{{ugsync_host}}",
+            "ranger.admin.kerberos.keytab": "",
+            "ranger.admin.kerberos.token.valid.seconds": "30",
+            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver",
             "ranger.unixauth.service.port": "5151"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
-            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks", 
-            "xasecure.policymgr.clientssl.truststore.password": "changeit", 
-            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}", 
-            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks", 
-            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}", 
+            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks",
+            "xasecure.policymgr.clientssl.truststore.password": "changeit",
+            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}",
+            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks",
+            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}",
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
-        }, 
+        },
         "tagsync-application-properties": {
-            "atlas.kafka.entities.group.id": "ranger_entities_consumer", 
-            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181", 
+            "atlas.kafka.entities.group.id": "ranger_entities_consumer",
+            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181",
             "atlas.kafka.bootstrap.servers": "localhost:6667"
-        }, 
+        },
         "ranger-env": {
-            "ranger_solr_shards": "1", 
-            "ranger_solr_config_set": "ranger_audits", 
-            "ranger_user": "ranger", 
+            "ranger_solr_shards": "1",
+            "ranger_solr_config_set": "ranger_audits",
+            "ranger_user": "ranger",
             "ranger_solr_replication_factor": "1",
-            "xml_configurations_supported": "true", 
-            "ranger-atlas-plugin-enabled": "No", 
-            "ranger-hbase-plugin-enabled": "No", 
-            "ranger-yarn-plugin-enabled": "No", 
-            "bind_anonymous": "false", 
-            "ranger_admin_username": "amb_ranger_admin", 
-            "admin_password": "admin", 
-            "is_solrCloud_enabled": "true", 
-            "ranger-storm-plugin-enabled": "No", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "ranger_group": "ranger", 
-            "ranger-knox-plugin-enabled": "No", 
-            "ranger_admin_log_dir": "/var/log/ranger/admin", 
-            "ranger-kafka-plugin-enabled": "No", 
-            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306", 
-            "ranger-hive-plugin-enabled": "No", 
-            "xasecure.audit.destination.solr": "true", 
-            "ranger_pid_dir": "/var/run/ranger", 
-            "xasecure.audit.destination.hdfs": "true", 
-            "admin_username": "admin", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
-            "create_db_dbuser": "true", 
-            "ranger_solr_collection_name": "ranger_audits", 
-            "ranger_admin_password": "P1!q9xa96SMi5NCl", 
+            "xml_configurations_supported": "true",
+            "ranger-atlas-plugin-enabled": "No",
+            "ranger-hbase-plugin-enabled": "No",
+            "ranger-yarn-plugin-enabled": "No",
+            "bind_anonymous": "false",
+            "ranger_admin_username": "amb_ranger_admin",
+            "admin_password": "admin",
+            "is_solrCloud_enabled": "true",
+            "ranger-storm-plugin-enabled": "No",
+            "ranger-hdfs-plugin-enabled": "No",
+            "ranger_group": "ranger",
+            "ranger-knox-plugin-enabled": "No",
+            "ranger_admin_log_dir": "/var/log/ranger/admin",
+            "ranger-kafka-plugin-enabled": "No",
+            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306",
+            "ranger-hive-plugin-enabled": "No",
+            "xasecure.audit.destination.solr": "true",
+            "ranger_pid_dir": "/var/run/ranger",
+            "xasecure.audit.destination.hdfs": "true",
+            "admin_username": "admin",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
+            "create_db_dbuser": "true",
+            "ranger_solr_collection_name": "ranger_audits",
+            "ranger_admin_password": "P1!q9xa96SMi5NCl",
             "ranger_usersync_log_dir": "/var/log/ranger/usersync"
-        }, 
+        },
         "usersync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/usersync.
 log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n"
-        }, 
+        },
         "admin-properties": {
-            "db_user": "rangeradmin01", 
-            "DB_FLAVOR": "MYSQL", 
-            "db_password": "rangeradmin01", 
-            "db_root_user": "root", 
-            "policymgr_external_url": "http://c6401.ambari.apache.org:6080", 
-            "db_name": "ranger01", 
-            "db_host": "c6401.ambari.apache.org", 
-            "db_root_password": "vagrant", 
+            "db_user": "rangeradmin01",
+            "DB_FLAVOR": "MYSQL",
+            "db_password": "rangeradmin01",
+            "db_root_user": "root",
+            "policymgr_external_url": "http://c6401.ambari.apache.org:6080",
+            "db_name": "ranger01",
+            "db_host": "c6401.ambari.apache.org",
+            "db_root_password": "vagrant",
             "SQL_CONNECTOR_JAR": "{{driver_curl_target}}"
-        }, 
+        },
         "ranger-ugsync-site": {
-            "ranger.usersync.ldap.binddn": "", 
-            "ranger.usersync.policymgr.username": "rangerusersync", 
-            "ranger.usersync.policymanager.mockrun": "false", 
-            "ranger.usersync.group.searchbase": "", 
-            "ranger.usersync.ldap.bindalias": "testldapalias", 
-            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks", 
-            "ranger.usersync.port": "5151", 
-            "ranger.usersync.pagedresultssize": "500", 
-            "ranger.usersync.group.memberattributename": "", 
-            "ranger.usersync.kerberos.principal": "", 
-            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder", 
-            "ranger.usersync.ldap.referral": "ignore", 
-            "ranger.usersync.group.searchfilter": "", 
-            "ranger.usersync.ldap.user.objectclass": "person", 
-            "ranger.usersync.logdir": "{{usersync_log_dir}}", 
-            "ranger.usersync.ldap.user.searchfilter": "", 
-            "ranger.usersync.ldap.groupname.caseconversion": "none", 
-            "ranger.usersync.ldap.ldapbindpassword": "", 
-            "ranger.usersync.unix.minUserId": "500", 
-            "ranger.usersync.policymanager.maxrecordsperapicall": "1000", 
-            "ranger.usersync.group.nameattribute": "", 
-            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password", 
-            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks", 
-            "ranger.usersync.user.searchenabled": "false", 
-            "ranger.usersync.group.usermapsyncenabled": "true", 
-            "ranger.usersync.ldap.bindkeystore": "", 
-            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof", 
-            "ranger.usersync.kerberos.keytab": "", 
-            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe", 
-            "ranger.usersync.group.objectclass": "", 
-            "ranger.usersync.ldap.user.searchscope": "sub", 
-            "ranger.usersync.unix.password.file": "/etc/passwd", 
-            "ranger.usersync.ldap.user.nameattribute": "", 
-            "ranger.usersync.pagedresultsenabled": "true", 
-            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}", 
-            "ranger.usersync.group.search.first.enabled": "false", 
-            "ranger.usersync.group.searchenabled": "false", 
-            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder", 
-            "ranger.usersync.ssl": "true", 
-            "ranger.usersync.ldap.url": "", 
-            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org", 
-            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.ldap.user.searchbase": "", 
-            "ranger.usersync.ldap.username.caseconversion": "none", 
-            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.keystore.password": "UnIx529p", 
-            "ranger.usersync.unix.group.file": "/etc/group", 
-            "ranger.usersync.filesource.file": "/tmp/usergroup.txt", 
-            "ranger.usersync.group.searchscope": "", 
-            "ranger.usersync.truststore.password": "changeit", 
-            "ranger.usersync.enabled": "true", 
-            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000", 
+            "ranger.usersync.ldap.binddn": "",
+            "ranger.usersync.policymgr.username": "rangerusersync",
+            "ranger.usersync.policymanager.mockrun": "false",
+            "ranger.usersync.group.searchbase": "",
+            "ranger.usersync.ldap.bindalias": "testldapalias",
+            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks",
+            "ranger.usersync.port": "5151",
+            "ranger.usersync.pagedresultssize": "500",
+            "ranger.usersync.group.memberattributename": "",
+            "ranger.usersync.kerberos.principal": "",
+            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
+            "ranger.usersync.ldap.referral": "ignore",
+            "ranger.usersync.group.searchfilter": "",
+            "ranger.usersync.ldap.user.objectclass": "person",
+            "ranger.usersync.logdir": "{{usersync_log_dir}}",
+            "ranger.usersync.ldap.user.searchfilter": "",
+            "ranger.usersync.ldap.groupname.caseconversion": "none",
+            "ranger.usersync.ldap.ldapbindpassword": "",
+            "ranger.usersync.unix.minUserId": "500",
+            "ranger.usersync.policymanager.maxrecordsperapicall": "1000",
+            "ranger.usersync.group.nameattribute": "",
+            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password",
+            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks",
+            "ranger.usersync.user.searchenabled": "false",
+            "ranger.usersync.group.usermapsyncenabled": "true",
+            "ranger.usersync.ldap.bindkeystore": "",
+            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof",
+            "ranger.usersync.kerberos.keytab": "",
+            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe",
+            "ranger.usersync.group.objectclass": "",
+            "ranger.usersync.ldap.user.searchscope": "sub",
+            "ranger.usersync.unix.password.file": "/etc/passwd",
+            "ranger.usersync.ldap.user.nameattribute": "",
+            "ranger.usersync.pagedresultsenabled": "true",
+            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}",
+            "ranger.usersync.group.search.first.enabled": "false",
+            "ranger.usersync.group.searchenabled": "false",
+            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder",
+            "ranger.usersync.ssl": "true",
+            "ranger.usersync.ldap.url": "",
+            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org",
+            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.ldap.user.searchbase": "",
+            "ranger.usersync.ldap.username.caseconversion": "none",
+            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.keystore.password": "UnIx529p",
+            "ranger.usersync.unix.group.file": "/etc/group",
+            "ranger.usersync.filesource.file": "/tmp/usergroup.txt",
+            "ranger.usersync.group.searchscope": "",
+            "ranger.usersync.truststore.password": "changeit",
+            "ranger.usersync.enabled": "true",
+            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000",
             "ranger.usersync.filesource.text.delimiter": ","
-        }, 
+        },
         "hdfs-site": {
-            "dfs.namenode.checkpoint.period": "21600", 
-            "dfs.namenode.avoid.write.stale.datanode": "true", 
-            "dfs.namenode.startup.delay.block.deletion.sec": "3600", 
-            "dfs.namenode.checkpoint.txns": "1000000", 
-            "dfs.content-summary.limit": "5000", 
-            "dfs.support.append": "true", 
-            "dfs.datanode.address": "0.0.0.0:50010", 
-            "dfs.cluster.administrators": " hdfs", 
-            "dfs.namenode.audit.log.async": "true", 
-            "dfs.datanode.balance.bandwidthPerSec": "6250000", 
-            "dfs.namenode.safemode.threshold-pct": "1", 
-            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}", 
-            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020", 
-            "dfs.permissions.enabled": "true", 
-            "dfs.client.read.shortcircuit": "true", 
-            "dfs.https.port": "50470", 
-            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470", 
-            "nfs.file.dump.dir": "/tmp/.hdfs-nfs", 
-            "dfs.blocksize": "134217728", 
-            "dfs.blockreport.initialDelay": "120", 
-            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode", 
-            "dfs.namenode.fslock.fair": "false", 
-            "dfs.datanode.max.transfer.threads": "4096", 
-            "dfs.heartbeat.interval": "3", 
-            "dfs.replication": "3", 
-            "dfs.namenode.handler.count": "50", 
-            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary", 
-            "fs.permissions.umask-mode": "022", 
-            "dfs.namenode.stale.datanode.interval": "30000", 
-            "dfs.datanode.ipc.address": "0.0.0.0:8010", 
-            "dfs.datanode.failed.volumes.tolerated": "0", 
-            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data", 
-            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070", 
-            "dfs.webhdfs.enabled": "true", 
-            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding", 
-            "dfs.namenode.accesstime.precision": "0", 
-            "dfs.datanode.https.address": "0.0.0.0:50475", 
-            "dfs.namenode.write.stale.datanode.ratio": "1.0f", 
-            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090", 
-            "nfs.exports.allowed.hosts": "* rw", 
-            "dfs.datanode.http.address": "0.0.0.0:50075", 
-            "dfs.datanode.du.reserved": "33011188224", 
-            "dfs.client.read.shortcircuit.streams.cache.size": "4096", 
-            "dfs.http.policy": "HTTP_ONLY", 
-            "dfs.block.access.token.enable": "true", 
-            "dfs.client.retry.policy.enabled": "false", 
-            "dfs.namenode.name.dir.restore": "true", 
-            "dfs.permissions.superusergroup": "hdfs", 
-            "dfs.journalnode.https-address": "0.0.0.0:8481", 
-            "dfs.journalnode.http-address": "0.0.0.0:8480", 
-            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket", 
-            "dfs.namenode.avoid.read.stale.datanode": "true", 
-            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude", 
-            "dfs.datanode.data.dir.perm": "750", 
-            "dfs.encryption.key.provider.uri": "", 
-            "dfs.replication.max": "50", 
+            "dfs.namenode.checkpoint.period": "21600",
+            "dfs.namenode.avoid.write.stale.datanode": "true",
+            "dfs.namenode.startup.delay.block.deletion.sec": "3600",
+            "dfs.namenode.checkpoint.txns": "1000000",
+            "dfs.content-summary.limit": "5000",
+            "dfs.support.append": "true",
+            "dfs.datanode.address": "0.0.0.0:50010",
+            "dfs.cluster.administrators": " hdfs",
+            "dfs.namenode.audit.log.async": "true",
+            "dfs.datanode.balance.bandwidthPerSec": "6250000",
+            "dfs.namenode.safemode.threshold-pct": "1",
+            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}",
+            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020",
+            "dfs.permissions.enabled": "true",
+            "dfs.client.read.shortcircuit": "true",
+            "dfs.https.port": "50470",
+            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470",
+            "nfs.file.dump.dir": "/tmp/.hdfs-nfs",
+            "dfs.blocksize": "134217728",
+            "dfs.blockreport.initialDelay": "120",
+            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode",
+            "dfs.namenode.fslock.fair": "false",
+            "dfs.datanode.max.transfer.threads": "4096",
+            "dfs.heartbeat.interval": "3",
+            "dfs.replication": "3",
+            "dfs.namenode.handler.count": "50",
+            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary",
+            "fs.permissions.umask-mode": "022",
+            "dfs.namenode.stale.datanode.interval": "30000",
+            "dfs.datanode.ipc.address": "0.0.0.0:8010",
+            "dfs.datanode.failed.volumes.tolerated": "0",
+            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data",
+            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070",
+            "dfs.webhdfs.enabled": "true",
+            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding",
+            "dfs.namenode.accesstime.precision": "0",
+            "dfs.datanode.https.address": "0.0.0.0:50475",
+            "dfs.namenode.write.stale.datanode.ratio": "1.0f",
+            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090",
+            "nfs.exports.allowed.hosts": "* rw",
+            "dfs.datanode.http.address": "0.0.0.0:50075",
+            "dfs.datanode.du.reserved": "33011188224",
+            "dfs.client.read.shortcircuit.streams.cache.size": "4096",
+            "dfs.http.policy": "HTTP_ONLY",
+            "dfs.block.access.token.enable": "true",
+            "dfs.client.retry.policy.enabled": "false",
+            "dfs.namenode.name.dir.restore": "true",
+            "dfs.permissions.superusergroup": "hdfs",
+            "dfs.journalnode.https-address": "0.0.0.0:8481",
+            "dfs.journalnode.http-address": "0.0.0.0:8480",
+            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket",
+            "dfs.namenode.avoid.read.stale.datanode": "true",
+            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude",
+            "dfs.datanode.data.dir.perm": "750",
+            "dfs.encryption.key.provider.uri": "",
+            "dfs.replication.max": "50",
             "dfs.namenode.name.dir": "/grid/0/hadoop/hdfs/namenode"
-        }, 
+        },
         "ranger-tagsync-site": {
-            "ranger.tagsync.dest.ranger.ssl.config.filename": "/usr/hdp/current/ranger-tagsync/conf/mytruststore.jks", 
-            "ranger.tagsync.source.atlasrest.username": "", 
-            "ranger.tagsync.logdir": "/var/log/ranger/tagsync", 
-            "ranger.tagsync.source.atlasrest.download.interval.millis": "", 
-            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks", 
-            "ranger.tagsync.source.file.check.interval.millis": "", 
-            "ranger.tagsync.source.atlasrest.endpoint": "", 
-            "ranger.tagsync.dest.ranger.username": "rangertagsync", 
-            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}", 
-            "ranger.tagsync.kerberos.principal": "", 
-            "ranger.tagsync.kerberos.keytab": "", 
-            "ranger.tagsync.source.atlas": "false", 
-            "ranger.tagsync.source.atlasrest": "false", 
-            "ranger.tagsync.source.file": "false", 
+            "ranger.tagsync.dest.ranger.ssl.config.filename": "/usr/hdp/current/ranger-tagsync/conf/mytruststore.jks",
+            "ranger.tagsync.source.atlasrest.username": "",
+            "ranger.tagsync.logdir": "/var/log/ranger/tagsync",
+            "ranger.tagsync.source.atlasrest.download.interval.millis": "",
+            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks",
+            "ranger.tagsync.source.file.check.interval.millis": "",
+            "ranger.tagsync.source.atlasrest.endpoint": "",
+            "ranger.tagsync.dest.ranger.username": "rangertagsync",
+            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}",
+            "ranger.tagsync.kerberos.principal": "",
+            "ranger.tagsync.kerberos.keytab": "",
+            "ranger.tagsync.source.atlas": "false",
+            "ranger.tagsync.source.atlasrest": "false",
+            "ranger.tagsync.source.file": "false",
             "ranger.tagsync.source.file.filename": ""
-        }, 
+        },
         "zoo.cfg": {
-            "clientPort": "2181", 
-            "autopurge.purgeInterval": "24", 
-            "syncLimit": "5", 
-            "dataDir": "/grid/0/hadoop/zookeeper", 
-            "initLimit": "10", 
-            "tickTime": "2000", 
+            "clientPort": "2181",
+            "autopurge.purgeInterval": "24",
+            "syncLimit": "5",
+            "dataDir": "/grid/0/hadoop/zookeeper",
+            "initLimit": "10",
+            "tickTime": "2000",
             "autopurge.snapRetainCount": "30"
-        }, 
+        },
         "hadoop-policy": {
-            "security.job.client.protocol.acl": "*", 
-            "security.job.task.protocol.acl": "*", 
-            "security.datanode.protocol.acl": "*", 
-            "security.namenode.protocol.acl": "*", 
-            "security.client.datanode.protocol.acl": "*", 
-            "security.inter.tracker.protocol.acl": "*", 
-            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop", 
-            "security.client.protocol.acl": "*", 
-            "security.refresh.policy.protocol.acl": "hadoop", 
-            "security.admin.operations.protocol.acl": "hadoop", 
+            "security.job.client.protocol.acl": "*",
+            "security.job.task.protocol.acl": "*",
+            "security.datanode.protocol.acl": "*",
+            "security.namenode.protocol.acl": "*",
+            "security.client.datanode.protocol.acl": "*",
+            "security.inter.tracker.protocol.acl": "*",
+            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop",
+            "security.client.protocol.acl": "*",
+            "security.refresh.policy.protocol.acl": "hadoop",
+            "security.admin.operations.protocol.acl": "hadoop",
             "security.inter.datanode.protocol.acl": "*"
-        }, 
+        },
         "hdfs-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#  http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n\n# Define some default values that can be overridden by system properties\n# To change daemon root logger use hadoop_root_logger in hadoop-env\nhadoop.root.lo
 gger=INFO,console\nhadoop.log.dir=.\nhadoop.log.file=hadoop.log\n\n\n# Define the root logger to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\n\n# Logging Threshold\nlog4j.threshhold=ALL\n\n#\n# Daily Rolling File Appender\n#\n\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Rollver at midnight\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\n\n# 30-day backup\n#log4j.appender.DRFA.MaxBackupIndex=30\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\n\n# Pattern format: Date LogLevel LoggerName LogMessage\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n# Debugging Pattern format\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender
 .console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\n\n#\n# TaskLog Appender\n#\n\n#Default values\nhadoop.tasklog.taskid=null\nhadoop.tasklog.iscleanup=false\nhadoop.tasklog.noKeepSplits=4\nhadoop.tasklog.totalLogFileSize=100\nhadoop.tasklog.purgeLogSplits=true\nhadoop.tasklog.logsRetainHours=12\n\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\n\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n\n#\n#Security audit appender\n#\nhadoop.security.logger=INFO,console\nhadoop.security.log.maxfilesize=256MB\nhadoop.security.log.maxbackupindex=20\nlog4j.category.SecurityLogger=${hadoop.security.logg
 er}\nhadoop.security.log.file=SecurityAuth.audit\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\n\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\n\n#\n# hdfs audit logging\n#\nhdfs.audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=
 false\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# NameNode metrics logging.\n# The default is to retain two namenode-metrics.log files up to 64MB each.\n#\nnamenode.metrics.logger=INFO,NullAppender\nlog4j.logger.NameNodeMetricsLog=${namenode.metrics.logger}\nlog4j.additivity.NameNodeMetricsLog=false\nlog4j.appender.NNMETRICSRFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.NNMETRICSRFA.File=${hadoop.log.dir}/namenode-metrics.log\nlog4j.appender.NNMETRICSRFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.NNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n\nlog4j.appender.NNMETRICSRFA.MaxBackupIndex=1\nlog4j.appender.NNMETRICSRFA.MaxFileSize=64MB\n\n#\n# mapred audit logging\n#\nmapred
 .audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# Rolling File Appender\n#\n\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Logfile size and and 30-day backups\nlog4j.appender.RFA.MaxFileSize=256MB\nlog4j.appender.RFA.MaxBackupIndex=10\n\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n# Custom Logging leve
 ls\n\nhadoop.metrics.log.level=INFO\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\n\n# Jets3t library\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\n\n#\n# Null Appender\n# Trap security logger on the hadoop client side\n#\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\n\n#\n# Event Counter Appender\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\n#\nlog4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter\n\n# Removes \"deprecated\" messages\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\n\n#\n# HDFS block state change log from block manager\n#\n# Uncomment the following to suppress normal block state change\n# messages from BlockManager in NameNode.\n#log4j.logger.BlockStateCh
 ange=WARN"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
-            "hadoop.rpc.protection": "authentication", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "REPOSITORY_CONFIG_USERNAME": "hadoop", 
-            "policy_user": "ambari-qa", 
-            "common.name.for.certificate": "", 
+            "hadoop.rpc.protection": "authentication",
+            "ranger-hdfs-plugin-enabled": "No",
+            "REPOSITORY_CONFIG_USERNAME": "hadoop",
+            "policy_user": "ambari-qa",
+            "common.name.for.certificate": "",
             "REPOSITORY_CONFIG_PASSWORD": "hadoop"
-        }, 
+        },
         "core-site": {
-            "hadoop.proxyuser.root.hosts": "c6401.ambari.apache.org", 
-            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
-            "fs.trash.interval": "360", 
-            "ha.failover-controller.active-standby-elector.zk.op.retries": "120", 
-            "hadoop.http.authentication.simple.anonymous.allowed": "true", 
-            "hadoop.security.authentication": "simple", 
-            "hadoop.proxyuser.root.groups": "*", 
-            "ipc.client.connection.maxidletime": "30000", 
-            "hadoop.security.key.provider.path": "", 
-            "mapreduce.jobtracker.webinterface.trusted": "false", 
-            "hadoop.security.authorization": "false", 
-            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py", 
-            "ipc.server.tcpnodelay": "true", 
-            "ipc.client.connect.max.retries": "50", 
-            "hadoop.security.auth_to_local": "DEFAULT", 
-            "io.file.buffer.size": "131072", 
-            "hadoop.proxyuser.hdfs.hosts": "*", 
-            "hadoop.proxyuser.hdfs.groups": "*", 
-            "ipc.client.idlethreshold": "8000", 
-            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020", 
+            "hadoop.proxyuser.root.hosts": "c6401.ambari.apache.org",
+            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization",
+            "fs.trash.interval": "360",
+            "ha.failover-controller.active-standby-elector.zk.op.retries": "120",
+            "hadoop.http.authentication.simple.anonymous.allowed": "true",
+            "hadoop.security.authentication": "simple",
+            "hadoop.proxyuser.root.groups": "*",
+            "ipc.client.connection.maxidletime": "30000",
+            "hadoop.security.key.provider.path": "",
+            "mapreduce.jobtracker.webinterface.trusted": "false",
+            "hadoop.security.authorization": "false",
+            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py",
+            "ipc.server.tcpnodelay": "true",
+            "ipc.client.connect.max.retries": "50",
+            "hadoop.security.auth_to_local": "DEFAULT",
+            "io.file.buffer.size": "131072",
+            "hadoop.proxyuser.hdfs.hosts": "*",
+            "hadoop.proxyuser.hdfs.groups": "*",
+            "ipc.client.idlethreshold": "8000",
+            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020",
             "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec"
-        }, 
+        },
         "hadoop-env": {
-            "keyserver_port": "", 
-            "proxyuser_group": "users", 
-            "hdfs_user_nproc_limit": "65536", 
-            "hdfs_log_dir_prefix": "/var/log/hadoop", 
-            "hdfs_user_nofile_limit": "128000", 
-            "hdfs_user": "hdfs", 
-            "keyserver_host": " ", 
-            "namenode_opt_maxnewsize": "128m", 
-            "namenode_opt_maxpermsize": "256m", 
-            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}", 
-            "namenode_heapsize": "1024m", 
-            "namenode_opt_newsize": "128m", 
-            "nfsgateway_heapsize": "1024", 
-            "dtnode_heapsize": "1024m", 
-            "hadoop_root_logger": "INFO,RFA", 
-            "hadoop_heapsize": "1024", 
-            "hadoop_pid_dir_prefix": "/var/run/hadoop", 
-            "namenode_opt_permsize": "128m", 
+            "keyserver_port": "",
+            "proxyuser_group": "users",
+            "hdfs_user_nproc_limit": "65536",
+            "hdfs_log_dir_prefix": "/var/log/hadoop",
+            "hdfs_user_nofile_limit": "128000",
+            "hdfs_user": "hdfs",
+            "keyserver_host": " ",
+            "namenode_opt_maxnewsize": "128m",
+            "namenode_opt_maxpermsize": "256m",
+            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}",
+            "namenode_heapsize": "1024m",
+            "namenode_opt_newsize": "128m",
+            "nfsgateway_heapsize": "1024",
+            "dtnode_heapsize": "1024m",
+            "hadoop_root_logger": "INFO,RFA",
+            "hadoop_heapsize": "1024",
+            "hadoop_pid_dir_prefix": "/var/run/hadoop",
+            "namenode_opt_permsize": "128m",
             "hdfs_tmp_dir": "/tmp"
-        }, 
+        },
         "zookeeper-log4j": {
             "content": "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n#\n#\n\n#\n# ZooKeeper Logging Configuration\n#\n\n# DEFAULT: console appender only\nlog4j.rootLogger=INFO, CONSOLE\n\n# Example with rolling log file\n#log4
 j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE\n\n# Example with rolling log file and tracing\n#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE\n\n#\n# Log INFO level and above messages to the console\n#\nlog4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender\nlog4j.appender.CONSOLE.Threshold=INFO\nlog4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout\nlog4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n\n\n#\n# Add ROLLINGFILE to rootLogger to get log file output\n#    Log DEBUG level and above messages to a log file\nlog4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender\nlog4j.appender.ROLLINGFILE.Threshold=DEBUG\nlog4j.appender.ROLLINGFILE.File=zookeeper.log\n\n# Max log file size of 10MB\nlog4j.appender.ROLLINGFILE.MaxFileSize=10MB\n# uncomment the next line to limit number of backup files\n#log4j.appender.ROLLINGFILE.MaxBackupIndex=10\n\nlog4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout\nlog4j.appender.ROLLIN
 GFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n\n\n\n#\n# Add TRACEFILE to rootLogger to get log file output\n#    Log DEBUG level and above messages to a log file\nlog4j.appender.TRACEFILE=org.apache.log4j.FileAppender\nlog4j.appender.TRACEFILE.Threshold=TRACE\nlog4j.appender.TRACEFILE.File=zookeeper_trace.log\n\nlog4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout\n### Notice we are including log4j's NDC here (%x)\nlog4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L][%x] - %m%n"
-        }, 
+        },
         "ssl-server": {
-            "ssl.server.keystore.location": "/etc/security/serverKeys/keystore.jks", 
-            "ssl.server.keystore.keypassword": "bigdata", 
-            "ssl.server.truststore.location": "/etc/security/serverKeys/all.jks", 
-            "ssl.server.keystore.password": "bigdata", 
-            "ssl.server.truststore.password": "bigdata", 
-            "ssl.server.truststore.type": "jks", 
-            "ssl.server.keystore.type": "jks", 
+            "ssl.server.keystore.location": "/etc/security/serverKeys/keystore.jks",
+            "ssl.server.keystore.keypassword": "bigdata",
+            "ssl.server.truststore.location": "/etc/security/serverKeys/all.jks",
+            "ssl.server.keystore.password": "bigdata",
+            "ssl.server.truststore.password": "bigdata",
+            "ssl.server.truststore.type": "jks",
+            "ssl.server.keystore.type": "jks",
             "ssl.server.truststore.reload.interval": "10000"
-        }, 
-        "ranger-site": {}, 
+        },
+        "ranger-site": {},
         "admin-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\nlog4j.rootLogger = warn,xa_log_appender\n\n\n# xa_logger\nlog4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.xa_log_app
 ender.file=${logdir}/xa_portal.log\nlog4j.appender.xa_log_appender.datePattern='.'yyyy-MM-dd\nlog4j.appender.xa_log_appender.append=true\nlog4j.appender.xa_log_appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.xa_log_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n\n# xa_log_appender : category and additivity\nlog4j.category.org.springframework=warn,xa_log_appender\nlog4j.additivity.org.springframework=false\n\nlog4j.category.org.apache.ranger=info,xa_log_appender\nlog4j.additivity.org.apache.ranger=false\n\nlog4j.category.xa=info,xa_log_appender\nlog4j.additivity.xa=false\n\n# perf_logger\nlog4j.appender.perf_appender=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.perf_appender.file=${logdir}/ranger_admin_perf.log\nlog4j.appender.perf_appender.datePattern='.'yyyy-MM-dd\nlog4j.appender.perf_appender.append=true\nlog4j.appender.perf_appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.perf_appender.layout.ConversionPattern=%d [%t] 
 %m%n\n\n\n# sql_appender\nlog4j.appender.sql_appender=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.sql_appender.file=${logdir}/xa_portal_sql.log\nlog4j.appender.sql_appender.datePattern='.'yyyy-MM-dd\nlog4j.appender.sql_appender.append=true\nlog4j.appender.sql_appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.sql_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n\n\n# sql_appender : category and additivity\nlog4j.category.org.hibernate.SQL=warn,sql_appender\nlog4j.additivity.org.hibernate.SQL=false\n\nlog4j.category.jdbc.sqlonly=fatal,sql_appender\nlog4j.additivity.jdbc.sqlonly=false\n\nlog4j.category.jdbc.sqltiming=warn,sql_appender\nlog4j.additivity.jdbc.sqltiming=false\n\nlog4j.category.jdbc.audit=fatal,sql_appender\nlog4j.additivity.jdbc.audit=false\n\nlog4j.category.jdbc.resultset=fatal,sql_appender\nlog4j.additivity.jdbc.resultset=false\n\nlog4j.category.jdbc.connection=fatal,sql_appender\nlog4j.additivity.jdbc.connection=false"
-        }, 
+        },
         "tagsync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/tagsync
 .log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n"
-        }, 
+        },
         "ranger-hdfs-security": {
-            "ranger.plugin.hdfs.policy.source.impl": "org.apache.ranger.admin.client.RangerAdminRESTClient", 
-            "ranger.plugin.hdfs.service.name": "{{repo_name}}", 
-            "ranger.plugin.hdfs.policy.cache.dir": "/etc/ranger/{{repo_name}}/policycache", 
-            "ranger.plugin.hdfs.policy.pollIntervalMs": "30000", 
-            "ranger.plugin.hdfs.policy.rest.url": "{{policymgr_mgr_url}}", 
-            "ranger.plugin.hdfs.policy.rest.ssl.config.file": "/etc/hadoop/conf/ranger-policymgr-ssl.xml", 
+            "ranger.plugin.hdfs.policy.source.impl": "org.apache.ranger.admin.client.RangerAdminRESTClient",
+            "ranger.plugin.hdfs.service.name": "{{repo_name}}",
+            "ranger.plugin.hdfs.policy.cache.dir": "/etc/ranger/{{repo_name}}/policycache",
+            "ranger.plugin.hdfs.policy.pollIntervalMs": "30000",
+            "ranger.plugin.hdfs.policy.rest.url": "{{policymgr_mgr_url}}",
+            "ranger.plugin.hdfs.policy.rest.ssl.config.file": "/etc/hadoop/conf/ranger-policymgr-ssl.xml",
             "xasecure.add-hadoop-authorization": "true"
-        }, 
-        "usersync-properties": {}, 
+        },
+        "usersync-properties": {},
         "zookeeper-env": {
-            "zk_log_dir": "/var/log/zookeeper", 
-            "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOOKEEPER_HOME={{zk_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}", 
-            "zk_server_heapsize": "1024m", 
-            "zk_pid_dir": "/var/run/zookeeper", 
+            "zk_log_dir": "/var/log/zookeeper",
+            "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOOKEEPER_HOME={{zk_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}",
+            "zk_server_heapsize": "1024m",
+            "zk_pid_dir": "/var/run/zookeeper",
             "zk_user": "zookeeper"
         },
         "infra-solr-env": {
@@ -651,7 +651,7 @@
             "infra_solr_kerberos_name_rules": "DEFAULT",
             "infra_solr_user": "infra-solr",
             "infra_solr_maxmem": "1024",
-            "content": "#!/bin/bash\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LI

<TRUNCATED>

[34/52] [abbrv] ambari git commit: AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
index fa791c1..64e7d52 100644
--- a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
+++ b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
@@ -1,101 +1,101 @@
 {
     "localComponents": [
-        "SECONDARY_NAMENODE", 
-        "HDFS_CLIENT", 
-        "DATANODE", 
-        "NAMENODE", 
-        "RANGER_ADMIN", 
-        "RANGER_TAGSYNC", 
-        "RANGER_USERSYNC", 
-        "ZOOKEEPER_SERVER", 
-        "ZOOKEEPER_CLIENT", 
+        "SECONDARY_NAMENODE",
+        "HDFS_CLIENT",
+        "DATANODE",
+        "NAMENODE",
+        "RANGER_ADMIN",
+        "RANGER_TAGSYNC",
+        "RANGER_USERSYNC",
+        "ZOOKEEPER_SERVER",
+        "ZOOKEEPER_CLIENT",
         "KERBEROS_CLIENT",
         "LOGSEARCH_SOLR",
         "LOGSEARCH_SOLR_CLIENT"
-    ], 
+    ],
     "configuration_attributes": {
-        "ranger-hdfs-audit": {}, 
-        "ssl-client": {}, 
-        "ranger-admin-site": {}, 
-        "ranger-hdfs-policymgr-ssl": {}, 
-        "tagsync-application-properties": {}, 
-        "ranger-env": {}, 
-        "usersync-log4j": {}, 
-        "ranger-hdfs-plugin-properties": {}, 
-        "kerberos-env": {}, 
-        "admin-properties": {}, 
-        "ranger-ugsync-site": {}, 
+        "ranger-hdfs-audit": {},
+        "ssl-client": {},
+        "ranger-admin-site": {},
+        "ranger-hdfs-policymgr-ssl": {},
+        "tagsync-application-properties": {},
+        "ranger-env": {},
+        "usersync-log4j": {},
+        "ranger-hdfs-plugin-properties": {},
+        "kerberos-env": {},
+        "admin-properties": {},
+        "ranger-ugsync-site": {},
         "hdfs-site": {
             "final": {
-                "dfs.datanode.data.dir": "true", 
-                "dfs.namenode.http-address": "true", 
-                "dfs.datanode.failed.volumes.tolerated": "true", 
-                "dfs.support.append": "true", 
-                "dfs.namenode.name.dir": "true", 
+                "dfs.datanode.data.dir": "true",
+                "dfs.namenode.http-address": "true",
+                "dfs.datanode.failed.volumes.tolerated": "true",
+                "dfs.support.append": "true",
+                "dfs.namenode.name.dir": "true",
                 "dfs.webhdfs.enabled": "true"
             }
-        }, 
+        },
         "ranger-tagsync-site": {},
-        "ranger-tagsync-policymgr-ssl": {}, 
+        "ranger-tagsync-policymgr-ssl": {},
         "zoo.cfg": {},
         "hadoop-policy": {},
-        "hdfs-log4j": {}, 
-        "krb5-conf": {}, 
+        "hdfs-log4j": {},
+        "krb5-conf": {},
         "core-site": {
             "final": {
                 "fs.defaultFS": "true"
             }
-        }, 
-        "hadoop-env": {}, 
-        "zookeeper-log4j": {}, 
-        "ssl-server": {}, 
-        "ranger-site": {}, 
-        "admin-log4j": {}, 
-        "tagsync-log4j": {}, 
-        "ranger-hdfs-security": {}, 
+        },
+        "hadoop-env": {},
+        "zookeeper-log4j": {},
+        "ssl-server": {},
+        "ranger-site": {},
+        "admin-log4j": {},
+        "tagsync-log4j": {},
+        "ranger-hdfs-security": {},
         "ranger-solr-configuration": {},
         "usersync-properties": {},
         "zookeeper-env": {},
         "infra-solr-env": {},
         "infra-solr-client-log4j": {},
         "cluster-env": {}
-    }, 
-    "public_hostname": "c6401.ambari.apache.org", 
-    "commandId": "41-2", 
-    "hostname": "c6401.ambari.apache.org", 
-    "kerberosCommandParams": [], 
-    "serviceName": "RANGER", 
-    "role": "RANGER_ADMIN", 
-    "forceRefreshConfigTagsBeforeExecution": [], 
-    "requestId": 41, 
+    },
+    "public_hostname": "c6401.ambari.apache.org",
+    "commandId": "41-2",
+    "hostname": "c6401.ambari.apache.org",
+    "kerberosCommandParams": [],
+    "serviceName": "RANGER",
+    "role": "RANGER_ADMIN",
+    "forceRefreshConfigTagsBeforeExecution": [],
+    "requestId": 41,
     "agentConfigParams": {
         "agent": {
             "parallel_execution": 0
         }
-    }, 
-    "clusterName": "test_Cluster01", 
-    "commandType": "EXECUTION_COMMAND", 
-    "taskId": 186, 
-    "roleParams": {}, 
+    },
+    "clusterName": "test_Cluster01",
+    "commandType": "EXECUTION_COMMAND",
+    "taskId": 186,
+    "roleParams": {},
     "configurationTags": {
         "ranger-hdfs-audit": {
             "tag": "version1466705299922"
-        }, 
+        },
         "ssl-client": {
             "tag": "version1"
-        }, 
+        },
         "ranger-admin-site": {
             "tag": "version1467016680635"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
             "tag": "version1466705299922"
-        }, 
+        },
         "tagsync-application-properties": {
             "tag": "version1467016680511"
-        }, 
+        },
         "ranger-env": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-ugsync-site": {
             "tag": "version1467016680537"
         },
@@ -104,52 +104,52 @@
         },
         "ranger-hdfs-plugin-properties": {
             "tag": "version1466705299922"
-        }, 
+        },
         "kerberos-env": {
             "tag": "version1467016537243"
-        }, 
+        },
         "admin-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "hdfs-site": {
             "tag": "version1467016680401"
-        }, 
+        },
         "ranger-tagsync-site": {
             "tag": "version1467016680586"
-        }, 
+        },
         "zoo.cfg": {
             "tag": "version1"
-        }, 
+        },
         "hadoop-policy": {
             "tag": "version1"
-        }, 
+        },
         "hdfs-log4j": {
             "tag": "version1"
-        }, 
+        },
         "usersync-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "krb5-conf": {
             "tag": "version1467016537243"
-        }, 
+        },
         "core-site": {
             "tag": "version1467016680612"
-        }, 
+        },
         "hadoop-env": {
             "tag": "version1467016680446"
-        }, 
+        },
         "zookeeper-log4j": {
             "tag": "version1"
-        }, 
+        },
         "ssl-server": {
             "tag": "version1"
-        }, 
+        },
         "ranger-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "admin-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "tagsync-log4j": {
             "tag": "version1466705299949"
         },
@@ -158,10 +158,10 @@
         },
         "ranger-hdfs-security": {
             "tag": "version1466705299922"
-        }, 
+        },
         "usersync-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "zookeeper-env": {
             "tag": "version1467016680492"
         },
@@ -174,116 +174,116 @@
         "cluster-env": {
             "tag": "version1467016680567"
         }
-    }, 
-    "roleCommand": "START", 
+    },
+    "roleCommand": "START",
     "hostLevelParams": {
-        "agent_stack_retry_on_unavailability": "false", 
-        "stack_name": "HDP", 
+        "agent_stack_retry_on_unavailability": "false",
+        "stack_name": "HDP",
         "package_version": "2_6_0_0_*",
         "custom_mysql_jdbc_name": "mysql-connector-java.jar",
         "previous_custom_mysql_jdbc_name": "mysql-connector-java-old.jar",
-        "host_sys_prepped": "false", 
-        "ambari_db_rca_username": "mapred", 
+        "host_sys_prepped": "false",
+        "ambari_db_rca_username": "mapred",
         "current_version": "2.6.0.0-801",
         "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar",
         "agent_stack_retry_count": "5",
         "stack_version": "2.6",
-        "jdk_name": "jdk-8u60-linux-x64.tar.gz", 
-        "ambari_db_rca_driver": "org.postgresql.Driver", 
+        "jdk_name": "jdk-8u60-linux-x64.tar.gz",
+        "ambari_db_rca_driver": "org.postgresql.Driver",
         "java_home": "/usr/jdk64/jdk1.7.0_45",
         "repository_version_id": "1",
         "jdk_location": "http://c6401.ambari.apache.org:8080/resources/",
-        "not_managed_hdfs_path_list": "[\"/tmp\"]", 
-        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
-        "java_version": "8", 
+        "not_managed_hdfs_path_list": "[\"/tmp\"]",
+        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+        "java_version": "8",
         "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.0.0-801\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.6\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.6.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.0.0-801\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]",
         "package_list": "[{\"name\":\"ranger_${stack_version}-admin\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-usersync\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-tagsync\",\"condition\":\"should_install_ranger_tagsync\",\"skipUpgrade\":false},{\"name\":\"ambari-logsearch-solr-client\",\"condition\":\"should_install_logsearch_solr_client\",\"skipUpgrade\":false}]",
         "db_name": "ambari",
-        "group_list": "[\"ranger\",\"hadoop\",\"users\"]", 
-        "agentCacheDir": "/var/lib/ambari-agent/cache", 
-        "ambari_db_rca_password": "mapred", 
-        "jce_name": "jce_policy-8.zip", 
-        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar", 
-        "db_driver_filename": "mysql-connector-java.jar", 
-        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]", 
+        "group_list": "[\"ranger\",\"hadoop\",\"users\"]",
+        "agentCacheDir": "/var/lib/ambari-agent/cache",
+        "ambari_db_rca_password": "mapred",
+        "jce_name": "jce_policy-8.zip",
+        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar",
+        "db_driver_filename": "mysql-connector-java.jar",
+        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]",
         "clientsToUpdateConfigs": "[\"*\"]"
-    }, 
+    },
     "commandParams": {
-        "service_package_folder": "common-services/RANGER/0.4.0/package", 
-        "script": "scripts/ranger_admin.py", 
-        "hooks_folder": "HDP/2.0.6/hooks", 
+        "service_package_folder": "common-services/RANGER/0.4.0/package",
+        "script": "scripts/ranger_admin.py",
+        "hooks_folder": "HDP/2.0.6/hooks",
         "version": "2.6.0.0-801",
         "max_duration_for_retries": "0",
         "command_retry_enabled": "false",
-        "command_timeout": "600", 
+        "command_timeout": "600",
         "script_type": "PYTHON"
-    }, 
-    "forceRefreshConfigTags": [], 
-    "stageId": 2, 
+    },
+    "forceRefreshConfigTags": [],
+    "stageId": 2,
     "clusterHostInfo": {
         "snamenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_use_ssl": [
             "false"
-        ], 
+        ],
         "all_ping_ports": [
             "8670"
-        ], 
+        ],
         "ranger_tagsync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ranger_usersync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "slave_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "namenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_port": [
             "8080"
-        ], 
+        ],
         "ranger_admin_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_racks": [
             "/default-rack"
-        ], 
+        ],
         "all_ipv4_ips": [
             "172.22.83.73"
-        ], 
+        ],
         "ambari_server_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "zookeeper_hosts": [
             "c6401.ambari.apache.org"
         ],
         "infra_solr_hosts": [
             "c6401.ambari.apache.org"
         ]
-    }, 
+    },
     "configurations": {
         "ranger-hdfs-audit": {
-            "xasecure.audit.destination.solr.zookeepers": "NONE", 
-            "xasecure.audit.destination.solr.urls": "", 
-            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool", 
+            "xasecure.audit.destination.solr.zookeepers": "NONE",
+            "xasecure.audit.destination.solr.urls": "",
+            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool",
             "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/hdfs/spool",
-            "xasecure.audit.destination.hdfs": "true", 
+            "xasecure.audit.destination.hdfs": "true",
             "xasecure.audit.destination.solr": "false",
-            "xasecure.audit.provider.summary.enabled": "false", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
+            "xasecure.audit.provider.summary.enabled": "false",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
             "xasecure.audit.is.enabled": "true"
         },
         "ranger-tagsync-policymgr-ssl": {
-            "xasecure.policymgr.clientssl.keystore": "/etc/security/serverKeys/ranger-tagsync-keystore.jks", 
-            "xasecure.policymgr.clientssl.truststore.password": "changeit", 
+            "xasecure.policymgr.clientssl.keystore": "/etc/security/serverKeys/ranger-tagsync-keystore.jks",
+            "xasecure.policymgr.clientssl.truststore.password": "changeit",
             "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{ranger_tagsync_credential_file}}",
-            "xasecure.policymgr.clientssl.truststore": "/etc/security/serverKeys/ranger-tagsync-mytruststore.jks", 
+            "xasecure.policymgr.clientssl.truststore": "/etc/security/serverKeys/ranger-tagsync-mytruststore.jks",
             "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{ranger_tagsync_credential_file}}",
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
         },
@@ -296,186 +296,186 @@
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
         },
         "ssl-client": {
-            "ssl.client.truststore.reload.interval": "10000", 
-            "ssl.client.keystore.password": "bigdata", 
-            "ssl.client.truststore.type": "jks", 
-            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks", 
-            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks", 
-            "ssl.client.truststore.password": "bigdata", 
+            "ssl.client.truststore.reload.interval": "10000",
+            "ssl.client.keystore.password": "bigdata",
+            "ssl.client.truststore.type": "jks",
+            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks",
+            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks",
+            "ssl.client.truststore.password": "bigdata",
             "ssl.client.keystore.type": "jks"
-        }, 
+        },
         "ranger-admin-site": {
             "ranger.is.solr.kerberised": "true",
-            "ranger.admin.kerberos.cookie.domain": "{{ranger_host}}", 
-            "ranger.kms.service.user.hdfs": "hdfs", 
-            "ranger.spnego.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.plugins.hive.serviceuser": "hive", 
-            "ranger.lookup.kerberos.keytab": "/etc/security/keytabs/rangerlookup.service.keytab", 
-            "ranger.plugins.kms.serviceuser": "kms", 
-            "ranger.service.https.attrib.ssl.enabled": "false", 
-            "ranger.sso.browser.useragent": "Mozilla,chrome", 
-            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01", 
-            "ranger.plugins.hbase.serviceuser": "hbase", 
-            "ranger.plugins.hdfs.serviceuser": "hdfs", 
-            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}", 
-            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net", 
-            "ranger.plugins.knox.serviceuser": "knox", 
-            "ranger.ldap.base.dn": "dc=example,dc=com", 
-            "ranger.sso.publicKey": "", 
-            "ranger.admin.kerberos.cookie.path": "/", 
-            "ranger.service.https.attrib.clientAuth": "want", 
-            "ranger.jpa.jdbc.user": "{{ranger_db_user}}", 
-            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})", 
-            "ranger.ldap.group.roleattribute": "cn", 
-            "ranger.plugins.kafka.serviceuser": "kafka", 
-            "ranger.admin.kerberos.principal": "rangeradmin/_HOST@EXAMPLE.COM", 
-            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
+            "ranger.admin.kerberos.cookie.domain": "{{ranger_host}}",
+            "ranger.kms.service.user.hdfs": "hdfs",
+            "ranger.spnego.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}",
+            "ranger.plugins.hive.serviceuser": "hive",
+            "ranger.lookup.kerberos.keytab": "/etc/security/keytabs/rangerlookup.service.keytab",
+            "ranger.plugins.kms.serviceuser": "kms",
+            "ranger.service.https.attrib.ssl.enabled": "false",
+            "ranger.sso.browser.useragent": "Mozilla,chrome",
+            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01",
+            "ranger.plugins.hbase.serviceuser": "hbase",
+            "ranger.plugins.hdfs.serviceuser": "hdfs",
+            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}",
+            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net",
+            "ranger.plugins.knox.serviceuser": "knox",
+            "ranger.ldap.base.dn": "dc=example,dc=com",
+            "ranger.sso.publicKey": "",
+            "ranger.admin.kerberos.cookie.path": "/",
+            "ranger.service.https.attrib.clientAuth": "want",
+            "ranger.jpa.jdbc.user": "{{ranger_db_user}}",
+            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})",
+            "ranger.ldap.group.roleattribute": "cn",
+            "ranger.plugins.kafka.serviceuser": "kafka",
+            "ranger.admin.kerberos.principal": "rangeradmin/_HOST@EXAMPLE.COM",
+            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
             "ranger.credential.provider.path": "/etc/ranger/admin/rangeradmin.jceks",
-            "ranger.ldap.referral": "ignore", 
-            "ranger.service.http.port": "6080", 
-            "ranger.ldap.user.searchfilter": "(uid={0})", 
-            "ranger.plugins.atlas.serviceuser": "atlas", 
-            "ranger.truststore.password": "changeit", 
-            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.password": "NONE", 
+            "ranger.ldap.referral": "ignore",
+            "ranger.service.http.port": "6080",
+            "ranger.ldap.user.searchfilter": "(uid={0})",
+            "ranger.plugins.atlas.serviceuser": "atlas",
+            "ranger.truststore.password": "changeit",
+            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.password": "NONE",
             "ranger.audit.solr.zookeepers": "c6401.ambari.apache.org:2181/infra-solr",
             "ranger.lookup.kerberos.principal": "rangerlookup/_HOST@EXAMPLE.COM",
-            "ranger.service.https.port": "6182", 
-            "ranger.plugins.storm.serviceuser": "storm", 
-            "ranger.externalurl": "{{ranger_external_url}}", 
-            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.kms.service.user.hive": "", 
-            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}", 
-            "ranger.service.host": "{{ranger_host}}", 
-            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin", 
-            "ranger.service.https.attrib.keystore.pass": "xasecure", 
-            "ranger.unixauth.remote.login.enabled": "true", 
+            "ranger.service.https.port": "6182",
+            "ranger.plugins.storm.serviceuser": "storm",
+            "ranger.externalurl": "{{ranger_external_url}}",
+            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.kms.service.user.hive": "",
+            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}",
+            "ranger.service.host": "{{ranger_host}}",
+            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin",
+            "ranger.service.https.attrib.keystore.pass": "xasecure",
+            "ranger.unixauth.remote.login.enabled": "true",
             "ranger.jpa.jdbc.credential.alias": "rangeradmin",
-            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.username": "ranger_solr", 
-            "ranger.sso.enabled": "false", 
-            "ranger.audit.solr.urls": "", 
-            "ranger.ldap.ad.domain": "", 
-            "ranger.plugins.yarn.serviceuser": "yarn", 
-            "ranger.audit.source.type": "solr", 
-            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
-            "ranger.ldap.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.authentication.method": "UNIX", 
-            "ranger.service.http.enabled": "true", 
-            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}", 
-            "ranger.ldap.ad.referral": "ignore", 
-            "ranger.ldap.ad.base.dn": "dc=example,dc=com", 
-            "ranger.jpa.jdbc.password": "_", 
-            "ranger.spnego.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab", 
-            "ranger.sso.providerurl": "", 
-            "ranger.unixauth.service.hostname": "{{ugsync_host}}", 
-            "ranger.admin.kerberos.keytab": "/etc/security/keytabs/rangeradmin.service.keytab", 
-            "ranger.admin.kerberos.token.valid.seconds": "30", 
-            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver", 
+            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.username": "ranger_solr",
+            "ranger.sso.enabled": "false",
+            "ranger.audit.solr.urls": "",
+            "ranger.ldap.ad.domain": "",
+            "ranger.plugins.yarn.serviceuser": "yarn",
+            "ranger.audit.source.type": "solr",
+            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
+            "ranger.ldap.url": "{{ranger_ug_ldap_url}}",
+            "ranger.authentication.method": "UNIX",
+            "ranger.service.http.enabled": "true",
+            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}",
+            "ranger.ldap.ad.referral": "ignore",
+            "ranger.ldap.ad.base.dn": "dc=example,dc=com",
+            "ranger.jpa.jdbc.password": "_",
+            "ranger.spnego.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab",
+            "ranger.sso.providerurl": "",
+            "ranger.unixauth.service.hostname": "{{ugsync_host}}",
+            "ranger.admin.kerberos.keytab": "/etc/security/keytabs/rangeradmin.service.keytab",
+            "ranger.admin.kerberos.token.valid.seconds": "30",
+            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver",
             "ranger.unixauth.service.port": "5151"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
-            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks", 
-            "xasecure.policymgr.clientssl.truststore.password": "changeit", 
-            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}", 
-            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks", 
-            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}", 
+            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks",
+            "xasecure.policymgr.clientssl.truststore.password": "changeit",
+            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}",
+            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks",
+            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}",
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
-        }, 
+        },
         "tagsync-application-properties": {
-            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181", 
-            "atlas.kafka.security.protocol": "SASL_PLAINTEXT", 
-            "atlas.jaas.KafkaClient.option.principal": "{{tagsync_jaas_principal}}", 
-            "atlas.jaas.KafkaClient.option.keyTab": "{{tagsync_keytab_path}}", 
-            "atlas.kafka.entities.group.id": "ranger_entities_consumer", 
-            "atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule", 
-            "atlas.jaas.KafkaClient.option.serviceName": "kafka", 
-            "atlas.kafka.bootstrap.servers": "localhost:6667", 
-            "atlas.jaas.KafkaClient.option.useKeyTab": "true", 
-            "atlas.jaas.KafkaClient.option.storeKey": "true", 
-            "atlas.jaas.KafkaClient.loginModuleControlFlag": "required", 
+            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181",
+            "atlas.kafka.security.protocol": "SASL_PLAINTEXT",
+            "atlas.jaas.KafkaClient.option.principal": "{{tagsync_jaas_principal}}",
+            "atlas.jaas.KafkaClient.option.keyTab": "{{tagsync_keytab_path}}",
+            "atlas.kafka.entities.group.id": "ranger_entities_consumer",
+            "atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
+            "atlas.jaas.KafkaClient.option.serviceName": "kafka",
+            "atlas.kafka.bootstrap.servers": "localhost:6667",
+            "atlas.jaas.KafkaClient.option.useKeyTab": "true",
+            "atlas.jaas.KafkaClient.option.storeKey": "true",
+            "atlas.jaas.KafkaClient.loginModuleControlFlag": "required",
             "atlas.kafka.sasl.kerberos.service.name": "kafka"
-        }, 
+        },
         "ranger-env": {
-            "ranger_solr_shards": "1", 
-            "ranger_solr_config_set": "ranger_audits", 
-            "ranger_user": "ranger", 
+            "ranger_solr_shards": "1",
+            "ranger_solr_config_set": "ranger_audits",
+            "ranger_user": "ranger",
             "ranger_solr_replication_factor": "1",
-            "xml_configurations_supported": "true", 
-            "ranger-atlas-plugin-enabled": "No", 
-            "ranger-hbase-plugin-enabled": "No", 
-            "ranger-yarn-plugin-enabled": "No", 
-            "bind_anonymous": "false", 
-            "ranger_admin_username": "amb_ranger_admin", 
-            "admin_password": "admin", 
-            "is_solrCloud_enabled": "true", 
-            "ranger-storm-plugin-enabled": "No", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "ranger_group": "ranger", 
-            "ranger-knox-plugin-enabled": "No", 
-            "ranger_admin_log_dir": "/var/log/ranger/admin", 
-            "ranger-kafka-plugin-enabled": "No", 
-            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306", 
-            "ranger-hive-plugin-enabled": "No", 
-            "xasecure.audit.destination.solr": "true", 
-            "ranger_pid_dir": "/var/run/ranger", 
-            "xasecure.audit.destination.hdfs": "true", 
-            "admin_username": "admin", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
-            "create_db_dbuser": "true", 
-            "ranger_solr_collection_name": "ranger_audits", 
-            "ranger_admin_password": "P1!q9xa96SMi5NCl", 
+            "xml_configurations_supported": "true",
+            "ranger-atlas-plugin-enabled": "No",
+            "ranger-hbase-plugin-enabled": "No",
+            "ranger-yarn-plugin-enabled": "No",
+            "bind_anonymous": "false",
+            "ranger_admin_username": "amb_ranger_admin",
+            "admin_password": "admin",
+            "is_solrCloud_enabled": "true",
+            "ranger-storm-plugin-enabled": "No",
+            "ranger-hdfs-plugin-enabled": "No",
+            "ranger_group": "ranger",
+            "ranger-knox-plugin-enabled": "No",
+            "ranger_admin_log_dir": "/var/log/ranger/admin",
+            "ranger-kafka-plugin-enabled": "No",
+            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306",
+            "ranger-hive-plugin-enabled": "No",
+            "xasecure.audit.destination.solr": "true",
+            "ranger_pid_dir": "/var/run/ranger",
+            "xasecure.audit.destination.hdfs": "true",
+            "admin_username": "admin",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
+            "create_db_dbuser": "true",
+            "ranger_solr_collection_name": "ranger_audits",
+            "ranger_admin_password": "P1!q9xa96SMi5NCl",
             "ranger_usersync_log_dir": "/var/log/ranger/usersync"
-        }, 
+        },
         "usersync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/usersync.
 log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
-            "hadoop.rpc.protection": "authentication", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "REPOSITORY_CONFIG_USERNAME": "hadoop", 
-            "policy_user": "ambari-qa", 
-            "common.name.for.certificate": "", 
+            "hadoop.rpc.protection": "authentication",
+            "ranger-hdfs-plugin-enabled": "No",
+            "REPOSITORY_CONFIG_USERNAME": "hadoop",
+            "policy_user": "ambari-qa",
+            "common.name.for.certificate": "",
             "REPOSITORY_CONFIG_PASSWORD": "hadoop"
-        }, 
+        },
         "kerberos-env": {
-            "kdc_hosts": "c6401.ambari.apache.org", 
-            "manage_auth_to_local": "true", 
-            "install_packages": "true", 
-            "realm": "EXAMPLE.COM", 
-            "encryption_types": "aes des3-cbc-sha1 rc4 des-cbc-md5", 
-            "ad_create_attributes_template": "\n{\n  \"objectClass\": [\"top\", \"person\", \"organizationalPerson\", \"user\"],\n  \"cn\": \"$principal_name\",\n  #if( $is_service )\n  \"servicePrincipalName\": \"$principal_name\",\n  #end\n  \"userPrincipalName\": \"$normalized_principal\",\n  \"unicodePwd\": \"$password\",\n  \"accountExpires\": \"0\",\n  \"userAccountControl\": \"66048\"\n}", 
-            "kdc_create_attributes": "", 
-            "admin_server_host": "c6401.ambari.apache.org", 
-            "group": "ambari-managed-principals", 
-            "password_length": "20", 
-            "ldap_url": "", 
-            "manage_identities": "true", 
-            "password_min_lowercase_letters": "1", 
-            "create_ambari_principal": "true", 
-            "service_check_principal_name": "${cluster_name|toLower()}-${short_date}", 
-            "executable_search_paths": "/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin", 
-            "password_chat_timeout": "5", 
-            "kdc_type": "mit-kdc", 
-            "set_password_expiry": "false", 
-            "password_min_punctuation": "1", 
-            "container_dn": "", 
-            "case_insensitive_username_rules": "false", 
-            "password_min_whitespace": "0", 
-            "password_min_uppercase_letters": "1", 
+            "kdc_hosts": "c6401.ambari.apache.org",
+            "manage_auth_to_local": "true",
+            "install_packages": "true",
+            "realm": "EXAMPLE.COM",
+            "encryption_types": "aes des3-cbc-sha1 rc4 des-cbc-md5",
+            "ad_create_attributes_template": "\n{\n  \"objectClass\": [\"top\", \"person\", \"organizationalPerson\", \"user\"],\n  \"cn\": \"$principal_name\",\n  #if( $is_service )\n  \"servicePrincipalName\": \"$principal_name\",\n  #end\n  \"userPrincipalName\": \"$normalized_principal\",\n  \"unicodePwd\": \"$password\",\n  \"accountExpires\": \"0\",\n  \"userAccountControl\": \"66048\"\n}",
+            "kdc_create_attributes": "",
+            "admin_server_host": "c6401.ambari.apache.org",
+            "group": "ambari-managed-principals",
+            "password_length": "20",
+            "ldap_url": "",
+            "manage_identities": "true",
+            "password_min_lowercase_letters": "1",
+            "create_ambari_principal": "true",
+            "service_check_principal_name": "${cluster_name|toLower()}-${short_date}",
+            "executable_search_paths": "/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin",
+            "password_chat_timeout": "5",
+            "kdc_type": "mit-kdc",
+            "set_password_expiry": "false",
+            "password_min_punctuation": "1",
+            "container_dn": "",
+            "case_insensitive_username_rules": "false",
+            "password_min_whitespace": "0",
+            "password_min_uppercase_letters": "1",
             "password_min_digits": "1"
-        }, 
+        },
         "admin-properties": {
-            "db_user": "rangeradmin01", 
-            "DB_FLAVOR": "MYSQL", 
-            "db_password": "rangeradmin01", 
-            "db_root_user": "root", 
-            "policymgr_external_url": "http://c6401.ambari.apache.org:6080", 
-            "db_name": "ranger01", 
-            "db_host": "c6401.ambari.apache.org", 
-            "db_root_password": "vagrant", 
+            "db_user": "rangeradmin01",
+            "DB_FLAVOR": "MYSQL",
+            "db_password": "rangeradmin01",
+            "db_root_user": "root",
+            "policymgr_external_url": "http://c6401.ambari.apache.org:6080",
+            "db_name": "ranger01",
+            "db_host": "c6401.ambari.apache.org",
+            "db_root_password": "vagrant",
             "SQL_CONNECTOR_JAR": "{{driver_curl_target}}"
         },
         "ranger-solr-configuration": {
@@ -484,261 +484,261 @@
             "ranger_audit_logs_merge_factor": "5"
         },
         "ranger-ugsync-site": {
-            "ranger.usersync.ldap.binddn": "", 
-            "ranger.usersync.policymgr.username": "rangerusersync", 
-            "ranger.usersync.policymanager.mockrun": "false", 
-            "ranger.usersync.group.searchbase": "", 
-            "ranger.usersync.ldap.bindalias": "testldapalias", 
-            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks", 
-            "ranger.usersync.port": "5151", 
-            "ranger.usersync.pagedresultssize": "500", 
-            "ranger.usersync.group.memberattributename": "", 
-            "ranger.usersync.kerberos.principal": "rangerusersync/_HOST@EXAMPLE.COM", 
-            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder", 
-            "ranger.usersync.ldap.referral": "ignore", 
-            "ranger.usersync.group.searchfilter": "", 
-            "ranger.usersync.ldap.user.objectclass": "person", 
-            "ranger.usersync.logdir": "{{usersync_log_dir}}", 
-            "ranger.usersync.ldap.user.searchfilter": "", 
-            "ranger.usersync.ldap.groupname.caseconversion": "none", 
-            "ranger.usersync.ldap.ldapbindpassword": "", 
-            "ranger.usersync.unix.minUserId": "500", 
-            "ranger.usersync.policymanager.maxrecordsperapicall": "1000", 
-            "ranger.usersync.group.nameattribute": "", 
-            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password", 
-            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks", 
-            "ranger.usersync.user.searchenabled": "false", 
-            "ranger.usersync.group.usermapsyncenabled": "true", 
-            "ranger.usersync.ldap.bindkeystore": "", 
-            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof", 
-            "ranger.usersync.kerberos.keytab": "/etc/security/keytabs/rangerusersync.service.keytab", 
-            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe", 
-            "ranger.usersync.group.objectclass": "", 
-            "ranger.usersync.ldap.user.searchscope": "sub", 
-            "ranger.usersync.unix.password.file": "/etc/passwd", 
-            "ranger.usersync.ldap.user.nameattribute": "", 
-            "ranger.usersync.pagedresultsenabled": "true", 
-            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}", 
-            "ranger.usersync.group.search.first.enabled": "false", 
-            "ranger.usersync.group.searchenabled": "false", 
-            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder", 
-            "ranger.usersync.ssl": "true", 
-            "ranger.usersync.ldap.url": "", 
-            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org", 
-            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.ldap.user.searchbase": "", 
-            "ranger.usersync.ldap.username.caseconversion": "none", 
-            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.keystore.password": "UnIx529p", 
-            "ranger.usersync.unix.group.file": "/etc/group", 
-            "ranger.usersync.filesource.file": "/tmp/usergroup.txt", 
-            "ranger.usersync.group.searchscope": "", 
-            "ranger.usersync.truststore.password": "changeit", 
-            "ranger.usersync.enabled": "true", 
-            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000", 
+            "ranger.usersync.ldap.binddn": "",
+            "ranger.usersync.policymgr.username": "rangerusersync",
+            "ranger.usersync.policymanager.mockrun": "false",
+            "ranger.usersync.group.searchbase": "",
+            "ranger.usersync.ldap.bindalias": "testldapalias",
+            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks",
+            "ranger.usersync.port": "5151",
+            "ranger.usersync.pagedresultssize": "500",
+            "ranger.usersync.group.memberattributename": "",
+            "ranger.usersync.kerberos.principal": "rangerusersync/_HOST@EXAMPLE.COM",
+            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
+            "ranger.usersync.ldap.referral": "ignore",
+            "ranger.usersync.group.searchfilter": "",
+            "ranger.usersync.ldap.user.objectclass": "person",
+            "ranger.usersync.logdir": "{{usersync_log_dir}}",
+            "ranger.usersync.ldap.user.searchfilter": "",
+            "ranger.usersync.ldap.groupname.caseconversion": "none",
+            "ranger.usersync.ldap.ldapbindpassword": "",
+            "ranger.usersync.unix.minUserId": "500",
+            "ranger.usersync.policymanager.maxrecordsperapicall": "1000",
+            "ranger.usersync.group.nameattribute": "",
+            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password",
+            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks",
+            "ranger.usersync.user.searchenabled": "false",
+            "ranger.usersync.group.usermapsyncenabled": "true",
+            "ranger.usersync.ldap.bindkeystore": "",
+            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof",
+            "ranger.usersync.kerberos.keytab": "/etc/security/keytabs/rangerusersync.service.keytab",
+            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe",
+            "ranger.usersync.group.objectclass": "",
+            "ranger.usersync.ldap.user.searchscope": "sub",
+            "ranger.usersync.unix.password.file": "/etc/passwd",
+            "ranger.usersync.ldap.user.nameattribute": "",
+            "ranger.usersync.pagedresultsenabled": "true",
+            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}",
+            "ranger.usersync.group.search.first.enabled": "false",
+            "ranger.usersync.group.searchenabled": "false",
+            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder",
+            "ranger.usersync.ssl": "true",
+            "ranger.usersync.ldap.url": "",
+            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org",
+            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.ldap.user.searchbase": "",
+            "ranger.usersync.ldap.username.caseconversion": "none",
+            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.keystore.password": "UnIx529p",
+            "ranger.usersync.unix.group.file": "/etc/group",
+            "ranger.usersync.filesource.file": "/tmp/usergroup.txt",
+            "ranger.usersync.group.searchscope": "",
+            "ranger.usersync.truststore.password": "changeit",
+            "ranger.usersync.enabled": "true",
+            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000",
             "ranger.usersync.filesource.text.delimiter": ","
-        }, 
+        },
         "hdfs-site": {
-            "dfs.namenode.checkpoint.period": "21600", 
-            "dfs.namenode.avoid.write.stale.datanode": "true", 
-            "dfs.permissions.superusergroup": "hdfs", 
-            "dfs.namenode.startup.delay.block.deletion.sec": "3600", 
-            "dfs.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "dfs.datanode.kerberos.principal": "dn/_HOST@EXAMPLE.COM", 
-            "dfs.heartbeat.interval": "3", 
-            "dfs.content-summary.limit": "5000", 
-            "dfs.support.append": "true", 
-            "dfs.datanode.address": "0.0.0.0:1019", 
-            "dfs.cluster.administrators": " hdfs", 
-            "dfs.namenode.audit.log.async": "true", 
-            "dfs.datanode.balance.bandwidthPerSec": "6250000", 
-            "dfs.namenode.safemode.threshold-pct": "1", 
-            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}", 
-            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020", 
-            "dfs.permissions.enabled": "true", 
-            "dfs.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM", 
-            "dfs.client.read.shortcircuit": "true", 
-            "dfs.https.port": "50470", 
-            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470", 
-            "nfs.file.dump.dir": "/tmp/.hdfs-nfs", 
-            "dfs.blocksize": "134217728", 
-            "dfs.blockreport.initialDelay": "120", 
-            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode", 
-            "dfs.namenode.fslock.fair": "false", 
-            "dfs.datanode.max.transfer.threads": "4096", 
-            "dfs.secondary.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "dfs.replication": "3", 
-            "dfs.namenode.handler.count": "50", 
-            "dfs.web.authentication.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab", 
-            "fs.permissions.umask-mode": "022", 
-            "dfs.namenode.stale.datanode.interval": "30000", 
-            "dfs.datanode.ipc.address": "0.0.0.0:8010", 
-            "dfs.datanode.failed.volumes.tolerated": "0", 
-            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data", 
-            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070", 
-            "dfs.webhdfs.enabled": "true", 
-            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding", 
-            "dfs.namenode.accesstime.precision": "0", 
-            "dfs.namenode.write.stale.datanode.ratio": "1.0f", 
-            "dfs.datanode.https.address": "0.0.0.0:50475", 
-            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary", 
-            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090", 
-            "nfs.exports.allowed.hosts": "* rw", 
-            "dfs.namenode.checkpoint.txns": "1000000", 
-            "dfs.datanode.http.address": "0.0.0.0:1022", 
-            "dfs.datanode.du.reserved": "33011188224", 
-            "dfs.client.read.shortcircuit.streams.cache.size": "4096", 
-            "dfs.secondary.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab", 
-            "dfs.web.authentication.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "dfs.http.policy": "HTTP_ONLY", 
-            "dfs.block.access.token.enable": "true", 
-            "dfs.client.retry.policy.enabled": "false", 
-            "dfs.secondary.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM", 
-            "dfs.datanode.keytab.file": "/etc/security/keytabs/dn.service.keytab", 
-            "dfs.namenode.name.dir.restore": "true", 
-            "dfs.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab", 
-            "dfs.journalnode.https-address": "0.0.0.0:8481", 
-            "dfs.journalnode.http-address": "0.0.0.0:8480", 
-            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket", 
-            "dfs.namenode.avoid.read.stale.datanode": "true", 
-            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude", 
-            "dfs.datanode.data.dir.perm": "750", 
-            "dfs.encryption.key.provider.uri": "kms://http@c6401.ambari.apache.org:9292/kms", 
-            "dfs.replication.max": "50", 
+            "dfs.namenode.checkpoint.period": "21600",
+            "dfs.namenode.avoid.write.stale.datanode": "true",
+            "dfs.permissions.superusergroup": "hdfs",
+            "dfs.namenode.startup.delay.block.deletion.sec": "3600",
+            "dfs.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "dfs.datanode.kerberos.principal": "dn/_HOST@EXAMPLE.COM",
+            "dfs.heartbeat.interval": "3",
+            "dfs.content-summary.limit": "5000",
+            "dfs.support.append": "true",
+            "dfs.datanode.address": "0.0.0.0:1019",
+            "dfs.cluster.administrators": " hdfs",
+            "dfs.namenode.audit.log.async": "true",
+            "dfs.datanode.balance.bandwidthPerSec": "6250000",
+            "dfs.namenode.safemode.threshold-pct": "1",
+            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}",
+            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020",
+            "dfs.permissions.enabled": "true",
+            "dfs.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM",
+            "dfs.client.read.shortcircuit": "true",
+            "dfs.https.port": "50470",
+            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470",
+            "nfs.file.dump.dir": "/tmp/.hdfs-nfs",
+            "dfs.blocksize": "134217728",
+            "dfs.blockreport.initialDelay": "120",
+            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode",
+            "dfs.namenode.fslock.fair": "false",
+            "dfs.datanode.max.transfer.threads": "4096",
+            "dfs.secondary.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "dfs.replication": "3",
+            "dfs.namenode.handler.count": "50",
+            "dfs.web.authentication.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab",
+            "fs.permissions.umask-mode": "022",
+            "dfs.namenode.stale.datanode.interval": "30000",
+            "dfs.datanode.ipc.address": "0.0.0.0:8010",
+            "dfs.datanode.failed.volumes.tolerated": "0",
+            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data",
+            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070",
+            "dfs.webhdfs.enabled": "true",
+            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding",
+            "dfs.namenode.accesstime.precision": "0",
+            "dfs.namenode.write.stale.datanode.ratio": "1.0f",
+            "dfs.datanode.https.address": "0.0.0.0:50475",
+            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary",
+            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090",
+            "nfs.exports.allowed.hosts": "* rw",
+            "dfs.namenode.checkpoint.txns": "1000000",
+            "dfs.datanode.http.address": "0.0.0.0:1022",
+            "dfs.datanode.du.reserved": "33011188224",
+            "dfs.client.read.shortcircuit.streams.cache.size": "4096",
+            "dfs.secondary.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab",
+            "dfs.web.authentication.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "dfs.http.policy": "HTTP_ONLY",
+            "dfs.block.access.token.enable": "true",
+            "dfs.client.retry.policy.enabled": "false",
+            "dfs.secondary.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM",
+            "dfs.datanode.keytab.file": "/etc/security/keytabs/dn.service.keytab",
+            "dfs.namenode.name.dir.restore": "true",
+            "dfs.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab",
+            "dfs.journalnode.https-address": "0.0.0.0:8481",
+            "dfs.journalnode.http-address": "0.0.0.0:8480",
+            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket",
+            "dfs.namenode.avoid.read.stale.datanode": "true",
+            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude",
+            "dfs.datanode.data.dir.perm": "750",
+            "dfs.encryption.key.provider.uri": "kms://http@c6401.ambari.apache.org:9292/kms",
+            "dfs.replication.max": "50",
             "dfs.namenode.name.dir": "/grid/0/hadoop/hdfs/namenode"
-        }, 
+        },
         "ranger-tagsync-site": {
             "ranger.tagsync.dest.ranger.ssl.config.filename": "{{stack_root}}/current/ranger-tagsync/conf/ranger-policymgr-ssl.xml",
             "ranger.tagsync.source.atlasrest.username": "",
             "ranger.tagsync.logdir": "/var/log/ranger/tagsync",
-            "ranger.tagsync.source.atlasrest.download.interval.millis": "", 
-            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks", 
-            "ranger.tagsync.source.file.check.interval.millis": "", 
-            "ranger.tagsync.source.atlasrest.endpoint": "", 
-            "ranger.tagsync.dest.ranger.username": "rangertagsync", 
-            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}", 
-            "ranger.tagsync.kerberos.principal": "rangertagsync/_HOST@EXAMPLE.COM", 
-            "ranger.tagsync.kerberos.keytab": "/etc/security/keytabs/rangertagsync.service.keytab", 
-            "ranger.tagsync.source.atlas": "false", 
-            "ranger.tagsync.source.atlasrest": "false", 
-            "ranger.tagsync.source.file": "false", 
+            "ranger.tagsync.source.atlasrest.download.interval.millis": "",
+            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks",
+            "ranger.tagsync.source.file.check.interval.millis": "",
+            "ranger.tagsync.source.atlasrest.endpoint": "",
+            "ranger.tagsync.dest.ranger.username": "rangertagsync",
+            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}",
+            "ranger.tagsync.kerberos.principal": "rangertagsync/_HOST@EXAMPLE.COM",
+            "ranger.tagsync.kerberos.keytab": "/etc/security/keytabs/rangertagsync.service.keytab",
+            "ranger.tagsync.source.atlas": "false",
+            "ranger.tagsync.source.atlasrest": "false",
+            "ranger.tagsync.source.file": "false",
             "ranger.tagsync.source.file.filename": ""
-        }, 
+        },
         "zoo.cfg": {
-            "clientPort": "2181", 
-            "autopurge.purgeInterval": "24", 
-            "syncLimit": "5", 
-            "dataDir": "/grid/0/hadoop/zookeeper", 
-            "initLimit": "10", 
-            "tickTime": "2000", 
+            "clientPort": "2181",
+            "autopurge.purgeInterval": "24",
+            "syncLimit": "5",
+            "dataDir": "/grid/0/hadoop/zookeeper",
+            "initLimit": "10",
+            "tickTime": "2000",
             "autopurge.snapRetainCount": "30"
-        }, 
+        },
         "hadoop-policy": {
-            "security.job.client.protocol.acl": "*", 
-            "security.job.task.protocol.acl": "*", 
-            "security.datanode.protocol.acl": "*", 
-            "security.namenode.protocol.acl": "*", 
-            "security.client.datanode.protocol.acl": "*", 
-            "security.inter.tracker.protocol.acl": "*", 
-            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop", 
-            "security.client.protocol.acl": "*", 
-            "security.refresh.policy.protocol.acl": "hadoop", 
-            "security.admin.operations.protocol.acl": "hadoop", 
+            "security.job.client.protocol.acl": "*",
+            "security.job.task.protocol.acl": "*",
+            "security.datanode.protocol.acl": "*",
+            "security.namenode.protocol.acl": "*",
+            "security.client.datanode.protocol.acl": "*",
+            "security.inter.tracker.protocol.acl": "*",
+            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop",
+            "security.client.protocol.acl": "*",
+            "security.refresh.policy.protocol.acl": "hadoop",
+            "security.admin.operations.protocol.acl": "hadoop",
             "security.inter.datanode.protocol.acl": "*"
-        }, 
+        },
         "hdfs-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#  http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n\n# Define some default values that can be overridden by system properties\n# To change daemon root logger use hadoop_root_logger in hadoop-env\nhadoop.root.lo
 gger=INFO,console\nhadoop.log.dir=.\nhadoop.log.file=hadoop.log\n\n\n# Define the root logger to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\n\n# Logging Threshold\nlog4j.threshhold=ALL\n\n#\n# Daily Rolling File Appender\n#\n\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Rollver at midnight\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\n\n# 30-day backup\n#log4j.appender.DRFA.MaxBackupIndex=30\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\n\n# Pattern format: Date LogLevel LoggerName LogMessage\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n# Debugging Pattern format\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender
 .console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\n\n#\n# TaskLog Appender\n#\n\n#Default values\nhadoop.tasklog.taskid=null\nhadoop.tasklog.iscleanup=false\nhadoop.tasklog.noKeepSplits=4\nhadoop.tasklog.totalLogFileSize=100\nhadoop.tasklog.purgeLogSplits=true\nhadoop.tasklog.logsRetainHours=12\n\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\n\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n\n#\n#Security audit appender\n#\nhadoop.security.logger=INFO,console\nhadoop.security.log.maxfilesize=256MB\nhadoop.security.log.maxbackupindex=20\nlog4j.category.SecurityLogger=${hadoop.security.logg
 er}\nhadoop.security.log.file=SecurityAuth.audit\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\n\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\n\n#\n# hdfs audit logging\n#\nhdfs.audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=
 false\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# NameNode metrics logging.\n# The default is to retain two namenode-metrics.log files up to 64MB each.\n#\nnamenode.metrics.logger=INFO,NullAppender\nlog4j.logger.NameNodeMetricsLog=${namenode.metrics.logger}\nlog4j.additivity.NameNodeMetricsLog=false\nlog4j.appender.NNMETRICSRFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.NNMETRICSRFA.File=${hadoop.log.dir}/namenode-metrics.log\nlog4j.appender.NNMETRICSRFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.NNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n\nlog4j.appender.NNMETRICSRFA.MaxBackupIndex=1\nlog4j.appender.NNMETRICSRFA.MaxFileSize=64MB\n\n#\n# mapred audit logging\n#\nmapred
 .audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# Rolling File Appender\n#\n\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Logfile size and and 30-day backups\nlog4j.appender.RFA.MaxFileSize=256MB\nlog4j.appender.RFA.MaxBackupIndex=10\n\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n# Custom Logging leve
 ls\n\nhadoop.metrics.log.level=INFO\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\n\n# Jets3t library\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\n\n#\n# Null Appender\n# Trap security logger on the hadoop client side\n#\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\n\n#\n# Event Counter Appender\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\n#\nlog4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter\n\n# Removes \"deprecated\" messages\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\n\n#\n# HDFS block state change log from block manager\n#\n# Uncomment the following to suppress normal block state change\n# messages from BlockManager in NameNode.\n#log4j.logger.BlockStateCh
 ange=WARN"
-        }, 
+        },
         "krb5-conf": {
-            "domains": "", 
-            "manage_krb5_conf": "true", 
-            "content": "\n[libdefaults]\n  renew_lifetime = 7d\n  forwardable = true\n  default_realm = {{realm}}\n  ticket_lifetime = 24h\n  dns_lookup_realm = false\n  dns_lookup_kdc = false\n  default_ccache_name = /tmp/krb5cc_%{uid}\n  #default_tgs_enctypes = {{encryption_types}}\n  #default_tkt_enctypes = {{encryption_types}}\n{% if domains %}\n[domain_realm]\n{%- for domain in domains.split(',') %}\n  {{domain|trim()}} = {{realm}}\n{%- endfor %}\n{% endif %}\n[logging]\n  default = FILE:/var/log/krb5kdc.log\n  admin_server = FILE:/var/log/kadmind.log\n  kdc = FILE:/var/log/krb5kdc.log\n\n[realms]\n  {{realm}} = {\n{%- if kdc_hosts > 0 -%}\n{%- set kdc_host_list = kdc_hosts.split(',')  -%}\n{%- if kdc_host_list and kdc_host_list|length > 0 %}\n    admin_server = {{admin_server_host|default(kdc_host_list[0]|trim(), True)}}\n{%- if kdc_host_list -%}\n{% for kdc_host in kdc_host_list %}\n    kdc = {{kdc_host|trim()}}\n{%- endfor -%}\n{% endif %}\n{%- endif %}\n{%- endif %}\n  }\n\
 n{# Append additional realm declarations below #}", 
+            "domains": "",
+            "manage_krb5_conf": "true",
+            "content": "\n[libdefaults]\n  renew_lifetime = 7d\n  forwardable = true\n  default_realm = {{realm}}\n  ticket_lifetime = 24h\n  dns_lookup_realm = false\n  dns_lookup_kdc = false\n  default_ccache_name = /tmp/krb5cc_%{uid}\n  #default_tgs_enctypes = {{encryption_types}}\n  #default_tkt_enctypes = {{encryption_types}}\n{% if domains %}\n[domain_realm]\n{%- for domain in domains.split(',') %}\n  {{domain|trim()}} = {{realm}}\n{%- endfor %}\n{% endif %}\n[logging]\n  default = FILE:/var/log/krb5kdc.log\n  admin_server = FILE:/var/log/kadmind.log\n  kdc = FILE:/var/log/krb5kdc.log\n\n[realms]\n  {{realm}} = {\n{%- if kdc_hosts > 0 -%}\n{%- set kdc_host_list = kdc_hosts.split(',')  -%}\n{%- if kdc_host_list and kdc_host_list|length > 0 %}\n    admin_server = {{admin_server_host|default(kdc_host_list[0]|trim(), True)}}\n{%- if kdc_host_list -%}\n{% for kdc_host in kdc_host_list %}\n    kdc = {{kdc_host|trim()}}\n{%- endfor -%}\n{% endif %}\n{%- endif %}\n{%- endif %}\n  }\n\
 n{# Append additional realm declarations below #}",
             "conf_dir": "/etc"
-        }, 
+        },
         "core-site": {
-            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py", 
-            "hadoop.proxyuser.hdfs.groups": "*", 
-            "fs.trash.interval": "360", 
-            "ipc.server.tcpnodelay": "true", 
-            "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec", 
-            "ipc.client.idlethreshold": "8000", 
-            "io.file.buffer.size": "131072", 
-            "hadoop.proxyuser.ambari-server-test_cluster01.groups": "*", 
-            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
-            "hadoop.security.authentication": "kerberos", 
-            "mapreduce.jobtracker.webinterface.trusted": "false", 
-            "hadoop.proxyuser.hdfs.hosts": "*", 
-            "hadoop.proxyuser.HTTP.groups": "users", 
-            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020", 
-            "ha.failover-controller.active-standby-elector.zk.op.retries": "120", 
-            "hadoop.security.key.provider.path": "kms://http@c6401.ambari.apache.org:9292/kms", 
-            "hadoop.security.authorization": "true", 
-            "hadoop.http.authentication.simple.anonymous.allowed": "true", 
-            "ipc.client.connect.max.retries": "50", 
-            "hadoop.security.auth_to_local": "RULE:[1:$1@$0](ambari-qa-test_cluster01@EXAMPLE.COM)s/.*/ambari-qa/\nRULE:[1:$1@$0](hdfs-test_cluster01@EXAMPLE.COM)s/.*/hdfs/\nRULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nRULE:[2:$1@$0](dn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](nn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](rangeradmin@EXAMPLE.COM)s/.*/ranger/\nRULE:[2:$1@$0](rangertagsync@EXAMPLE.COM)s/.*/rangertagsync/\nRULE:[2:$1@$0](rangerusersync@EXAMPLE.COM)s/.*/rangerusersync/\nDEFAULT", 
-            "hadoop.proxyuser.ambari-server-test_cluster01.hosts": "c6401.ambari.apache.org", 
+            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py",
+            "hadoop.proxyuser.hdfs.groups": "*",
+            "fs.trash.interval": "360",
+            "ipc.server.tcpnodelay": "true",
+            "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec",
+            "ipc.client.idlethreshold": "8000",
+            "io.file.buffer.size": "131072",
+            "hadoop.proxyuser.ambari-server-test_cluster01.groups": "*",
+            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization",
+            "hadoop.security.authentication": "kerberos",
+            "mapreduce.jobtracker.webinterface.trusted": "false",
+            "hadoop.proxyuser.hdfs.hosts": "*",
+            "hadoop.proxyuser.HTTP.groups": "users",
+            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020",
+            "ha.failover-controller.active-standby-elector.zk.op.retries": "120",
+            "hadoop.security.key.provider.path": "kms://http@c6401.ambari.apache.org:9292/kms",
+            "hadoop.security.authorization": "true",
+            "hadoop.http.authentication.simple.anonymous.allowed": "true",
+            "ipc.client.connect.max.retries": "50",
+            "hadoop.security.auth_to_local": "RULE:[1:$1@$0](ambari-qa-test_cluster01@EXAMPLE.COM)s/.*/ambari-qa/\nRULE:[1:$1@$0](hdfs-test_cluster01@EXAMPLE.COM)s/.*/hdfs/\nRULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nRULE:[2:$1@$0](dn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](nn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](rangeradmin@EXAMPLE.COM)s/.*/ranger/\nRULE:[2:$1@$0](rangertagsync@EXAMPLE.COM)s/.*/rangertagsync/\nRULE:[2:$1@$0](rangerusersync@EXAMPLE.COM)s/.*/rangerusersync/\nDEFAULT",
+            "hadoop.proxyuser.ambari-server-test_cluster01.hosts": "c6401.ambari.apache.org",
             "ipc.client.connection.maxidletime": "30000"
-        }, 
+        },
         "hadoop-env": {
-            "keyserver_port": "", 
-            "proxyuser_group": "users", 
-            "hdfs_user_nproc_limit": "65536", 
-            "hdfs_log_dir_prefix": "/var/log/hadoop", 
-            "hdfs_user_nofile_limit": "128000", 
-            "hdfs_user": "hdfs", 
-            "hdfs_principal_name": "hdfs-test_cluster01@EXAMPLE.COM", 
-            "keyserver_host": " ", 
-            "namenode_opt_maxnewsize": "128m", 
-            "hdfs_user_keytab": "/etc/security/keytabs/hdfs.headless.keytab", 
-            "namenode_opt_maxpermsize": "256m", 
-            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}", 
-            "namenode_heapsize": "1024m", 
-            "namenode_opt_newsize": "128m", 
-            "nfsgateway_heapsize": "1024", 
-            "dtnode_heapsize": "1024m", 
-            "hadoop_root_logger": "INFO,RFA", 
-            "hadoop_heapsize": "1024", 
-            "hadoop_pid_dir_prefix": "/var/run/hadoop", 
-            "namenode_opt_permsize": "128m", 
+            "keyserver_port": "",
+            "proxyuser_group": "users",
+            "hdfs_user_nproc_limit": "65536",
+            "hdfs_log_dir_prefix": "/var/log/hadoop",
+            "hdfs_user_nofile_limit": "128000",
+            "hdfs_user": "hdfs",
+            "hdfs_principal_name": "hdfs-test_cluster01@EXAMPLE.COM",
+            "keyserver_host": " ",
+            "namenode_opt_maxnewsize": "128m",
+            "hdfs_user_keytab": "/etc/security/keytabs/hdfs.headless.keytab",
+            "namenode_opt_maxpermsize": "256m",
+            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}",
+            "namenode_heapsize": "1024m",
+            "namenode_opt_newsize": "128m",
+            "nfsgateway_heapsize": "1024",
+            "dtnode_heapsize": "1024m",
+            "hadoop_root_logger": "INFO,RFA",
+            "hadoop_heapsize": "1024",
+            "hadoop_pid_dir_prefix": "/var/run/hadoop",
+            "namenode_opt_permsize": "128m",
             "hdfs_tmp_dir": "/tmp"
-        }, 
+        },
         "zookeeper-log4j": {
             "content": "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n#\n#\n\n#\n# ZooKeeper Logging Configuration\n#\n\n# DEFAULT: consol

<TRUNCATED>

[47/52] [abbrv] ambari git commit: Revert "AMBARI-21077: Refactor API endpoint to have a single entry point for an API version (jluniya)"

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java
index 47b70d9..ab83dfd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for CredentialService.
@@ -65,7 +64,7 @@ public class ClusterKerberosDescriptorServiceTest extends BaseServiceTest {
     private String type;
 
     private TestService(String type) {
-      super(ApiVersion.Default, "C1");
+      super("C1");
       this.type = type;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java
index 06f337e..a1c8d6c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ClusterPrivilegeService.
@@ -70,7 +69,7 @@ public class ClusterPrivilegeServiceTest extends BaseServiceTest {
   private class TestClusterPrivilegeService extends ClusterPrivilegeService {
 
     private TestClusterPrivilegeService(String clusterName) {
-      super(ApiVersion.Default, clusterName);
+      super(clusterName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
index cfc6a2e..cfc43f5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.orm.dao.ClusterDAO;
 import org.apache.ambari.server.orm.dao.HostDAO;
 import org.apache.ambari.server.orm.entities.ClusterEntity;
@@ -146,7 +145,7 @@ public class ClusterServiceTest extends BaseServiceTest {
     private String m_clusterId;
 
     private TestClusterService(Clusters clusters, String clusterId) {
-      super(ApiVersion.Default, clusters);
+      super(clusters);
       m_clusterId = clusterId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java
index fa21156..ac607fb 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 import org.easymock.EasyMock;
 import org.junit.Test;
@@ -73,7 +72,7 @@ public class ClusterStackVersionServiceTest extends BaseServiceTest {
 
   private class TestClusterStackVersionService extends ClusterStackVersionService {
     public TestClusterStackVersionService(String clusterName) {
-      super(ApiVersion.Default, clusterName);
+      super(clusterName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
index dda130a..9ced9b3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
@@ -32,7 +32,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ComponentService.
@@ -93,7 +92,7 @@ public class ComponentServiceTest extends BaseServiceTest {
     private String m_componentId;
 
     private TestComponentService(String clusterId, String serviceId, String componentId) {
-      super(ApiVersion.Default, clusterId, serviceId);
+      super(clusterId, serviceId);
       m_clusterId = clusterId;
       m_serviceId = serviceId;
       m_componentId = componentId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
index b0ad67c..88ee500 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 public class ConfigGroupServiceTest extends BaseServiceTest {
 
@@ -86,7 +85,7 @@ public class ConfigGroupServiceTest extends BaseServiceTest {
     private String m_groupId;
 
     public TestConfigGroupService(String m_clusterName, String groupId) {
-      super(ApiVersion.Default, m_clusterName);
+      super(m_clusterName);
       this.m_clusterName = m_clusterName;
       this.m_groupId = groupId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
index eda6cc9..adaffff 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
@@ -29,7 +29,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 public class ConfigurationServiceTest extends BaseServiceTest {
 
@@ -56,7 +56,7 @@ public class ConfigurationServiceTest extends BaseServiceTest {
     private String m_clusterId;
 
     private TestConfigurationService(String clusterId) {
-      super(ApiVersion.Default, clusterId);
+      super(clusterId);
       m_clusterId = clusterId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java
index 8aa1303..73d3383 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for CredentialService.
@@ -73,7 +72,7 @@ public class CredentialServiceTest extends BaseServiceTest {
     private String alias;
 
     private TestCredentialService(String alias) {
-      super(ApiVersion.Default, "C1");
+      super("C1");
       this.alias = alias;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java
index 00a028e..7a696a6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
 * Unit tests for ExtensionsService.
@@ -74,7 +73,6 @@ public class ExtensionsServiceTest extends BaseServiceTest {
     private String m_extensionVersion;
 
     private TestExtensionsService(String extensionName, String extensionVersion) {
-      super(ApiVersion.Default);
       m_extensionId = extensionName;
       m_extensionVersion = extensionVersion;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
index 31e0edf..c899b93 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for FeedService.
@@ -79,7 +79,6 @@ public class FeedServiceTest extends BaseServiceTest {
     private String m_feedId;
 
     private TestFeedService(String feedId) {
-      super(ApiVersion.Default);
       m_feedId = feedId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
index 8cdbf75..89545a5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
@@ -31,7 +31,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 import org.easymock.EasyMock;
 import org.junit.Test;
@@ -86,7 +85,7 @@ public class GroupPrivilegeServiceTest extends BaseServiceTest {
   private class TestGroupPrivilegeService extends GroupPrivilegeService {
 
     public TestGroupPrivilegeService() {
-      super(ApiVersion.Default, "group");
+      super("group");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
index 0753f1c..f46d358 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -79,10 +78,6 @@ public class GroupServiceTest extends BaseServiceTest {
   }
 
   private class TestGroupService extends GroupService {
-    public TestGroupService() {
-      super(ApiVersion.Default);
-    }
-
     @Override
     protected ResourceInstance createResource(Type type, Map<Type, String> mapIds) {
       return getTestResource();

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java
index 670eab1..01ccd6a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java
@@ -31,7 +31,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for HostComponentService.
@@ -92,7 +91,7 @@ public class HostComponentServiceTest extends BaseServiceTest {
     private String m_hostComponentId;
 
     private TestHostComponentService(String clusterId, String hostId, String hostComponentId) {
-      super(ApiVersion.Default, clusterId, hostId);
+      super(clusterId, hostId);
       m_clusterId = clusterId;
       m_hostId = hostId;
       m_hostComponentId = hostComponentId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
index 1550e0a..c9200b0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
@@ -32,7 +32,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for HostKerberosIdentity.
@@ -63,7 +62,7 @@ public class HostKerberosIdentityServiceTest extends BaseServiceTest {
     private String identityId;
 
     private TestHostKerberosIdentityService(String clusterId, String hostId, String identityId) {
-      super(ApiVersion.Default, clusterId, hostId);
+      super(clusterId, hostId);
       this.clusterId = clusterId;
       this.hostId = hostId;
       this.identityId = identityId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
index 8209227..6aef04d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
@@ -31,7 +31,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for HostService.
@@ -91,7 +90,7 @@ public class HostServiceTest extends BaseServiceTest {
     private String m_hostId;
 
     private TestHostService(String clusterId, String hostId) {
-      super(ApiVersion.Default, clusterId);
+      super(clusterId);
       m_clusterId = clusterId;
       m_hostId = hostId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java
index 83de4e3..8367a94 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -61,7 +60,7 @@ public class HostStackVersionServiceTest extends BaseServiceTest {
 
   private class TestHostStackVersionService extends HostStackVersionService {
     public TestHostStackVersionService(String hostName, String clusterName) {
-      super(ApiVersion.Default, hostName, clusterName);
+      super(hostName, clusterName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java
index 8f0e004..ee42b57 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java
@@ -31,7 +31,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for InstanceService.
@@ -79,7 +78,7 @@ public class InstanceServiceTest extends BaseServiceTest {
     private String m_instanceId;
 
     private TestInstanceService(String feedName, String instanceId) {
-      super(ApiVersion.Default, feedName);
+      super(feedName);
       m_feedName = feedName;
       m_instanceId = instanceId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java
index 1c7c01b..128b345 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for JobService.
@@ -63,7 +62,7 @@ public class JobServiceTest extends BaseServiceTest {
     private String clusterName;
 
     public TestJobService(String clusterName, String workflowId) {
-      super(ApiVersion.Default, clusterName, workflowId);
+      super(clusterName, workflowId);
       this.clusterName = clusterName;
       this.workflowId = workflowId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java
index e129aff..9085bf5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -71,7 +70,7 @@ public class LdapSyncEventServiceTest extends BaseServiceTest {
   private class TestLdapSyncEventService extends LdapSyncEventService {
 
     private TestLdapSyncEventService() {
-      super(ApiVersion.Default);
+      super();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java
index 183ea3f..800aca2 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java
@@ -26,7 +26,6 @@ import java.net.HttpURLConnection;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.logging.LoggingRequestHelperFactory;
 import org.apache.ambari.server.security.TestAuthenticationFactory;
@@ -126,7 +125,7 @@ public class LoggingServiceTest {
     SecurityContextHolder.getContext().setAuthentication(authentication);
 
     LoggingService loggingService =
-      new LoggingService(ApiVersion.Default, expectedClusterName, controllerFactoryMock);
+      new LoggingService(expectedClusterName, controllerFactoryMock);
     loggingService.setLoggingRequestHelperFactory(helperFactoryMock);
 
     Response resource = loggingService.getSearchEngine("", null, uriInfoMock);

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
index 9f9e31c..f9543df 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -85,7 +84,7 @@ public class MemberServiceTest extends BaseServiceTest {
 
   private class TestMemberService extends MemberService {
     public TestMemberService(String groupName) {
-      super(ApiVersion.Default, groupName);
+      super(groupName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java
index bf64c4f..bbb4578 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for PermissionService.
@@ -78,7 +78,6 @@ public class PermissionServiceTest extends BaseServiceTest {
     private String id;
 
     private TestPermissionService(String id) {
-      super(ApiVersion.Default);
       this.id = id;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java
index 4be5f7c..23c99d9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -57,7 +56,7 @@ public class PreUpgradeCheckServiceTest extends BaseServiceTest {
   private class TestPreUpgradeCheckService extends PreUpgradeCheckService {
 
     public TestPreUpgradeCheckService(String clusterName) {
-      super(ApiVersion.Default, clusterName);
+      super(clusterName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java
index 23e644a..134c753 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for PrivilegeService.
@@ -91,7 +91,6 @@ public class PrivilegeServiceTest extends BaseServiceTest {
     private String id;
 
     private TestPrivilegeService(String id) {
-      super(ApiVersion.Default);
       this.id = id;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java
index eb5c92b..779a320 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for RecommendationService.
@@ -43,8 +42,8 @@ public class RecommendationServiceTest extends BaseServiceTest {
 
     //getRecommendation
     RecommendationService service = new TestRecommendationService("stackName", "stackVersion");
-    Method m = service.getClass().getMethod("getRecommendation", String.class, HttpHeaders.class, UriInfo.class);
-    Object[] args = new Object[] {"body", getHttpHeaders(), getUriInfo()};
+    Method m = service.getClass().getMethod("getRecommendation", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    Object[] args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.POST, service, m, args, "body"));
 
     return listInvocations;
@@ -55,7 +54,7 @@ public class RecommendationServiceTest extends BaseServiceTest {
     private String stackVersion;
 
     private TestRecommendationService(String stackName, String stackVersion) {
-      super(ApiVersion.Default, stackName, stackVersion);
+      super();
       this.stackName = stackName;
       this.stackVersion = stackVersion;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java
index e035947..6d6ba7b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -82,7 +81,7 @@ public class RepositoryServiceTest extends BaseServiceTest {
   private class TestRepositoryService extends RepositoryService {
 
     public TestRepositoryService() {
-      super(ApiVersion.Default, new HashMap<Type, String>());
+      super(new HashMap<Type, String>());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java
index 063fa05..517a6a0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for RoleAuthorizationService.
@@ -60,7 +60,6 @@ public class RoleAuthorizationServiceTest extends BaseServiceTest {
     private String id;
 
     private TestRoleAuthorizationService(String id) {
-      super(ApiVersion.Default);
       this.id = id;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
index b2598c6..64898c8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
 * Unit tests for RootServiceService.
@@ -94,7 +93,6 @@ public class RootServiceServiceTest extends BaseServiceTest {
     private String m_hostName;
 
     private TestRootServiceService(String serviceName, String componentName, String hostName) {
-      super(ApiVersion.Default);
       m_serviceName = serviceName;
       m_componentName = componentName;
       m_hostName = hostName;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
index ddb22eb..deda3eb 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ServiceService.
@@ -134,13 +133,13 @@ public class ServiceServiceTest extends BaseServiceTest {
     private String m_artifact_id;
 
     private TestServiceService(String clusterId, String serviceId) {
-      super(ApiVersion.Default, clusterId);
+      super(clusterId);
       m_clusterId = clusterId;
       m_serviceId = serviceId;
     }
 
     private TestServiceService(String clusterId, String serviceId, String artifactId) {
-      super(ApiVersion.Default, clusterId);
+      super(clusterId);
       m_clusterId = clusterId;
       m_serviceId = serviceId;
       m_artifact_id = artifactId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
index c53b852..1bc75ff 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit test for {@link SettingService}
@@ -76,7 +75,6 @@ public class SettingServiceTest extends BaseServiceTest {
     private String settingName;
 
     private TestSettingService(String settingName) {
-      super(ApiVersion.Default);
       this.settingName = settingName;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
index b828879..ff62712 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
 * Unit tests for StacksService.
@@ -142,7 +141,6 @@ public class StacksServiceTest extends BaseServiceTest {
     private String m_stackVersion;
 
     private TestStacksService(String stackName, String stackVersion) {
-      super(ApiVersion.Default);
       m_stackId = stackName;
       m_stackVersion = stackVersion;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java
index 2b72570..a71b062 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for TargetClusterService.
@@ -79,7 +79,6 @@ public class TargetClusterServiceTest extends BaseServiceTest {
     private String m_targetClusterId;
 
     private TestTargetClusterService(String targetClusterId) {
-      super(ApiVersion.Default);
       m_targetClusterId = targetClusterId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java
index 0d41be7..072cd65 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for TaskAttemptService.
@@ -66,7 +65,7 @@ public class TaskAttemptServiceTest extends BaseServiceTest {
 
     public TestTaskAttemptService(String clusterName, String workflowId,
         String jobId) {
-      super(ApiVersion.Default, clusterName, workflowId, jobId);
+      super(clusterName, workflowId, jobId);
       this.clusterName = clusterName;
       this.workflowId = workflowId;
       this.jobId = jobId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java
index 4bd7dde..25f67a4 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.junit.Assert;
 
 /**
@@ -51,7 +50,7 @@ public class UpgradeItemServiceTest extends BaseServiceTest {
     private Long m_upgradeItemId;
 
     private TestUpgradeItemService(String clusterName, String upgradeId, String upgradeGroupId, Long upgradeItemId) {
-      super(ApiVersion.Default, clusterName, upgradeId, upgradeGroupId);
+      super(clusterName, upgradeId, upgradeGroupId);
 
       m_upgradeItemId = upgradeItemId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
index bf712c8..c0fb6ff 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.junit.Test;
 
@@ -61,7 +60,7 @@ public class UserAuthorizationServiceTest extends BaseServiceTest {
   @Test
   public void testCreateAuthorizationResourceWithUppercaseUsername() {
     // GIVEN
-    UserAuthorizationService userAuthorizationService= new UserAuthorizationService(ApiVersion.Default, "Jdoe");
+    UserAuthorizationService userAuthorizationService= new UserAuthorizationService("Jdoe");
     // WHEN
     ResourceInstance result = userAuthorizationService.createAuthorizationResource("id");
     // THEN
@@ -73,7 +72,7 @@ public class UserAuthorizationServiceTest extends BaseServiceTest {
     private String id;
 
     private TestUserAuthorizationService(String id) {
-      super(ApiVersion.Default, "jdoe");
+      super("jdoe");
       this.id = id;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
index 23e1062..909a4ba 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
@@ -33,7 +33,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 import org.easymock.EasyMock;
@@ -89,7 +88,7 @@ public class UserPrivilegeServiceTest extends BaseServiceTest {
   @Test
   public void testCreatePrivilegeResourcesWithUppercaseUsername() {
     // GIVEN
-    UserPrivilegeService userPrivilegeService = new UserPrivilegeService(ApiVersion.Default, "User");
+    UserPrivilegeService userPrivilegeService = new UserPrivilegeService("User");
     // WHEN
     ResourceInstance result = userPrivilegeService.createPrivilegeResource("test");
     // THEN
@@ -99,7 +98,7 @@ public class UserPrivilegeServiceTest extends BaseServiceTest {
   private class TestUserPrivilegeService extends UserPrivilegeService {
 
     public TestUserPrivilegeService() {
-      super(ApiVersion.Default, "user");
+      super("user");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java
index ef6aef0..722e4bc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ValidationService.
@@ -43,8 +42,8 @@ public class ValidationServiceTest extends BaseServiceTest {
 
     //getValidation
     ValidationService service = new TestValidationService("stackName", "stackVersion");
-    Method m = service.getClass().getMethod("getValidation", String.class, HttpHeaders.class, UriInfo.class);
-    Object[] args = new Object[] {"body", getHttpHeaders(), getUriInfo()};
+    Method m = service.getClass().getMethod("getValidation", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    Object[] args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.POST, service, m, args, "body"));
 
     return listInvocations;
@@ -55,7 +54,7 @@ public class ValidationServiceTest extends BaseServiceTest {
     private String stackVersion;
 
     private TestValidationService(String stackName, String stackVersion) {
-      super(ApiVersion.Default, stackName, stackVersion);
+      super();
       this.stackName = stackName;
       this.stackVersion = stackVersion;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
index 2672410..e1eb0de 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
@@ -27,7 +27,6 @@ import static org.easymock.EasyMock.verify;
 
 import javax.ws.rs.WebApplicationException;
 
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 import org.apache.ambari.server.view.ViewDataMigrationUtility;
 import org.apache.ambari.server.view.ViewRegistry;
@@ -55,7 +54,7 @@ public class ViewDataMigrationServiceTest {
     replay(viewRegistry);
     ViewRegistry.initInstance(viewRegistry);
 
-    ViewDataMigrationService service = new ViewDataMigrationService(ApiVersion.Default, viewName, version1, instanceName);
+    ViewDataMigrationService service = new ViewDataMigrationService(viewName, version1, instanceName);
 
     ViewDataMigrationUtility migrationUtility = createStrictMock(ViewDataMigrationUtility.class);
     migrationUtility.migrateData(anyObject(ViewInstanceEntity.class), anyObject(ViewInstanceEntity.class), eq(false));
@@ -74,7 +73,7 @@ public class ViewDataMigrationServiceTest {
     replay(viewRegistry);
     ViewRegistry.initInstance(viewRegistry);
 
-    ViewDataMigrationService service = new ViewDataMigrationService(ApiVersion.Default, viewName, version1, instanceName);
+    ViewDataMigrationService service = new ViewDataMigrationService(viewName, version1, instanceName);
 
     thrown.expect(WebApplicationException.class);
     service.migrateData(version2, instanceName);

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
index 74711e6..155f91e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
@@ -17,7 +17,6 @@
  */
 package org.apache.ambari.server.api.services;
 
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntityTest;
@@ -33,7 +32,7 @@ public class ViewExternalSubResourceServiceTest {
     Resource.Type type = new Resource.Type("resource");
 
     ViewInstanceEntity definition = ViewInstanceEntityTest.getViewInstanceEntity();
-    ViewExternalSubResourceService service = new ViewExternalSubResourceService(ApiVersion.Default, type, definition);
+    ViewExternalSubResourceService service = new ViewExternalSubResourceService(type, definition);
 
     Object fooService = new Object();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
index befa939..1c9e589 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ViewPermissionService.
@@ -74,7 +73,7 @@ public class ViewPermissionServiceTest extends BaseServiceTest {
 
     private TestViewPermissionService(String viewName, String version, String permissionId) {
 
-      super(ApiVersion.Default, viewName, version);
+      super(viewName, version);
       this.permissionId = permissionId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
index 6c23960..97943df 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
@@ -43,7 +43,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.api.util.TreeNode;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
@@ -133,7 +132,7 @@ public class ViewSubResourceServiceTest extends BaseServiceTest {
     Resource.Type type = new Resource.Type("subResource");
 
     // get resource
-    ViewSubResourceService service = new ViewSubResourceService(ApiVersion.Default, type, viewInstanceEntity);
+    ViewSubResourceService service = new ViewSubResourceService(type, viewInstanceEntity);
 
     ResultSerializer serializer = service.getResultSerializer(MediaType.TEXT_PLAIN_TYPE);
 
@@ -191,7 +190,7 @@ public class ViewSubResourceServiceTest extends BaseServiceTest {
     Resource.Type type = new Resource.Type("subResource");
 
     // get resource
-    ViewSubResourceService service = new ViewSubResourceService(ApiVersion.Default, type, viewInstanceEntity);
+    ViewSubResourceService service = new ViewSubResourceService(type, viewInstanceEntity);
 
     ResultSerializer serializer = service.getResultSerializer(MediaType.APPLICATION_JSON_TYPE);
 
@@ -220,7 +219,7 @@ public class ViewSubResourceServiceTest extends BaseServiceTest {
      * Construct a view sub-resource service.
      */
     public TestViewSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
-      super(ApiVersion.Default, type, viewInstanceDefinition);
+      super(type, viewInstanceDefinition);
     }
 
     public Response getSubResource1(@Context HttpHeaders headers, @Context UriInfo ui,

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java
index 250812f..b9cc545 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for WorkflowService.
@@ -62,7 +61,7 @@ public class WorkflowServiceTest extends BaseServiceTest {
     private String clusterName;
 
     public TestWorkflowService(String clusterName) {
-      super(ApiVersion.Default, clusterName);
+      super(clusterName);
       this.clusterName = clusterName;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java
index a63f011..8f608aa 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java
@@ -34,7 +34,6 @@ import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
 import org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.junit.Test;
 
 public class ConfigurationRecommendationCommandTest {
@@ -44,7 +43,7 @@ public class ConfigurationRecommendationCommandTest {
     StackAdvisorRunner saRunner = mock(StackAdvisorRunner.class);
     File file = mock(File.class);
     AmbariMetaInfo metaInfo = mock(AmbariMetaInfo.class);
-    ConfigurationRecommendationCommand command = new ConfigurationRecommendationCommand(ApiVersion.Default, file, "1w", "script", 1, saRunner, metaInfo);
+    ConfigurationRecommendationCommand command = new ConfigurationRecommendationCommand(file, "1w", "script", 1, saRunner, metaInfo);
 
     StackAdvisorRequest request = mock(StackAdvisorRequest.class);
     Map<String, Set<String>> componentHostGroupMap = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java
index 81c36b3..67048ad 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java
@@ -46,7 +46,6 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequestExc
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorResponse;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
 import org.apache.ambari.server.api.services.stackadvisor.commands.StackAdvisorCommand.StackAdvisorData;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.commons.io.FileUtils;
 import org.codehaus.jackson.JsonNode;
 import org.codehaus.jackson.annotate.JsonProperty;
@@ -268,7 +267,7 @@ public class StackAdvisorCommandTest {
   class TestStackAdvisorCommand extends StackAdvisorCommand<TestResource> {
     public TestStackAdvisorCommand(File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript,
         int requestId, StackAdvisorRunner saRunner, AmbariMetaInfo metaInfo) {
-      super(ApiVersion.Default, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
+      super(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
     }
 
     @Override


[42/52] [abbrv] ambari git commit: AMBARI-21430. Allow Multiple Versions of Stack Tools to Co-Exist - fix illegal import

Posted by jl...@apache.org.
AMBARI-21430. Allow Multiple Versions of Stack Tools to Co-Exist - fix illegal import


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: d0f7a51537469740e5397486b1e2c19862c26c01
Parents: f33a250
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Sun Jul 9 12:15:28 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Sun Jul 9 12:16:54 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0f7a515/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java
index fa3aea3..0656f68 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java
@@ -29,7 +29,7 @@ import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.PropertyInfo;
-import org.apache.hadoop.metrics2.sink.relocated.commons.lang.StringUtils;
+import org.apache.commons.lang.StringUtils;
 
 import com.google.common.collect.Sets;
 import com.google.inject.Inject;


[09/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/usersync-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/usersync-log4j.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/usersync-log4j.xml
new file mode 100644
index 0000000..b5f2a7a
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/usersync-log4j.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_adding_forbidden="false">
+  <property>
+    <name>ranger_usersync_log_maxfilesize</name>
+    <value>256</value>
+   <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>Ranger usersync Log: backup file size</display-name>
+    <value-attributes>
+      <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+   </property>
+   <property>
+    <name>ranger_usersync_log_maxbackupindex</name>
+    <value>20</value>
+    <description>The number of backup files</description>
+    <display-name>Ranger usersync Log: # of backup files</display-name>
+    <value-attributes>
+      <type>int</type>
+      <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>content</name>
+    <display-name>usersync-log4j template</display-name>
+    <description>usersync-log4j.properties</description>
+    <value>
+#
+# 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.
+#
+
+log4j.rootLogger = info,logFile
+
+# logFile
+log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.logFile.file=${logdir}/usersync.log
+log4j.appender.logFile.datePattern='.'yyyy-MM-dd
+log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
+log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n
+log4j.appender.logFile.MaxFileSize = {{ranger_usersync_log_maxfilesize}}MB
+log4j.appender.logFile.MaxBackupIndex = {{ranger_usersync_log_maxbackupindex}}
+
+# console
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Target=System.out
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n
+    </value>
+    <value-attributes>
+      <type>content</type>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/kerberos.json b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/kerberos.json
new file mode 100644
index 0000000..1fc8acf
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/kerberos.json
@@ -0,0 +1,153 @@
+{
+  "services": [
+    {
+      "name": "RANGER",
+      "identities": [
+        {
+          "name": "/spnego"
+        },
+        {
+          "name": "/smokeuser"
+        }
+      ],
+      "configurations": [
+        {
+          "ranger-admin-site": {
+            "xasecure.audit.jaas.Client.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
+            "xasecure.audit.jaas.Client.loginModuleControlFlag": "required",
+            "xasecure.audit.jaas.Client.option.useKeyTab": "true",
+            "xasecure.audit.jaas.Client.option.storeKey": "false",
+            "xasecure.audit.jaas.Client.option.serviceName": "solr"
+          }
+        }
+      ],
+      "components": [
+        {
+          "name": "RANGER_ADMIN",
+          "identities": [
+            {
+              "name": "rangeradmin",
+              "principal": {
+                "value": "rangeradmin/_HOST@${realm}",
+                "type" : "service",
+                "configuration": "ranger-admin-site/ranger.admin.kerberos.principal",
+                "local_username" : "${ranger-env/ranger_user}"
+              },
+              "keytab": {
+                "file": "${keytab_dir}/rangeradmin.service.keytab",
+                "owner": {
+                  "name": "${ranger-env/ranger_user}",
+                  "access": "r"
+                },
+                "configuration": "ranger-admin-site/ranger.admin.kerberos.keytab"
+              }
+            },
+            {
+              "name": "rangerlookup",
+              "principal": {
+                "value": "rangerlookup/_HOST@${realm}",
+                "configuration": "ranger-admin-site/ranger.lookup.kerberos.principal",
+                "type" : "service"
+              },
+              "keytab": {
+                "file": "${keytab_dir}/rangerlookup.service.keytab",
+                "owner": {
+                  "name": "${ranger-env/ranger_user}",
+                  "access": "r"
+                },
+                "configuration": "ranger-admin-site/ranger.lookup.kerberos.keytab"
+              }
+            },
+            {
+              "name": "/spnego",
+              "keytab": {
+                "configuration": "ranger-admin-site/ranger.spnego.kerberos.keytab"
+              }
+            },
+            {
+              "name": "/RANGER/RANGER_ADMIN/rangeradmin",
+              "principal": {
+                "configuration": "ranger-admin-site/xasecure.audit.jaas.Client.option.principal"
+              },
+              "keytab": {
+                "configuration": "ranger-admin-site/xasecure.audit.jaas.Client.option.keyTab"
+              }
+            },
+            {
+              "name": "/AMBARI_INFRA/INFRA_SOLR/infra-solr",
+              "when" : {
+                "contains" : ["services", "AMBARI_INFRA"]
+              }
+            }
+          ]
+        },
+        {
+          "name": "RANGER_USERSYNC",
+          "identities": [
+            {
+              "name": "rangerusersync",
+              "principal": {
+                "value": "rangerusersync/_HOST@${realm}",
+                "type" : "service",
+                "configuration" : "ranger-ugsync-site/ranger.usersync.kerberos.principal",
+                "local_username" : "rangerusersync"
+              },
+              "keytab": {
+                "file": "${keytab_dir}/rangerusersync.service.keytab",
+                "owner": {
+                  "name": "${ranger-env/ranger_user}",
+                  "access": "r"
+                },
+                "configuration": "ranger-ugsync-site/ranger.usersync.kerberos.keytab"
+              }
+            }
+          ]
+        },
+        {
+          "name": "RANGER_TAGSYNC",
+          "identities": [
+            {
+              "name": "rangertagsync",
+              "principal": {
+                "value": "rangertagsync/_HOST@${realm}",
+                "type" : "service",
+                "configuration": "ranger-tagsync-site/ranger.tagsync.kerberos.principal",
+                "local_username" : "rangertagsync"
+              },
+              "keytab": {
+                "file": "${keytab_dir}/rangertagsync.service.keytab",
+                "owner": {
+                  "name": "${ranger-env/ranger_user}",
+                  "access": "r"
+                },
+                "configuration": "ranger-tagsync-site/ranger.tagsync.kerberos.keytab"
+              }
+            },
+            {
+              "name": "/RANGER/RANGER_TAGSYNC/rangertagsync",
+              "principal": {
+                "configuration": "tagsync-application-properties/atlas.jaas.KafkaClient.option.principal"
+              },
+              "keytab": {
+                "configuration": "tagsync-application-properties/atlas.jaas.KafkaClient.option.keyTab"
+              }
+            }
+          ],
+          "configurations": [
+            {
+              "tagsync-application-properties": {
+                "atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
+                "atlas.jaas.KafkaClient.loginModuleControlFlag": "required",
+                "atlas.jaas.KafkaClient.option.useKeyTab": "true",
+                "atlas.jaas.KafkaClient.option.storeKey": "true",
+                "atlas.jaas.KafkaClient.option.serviceName": "kafka",
+                "atlas.kafka.sasl.kerberos.service.name": "kafka",
+                "atlas.kafka.security.protocol": "PLAINTEXTSASL"
+              }
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/metainfo.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/metainfo.xml
new file mode 100644
index 0000000..c452f2e
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/metainfo.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>RANGER</name>
+      <displayName>Ranger</displayName>
+      <comment>Comprehensive security for Hadoop</comment>
+      <version>1.0.0.3.0</version>
+      <components>
+
+        <component>
+          <name>RANGER_ADMIN</name>
+          <displayName>Ranger Admin</displayName>
+          <category>MASTER</category>
+          <cardinality>1+</cardinality>
+          <versionAdvertised>true</versionAdvertised>
+          <dependencies>
+            <dependency>
+              <name>AMBARI_INFRA/INFRA_SOLR_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/ranger_admin.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <logs>
+            <log>
+              <logId>ranger_admin</logId>
+              <primary>true</primary>
+            </log>
+            <log>
+              <logId>ranger_dbpatch</logId>
+            </log>
+          </logs>
+        </component>
+
+        <component>
+          <name>RANGER_TAGSYNC</name>
+          <displayName>Ranger Tagsync</displayName>
+          <category>SLAVE</category>
+          <cardinality>0-1</cardinality>
+          <versionAdvertised>true</versionAdvertised>
+          <commandScript>
+            <script>scripts/ranger_tagsync.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <configuration-dependencies>
+            <config-type>ranger-tagsync-site</config-type>
+            <config-type>tagsync-application-properties</config-type>
+            <config-type>ranger-tagsync-policymgr-ssl</config-type>
+            <config-type>atlas-tagsync-ssl</config-type>
+          </configuration-dependencies>
+        </component>
+
+        <component>
+          <name>RANGER_USERSYNC</name>
+          <displayName>Ranger Usersync</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <versionAdvertised>true</versionAdvertised>
+          <auto-deploy>
+            <enabled>true</enabled>
+            <co-locate>RANGER/RANGER_ADMIN</co-locate>
+          </auto-deploy>
+          <commandScript>
+            <script>scripts/ranger_usersync.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <logs>
+            <log>
+              <logId>ranger_usersync</logId>
+              <primary>true</primary>
+            </log>
+          </logs>
+        </component>
+
+      </components>
+      <configuration-dependencies>
+        <config-type>admin-properties</config-type>
+        <config-type>ranger-admin-site</config-type>
+        <config-type>ranger-ugsync-site</config-type>
+        <config-type>admin-log4j</config-type>
+        <config-type>usersync-log4j</config-type>
+        <config-type>ranger-solr-configuration</config-type>
+      </configuration-dependencies>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <themes>
+        <theme>
+          <fileName>theme_version_1.json</fileName>
+          <default>true</default>
+        </theme>
+      </themes>
+
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>redhat7,amazon2015,redhat6,suse11,suse12</osFamily>
+          <packages>
+            <package>
+              <name>ranger_${stack_version}-admin</name>
+            </package>
+            <package>
+              <name>ranger_${stack_version}-usersync</name>
+            </package>
+            <package>
+              <name>ranger_${stack_version}-tagsync</name>
+              <condition>should_install_ranger_tagsync</condition>
+            </package>
+            <package>
+              <name>ambari-infra-solr-client</name>
+              <condition>should_install_infra_solr_client</condition>
+            </package>
+          </packages>
+        </osSpecific>
+        <osSpecific>
+          <osFamily>debian7,ubuntu12,ubuntu14,ubuntu16</osFamily>
+          <packages>
+            <package>
+              <name>ranger-${stack_version}-admin</name>
+            </package>
+            <package>
+              <name>ranger-${stack_version}-usersync</name>
+            </package>
+            <package>
+              <name>ranger-${stack_version}-tagsync</name>
+              <condition>should_install_ranger_tagsync</condition>
+            </package>
+            <package>
+              <name>ambari-infra-solr-client</name>
+              <condition>should_install_infra_solr_client</condition>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <quickLinksConfigurations>
+        <quickLinksConfiguration>
+          <fileName>quicklinks.json</fileName>
+          <default>true</default>
+        </quickLinksConfiguration>
+      </quickLinksConfigurations>
+
+    </service>
+  </services>
+</metainfo>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/alerts/alert_ranger_admin_passwd_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/alerts/alert_ranger_admin_passwd_check.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/alerts/alert_ranger_admin_passwd_check.py
new file mode 100644
index 0000000..8ea8070
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/alerts/alert_ranger_admin_passwd_check.py
@@ -0,0 +1,195 @@
+#!/usr/bin/env python
+
+"""
+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.
+"""
+
+import base64
+import urllib2
+import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
+import logging
+from resource_management.core.environment import Environment
+from resource_management.libraries.script import Script
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions import StackFeature
+
+logger = logging.getLogger()
+RANGER_ADMIN_URL = '{{admin-properties/policymgr_external_url}}'
+ADMIN_USERNAME = '{{ranger-env/admin_username}}'
+ADMIN_PASSWORD = '{{ranger-env/admin_password}}'
+RANGER_ADMIN_USERNAME = '{{ranger-env/ranger_admin_username}}'
+RANGER_ADMIN_PASSWORD = '{{ranger-env/ranger_admin_password}}'
+SECURITY_ENABLED = '{{cluster-env/security_enabled}}'
+
+def get_tokens():
+  """
+  Returns a tuple of tokens in the format {{site/property}} that will be used
+  to build the dictionary passed into execute
+
+  :return tuple
+  """
+  return (RANGER_ADMIN_URL, ADMIN_USERNAME, ADMIN_PASSWORD, RANGER_ADMIN_USERNAME, RANGER_ADMIN_PASSWORD, SECURITY_ENABLED)
+
+
+def execute(configurations={}, parameters={}, host_name=None):
+  """
+  Returns a tuple containing the result code and a pre-formatted result label
+
+  Keyword arguments:
+  configurations (dictionary): a mapping of configuration key to value
+  parameters (dictionary): a mapping of script parameter key to value
+  host_name (string): the name of this host where the alert is running
+  """
+
+  if configurations is None:
+    return (('UNKNOWN', ['There were no configurations supplied to the script.']))
+
+  ranger_link = None
+  ranger_auth_link = None
+  ranger_get_user = None
+  admin_username = None
+  admin_password = None
+  ranger_admin_username = None
+  ranger_admin_password = None
+  security_enabled = False
+
+  stack_version_formatted = Script.get_stack_version()
+  stack_supports_ranger_kerberos = stack_version_formatted and check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, stack_version_formatted)
+
+  if RANGER_ADMIN_URL in configurations:
+    ranger_link = configurations[RANGER_ADMIN_URL]
+    if ranger_link.endswith('/'):
+      ranger_link = ranger_link[:-1]
+    ranger_auth_link = '{0}/{1}'.format(ranger_link, 'service/public/api/repository/count')
+    ranger_get_user = '{0}/{1}'.format(ranger_link, 'service/xusers/users')
+
+  if ADMIN_USERNAME in configurations:
+    admin_username = configurations[ADMIN_USERNAME]
+
+  if ADMIN_PASSWORD in configurations:
+    admin_password = configurations[ADMIN_PASSWORD]
+
+  if RANGER_ADMIN_USERNAME in configurations:
+    ranger_admin_username = configurations[RANGER_ADMIN_USERNAME]
+
+  if RANGER_ADMIN_PASSWORD in configurations:
+    ranger_admin_password = configurations[RANGER_ADMIN_PASSWORD]
+
+  if SECURITY_ENABLED in configurations:
+    security_enabled = str(configurations[SECURITY_ENABLED]).upper() == 'TRUE'
+
+  label = None
+  result_code = 'OK'
+
+  try:
+    if security_enabled and stack_supports_ranger_kerberos:
+      result_code = 'UNKNOWN'
+      label = 'This alert will get skipped for Ranger Admin on kerberos env'
+    else:
+      admin_http_code = check_ranger_login(ranger_auth_link, admin_username, admin_password)
+      if admin_http_code == 200:
+        get_user_code = get_ranger_user(ranger_get_user, admin_username, admin_password, ranger_admin_username)
+        if get_user_code:
+          user_http_code = check_ranger_login(ranger_auth_link, ranger_admin_username, ranger_admin_password)
+          if user_http_code == 200:
+            result_code = 'OK'
+            label = 'Login Successful for users {0} and {1}'.format(admin_username, ranger_admin_username)
+          elif user_http_code == 401:
+            result_code = 'CRITICAL'
+            label = 'User:{0} credentials on Ambari UI are not in sync with Ranger'.format(ranger_admin_username)
+          else:
+            result_code = 'WARNING'
+            label = 'Ranger Admin service is not reachable, please restart the service'
+        else:
+          result_code = 'OK'
+          label = 'Login Successful for user: {0}. User:{1} user not yet synced with Ranger'.format(admin_username, ranger_admin_username)
+      elif admin_http_code == 401:
+        result_code = 'CRITICAL'
+        label = 'User:{0} credentials on Ambari UI are not in sync with Ranger'.format(admin_username)
+      else:
+        result_code = 'WARNING'
+        label = 'Ranger Admin service is not reachable, please restart the service'
+
+  except Exception, e:
+    label = str(e)
+    result_code = 'UNKNOWN'
+    logger.exception(label)
+
+  return ((result_code, [label]))
+
+def check_ranger_login(ranger_auth_link, username, password):
+  """
+  params ranger_auth_link: ranger login url
+  params username: user credentials
+  params password: user credentials
+
+  return response code
+  """
+  try:
+    usernamepassword = '{0}:{1}'.format(username, password)
+    base_64_string = base64.encodestring(usernamepassword).replace('\n', '')
+    request = urllib2.Request(ranger_auth_link)
+    request.add_header("Content-Type", "application/json")
+    request.add_header("Accept", "application/json")
+    request.add_header("Authorization", "Basic {0}".format(base_64_string))
+    result = urllib2.urlopen(request, timeout=20)
+    response_code = result.getcode()
+    if response_code == 200:
+      response = json.loads(result.read())
+    return response_code
+  except urllib2.HTTPError, e:
+    logger.exception("Error during Ranger service authentication. Http status code - {0}. {1}".format(e.code, e.read()))
+    return e.code
+  except urllib2.URLError, e:
+    logger.exception("Error during Ranger service authentication. {0}".format(e.reason))
+    return None
+  except Exception, e:
+    return 401
+
+def get_ranger_user(ranger_get_user, username, password, user):
+  """
+  params ranger_get_user: ranger get user url
+  params username: user credentials
+  params password: user credentials
+  params user: user to be search
+  return Boolean if user exist or not
+  """
+  try:
+    url = '{0}?name={1}'.format(ranger_get_user, user)
+    usernamepassword = '{0}:{1}'.format(username, password)
+    base_64_string = base64.encodestring(usernamepassword).replace('\n', '')
+    request = urllib2.Request(url)
+    request.add_header("Content-Type", "application/json")
+    request.add_header("Accept", "application/json")
+    request.add_header("Authorization", "Basic {0}".format(base_64_string))
+    result = urllib2.urlopen(request, timeout=20)
+    response_code = result.getcode()
+    response = json.loads(result.read())
+    if response_code == 200 and len(response['vXUsers']) > 0:
+      for xuser in response['vXUsers']:
+        if xuser['name'] == user:
+          return True
+    else:
+      return False
+  except urllib2.HTTPError, e:
+    logger.exception("Error getting user from Ranger service. Http status code - {0}. {1}".format(e.code, e.read()))
+    return False
+  except urllib2.URLError, e:
+    logger.exception("Error getting user from Ranger service. {0}".format(e.reason))
+    return False
+  except Exception, e:
+    return False

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/params.py
new file mode 100644
index 0000000..e121ccb
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/params.py
@@ -0,0 +1,449 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+import os
+from resource_management.libraries.script import Script
+from resource_management.libraries.functions.version import format_stack_version
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.libraries.functions.constants import Direction
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions.stack_features import get_stack_feature_version
+from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions.get_bare_principal import get_bare_principal
+
+# a map of the Ambari role to the component name
+# for use with <stack-root>/current/<component>
+SERVER_ROLE_DIRECTORY_MAP = {
+  'RANGER_ADMIN' : 'ranger-admin',
+  'RANGER_USERSYNC' : 'ranger-usersync',
+  'RANGER_TAGSYNC' : 'ranger-tagsync'
+}
+
+component_directory = Script.get_component_from_role(SERVER_ROLE_DIRECTORY_MAP, "RANGER_ADMIN")
+
+config  = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
+stack_root = Script.get_stack_root()
+
+stack_name = default("/hostLevelParams/stack_name", None)
+version = default("/commandParams/version", None)
+
+stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+
+upgrade_marker_file = format("{tmp_dir}/rangeradmin_ru.inprogress")
+
+xml_configurations_supported = config['configurations']['ranger-env']['xml_configurations_supported']
+
+create_db_dbuser = config['configurations']['ranger-env']['create_db_dbuser']
+
+# get the correct version to use for checking stack features
+version_for_stack_feature_checks = get_stack_feature_version(config)
+
+stack_supports_rolling_upgrade = check_stack_feature(StackFeature.ROLLING_UPGRADE, version_for_stack_feature_checks)
+stack_supports_config_versioning = check_stack_feature(StackFeature.CONFIG_VERSIONING, version_for_stack_feature_checks)
+stack_supports_usersync_non_root = check_stack_feature(StackFeature.RANGER_USERSYNC_NON_ROOT, version_for_stack_feature_checks)
+stack_supports_ranger_tagsync = check_stack_feature(StackFeature.RANGER_TAGSYNC_COMPONENT, version_for_stack_feature_checks)
+stack_supports_ranger_audit_db = check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, version_for_stack_feature_checks)
+stack_supports_ranger_log4j = check_stack_feature(StackFeature.RANGER_LOG4J_SUPPORT, version_for_stack_feature_checks)
+stack_supports_ranger_kerberos = check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, version_for_stack_feature_checks)
+stack_supports_usersync_passwd = check_stack_feature(StackFeature.RANGER_USERSYNC_PASSWORD_JCEKS, version_for_stack_feature_checks)
+stack_supports_infra_client = check_stack_feature(StackFeature.RANGER_INSTALL_INFRA_CLIENT, version_for_stack_feature_checks)
+stack_supports_pid = check_stack_feature(StackFeature.RANGER_PID_SUPPORT, version_for_stack_feature_checks)
+stack_supports_ranger_admin_password_change = check_stack_feature(StackFeature.RANGER_ADMIN_PASSWD_CHANGE, version_for_stack_feature_checks)
+stack_supports_ranger_setup_db_on_start = check_stack_feature(StackFeature.RANGER_SETUP_DB_ON_START, version_for_stack_feature_checks)
+stack_supports_ranger_tagsync_ssl_xml_support = check_stack_feature(StackFeature.RANGER_TAGSYNC_SSL_XML_SUPPORT, version_for_stack_feature_checks)
+stack_supports_ranger_solr_configs = check_stack_feature(StackFeature.RANGER_SOLR_CONFIG_SUPPORT, version_for_stack_feature_checks)
+stack_supports_secure_ssl_password = check_stack_feature(StackFeature.SECURE_RANGER_SSL_PASSWORD, version_for_stack_feature_checks)
+
+downgrade_from_version = default("/commandParams/downgrade_from_version", None)
+upgrade_direction = default("/commandParams/upgrade_direction", None)
+
+ranger_conf    = '/etc/ranger/admin/conf'
+ranger_ugsync_conf = '/etc/ranger/usersync/conf'
+ranger_tagsync_home  = format('{stack_root}/current/ranger-tagsync')
+ranger_tagsync_conf = format('{stack_root}/current/ranger-tagsync/conf')
+tagsync_bin = '/usr/bin/ranger-tagsync'
+tagsync_services_file = format('{stack_root}/current/ranger-tagsync/ranger-tagsync-services.sh')
+security_store_path = '/etc/security/serverKeys'
+tagsync_etc_path = '/etc/ranger/tagsync/'
+ranger_tagsync_credential_file= os.path.join(tagsync_etc_path,'rangercred.jceks')
+atlas_tagsync_credential_file= os.path.join(tagsync_etc_path,'atlascred.jceks')
+ranger_tagsync_keystore_password = config['configurations']['ranger-tagsync-policymgr-ssl']['xasecure.policymgr.clientssl.keystore.password']
+ranger_tagsync_truststore_password = config['configurations']['ranger-tagsync-policymgr-ssl']['xasecure.policymgr.clientssl.truststore.password']
+atlas_tagsync_keystore_password = config['configurations']['atlas-tagsync-ssl']['xasecure.policymgr.clientssl.keystore.password']
+atlas_tagsync_truststore_password = config['configurations']['atlas-tagsync-ssl']['xasecure.policymgr.clientssl.truststore.password']
+
+if upgrade_direction == Direction.DOWNGRADE and version and not check_stack_feature(StackFeature.CONFIG_VERSIONING, version):
+  stack_supports_rolling_upgrade = True
+  stack_supports_config_versioning = False
+
+if upgrade_direction == Direction.DOWNGRADE and version and not check_stack_feature(StackFeature.RANGER_USERSYNC_NON_ROOT, version):
+  stack_supports_usersync_non_root = False
+
+if stack_supports_rolling_upgrade:
+  ranger_home    = format('{stack_root}/current/ranger-admin')
+  ranger_conf    = '/etc/ranger/admin/conf'
+  ranger_stop    = '/usr/bin/ranger-admin-stop'
+  ranger_start   = '/usr/bin/ranger-admin-start'
+  usersync_home  = format('{stack_root}/current/ranger-usersync')
+  usersync_start = '/usr/bin/ranger-usersync-start'
+  usersync_stop  = '/usr/bin/ranger-usersync-stop'
+  ranger_ugsync_conf = '/etc/ranger/usersync/conf'
+
+if stack_supports_config_versioning:
+  ranger_conf = format('{stack_root}/current/ranger-admin/conf')
+  ranger_ugsync_conf = format('{stack_root}/current/ranger-usersync/conf')
+
+if stack_supports_ranger_tagsync:
+  ranger_tagsync_home  = format('{stack_root}/current/ranger-tagsync')
+  tagsync_bin = '/usr/bin/ranger-tagsync'
+  ranger_tagsync_conf = format('{stack_root}/current/ranger-tagsync/conf')
+  tagsync_services_file = format('{stack_root}/current/ranger-tagsync/ranger-tagsync-services.sh')
+
+usersync_services_file = format('{stack_root}/current/ranger-usersync/ranger-usersync-services.sh')
+
+java_home = config['hostLevelParams']['java_home']
+unix_user  = config['configurations']['ranger-env']['ranger_user']
+unix_group = config['configurations']['ranger-env']['ranger_group']
+ranger_pid_dir = default("/configurations/ranger-env/ranger_pid_dir", "/var/run/ranger")
+usersync_log_dir = default("/configurations/ranger-env/ranger_usersync_log_dir", "/var/log/ranger/usersync")
+admin_log_dir = default("/configurations/ranger-env/ranger_admin_log_dir", "/var/log/ranger/admin")
+ranger_admin_default_file = format('{ranger_conf}/ranger-admin-default-site.xml')
+security_app_context_file = format('{ranger_conf}/security-applicationContext.xml')
+ranger_ugsync_default_file = format('{ranger_ugsync_conf}/ranger-ugsync-default.xml')
+usgsync_log4j_file = format('{ranger_ugsync_conf}/log4j.xml')
+if stack_supports_ranger_log4j:
+  usgsync_log4j_file = format('{ranger_ugsync_conf}/log4j.properties')
+cred_validator_file = format('{usersync_home}/native/credValidator.uexe')
+
+ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
+
+db_flavor =  (config['configurations']['admin-properties']['DB_FLAVOR']).lower()
+usersync_exturl =  config['configurations']['admin-properties']['policymgr_external_url']
+if usersync_exturl.endswith('/'):
+  usersync_exturl = usersync_exturl.rstrip('/')
+ranger_host = config['clusterHostInfo']['ranger_admin_hosts'][0]
+ugsync_host = 'localhost'
+usersync_host_info = config['clusterHostInfo']['ranger_usersync_hosts']
+if not is_empty(usersync_host_info) and len(usersync_host_info) > 0:
+  ugsync_host = config['clusterHostInfo']['ranger_usersync_hosts'][0]
+ranger_external_url = config['configurations']['admin-properties']['policymgr_external_url']
+if ranger_external_url.endswith('/'):
+  ranger_external_url = ranger_external_url.rstrip('/')
+ranger_db_name = config['configurations']['admin-properties']['db_name']
+ranger_auditdb_name = default('/configurations/admin-properties/audit_db_name', 'ranger_audits')
+
+sql_command_invoker = config['configurations']['admin-properties']['SQL_COMMAND_INVOKER']
+db_root_user = config['configurations']['admin-properties']['db_root_user']
+db_root_password = unicode(config['configurations']['admin-properties']['db_root_password'])
+db_host =  config['configurations']['admin-properties']['db_host']
+ranger_db_user = config['configurations']['admin-properties']['db_user']
+ranger_audit_db_user = default('/configurations/admin-properties/audit_db_user', 'rangerlogger')
+ranger_db_password = unicode(config['configurations']['admin-properties']['db_password'])
+
+#ranger-env properties
+oracle_home = default("/configurations/ranger-env/oracle_home", "-")
+
+#For curl command in ranger to get db connector
+jdk_location = config['hostLevelParams']['jdk_location']
+java_share_dir = '/usr/share/java'
+jdbc_jar_name = None
+previous_jdbc_jar_name = None
+if db_flavor.lower() == 'mysql':
+  jdbc_jar_name = default("/hostLevelParams/custom_mysql_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mysql_jdbc_name", None)
+  audit_jdbc_url = format('jdbc:mysql://{db_host}/{ranger_auditdb_name}') if stack_supports_ranger_audit_db else None
+  jdbc_dialect = "org.eclipse.persistence.platform.database.MySQLPlatform"
+elif db_flavor.lower() == 'oracle':
+  jdbc_jar_name = default("/hostLevelParams/custom_oracle_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_oracle_jdbc_name", None)
+  jdbc_dialect = "org.eclipse.persistence.platform.database.OraclePlatform"
+  colon_count = db_host.count(':')
+  if colon_count == 2 or colon_count == 0:
+    audit_jdbc_url = format('jdbc:oracle:thin:@{db_host}') if stack_supports_ranger_audit_db else None
+  else:
+    audit_jdbc_url = format('jdbc:oracle:thin:@//{db_host}') if stack_supports_ranger_audit_db else None
+elif db_flavor.lower() == 'postgres':
+  jdbc_jar_name = default("/hostLevelParams/custom_postgres_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_postgres_jdbc_name", None)
+  audit_jdbc_url = format('jdbc:postgresql://{db_host}/{ranger_auditdb_name}') if stack_supports_ranger_audit_db else None
+  jdbc_dialect = "org.eclipse.persistence.platform.database.PostgreSQLPlatform"
+elif db_flavor.lower() == 'mssql':
+  jdbc_jar_name = default("/hostLevelParams/custom_mssql_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mssql_jdbc_name", None)
+  audit_jdbc_url = format('jdbc:sqlserver://{db_host};databaseName={ranger_auditdb_name}') if stack_supports_ranger_audit_db else None
+  jdbc_dialect = "org.eclipse.persistence.platform.database.SQLServerPlatform"
+elif db_flavor.lower() == 'sqla':
+  jdbc_jar_name = default("/hostLevelParams/custom_sqlanywhere_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_sqlanywhere_jdbc_name", None)
+  audit_jdbc_url = format('jdbc:sqlanywhere:database={ranger_auditdb_name};host={db_host}') if stack_supports_ranger_audit_db else None
+  jdbc_dialect = "org.eclipse.persistence.platform.database.SQLAnywherePlatform"
+
+downloaded_custom_connector = format("{tmp_dir}/{jdbc_jar_name}")
+
+driver_curl_source = format("{jdk_location}/{jdbc_jar_name}")
+driver_curl_target = format("{java_share_dir}/{jdbc_jar_name}")
+previous_jdbc_jar = format("{java_share_dir}/{previous_jdbc_jar_name}")
+if stack_supports_config_versioning:
+  driver_curl_target = format("{ranger_home}/ews/lib/{jdbc_jar_name}")
+  previous_jdbc_jar = format("{ranger_home}/ews/lib/{previous_jdbc_jar_name}")
+
+if db_flavor.lower() == 'sqla':
+  downloaded_custom_connector = format("{tmp_dir}/sqla-client-jdbc.tar.gz")
+  jar_path_in_archive = format("{tmp_dir}/sqla-client-jdbc/java/sajdbc4.jar")
+  libs_path_in_archive = format("{tmp_dir}/sqla-client-jdbc/native/lib64/*")
+  jdbc_libs_dir = format("{ranger_home}/native/lib64")
+  ld_lib_path = format("{jdbc_libs_dir}")
+
+#for db connection
+check_db_connection_jar_name = "DBConnectionVerification.jar"
+check_db_connection_jar = format("/usr/lib/ambari-agent/{check_db_connection_jar_name}")
+ranger_jdbc_connection_url = config["configurations"]["ranger-admin-site"]["ranger.jpa.jdbc.url"]
+ranger_jdbc_driver = config["configurations"]["ranger-admin-site"]["ranger.jpa.jdbc.driver"]
+
+ranger_credential_provider_path = config["configurations"]["ranger-admin-site"]["ranger.credential.provider.path"]
+ranger_jpa_jdbc_credential_alias = config["configurations"]["ranger-admin-site"]["ranger.jpa.jdbc.credential.alias"]
+ranger_ambari_db_password = unicode(config["configurations"]["admin-properties"]["db_password"])
+
+ranger_jpa_audit_jdbc_credential_alias = default('/configurations/ranger-admin-site/ranger.jpa.audit.jdbc.credential.alias', 'rangeraudit')
+ranger_ambari_audit_db_password = ''
+if not is_empty(config["configurations"]["admin-properties"]["audit_db_password"]) and stack_supports_ranger_audit_db:
+  ranger_ambari_audit_db_password = unicode(config["configurations"]["admin-properties"]["audit_db_password"])
+
+ugsync_jceks_path = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.credstore.filename"]
+ugsync_cred_lib = os.path.join(usersync_home,"lib","*")
+cred_lib_path = os.path.join(ranger_home,"cred","lib","*")
+cred_setup_prefix = (format('{ranger_home}/ranger_credential_helper.py'), '-l', cred_lib_path)
+ranger_audit_source_type = config["configurations"]["ranger-admin-site"]["ranger.audit.source.type"]
+
+ranger_usersync_keystore_password = unicode(config["configurations"]["ranger-ugsync-site"]["ranger.usersync.keystore.password"])
+ranger_usersync_ldap_ldapbindpassword = unicode(config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.ldapbindpassword"])
+ranger_usersync_truststore_password = unicode(config["configurations"]["ranger-ugsync-site"]["ranger.usersync.truststore.password"])
+ranger_usersync_keystore_file = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.keystore.file"]
+default_dn_name = 'cn=unixauthservice,ou=authenticator,o=mycompany,c=US'
+
+ranger_admin_hosts = config['clusterHostInfo']['ranger_admin_hosts']
+is_ranger_ha_enabled = True if len(ranger_admin_hosts) > 1 else False
+ranger_ug_ldap_url = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.url"]
+ranger_ug_ldap_bind_dn = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.binddn"]
+ranger_ug_ldap_user_searchfilter = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.user.searchfilter"]
+ranger_ug_ldap_group_searchbase = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.group.searchbase"]
+ranger_ug_ldap_group_searchfilter = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.group.searchfilter"]
+ug_sync_source = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.source.impl.class"]
+current_host = config['hostname']
+if current_host in ranger_admin_hosts:
+  ranger_host = current_host
+
+# ranger-tagsync
+ranger_tagsync_hosts = default("/clusterHostInfo/ranger_tagsync_hosts", [])
+has_ranger_tagsync = len(ranger_tagsync_hosts) > 0
+
+tagsync_log_dir = default("/configurations/ranger-tagsync-site/ranger.tagsync.logdir", "/var/log/ranger/tagsync")
+tagsync_jceks_path = config["configurations"]["ranger-tagsync-site"]["ranger.tagsync.keystore.filename"]
+atlas_tagsync_jceks_path = config["configurations"]["ranger-tagsync-site"]["ranger.tagsync.source.atlasrest.keystore.filename"]
+tagsync_application_properties = dict(config["configurations"]["tagsync-application-properties"]) if has_ranger_tagsync else None
+tagsync_pid_file = format('{ranger_pid_dir}/tagsync.pid')
+tagsync_cred_lib = os.path.join(ranger_tagsync_home, "lib", "*")
+
+ranger_usersync_log_maxfilesize = default('/configurations/usersync-log4j/ranger_usersync_log_maxfilesize',256)
+ranger_usersync_log_maxbackupindex = default('/configurations/usersync-log4j/ranger_usersync_log_maxbackupindex',20)
+ranger_tagsync_log_maxfilesize = default('/configurations/tagsync-log4j/ranger_tagsync_log_maxfilesize',256)
+ranger_tagsync_log_number_of_backup_files = default('/configurations/tagsync-log4j/ranger_tagsync_log_number_of_backup_files',20)
+ranger_xa_log_maxfilesize = default('/configurations/admin-log4j/ranger_xa_log_maxfilesize',256)
+ranger_xa_log_maxbackupindex = default('/configurations/admin-log4j/ranger_xa_log_maxbackupindex',20)
+
+# ranger log4j.properties
+admin_log4j = config['configurations']['admin-log4j']['content']
+usersync_log4j = config['configurations']['usersync-log4j']['content']
+tagsync_log4j = config['configurations']['tagsync-log4j']['content']
+
+# ranger kerberos
+security_enabled = config['configurations']['cluster-env']['security_enabled']
+namenode_hosts = default("/clusterHostInfo/namenode_host", [])
+has_namenode = len(namenode_hosts) > 0
+
+ugsync_policymgr_alias = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.policymgr.alias"]
+ugsync_policymgr_keystore = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.policymgr.keystore"]
+
+# ranger solr
+audit_solr_enabled = default('/configurations/ranger-env/xasecure.audit.destination.solr', False)
+ranger_solr_config_set = config['configurations']['ranger-env']['ranger_solr_config_set']
+ranger_solr_collection_name = config['configurations']['ranger-env']['ranger_solr_collection_name']
+ranger_solr_shards = config['configurations']['ranger-env']['ranger_solr_shards']
+replication_factor = config['configurations']['ranger-env']['ranger_solr_replication_factor']
+ranger_solr_conf = format('{ranger_home}/contrib/solr_for_audit_setup/conf')
+infra_solr_hosts = default("/clusterHostInfo/infra_solr_hosts", [])
+has_infra_solr = len(infra_solr_hosts) > 0
+is_solrCloud_enabled = default('/configurations/ranger-env/is_solrCloud_enabled', False)
+is_external_solrCloud_enabled = default('/configurations/ranger-env/is_external_solrCloud_enabled', False)
+solr_znode = '/ranger_audits'
+if stack_supports_infra_client and is_solrCloud_enabled:
+  solr_znode = default('/configurations/ranger-admin-site/ranger.audit.solr.zookeepers', 'NONE')
+  if solr_znode != '' and solr_znode.upper() != 'NONE':
+    solr_znode = solr_znode.split('/')
+    if len(solr_znode) > 1 and len(solr_znode) == 2:
+      solr_znode = solr_znode[1]
+      solr_znode = format('/{solr_znode}')
+  if has_infra_solr and not is_external_solrCloud_enabled:
+    solr_znode = config['configurations']['infra-solr-env']['infra_solr_znode']
+solr_user = unix_user
+if has_infra_solr and not is_external_solrCloud_enabled:
+  solr_user = default('/configurations/infra-solr-env/infra_solr_user', unix_user)
+  infra_solr_role_ranger_admin = default('configurations/infra-solr-security-json/infra_solr_role_ranger_admin', 'ranger_user')
+  infra_solr_role_ranger_audit = default('configurations/infra-solr-security-json/infra_solr_role_ranger_audit', 'ranger_audit_user')
+  infra_solr_role_dev = default('configurations/infra-solr-security-json/infra_solr_role_dev', 'dev')
+custom_log4j = has_infra_solr and not is_external_solrCloud_enabled
+
+ranger_audit_max_retention_days = config['configurations']['ranger-solr-configuration']['ranger_audit_max_retention_days']
+ranger_audit_logs_merge_factor = config['configurations']['ranger-solr-configuration']['ranger_audit_logs_merge_factor']
+ranger_solr_config_content = config['configurations']['ranger-solr-configuration']['content']
+
+# get comma separated list of zookeeper hosts
+zookeeper_port = default('/configurations/zoo.cfg/clientPort', None)
+zookeeper_hosts = default("/clusterHostInfo/zookeeper_hosts", [])
+index = 0
+zookeeper_quorum = ""
+for host in zookeeper_hosts:
+  zookeeper_quorum += host + ":" + str(zookeeper_port)
+  index += 1
+  if index < len(zookeeper_hosts):
+    zookeeper_quorum += ","
+
+# solr kerberised
+solr_jaas_file = None
+is_external_solrCloud_kerberos = default('/configurations/ranger-env/is_external_solrCloud_kerberos', False)
+
+if security_enabled:
+  if has_ranger_tagsync:
+    ranger_tagsync_principal = config['configurations']['ranger-tagsync-site']['ranger.tagsync.kerberos.principal']
+    if not is_empty(ranger_tagsync_principal) and ranger_tagsync_principal != '':
+      tagsync_jaas_principal = ranger_tagsync_principal.replace('_HOST', current_host.lower())
+    tagsync_keytab_path = config['configurations']['ranger-tagsync-site']['ranger.tagsync.kerberos.keytab']
+
+  if stack_supports_ranger_kerberos:
+    ranger_admin_keytab = config['configurations']['ranger-admin-site']['ranger.admin.kerberos.keytab']
+    ranger_admin_principal = config['configurations']['ranger-admin-site']['ranger.admin.kerberos.principal']
+    if not is_empty(ranger_admin_principal) and ranger_admin_principal != '':
+      ranger_admin_jaas_principal = ranger_admin_principal.replace('_HOST', ranger_host.lower())
+      if stack_supports_infra_client and is_solrCloud_enabled and is_external_solrCloud_enabled and is_external_solrCloud_kerberos:
+        solr_jaas_file = format('{ranger_home}/conf/ranger_solr_jaas.conf')
+        solr_kerberos_principal = ranger_admin_jaas_principal
+        solr_kerberos_keytab = ranger_admin_keytab
+      if stack_supports_infra_client and is_solrCloud_enabled and not is_external_solrCloud_enabled and not is_external_solrCloud_kerberos:
+        solr_jaas_file = format('{ranger_home}/conf/ranger_solr_jaas.conf')
+        solr_kerberos_principal = ranger_admin_jaas_principal
+        solr_kerberos_keytab = ranger_admin_keytab
+
+# logic to create core-site.xml if hdfs not installed
+if stack_supports_ranger_kerberos and not has_namenode:
+  core_site_property = {
+    'hadoop.security.authentication': 'kerberos' if security_enabled else 'simple'
+  }
+
+  if security_enabled:
+    realm = 'EXAMPLE.COM'
+    ranger_admin_bare_principal = 'rangeradmin'
+    ranger_usersync_bare_principal = 'rangerusersync'
+    ranger_tagsync_bare_principal = 'rangertagsync'
+
+    ranger_usersync_principal = config['configurations']['ranger-ugsync-site']['ranger.usersync.kerberos.principal']
+    if not is_empty(ranger_admin_principal) and ranger_admin_principal != '':
+      ranger_admin_bare_principal = get_bare_principal(ranger_admin_principal)
+    if not is_empty(ranger_usersync_principal) and ranger_usersync_principal != '':
+      ranger_usersync_bare_principal = get_bare_principal(ranger_usersync_principal)
+    realm = config['configurations']['kerberos-env']['realm']
+
+    rule_dict = [
+      {'principal': ranger_admin_bare_principal, 'user': unix_user},
+      {'principal': ranger_usersync_bare_principal, 'user': 'rangerusersync'},
+    ]
+
+    if has_ranger_tagsync:
+      if not is_empty(ranger_tagsync_principal) and ranger_tagsync_principal != '':
+        ranger_tagsync_bare_principal = get_bare_principal(ranger_tagsync_principal)
+      rule_dict.append({'principal': ranger_tagsync_bare_principal, 'user': 'rangertagsync'})
+
+    core_site_auth_to_local_property = ''
+    for item in range(len(rule_dict)):
+      rule_line = 'RULE:[2:$1@$0]({0}@{1})s/.*/{2}/\n'.format(rule_dict[item]['principal'], realm, rule_dict[item]['user'])
+      core_site_auth_to_local_property = rule_line + core_site_auth_to_local_property
+
+    core_site_auth_to_local_property = core_site_auth_to_local_property + 'DEFAULT'
+    core_site_property['hadoop.security.auth_to_local'] = core_site_auth_to_local_property
+
+upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
+
+# ranger service pid
+user_group = config['configurations']['cluster-env']['user_group']
+ranger_admin_pid_file = format('{ranger_pid_dir}/rangeradmin.pid')
+ranger_usersync_pid_file = format('{ranger_pid_dir}/usersync.pid')
+
+# admin credential
+admin_username = config['configurations']['ranger-env']['admin_username']
+admin_password = config['configurations']['ranger-env']['admin_password']
+default_admin_password = 'admin'
+
+ranger_is_solr_kerberised = "false"
+if audit_solr_enabled and is_solrCloud_enabled:
+  # Check internal solrCloud
+  if security_enabled and not is_external_solrCloud_enabled:
+    ranger_is_solr_kerberised = "true"
+  # Check external solrCloud
+  if is_external_solrCloud_enabled and is_external_solrCloud_kerberos:
+    ranger_is_solr_kerberised = "true"
+
+hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
+is_hbase_ha_enabled = True if len(hbase_master_hosts) > 1 else False
+is_namenode_ha_enabled = True if len(namenode_hosts) > 1 else False
+ranger_hbase_plugin_enabled = False
+ranger_hdfs_plugin_enabled = False
+
+
+if is_hbase_ha_enabled:
+  if not is_empty(config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled']):
+    ranger_hbase_plugin_enabled = config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled'].lower() == 'yes'
+if is_namenode_ha_enabled:
+  if not is_empty(config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled']):
+    ranger_hdfs_plugin_enabled = config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled'].lower() == 'yes'
+
+ranger_admin_password_properties = ['ranger.jpa.jdbc.password', 'ranger.jpa.audit.jdbc.password', 'ranger.ldap.bind.password', 'ranger.ldap.ad.bind.password']
+ranger_usersync_password_properties = ['ranger.usersync.ldap.ldapbindpassword']
+ranger_tagsync_password_properties = ['xasecure.policymgr.clientssl.keystore.password', 'xasecure.policymgr.clientssl.truststore.password']
+if stack_supports_secure_ssl_password:
+  ranger_admin_password_properties.extend(['ranger.service.https.attrib.keystore.pass', 'ranger.truststore.password'])
+  ranger_usersync_password_properties.extend(['ranger.usersync.keystore.password', 'ranger.usersync.truststore.password'])
+
+ranger_auth_method = config['configurations']['ranger-admin-site']['ranger.authentication.method']
+ranger_ldap_password_alias = default('/configurations/ranger-admin-site/ranger.ldap.binddn.credential.alias', 'ranger.ldap.bind.password')
+ranger_ad_password_alias = default('/configurations/ranger-admin-site/ranger.ldap.ad.binddn.credential.alias', 'ranger.ldap.ad.bind.password')
+ranger_https_keystore_alias = default('/configurations/ranger-admin-site/ranger.service.https.attrib.keystore.credential.alias', 'keyStoreCredentialAlias')
+ranger_truststore_alias = default('/configurations/ranger-admin-site/ranger.truststore.alias', 'trustStoreAlias')
+https_enabled = config['configurations']['ranger-admin-site']['ranger.service.https.attrib.ssl.enabled']
+http_enabled = config['configurations']['ranger-admin-site']['ranger.service.http.enabled']
+https_keystore_password = config['configurations']['ranger-admin-site']['ranger.service.https.attrib.keystore.pass']
+truststore_password = config['configurations']['ranger-admin-site']['ranger.truststore.password']
+
+# need this to capture cluster name for ranger tagsync
+cluster_name = config['clusterName']
+ranger_ldap_bind_auth_password = config['configurations']['ranger-admin-site']['ranger.ldap.bind.password']
+ranger_ad_bind_auth_password = config['configurations']['ranger-admin-site']['ranger.ldap.ad.bind.password']
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_admin.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_admin.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_admin.py
new file mode 100644
index 0000000..bdf7661
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_admin.py
@@ -0,0 +1,210 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+from resource_management.core.exceptions import Fail
+from resource_management.libraries.functions.check_process_status import check_process_status
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions.constants import Direction
+from resource_management.libraries.script import Script
+from resource_management.core.resources.system import Execute, File
+from resource_management.core.exceptions import ComponentIsNotRunning
+from resource_management.libraries.functions.format import format
+from resource_management.core.logger import Logger
+from resource_management.core import shell
+from ranger_service import ranger_service
+from setup_ranger_xml import setup_ranger_audit_solr, setup_ranger_admin_passwd_change
+from resource_management.libraries.functions import solr_cloud_util
+from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING
+from resource_management.libraries.functions.constants import Direction
+from setup_ranger_xml import ranger
+import upgrade
+import os, errno
+
+class RangerAdmin(Script):
+
+  def get_component_name(self):
+    return "ranger-admin"
+
+  def install(self, env):
+    self.install_packages(env)
+    import params
+    env.set_params(params)
+    # call config and setup db only in case of stack version < 2.6
+    if not params.stack_supports_ranger_setup_db_on_start:
+      self.configure(env, setup_db=True)
+
+  def stop(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    if upgrade_type == UPGRADE_TYPE_NON_ROLLING and params.upgrade_direction == Direction.UPGRADE:
+      if params.stack_supports_rolling_upgrade and not params.stack_supports_config_versioning and os.path.isfile(format('{ranger_home}/ews/stop-ranger-admin.sh')):
+        File(format('{ranger_home}/ews/stop-ranger-admin.sh'),
+          owner=params.unix_user,
+          group = params.unix_group
+        )
+
+    Execute(format('{params.ranger_stop}'), environment={'JAVA_HOME': params.java_home}, user=params.unix_user)
+    if params.stack_supports_pid:
+      File(params.ranger_admin_pid_file,
+        action = "delete"
+      )
+
+  def pre_upgrade_restart(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    upgrade.prestart(env, "ranger-admin")
+
+    self.set_ru_rangeradmin_in_progress(params.upgrade_marker_file)
+
+  def post_upgrade_restart(self,env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    if os.path.isfile(params.upgrade_marker_file):
+      os.remove(params.upgrade_marker_file)
+
+  def start(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    # setup db only if in case stack version is > 2.6
+    self.configure(env, upgrade_type=upgrade_type, setup_db=params.stack_supports_ranger_setup_db_on_start)
+
+    if params.stack_supports_infra_client and params.audit_solr_enabled and params.is_solrCloud_enabled:
+      solr_cloud_util.setup_solr_client(params.config, custom_log4j = params.custom_log4j)
+      setup_ranger_audit_solr()
+
+    ranger_service('ranger_admin')
+
+  def status(self, env):
+    import status_params
+
+    env.set_params(status_params)
+
+    if status_params.stack_supports_pid:
+      check_process_status(status_params.ranger_admin_pid_file)
+      return
+
+    cmd = 'ps -ef | grep proc_rangeradmin | grep -v grep'
+    code, output = shell.call(cmd, timeout=20)
+
+    if code != 0:
+      if self.is_ru_rangeradmin_in_progress(status_params.upgrade_marker_file):
+        Logger.info('Ranger admin process not running - skipping as stack upgrade is in progress')
+      else:
+        Logger.debug('Ranger admin process not running')
+        raise ComponentIsNotRunning()
+    pass
+
+  def configure(self, env, upgrade_type=None, setup_db=False):
+    import params
+    env.set_params(params)
+
+    # set up db if we are not upgrading and setup_db is true
+    if setup_db and upgrade_type is None:
+      from setup_ranger_xml import setup_ranger_db
+      setup_ranger_db()
+
+    ranger('ranger_admin', upgrade_type=upgrade_type)
+
+    # set up java patches if we are not upgrading and setup_db is true
+    if setup_db and upgrade_type is None:
+      from setup_ranger_xml import setup_java_patch
+      setup_java_patch()
+
+      if params.stack_supports_ranger_admin_password_change:
+        setup_ranger_admin_passwd_change()
+
+  def set_ru_rangeradmin_in_progress(self, upgrade_marker_file):
+    config_dir = os.path.dirname(upgrade_marker_file)
+    try:
+      msg = "Starting Upgrade"
+      if (not os.path.exists(config_dir)):
+        os.makedirs(config_dir)
+      ofp = open(upgrade_marker_file, 'w')
+      ofp.write(msg)
+      ofp.close()
+    except OSError as exc:
+      if exc.errno == errno.EEXIST and os.path.isdir(config_dir):
+        pass
+      else:
+        raise
+
+  def is_ru_rangeradmin_in_progress(self, upgrade_marker_file):
+    return os.path.isfile(upgrade_marker_file)
+
+  def setup_ranger_database(self, env):
+    import params
+    env.set_params(params)
+
+    upgrade_stack = stack_select._get_upgrade_stack()
+    if upgrade_stack is None:
+      raise Fail('Unable to determine the stack and stack version')
+
+    stack_version = upgrade_stack[1]
+
+    if params.upgrade_direction == Direction.UPGRADE:
+      Logger.info(format('Setting Ranger database schema, using version {stack_version}'))
+
+      from setup_ranger_xml import setup_ranger_db
+      setup_ranger_db(stack_version=stack_version)
+
+  def setup_ranger_java_patches(self, env):
+    import params
+    env.set_params(params)
+
+    upgrade_stack = stack_select._get_upgrade_stack()
+    if upgrade_stack is None:
+      raise Fail('Unable to determine the stack and stack version')
+
+    stack_version = upgrade_stack[1]
+
+    if params.upgrade_direction == Direction.UPGRADE:
+      Logger.info(format('Applying Ranger java patches, using version {stack_version}'))
+
+      from setup_ranger_xml import setup_java_patch
+      setup_java_patch(stack_version=stack_version)
+
+  def set_pre_start(self, env):
+    import params
+    env.set_params(params)
+
+    upgrade_stack = stack_select._get_upgrade_stack()
+    if upgrade_stack is None:
+      raise Fail('Unable to determine the stack and stack version')
+
+    stack_name = upgrade_stack[0]
+    stack_version = upgrade_stack[1]
+
+    stack_select.select("ranger-admin", stack_version)
+    conf_select.select(stack_name, "ranger-admin", stack_version)
+
+  def get_log_folder(self):
+    import params
+    return params.admin_log_dir
+
+  def get_user(self):
+    import params
+    return params.unix_user
+
+if __name__ == "__main__":
+  RangerAdmin().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_service.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_service.py
new file mode 100644
index 0000000..a0ecfac
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_service.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.show_logs import show_logs
+from resource_management.core.resources.system import Execute
+
+def ranger_service(name, action=None):
+  import params
+
+  env_dict = {'JAVA_HOME': params.java_home}
+  if params.db_flavor.lower() == 'sqla':
+    env_dict = {'JAVA_HOME': params.java_home, 'LD_LIBRARY_PATH': params.ld_lib_path}
+
+  if name == 'ranger_admin':
+    no_op_test = format('ps -ef | grep proc_rangeradmin | grep -v grep')
+    try:
+      Execute(params.ranger_start, environment=env_dict, user=params.unix_user, not_if=no_op_test)
+    except:
+      show_logs(params.admin_log_dir, params.unix_user)
+      raise
+  elif name == 'ranger_usersync':
+    no_op_test = format('ps -ef | grep proc_rangerusersync | grep -v grep')
+    if params.stack_supports_usersync_non_root:
+      try:
+        Execute(params.usersync_start,
+                environment=env_dict,
+                not_if=no_op_test,
+                user=params.unix_user
+        )
+      except:
+        show_logs(params.usersync_log_dir, params.unix_user)
+        raise
+    else:
+      # Usersync requires to be run as root for 2.2
+      Execute((params.usersync_start,),
+              environment={'JAVA_HOME': params.java_home},
+              not_if=no_op_test,
+              sudo=True
+      )
+  elif name == 'ranger_tagsync' and params.stack_supports_ranger_tagsync:
+    no_op_test = format('ps -ef | grep proc_rangertagsync | grep -v grep')
+    cmd = format('{tagsync_services_file} start')
+    try:
+      Execute(cmd,
+        environment=env_dict,
+        user=params.unix_user,
+        not_if=no_op_test
+      )
+    except:
+      show_logs(params.tagsync_log_dir, params.unix_user)
+      raise
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_tagsync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_tagsync.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_tagsync.py
new file mode 100644
index 0000000..c1e32ba
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_tagsync.py
@@ -0,0 +1,139 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+from resource_management.libraries.script import Script
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions import stack_select
+from resource_management.core.resources.system import Execute, File
+from resource_management.libraries.functions.check_process_status import check_process_status
+from resource_management.core.exceptions import ComponentIsNotRunning
+from resource_management.libraries.functions.format import format
+from resource_management.core.logger import Logger
+from resource_management.core import shell
+from ranger_service import ranger_service
+from setup_ranger_xml import ranger, ranger_credential_helper
+from resource_management.core.exceptions import Fail
+import upgrade
+
+class RangerTagsync(Script):
+
+  def install(self, env):
+    self.install_packages(env)
+    import params
+    env.set_params(params)
+
+    ranger_credential_helper(params.tagsync_cred_lib, 'tagadmin.user.password', 'rangertagsync', params.tagsync_jceks_path)
+    File(params.tagsync_jceks_path,
+       owner = params.unix_user,
+       group = params.unix_group,
+       mode = 0640
+    )
+    if params.stack_supports_ranger_tagsync_ssl_xml_support:
+      Logger.info("Stack support Atlas user for Tagsync, creating keystore for same.")
+      self.create_atlas_user_keystore(env)
+    else:
+      Logger.info("Stack does not support Atlas user for Tagsync, skipping keystore creation for same.")
+
+    self.configure(env)
+
+  def configure(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+    ranger('ranger_tagsync', upgrade_type=upgrade_type)
+
+  def start(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    self.configure(env, upgrade_type=upgrade_type)
+    ranger_service('ranger_tagsync')
+
+  def stop(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    Execute(format('{tagsync_services_file} stop'), environment={'JAVA_HOME': params.java_home}, user=params.unix_user)
+    File(params.tagsync_pid_file,
+      action = "delete"
+    )
+
+  def status(self, env):
+    import status_params
+    env.set_params(status_params)
+
+    check_process_status(status_params.tagsync_pid_file)
+
+  def pre_upgrade_restart(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    if params.stack_supports_ranger_tagsync:
+      Logger.info("Executing Ranger Tagsync Stack Upgrade pre-restart")
+      conf_select.select(params.stack_name, "ranger-tagsync", params.version)
+      stack_select.select("ranger-tagsync", params.version)
+
+  def get_component_name(self):
+    return "ranger-tagsync"
+
+  def get_log_folder(self):
+    import params
+    return params.tagsync_log_dir
+
+  def get_user(self):
+    import params
+    return params.unix_user
+
+  def get_pid_files(self):
+    import status_params
+    return [status_params.tagsync_pid_file]
+
+  def configure_atlas_user_for_tagsync(self, env):
+    Logger.info("Configuring Atlas user for Tagsync service.")
+    import params
+    env.set_params(params)
+
+    upgrade_stack = stack_select._get_upgrade_stack()
+    if upgrade_stack is None:
+      raise Fail('Unable to determine the stack and stack version')
+
+    stack_name = upgrade_stack[0]
+    stack_version = upgrade_stack[1]
+
+    stack_select.select("ranger-tagsync", stack_version)
+    conf_select.select(stack_name, "ranger-tagsync", stack_version)
+    if params.stack_supports_ranger_tagsync_ssl_xml_support:
+      Logger.info("Upgrading Tagsync, stack support Atlas user for Tagsync, creating keystore for same.")
+      self.create_atlas_user_keystore(env)
+    else:
+      Logger.info("Upgrading Tagsync, stack does not support Atlas user for Tagsync, skipping keystore creation for same.")
+
+    Logger.info("Configuring Atlas user for Tagsync service done.")
+
+  def create_atlas_user_keystore(self,env):
+    import params
+    env.set_params(params)
+    ranger_credential_helper(params.tagsync_cred_lib, 'atlas.user.password', 'admin', params.atlas_tagsync_jceks_path)
+    File(params.atlas_tagsync_jceks_path,
+         owner = params.unix_user,
+         group = params.unix_group,
+         mode = 0640
+    )
+
+if __name__ == "__main__":
+  RangerTagsync().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_usersync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_usersync.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_usersync.py
new file mode 100644
index 0000000..ca84528
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/ranger_usersync.py
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+from resource_management.libraries.functions.check_process_status import check_process_status
+from resource_management.libraries.script import Script
+from resource_management.core.resources.system import Execute, File
+from resource_management.core.exceptions import ComponentIsNotRunning
+from resource_management.libraries.functions.format import format
+from resource_management.core.logger import Logger
+from resource_management.core import shell
+from ranger_service import ranger_service
+from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING
+from resource_management.libraries.functions.constants import Direction
+from setup_ranger_xml import ranger
+import upgrade
+import os
+
+class RangerUsersync(Script):
+
+  def install(self, env):
+    self.install_packages(env)
+    import params
+    env.set_params(params)
+
+    if params.stack_supports_usersync_passwd:
+      from setup_ranger_xml import ranger_credential_helper
+      ranger_credential_helper(params.ugsync_cred_lib, params.ugsync_policymgr_alias, 'rangerusersync', params.ugsync_policymgr_keystore)
+
+      File(params.ugsync_policymgr_keystore,
+        owner = params.unix_user,
+        group = params.unix_group,
+        mode = 0640
+      )
+
+    self.configure(env)
+
+  def configure(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    ranger('ranger_usersync', upgrade_type=upgrade_type)
+
+  def start(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    self.configure(env, upgrade_type=upgrade_type)
+    ranger_service('ranger_usersync')
+
+  def stop(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    if upgrade_type == UPGRADE_TYPE_NON_ROLLING and params.upgrade_direction == Direction.UPGRADE:
+      if params.stack_supports_usersync_non_root and os.path.isfile(params.usersync_services_file):
+        File(params.usersync_services_file,
+          mode = 0755
+        )
+        Execute(('ln','-sf', format('{usersync_services_file}'),'/usr/bin/ranger-usersync'),
+          not_if=format("ls /usr/bin/ranger-usersync"),
+          only_if=format("ls {usersync_services_file}"),
+          sudo=True
+        )
+
+    Execute((params.usersync_stop,), environment={'JAVA_HOME': params.java_home}, sudo=True)
+    if params.stack_supports_pid:
+      File(params.ranger_usersync_pid_file,
+        action = "delete"
+      )
+
+  def status(self, env):
+    import status_params
+    env.set_params(status_params)
+
+    if status_params.stack_supports_pid:
+      check_process_status(status_params.ranger_usersync_pid_file)
+      return
+
+    cmd = 'ps -ef | grep proc_rangerusersync | grep -v grep'
+    code, output = shell.call(cmd, timeout=20)
+
+    if code != 0:
+      Logger.debug('Ranger usersync process not running')
+      raise ComponentIsNotRunning()
+    pass
+
+  def pre_upgrade_restart(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+    upgrade.prestart(env, "ranger-usersync")
+
+  def get_component_name(self):
+    return "ranger-usersync"
+
+  def get_log_folder(self):
+    import params
+    return params.usersync_log_dir
+
+  def get_user(self):
+    import params
+    return params.unix_user
+
+if __name__ == "__main__":
+  RangerUsersync().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/service_check.py
new file mode 100644
index 0000000..fb6af95
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/service_check.py
@@ -0,0 +1,49 @@
+"""
+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.
+
+"""
+
+from resource_management.libraries.script import Script
+from resource_management.core.resources.system import Execute
+from resource_management.core.exceptions import ComponentIsNotRunning
+from resource_management.libraries.functions.format import format
+from resource_management.core.logger import Logger
+import os
+
+
+class RangerServiceCheck(Script):
+
+  def service_check(self, env):
+    import params
+
+    env.set_params(params)
+    self.check_ranger_admin_service(params.ranger_external_url, params.upgrade_marker_file)
+
+  def check_ranger_admin_service(self, ranger_external_url, upgrade_marker_file):
+    if (self.is_ru_rangeradmin_in_progress(upgrade_marker_file)):
+      Logger.info('Ranger admin process not running - skipping as stack upgrade is in progress')
+    else:
+      Execute(format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {ranger_external_url}/login.jsp | grep 200"),
+        tries = 10,
+        try_sleep=3,
+        logoutput=True)
+
+  def is_ru_rangeradmin_in_progress(self, upgrade_marker_file):
+    return os.path.isfile(upgrade_marker_file)
+
+if __name__ == "__main__":
+  RangerServiceCheck().execute()


[38/52] [abbrv] ambari git commit: AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-secured.json b/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-secured.json
index f959b1f..7f1e549 100644
--- a/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-secured.json
+++ b/ambari-server/src/test/python/stacks/2.5/configs/ranger-admin-secured.json
@@ -1,159 +1,159 @@
 {
     "localComponents": [
-        "SECONDARY_NAMENODE", 
-        "HDFS_CLIENT", 
-        "DATANODE", 
-        "NAMENODE", 
-        "RANGER_ADMIN", 
-        "RANGER_TAGSYNC", 
-        "RANGER_USERSYNC", 
-        "ZOOKEEPER_SERVER", 
-        "ZOOKEEPER_CLIENT", 
+        "SECONDARY_NAMENODE",
+        "HDFS_CLIENT",
+        "DATANODE",
+        "NAMENODE",
+        "RANGER_ADMIN",
+        "RANGER_TAGSYNC",
+        "RANGER_USERSYNC",
+        "ZOOKEEPER_SERVER",
+        "ZOOKEEPER_CLIENT",
         "KERBEROS_CLIENT",
         "LOGSEARCH_SOLR",
         "LOGSEARCH_SOLR_CLIENT"
-    ], 
+    ],
     "configuration_attributes": {
-        "ranger-hdfs-audit": {}, 
-        "ssl-client": {}, 
-        "ranger-admin-site": {}, 
-        "ranger-hdfs-policymgr-ssl": {}, 
-        "tagsync-application-properties": {}, 
-        "ranger-env": {}, 
-        "usersync-log4j": {}, 
-        "ranger-hdfs-plugin-properties": {}, 
-        "kerberos-env": {}, 
-        "admin-properties": {}, 
-        "ranger-ugsync-site": {}, 
+        "ranger-hdfs-audit": {},
+        "ssl-client": {},
+        "ranger-admin-site": {},
+        "ranger-hdfs-policymgr-ssl": {},
+        "tagsync-application-properties": {},
+        "ranger-env": {},
+        "usersync-log4j": {},
+        "ranger-hdfs-plugin-properties": {},
+        "kerberos-env": {},
+        "admin-properties": {},
+        "ranger-ugsync-site": {},
         "hdfs-site": {
             "final": {
-                "dfs.datanode.data.dir": "true", 
-                "dfs.namenode.http-address": "true", 
-                "dfs.datanode.failed.volumes.tolerated": "true", 
-                "dfs.support.append": "true", 
-                "dfs.namenode.name.dir": "true", 
+                "dfs.datanode.data.dir": "true",
+                "dfs.namenode.http-address": "true",
+                "dfs.datanode.failed.volumes.tolerated": "true",
+                "dfs.support.append": "true",
+                "dfs.namenode.name.dir": "true",
                 "dfs.webhdfs.enabled": "true"
             }
-        }, 
-        "ranger-tagsync-site": {}, 
-        "zoo.cfg": {}, 
-        "hadoop-policy": {}, 
-        "hdfs-log4j": {}, 
-        "krb5-conf": {}, 
+        },
+        "ranger-tagsync-site": {},
+        "zoo.cfg": {},
+        "hadoop-policy": {},
+        "hdfs-log4j": {},
+        "krb5-conf": {},
         "core-site": {
             "final": {
                 "fs.defaultFS": "true"
             }
-        }, 
-        "hadoop-env": {}, 
-        "zookeeper-log4j": {}, 
-        "ssl-server": {}, 
-        "ranger-site": {}, 
-        "admin-log4j": {}, 
-        "tagsync-log4j": {}, 
-        "ranger-hdfs-security": {}, 
-        "usersync-properties": {}, 
+        },
+        "hadoop-env": {},
+        "zookeeper-log4j": {},
+        "ssl-server": {},
+        "ranger-site": {},
+        "admin-log4j": {},
+        "tagsync-log4j": {},
+        "ranger-hdfs-security": {},
+        "usersync-properties": {},
         "zookeeper-env": {},
         "infra-solr-env": {},
         "infra-solr-client-log4j": {},
         "cluster-env": {}
-    }, 
-    "public_hostname": "c6401.ambari.apache.org", 
-    "commandId": "41-2", 
-    "hostname": "c6401.ambari.apache.org", 
-    "kerberosCommandParams": [], 
-    "serviceName": "RANGER", 
-    "role": "RANGER_ADMIN", 
-    "forceRefreshConfigTagsBeforeExecution": [], 
-    "requestId": 41, 
+    },
+    "public_hostname": "c6401.ambari.apache.org",
+    "commandId": "41-2",
+    "hostname": "c6401.ambari.apache.org",
+    "kerberosCommandParams": [],
+    "serviceName": "RANGER",
+    "role": "RANGER_ADMIN",
+    "forceRefreshConfigTagsBeforeExecution": [],
+    "requestId": 41,
     "agentConfigParams": {
         "agent": {
             "parallel_execution": 0
         }
-    }, 
-    "clusterName": "test_Cluster01", 
-    "commandType": "EXECUTION_COMMAND", 
-    "taskId": 186, 
-    "roleParams": {}, 
+    },
+    "clusterName": "test_Cluster01",
+    "commandType": "EXECUTION_COMMAND",
+    "taskId": 186,
+    "roleParams": {},
     "configurationTags": {
         "ranger-hdfs-audit": {
             "tag": "version1466705299922"
-        }, 
+        },
         "ssl-client": {
             "tag": "version1"
-        }, 
+        },
         "ranger-admin-site": {
             "tag": "version1467016680635"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
             "tag": "version1466705299922"
-        }, 
+        },
         "tagsync-application-properties": {
             "tag": "version1467016680511"
-        }, 
+        },
         "ranger-env": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-ugsync-site": {
             "tag": "version1467016680537"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
             "tag": "version1466705299922"
-        }, 
+        },
         "kerberos-env": {
             "tag": "version1467016537243"
-        }, 
+        },
         "admin-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "hdfs-site": {
             "tag": "version1467016680401"
-        }, 
+        },
         "ranger-tagsync-site": {
             "tag": "version1467016680586"
-        }, 
+        },
         "zoo.cfg": {
             "tag": "version1"
-        }, 
+        },
         "hadoop-policy": {
             "tag": "version1"
-        }, 
+        },
         "hdfs-log4j": {
             "tag": "version1"
-        }, 
+        },
         "usersync-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "krb5-conf": {
             "tag": "version1467016537243"
-        }, 
+        },
         "core-site": {
             "tag": "version1467016680612"
-        }, 
+        },
         "hadoop-env": {
             "tag": "version1467016680446"
-        }, 
+        },
         "zookeeper-log4j": {
             "tag": "version1"
-        }, 
+        },
         "ssl-server": {
             "tag": "version1"
-        }, 
+        },
         "ranger-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "admin-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "tagsync-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-hdfs-security": {
             "tag": "version1466705299922"
-        }, 
+        },
         "usersync-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "zookeeper-env": {
             "tag": "version1467016680492"
         },
@@ -166,550 +166,550 @@
         "cluster-env": {
             "tag": "version1467016680567"
         }
-    }, 
-    "roleCommand": "START", 
+    },
+    "roleCommand": "START",
     "hostLevelParams": {
-        "agent_stack_retry_on_unavailability": "false", 
-        "stack_name": "HDP", 
-        "package_version": "2_5_0_0_*", 
+        "agent_stack_retry_on_unavailability": "false",
+        "stack_name": "HDP",
+        "package_version": "2_5_0_0_*",
         "custom_mysql_jdbc_name": "mysql-connector-java.jar",
         "previous_custom_mysql_jdbc_name": "mysql-connector-java-old.jar",
-        "host_sys_prepped": "false", 
-        "ambari_db_rca_username": "mapred", 
-        "current_version": "2.5.0.0-801", 
-        "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar", 
-        "agent_stack_retry_count": "5", 
-        "stack_version": "2.5", 
-        "jdk_name": "jdk-8u60-linux-x64.tar.gz", 
-        "ambari_db_rca_driver": "org.postgresql.Driver", 
+        "host_sys_prepped": "false",
+        "ambari_db_rca_username": "mapred",
+        "current_version": "2.5.0.0-801",
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar",
+        "agent_stack_retry_count": "5",
+        "stack_version": "2.5",
+        "jdk_name": "jdk-8u60-linux-x64.tar.gz",
+        "ambari_db_rca_driver": "org.postgresql.Driver",
         "java_home": "/usr/jdk64/jdk1.7.0_45",
-        "repository_version_id": "1", 
-        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
-        "not_managed_hdfs_path_list": "[\"/tmp\"]", 
-        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
-        "java_version": "8", 
-        "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.5\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]", 
-        "package_list": "[{\"name\":\"ranger_${stack_version}-admin\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-usersync\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-tagsync\",\"condition\":\"should_install_ranger_tagsync\",\"skipUpgrade\":false},{\"name\":\"ambari-logsearch-solr-client\",\"condition\":\"should_install_logsearch_solr_client\",\"skipUpgrade\":false}]", 
-        "db_name": "ambari", 
-        "group_list": "[\"ranger\",\"hadoop\",\"users\"]", 
-        "agentCacheDir": "/var/lib/ambari-agent/cache", 
-        "ambari_db_rca_password": "mapred", 
-        "jce_name": "jce_policy-8.zip", 
-        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar", 
-        "db_driver_filename": "mysql-connector-java.jar", 
-        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]", 
+        "repository_version_id": "1",
+        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/",
+        "not_managed_hdfs_path_list": "[\"/tmp\"]",
+        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+        "java_version": "8",
+        "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.5\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]",
+        "package_list": "[{\"name\":\"ranger_${stack_version}-admin\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-usersync\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-tagsync\",\"condition\":\"should_install_ranger_tagsync\",\"skipUpgrade\":false},{\"name\":\"ambari-logsearch-solr-client\",\"condition\":\"should_install_logsearch_solr_client\",\"skipUpgrade\":false}]",
+        "db_name": "ambari",
+        "group_list": "[\"ranger\",\"hadoop\",\"users\"]",
+        "agentCacheDir": "/var/lib/ambari-agent/cache",
+        "ambari_db_rca_password": "mapred",
+        "jce_name": "jce_policy-8.zip",
+        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar",
+        "db_driver_filename": "mysql-connector-java.jar",
+        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]",
         "clientsToUpdateConfigs": "[\"*\"]"
-    }, 
+    },
     "commandParams": {
-        "service_package_folder": "common-services/RANGER/0.4.0/package", 
-        "script": "scripts/ranger_admin.py", 
-        "hooks_folder": "HDP/2.0.6/hooks", 
-        "version": "2.5.0.0-801", 
-        "max_duration_for_retries": "0", 
-        "command_retry_enabled": "false", 
-        "command_timeout": "600", 
+        "service_package_folder": "common-services/RANGER/0.4.0/package",
+        "script": "scripts/ranger_admin.py",
+        "hooks_folder": "HDP/2.0.6/hooks",
+        "version": "2.5.0.0-801",
+        "max_duration_for_retries": "0",
+        "command_retry_enabled": "false",
+        "command_timeout": "600",
         "script_type": "PYTHON"
-    }, 
-    "forceRefreshConfigTags": [], 
-    "stageId": 2, 
+    },
+    "forceRefreshConfigTags": [],
+    "stageId": 2,
     "clusterHostInfo": {
         "snamenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_use_ssl": [
             "false"
-        ], 
+        ],
         "all_ping_ports": [
             "8670"
-        ], 
+        ],
         "ranger_tagsync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ranger_usersync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "slave_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "namenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_port": [
             "8080"
-        ], 
+        ],
         "ranger_admin_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_racks": [
             "/default-rack"
-        ], 
+        ],
         "all_ipv4_ips": [
             "172.22.83.73"
-        ], 
+        ],
         "ambari_server_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "zookeeper_hosts": [
             "c6401.ambari.apache.org"
         ],
         "infra_solr_hosts": [
             "c6401.ambari.apache.org"
         ]
-    }, 
+    },
     "configurations": {
         "ranger-hdfs-audit": {
-            "xasecure.audit.destination.solr.zookeepers": "NONE", 
-            "xasecure.audit.destination.solr.urls": "", 
-            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool", 
+            "xasecure.audit.destination.solr.zookeepers": "NONE",
+            "xasecure.audit.destination.solr.urls": "",
+            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool",
             "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/hdfs/spool",
-            "xasecure.audit.destination.hdfs": "true", 
+            "xasecure.audit.destination.hdfs": "true",
             "xasecure.audit.destination.solr": "false",
-            "xasecure.audit.provider.summary.enabled": "false", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
+            "xasecure.audit.provider.summary.enabled": "false",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
             "xasecure.audit.is.enabled": "true"
-        }, 
+        },
         "ssl-client": {
-            "ssl.client.truststore.reload.interval": "10000", 
-            "ssl.client.keystore.password": "bigdata", 
-            "ssl.client.truststore.type": "jks", 
-            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks", 
-            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks", 
-            "ssl.client.truststore.password": "bigdata", 
+            "ssl.client.truststore.reload.interval": "10000",
+            "ssl.client.keystore.password": "bigdata",
+            "ssl.client.truststore.type": "jks",
+            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks",
+            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks",
+            "ssl.client.truststore.password": "bigdata",
             "ssl.client.keystore.type": "jks"
-        }, 
+        },
         "ranger-admin-site": {
             "ranger.is.solr.kerberised": "true",
-            "ranger.admin.kerberos.cookie.domain": "{{ranger_host}}", 
-            "ranger.kms.service.user.hdfs": "hdfs", 
-            "ranger.spnego.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.plugins.hive.serviceuser": "hive", 
-            "ranger.lookup.kerberos.keytab": "/etc/security/keytabs/rangerlookup.service.keytab", 
-            "ranger.plugins.kms.serviceuser": "kms", 
-            "ranger.service.https.attrib.ssl.enabled": "false", 
-            "ranger.sso.browser.useragent": "Mozilla,chrome", 
-            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01", 
-            "ranger.plugins.hbase.serviceuser": "hbase", 
-            "ranger.plugins.hdfs.serviceuser": "hdfs", 
-            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}", 
-            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net", 
-            "ranger.plugins.knox.serviceuser": "knox", 
-            "ranger.ldap.base.dn": "dc=example,dc=com", 
-            "ranger.sso.publicKey": "", 
-            "ranger.admin.kerberos.cookie.path": "/", 
-            "ranger.service.https.attrib.clientAuth": "want", 
-            "ranger.jpa.jdbc.user": "{{ranger_db_user}}", 
-            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})", 
-            "ranger.ldap.group.roleattribute": "cn", 
-            "ranger.plugins.kafka.serviceuser": "kafka", 
-            "ranger.admin.kerberos.principal": "rangeradmin/_HOST@EXAMPLE.COM", 
-            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
+            "ranger.admin.kerberos.cookie.domain": "{{ranger_host}}",
+            "ranger.kms.service.user.hdfs": "hdfs",
+            "ranger.spnego.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}",
+            "ranger.plugins.hive.serviceuser": "hive",
+            "ranger.lookup.kerberos.keytab": "/etc/security/keytabs/rangerlookup.service.keytab",
+            "ranger.plugins.kms.serviceuser": "kms",
+            "ranger.service.https.attrib.ssl.enabled": "false",
+            "ranger.sso.browser.useragent": "Mozilla,chrome",
+            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01",
+            "ranger.plugins.hbase.serviceuser": "hbase",
+            "ranger.plugins.hdfs.serviceuser": "hdfs",
+            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}",
+            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net",
+            "ranger.plugins.knox.serviceuser": "knox",
+            "ranger.ldap.base.dn": "dc=example,dc=com",
+            "ranger.sso.publicKey": "",
+            "ranger.admin.kerberos.cookie.path": "/",
+            "ranger.service.https.attrib.clientAuth": "want",
+            "ranger.jpa.jdbc.user": "{{ranger_db_user}}",
+            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})",
+            "ranger.ldap.group.roleattribute": "cn",
+            "ranger.plugins.kafka.serviceuser": "kafka",
+            "ranger.admin.kerberos.principal": "rangeradmin/_HOST@EXAMPLE.COM",
+            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
             "ranger.credential.provider.path": "/etc/ranger/admin/rangeradmin.jceks",
-            "ranger.ldap.referral": "ignore", 
-            "ranger.service.http.port": "6080", 
-            "ranger.ldap.user.searchfilter": "(uid={0})", 
-            "ranger.plugins.atlas.serviceuser": "atlas", 
-            "ranger.truststore.password": "changeit", 
-            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.password": "NONE", 
-            "ranger.audit.solr.zookeepers": "c6401.ambari.apache.org:2181/ambari-solr", 
+            "ranger.ldap.referral": "ignore",
+            "ranger.service.http.port": "6080",
+            "ranger.ldap.user.searchfilter": "(uid={0})",
+            "ranger.plugins.atlas.serviceuser": "atlas",
+            "ranger.truststore.password": "changeit",
+            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.password": "NONE",
+            "ranger.audit.solr.zookeepers": "c6401.ambari.apache.org:2181/ambari-solr",
             "ranger.lookup.kerberos.principal": "rangerlookup/_HOST@EXAMPLE.COM",
-            "ranger.service.https.port": "6182", 
-            "ranger.plugins.storm.serviceuser": "storm", 
-            "ranger.externalurl": "{{ranger_external_url}}", 
-            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.kms.service.user.hive": "", 
-            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}", 
-            "ranger.service.host": "{{ranger_host}}", 
-            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin", 
-            "ranger.service.https.attrib.keystore.pass": "xasecure", 
-            "ranger.unixauth.remote.login.enabled": "true", 
+            "ranger.service.https.port": "6182",
+            "ranger.plugins.storm.serviceuser": "storm",
+            "ranger.externalurl": "{{ranger_external_url}}",
+            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.kms.service.user.hive": "",
+            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}",
+            "ranger.service.host": "{{ranger_host}}",
+            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin",
+            "ranger.service.https.attrib.keystore.pass": "xasecure",
+            "ranger.unixauth.remote.login.enabled": "true",
             "ranger.jpa.jdbc.credential.alias": "rangeradmin",
-            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.username": "ranger_solr", 
-            "ranger.sso.enabled": "false", 
-            "ranger.audit.solr.urls": "", 
-            "ranger.ldap.ad.domain": "", 
-            "ranger.plugins.yarn.serviceuser": "yarn", 
-            "ranger.audit.source.type": "solr", 
-            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
-            "ranger.ldap.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.authentication.method": "UNIX", 
-            "ranger.service.http.enabled": "true", 
-            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}", 
-            "ranger.ldap.ad.referral": "ignore", 
-            "ranger.ldap.ad.base.dn": "dc=example,dc=com", 
-            "ranger.jpa.jdbc.password": "_", 
-            "ranger.spnego.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab", 
-            "ranger.sso.providerurl": "", 
-            "ranger.unixauth.service.hostname": "{{ugsync_host}}", 
-            "ranger.admin.kerberos.keytab": "/etc/security/keytabs/rangeradmin.service.keytab", 
-            "ranger.admin.kerberos.token.valid.seconds": "30", 
-            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver", 
+            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.username": "ranger_solr",
+            "ranger.sso.enabled": "false",
+            "ranger.audit.solr.urls": "",
+            "ranger.ldap.ad.domain": "",
+            "ranger.plugins.yarn.serviceuser": "yarn",
+            "ranger.audit.source.type": "solr",
+            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
+            "ranger.ldap.url": "{{ranger_ug_ldap_url}}",
+            "ranger.authentication.method": "UNIX",
+            "ranger.service.http.enabled": "true",
+            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}",
+            "ranger.ldap.ad.referral": "ignore",
+            "ranger.ldap.ad.base.dn": "dc=example,dc=com",
+            "ranger.jpa.jdbc.password": "_",
+            "ranger.spnego.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab",
+            "ranger.sso.providerurl": "",
+            "ranger.unixauth.service.hostname": "{{ugsync_host}}",
+            "ranger.admin.kerberos.keytab": "/etc/security/keytabs/rangeradmin.service.keytab",
+            "ranger.admin.kerberos.token.valid.seconds": "30",
+            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver",
             "ranger.unixauth.service.port": "5151"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
-            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks", 
-            "xasecure.policymgr.clientssl.truststore.password": "changeit", 
-            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}", 
-            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks", 
-            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}", 
+            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks",
+            "xasecure.policymgr.clientssl.truststore.password": "changeit",
+            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}",
+            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks",
+            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}",
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
-        }, 
+        },
         "tagsync-application-properties": {
-            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181", 
-            "atlas.kafka.security.protocol": "SASL_PLAINTEXT", 
-            "atlas.jaas.KafkaClient.option.principal": "{{tagsync_jaas_principal}}", 
-            "atlas.jaas.KafkaClient.option.keyTab": "{{tagsync_keytab_path}}", 
-            "atlas.kafka.entities.group.id": "ranger_entities_consumer", 
-            "atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule", 
-            "atlas.jaas.KafkaClient.option.serviceName": "kafka", 
-            "atlas.kafka.bootstrap.servers": "localhost:6667", 
-            "atlas.jaas.KafkaClient.option.useKeyTab": "true", 
-            "atlas.jaas.KafkaClient.option.storeKey": "true", 
-            "atlas.jaas.KafkaClient.loginModuleControlFlag": "required", 
+            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181",
+            "atlas.kafka.security.protocol": "SASL_PLAINTEXT",
+            "atlas.jaas.KafkaClient.option.principal": "{{tagsync_jaas_principal}}",
+            "atlas.jaas.KafkaClient.option.keyTab": "{{tagsync_keytab_path}}",
+            "atlas.kafka.entities.group.id": "ranger_entities_consumer",
+            "atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
+            "atlas.jaas.KafkaClient.option.serviceName": "kafka",
+            "atlas.kafka.bootstrap.servers": "localhost:6667",
+            "atlas.jaas.KafkaClient.option.useKeyTab": "true",
+            "atlas.jaas.KafkaClient.option.storeKey": "true",
+            "atlas.jaas.KafkaClient.loginModuleControlFlag": "required",
             "atlas.kafka.sasl.kerberos.service.name": "kafka"
-        }, 
+        },
         "ranger-env": {
-            "ranger_solr_shards": "1", 
-            "ranger_solr_config_set": "ranger_audits", 
-            "ranger_user": "ranger", 
+            "ranger_solr_shards": "1",
+            "ranger_solr_config_set": "ranger_audits",
+            "ranger_user": "ranger",
             "ranger_solr_replication_factor": "1",
-            "xml_configurations_supported": "true", 
-            "ranger-atlas-plugin-enabled": "No", 
-            "ranger-hbase-plugin-enabled": "No", 
-            "ranger-yarn-plugin-enabled": "No", 
-            "bind_anonymous": "false", 
-            "ranger_admin_username": "amb_ranger_admin", 
-            "admin_password": "admin", 
-            "is_solrCloud_enabled": "true", 
-            "ranger-storm-plugin-enabled": "No", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "ranger_group": "ranger", 
-            "ranger-knox-plugin-enabled": "No", 
-            "ranger_admin_log_dir": "/var/log/ranger/admin", 
-            "ranger-kafka-plugin-enabled": "No", 
-            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306", 
-            "ranger-hive-plugin-enabled": "No", 
-            "xasecure.audit.destination.solr": "true", 
-            "ranger_pid_dir": "/var/run/ranger", 
-            "xasecure.audit.destination.hdfs": "true", 
-            "admin_username": "admin", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
-            "create_db_dbuser": "true", 
-            "ranger_solr_collection_name": "ranger_audits", 
-            "ranger_admin_password": "P1!q9xa96SMi5NCl", 
+            "xml_configurations_supported": "true",
+            "ranger-atlas-plugin-enabled": "No",
+            "ranger-hbase-plugin-enabled": "No",
+            "ranger-yarn-plugin-enabled": "No",
+            "bind_anonymous": "false",
+            "ranger_admin_username": "amb_ranger_admin",
+            "admin_password": "admin",
+            "is_solrCloud_enabled": "true",
+            "ranger-storm-plugin-enabled": "No",
+            "ranger-hdfs-plugin-enabled": "No",
+            "ranger_group": "ranger",
+            "ranger-knox-plugin-enabled": "No",
+            "ranger_admin_log_dir": "/var/log/ranger/admin",
+            "ranger-kafka-plugin-enabled": "No",
+            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306",
+            "ranger-hive-plugin-enabled": "No",
+            "xasecure.audit.destination.solr": "true",
+            "ranger_pid_dir": "/var/run/ranger",
+            "xasecure.audit.destination.hdfs": "true",
+            "admin_username": "admin",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
+            "create_db_dbuser": "true",
+            "ranger_solr_collection_name": "ranger_audits",
+            "ranger_admin_password": "P1!q9xa96SMi5NCl",
             "ranger_usersync_log_dir": "/var/log/ranger/usersync"
-        }, 
+        },
         "usersync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/usersync.
 log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
-            "hadoop.rpc.protection": "authentication", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "REPOSITORY_CONFIG_USERNAME": "hadoop", 
-            "policy_user": "ambari-qa", 
-            "common.name.for.certificate": "", 
+            "hadoop.rpc.protection": "authentication",
+            "ranger-hdfs-plugin-enabled": "No",
+            "REPOSITORY_CONFIG_USERNAME": "hadoop",
+            "policy_user": "ambari-qa",
+            "common.name.for.certificate": "",
             "REPOSITORY_CONFIG_PASSWORD": "hadoop"
-        }, 
+        },
         "kerberos-env": {
-            "kdc_hosts": "c6401.ambari.apache.org", 
-            "manage_auth_to_local": "true", 
-            "install_packages": "true", 
-            "realm": "EXAMPLE.COM", 
-            "encryption_types": "aes des3-cbc-sha1 rc4 des-cbc-md5", 
-            "ad_create_attributes_template": "\n{\n  \"objectClass\": [\"top\", \"person\", \"organizationalPerson\", \"user\"],\n  \"cn\": \"$principal_name\",\n  #if( $is_service )\n  \"servicePrincipalName\": \"$principal_name\",\n  #end\n  \"userPrincipalName\": \"$normalized_principal\",\n  \"unicodePwd\": \"$password\",\n  \"accountExpires\": \"0\",\n  \"userAccountControl\": \"66048\"\n}", 
-            "kdc_create_attributes": "", 
-            "admin_server_host": "c6401.ambari.apache.org", 
-            "group": "ambari-managed-principals", 
-            "password_length": "20", 
-            "ldap_url": "", 
-            "manage_identities": "true", 
-            "password_min_lowercase_letters": "1", 
-            "create_ambari_principal": "true", 
-            "service_check_principal_name": "${cluster_name|toLower()}-${short_date}", 
-            "executable_search_paths": "/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin", 
-            "password_chat_timeout": "5", 
-            "kdc_type": "mit-kdc", 
-            "set_password_expiry": "false", 
-            "password_min_punctuation": "1", 
-            "container_dn": "", 
-            "case_insensitive_username_rules": "false", 
-            "password_min_whitespace": "0", 
-            "password_min_uppercase_letters": "1", 
+            "kdc_hosts": "c6401.ambari.apache.org",
+            "manage_auth_to_local": "true",
+            "install_packages": "true",
+            "realm": "EXAMPLE.COM",
+            "encryption_types": "aes des3-cbc-sha1 rc4 des-cbc-md5",
+            "ad_create_attributes_template": "\n{\n  \"objectClass\": [\"top\", \"person\", \"organizationalPerson\", \"user\"],\n  \"cn\": \"$principal_name\",\n  #if( $is_service )\n  \"servicePrincipalName\": \"$principal_name\",\n  #end\n  \"userPrincipalName\": \"$normalized_principal\",\n  \"unicodePwd\": \"$password\",\n  \"accountExpires\": \"0\",\n  \"userAccountControl\": \"66048\"\n}",
+            "kdc_create_attributes": "",
+            "admin_server_host": "c6401.ambari.apache.org",
+            "group": "ambari-managed-principals",
+            "password_length": "20",
+            "ldap_url": "",
+            "manage_identities": "true",
+            "password_min_lowercase_letters": "1",
+            "create_ambari_principal": "true",
+            "service_check_principal_name": "${cluster_name|toLower()}-${short_date}",
+            "executable_search_paths": "/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin",
+            "password_chat_timeout": "5",
+            "kdc_type": "mit-kdc",
+            "set_password_expiry": "false",
+            "password_min_punctuation": "1",
+            "container_dn": "",
+            "case_insensitive_username_rules": "false",
+            "password_min_whitespace": "0",
+            "password_min_uppercase_letters": "1",
             "password_min_digits": "1"
-        }, 
+        },
         "admin-properties": {
-            "db_user": "rangeradmin01", 
-            "DB_FLAVOR": "MYSQL", 
-            "db_password": "rangeradmin01", 
-            "db_root_user": "root", 
-            "policymgr_external_url": "http://c6401.ambari.apache.org:6080", 
-            "db_name": "ranger01", 
-            "db_host": "c6401.ambari.apache.org", 
-            "db_root_password": "vagrant", 
+            "db_user": "rangeradmin01",
+            "DB_FLAVOR": "MYSQL",
+            "db_password": "rangeradmin01",
+            "db_root_user": "root",
+            "policymgr_external_url": "http://c6401.ambari.apache.org:6080",
+            "db_name": "ranger01",
+            "db_host": "c6401.ambari.apache.org",
+            "db_root_password": "vagrant",
             "SQL_CONNECTOR_JAR": "{{driver_curl_target}}"
-        }, 
+        },
         "ranger-ugsync-site": {
-            "ranger.usersync.ldap.binddn": "", 
-            "ranger.usersync.policymgr.username": "rangerusersync", 
-            "ranger.usersync.policymanager.mockrun": "false", 
-            "ranger.usersync.group.searchbase": "", 
-            "ranger.usersync.ldap.bindalias": "testldapalias", 
-            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks", 
-            "ranger.usersync.port": "5151", 
-            "ranger.usersync.pagedresultssize": "500", 
-            "ranger.usersync.group.memberattributename": "", 
-            "ranger.usersync.kerberos.principal": "rangerusersync/_HOST@EXAMPLE.COM", 
-            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder", 
-            "ranger.usersync.ldap.referral": "ignore", 
-            "ranger.usersync.group.searchfilter": "", 
-            "ranger.usersync.ldap.user.objectclass": "person", 
-            "ranger.usersync.logdir": "{{usersync_log_dir}}", 
-            "ranger.usersync.ldap.user.searchfilter": "", 
-            "ranger.usersync.ldap.groupname.caseconversion": "none", 
-            "ranger.usersync.ldap.ldapbindpassword": "", 
-            "ranger.usersync.unix.minUserId": "500", 
-            "ranger.usersync.policymanager.maxrecordsperapicall": "1000", 
-            "ranger.usersync.group.nameattribute": "", 
-            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password", 
-            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks", 
-            "ranger.usersync.user.searchenabled": "false", 
-            "ranger.usersync.group.usermapsyncenabled": "true", 
-            "ranger.usersync.ldap.bindkeystore": "", 
-            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof", 
-            "ranger.usersync.kerberos.keytab": "/etc/security/keytabs/rangerusersync.service.keytab", 
-            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe", 
-            "ranger.usersync.group.objectclass": "", 
-            "ranger.usersync.ldap.user.searchscope": "sub", 
-            "ranger.usersync.unix.password.file": "/etc/passwd", 
-            "ranger.usersync.ldap.user.nameattribute": "", 
-            "ranger.usersync.pagedresultsenabled": "true", 
-            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}", 
-            "ranger.usersync.group.search.first.enabled": "false", 
-            "ranger.usersync.group.searchenabled": "false", 
-            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder", 
-            "ranger.usersync.ssl": "true", 
-            "ranger.usersync.ldap.url": "", 
-            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org", 
-            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.ldap.user.searchbase": "", 
-            "ranger.usersync.ldap.username.caseconversion": "none", 
-            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.keystore.password": "UnIx529p", 
-            "ranger.usersync.unix.group.file": "/etc/group", 
-            "ranger.usersync.filesource.file": "/tmp/usergroup.txt", 
-            "ranger.usersync.group.searchscope": "", 
-            "ranger.usersync.truststore.password": "changeit", 
-            "ranger.usersync.enabled": "true", 
-            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000", 
+            "ranger.usersync.ldap.binddn": "",
+            "ranger.usersync.policymgr.username": "rangerusersync",
+            "ranger.usersync.policymanager.mockrun": "false",
+            "ranger.usersync.group.searchbase": "",
+            "ranger.usersync.ldap.bindalias": "testldapalias",
+            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks",
+            "ranger.usersync.port": "5151",
+            "ranger.usersync.pagedresultssize": "500",
+            "ranger.usersync.group.memberattributename": "",
+            "ranger.usersync.kerberos.principal": "rangerusersync/_HOST@EXAMPLE.COM",
+            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
+            "ranger.usersync.ldap.referral": "ignore",
+            "ranger.usersync.group.searchfilter": "",
+            "ranger.usersync.ldap.user.objectclass": "person",
+            "ranger.usersync.logdir": "{{usersync_log_dir}}",
+            "ranger.usersync.ldap.user.searchfilter": "",
+            "ranger.usersync.ldap.groupname.caseconversion": "none",
+            "ranger.usersync.ldap.ldapbindpassword": "",
+            "ranger.usersync.unix.minUserId": "500",
+            "ranger.usersync.policymanager.maxrecordsperapicall": "1000",
+            "ranger.usersync.group.nameattribute": "",
+            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password",
+            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks",
+            "ranger.usersync.user.searchenabled": "false",
+            "ranger.usersync.group.usermapsyncenabled": "true",
+            "ranger.usersync.ldap.bindkeystore": "",
+            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof",
+            "ranger.usersync.kerberos.keytab": "/etc/security/keytabs/rangerusersync.service.keytab",
+            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe",
+            "ranger.usersync.group.objectclass": "",
+            "ranger.usersync.ldap.user.searchscope": "sub",
+            "ranger.usersync.unix.password.file": "/etc/passwd",
+            "ranger.usersync.ldap.user.nameattribute": "",
+            "ranger.usersync.pagedresultsenabled": "true",
+            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}",
+            "ranger.usersync.group.search.first.enabled": "false",
+            "ranger.usersync.group.searchenabled": "false",
+            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder",
+            "ranger.usersync.ssl": "true",
+            "ranger.usersync.ldap.url": "",
+            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org",
+            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.ldap.user.searchbase": "",
+            "ranger.usersync.ldap.username.caseconversion": "none",
+            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.keystore.password": "UnIx529p",
+            "ranger.usersync.unix.group.file": "/etc/group",
+            "ranger.usersync.filesource.file": "/tmp/usergroup.txt",
+            "ranger.usersync.group.searchscope": "",
+            "ranger.usersync.truststore.password": "changeit",
+            "ranger.usersync.enabled": "true",
+            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000",
             "ranger.usersync.filesource.text.delimiter": ","
-        }, 
+        },
         "hdfs-site": {
-            "dfs.namenode.checkpoint.period": "21600", 
-            "dfs.namenode.avoid.write.stale.datanode": "true", 
-            "dfs.permissions.superusergroup": "hdfs", 
-            "dfs.namenode.startup.delay.block.deletion.sec": "3600", 
-            "dfs.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "dfs.datanode.kerberos.principal": "dn/_HOST@EXAMPLE.COM", 
-            "dfs.heartbeat.interval": "3", 
-            "dfs.content-summary.limit": "5000", 
-            "dfs.support.append": "true", 
-            "dfs.datanode.address": "0.0.0.0:1019", 
-            "dfs.cluster.administrators": " hdfs", 
-            "dfs.namenode.audit.log.async": "true", 
-            "dfs.datanode.balance.bandwidthPerSec": "6250000", 
-            "dfs.namenode.safemode.threshold-pct": "1", 
-            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}", 
-            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020", 
-            "dfs.permissions.enabled": "true", 
-            "dfs.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM", 
-            "dfs.client.read.shortcircuit": "true", 
-            "dfs.https.port": "50470", 
-            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470", 
-            "nfs.file.dump.dir": "/tmp/.hdfs-nfs", 
-            "dfs.blocksize": "134217728", 
-            "dfs.blockreport.initialDelay": "120", 
-            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode", 
-            "dfs.namenode.fslock.fair": "false", 
-            "dfs.datanode.max.transfer.threads": "4096", 
-            "dfs.secondary.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "dfs.replication": "3", 
-            "dfs.namenode.handler.count": "50", 
-            "dfs.web.authentication.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab", 
-            "fs.permissions.umask-mode": "022", 
-            "dfs.namenode.stale.datanode.interval": "30000", 
-            "dfs.datanode.ipc.address": "0.0.0.0:8010", 
-            "dfs.datanode.failed.volumes.tolerated": "0", 
-            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data", 
-            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070", 
-            "dfs.webhdfs.enabled": "true", 
-            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding", 
-            "dfs.namenode.accesstime.precision": "0", 
-            "dfs.namenode.write.stale.datanode.ratio": "1.0f", 
-            "dfs.datanode.https.address": "0.0.0.0:50475", 
-            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary", 
-            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090", 
-            "nfs.exports.allowed.hosts": "* rw", 
-            "dfs.namenode.checkpoint.txns": "1000000", 
-            "dfs.datanode.http.address": "0.0.0.0:1022", 
-            "dfs.datanode.du.reserved": "33011188224", 
-            "dfs.client.read.shortcircuit.streams.cache.size": "4096", 
-            "dfs.secondary.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab", 
-            "dfs.web.authentication.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "dfs.http.policy": "HTTP_ONLY", 
-            "dfs.block.access.token.enable": "true", 
-            "dfs.client.retry.policy.enabled": "false", 
-            "dfs.secondary.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM", 
-            "dfs.datanode.keytab.file": "/etc/security/keytabs/dn.service.keytab", 
-            "dfs.namenode.name.dir.restore": "true", 
-            "dfs.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab", 
-            "dfs.journalnode.https-address": "0.0.0.0:8481", 
-            "dfs.journalnode.http-address": "0.0.0.0:8480", 
-            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket", 
-            "dfs.namenode.avoid.read.stale.datanode": "true", 
-            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude", 
-            "dfs.datanode.data.dir.perm": "750", 
-            "dfs.encryption.key.provider.uri": "kms://http@c6401.ambari.apache.org:9292/kms", 
-            "dfs.replication.max": "50", 
+            "dfs.namenode.checkpoint.period": "21600",
+            "dfs.namenode.avoid.write.stale.datanode": "true",
+            "dfs.permissions.superusergroup": "hdfs",
+            "dfs.namenode.startup.delay.block.deletion.sec": "3600",
+            "dfs.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "dfs.datanode.kerberos.principal": "dn/_HOST@EXAMPLE.COM",
+            "dfs.heartbeat.interval": "3",
+            "dfs.content-summary.limit": "5000",
+            "dfs.support.append": "true",
+            "dfs.datanode.address": "0.0.0.0:1019",
+            "dfs.cluster.administrators": " hdfs",
+            "dfs.namenode.audit.log.async": "true",
+            "dfs.datanode.balance.bandwidthPerSec": "6250000",
+            "dfs.namenode.safemode.threshold-pct": "1",
+            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}",
+            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020",
+            "dfs.permissions.enabled": "true",
+            "dfs.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM",
+            "dfs.client.read.shortcircuit": "true",
+            "dfs.https.port": "50470",
+            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470",
+            "nfs.file.dump.dir": "/tmp/.hdfs-nfs",
+            "dfs.blocksize": "134217728",
+            "dfs.blockreport.initialDelay": "120",
+            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode",
+            "dfs.namenode.fslock.fair": "false",
+            "dfs.datanode.max.transfer.threads": "4096",
+            "dfs.secondary.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "dfs.replication": "3",
+            "dfs.namenode.handler.count": "50",
+            "dfs.web.authentication.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab",
+            "fs.permissions.umask-mode": "022",
+            "dfs.namenode.stale.datanode.interval": "30000",
+            "dfs.datanode.ipc.address": "0.0.0.0:8010",
+            "dfs.datanode.failed.volumes.tolerated": "0",
+            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data",
+            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070",
+            "dfs.webhdfs.enabled": "true",
+            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding",
+            "dfs.namenode.accesstime.precision": "0",
+            "dfs.namenode.write.stale.datanode.ratio": "1.0f",
+            "dfs.datanode.https.address": "0.0.0.0:50475",
+            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary",
+            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090",
+            "nfs.exports.allowed.hosts": "* rw",
+            "dfs.namenode.checkpoint.txns": "1000000",
+            "dfs.datanode.http.address": "0.0.0.0:1022",
+            "dfs.datanode.du.reserved": "33011188224",
+            "dfs.client.read.shortcircuit.streams.cache.size": "4096",
+            "dfs.secondary.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab",
+            "dfs.web.authentication.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "dfs.http.policy": "HTTP_ONLY",
+            "dfs.block.access.token.enable": "true",
+            "dfs.client.retry.policy.enabled": "false",
+            "dfs.secondary.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM",
+            "dfs.datanode.keytab.file": "/etc/security/keytabs/dn.service.keytab",
+            "dfs.namenode.name.dir.restore": "true",
+            "dfs.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab",
+            "dfs.journalnode.https-address": "0.0.0.0:8481",
+            "dfs.journalnode.http-address": "0.0.0.0:8480",
+            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket",
+            "dfs.namenode.avoid.read.stale.datanode": "true",
+            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude",
+            "dfs.datanode.data.dir.perm": "750",
+            "dfs.encryption.key.provider.uri": "kms://http@c6401.ambari.apache.org:9292/kms",
+            "dfs.replication.max": "50",
             "dfs.namenode.name.dir": "/grid/0/hadoop/hdfs/namenode"
-        }, 
+        },
         "ranger-tagsync-site": {
-            "ranger.tagsync.dest.ranger.ssl.config.filename": "/usr/hdp/current/ranger-tagsync/conf/mytruststore.jks", 
-            "ranger.tagsync.source.atlasrest.username": "", 
-            "ranger.tagsync.logdir": "/var/log/ranger/tagsync", 
-            "ranger.tagsync.source.atlasrest.download.interval.millis": "", 
-            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks", 
-            "ranger.tagsync.source.file.check.interval.millis": "", 
-            "ranger.tagsync.source.atlasrest.endpoint": "", 
-            "ranger.tagsync.dest.ranger.username": "rangertagsync", 
-            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}", 
-            "ranger.tagsync.kerberos.principal": "rangertagsync/_HOST@EXAMPLE.COM", 
-            "ranger.tagsync.kerberos.keytab": "/etc/security/keytabs/rangertagsync.service.keytab", 
-            "ranger.tagsync.source.atlas": "false", 
-            "ranger.tagsync.source.atlasrest": "false", 
-            "ranger.tagsync.source.file": "false", 
+            "ranger.tagsync.dest.ranger.ssl.config.filename": "/usr/hdp/current/ranger-tagsync/conf/mytruststore.jks",
+            "ranger.tagsync.source.atlasrest.username": "",
+            "ranger.tagsync.logdir": "/var/log/ranger/tagsync",
+            "ranger.tagsync.source.atlasrest.download.interval.millis": "",
+            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks",
+            "ranger.tagsync.source.file.check.interval.millis": "",
+            "ranger.tagsync.source.atlasrest.endpoint": "",
+            "ranger.tagsync.dest.ranger.username": "rangertagsync",
+            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}",
+            "ranger.tagsync.kerberos.principal": "rangertagsync/_HOST@EXAMPLE.COM",
+            "ranger.tagsync.kerberos.keytab": "/etc/security/keytabs/rangertagsync.service.keytab",
+            "ranger.tagsync.source.atlas": "false",
+            "ranger.tagsync.source.atlasrest": "false",
+            "ranger.tagsync.source.file": "false",
             "ranger.tagsync.source.file.filename": ""
-        }, 
+        },
         "zoo.cfg": {
-            "clientPort": "2181", 
-            "autopurge.purgeInterval": "24", 
-            "syncLimit": "5", 
-            "dataDir": "/grid/0/hadoop/zookeeper", 
-            "initLimit": "10", 
-            "tickTime": "2000", 
+            "clientPort": "2181",
+            "autopurge.purgeInterval": "24",
+            "syncLimit": "5",
+            "dataDir": "/grid/0/hadoop/zookeeper",
+            "initLimit": "10",
+            "tickTime": "2000",
             "autopurge.snapRetainCount": "30"
-        }, 
+        },
         "hadoop-policy": {
-            "security.job.client.protocol.acl": "*", 
-            "security.job.task.protocol.acl": "*", 
-            "security.datanode.protocol.acl": "*", 
-            "security.namenode.protocol.acl": "*", 
-            "security.client.datanode.protocol.acl": "*", 
-            "security.inter.tracker.protocol.acl": "*", 
-            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop", 
-            "security.client.protocol.acl": "*", 
-            "security.refresh.policy.protocol.acl": "hadoop", 
-            "security.admin.operations.protocol.acl": "hadoop", 
+            "security.job.client.protocol.acl": "*",
+            "security.job.task.protocol.acl": "*",
+            "security.datanode.protocol.acl": "*",
+            "security.namenode.protocol.acl": "*",
+            "security.client.datanode.protocol.acl": "*",
+            "security.inter.tracker.protocol.acl": "*",
+            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop",
+            "security.client.protocol.acl": "*",
+            "security.refresh.policy.protocol.acl": "hadoop",
+            "security.admin.operations.protocol.acl": "hadoop",
             "security.inter.datanode.protocol.acl": "*"
-        }, 
+        },
         "hdfs-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#  http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n\n# Define some default values that can be overridden by system properties\n# To change daemon root logger use hadoop_root_logger in hadoop-env\nhadoop.root.lo
 gger=INFO,console\nhadoop.log.dir=.\nhadoop.log.file=hadoop.log\n\n\n# Define the root logger to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\n\n# Logging Threshold\nlog4j.threshhold=ALL\n\n#\n# Daily Rolling File Appender\n#\n\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Rollver at midnight\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\n\n# 30-day backup\n#log4j.appender.DRFA.MaxBackupIndex=30\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\n\n# Pattern format: Date LogLevel LoggerName LogMessage\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n# Debugging Pattern format\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender
 .console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\n\n#\n# TaskLog Appender\n#\n\n#Default values\nhadoop.tasklog.taskid=null\nhadoop.tasklog.iscleanup=false\nhadoop.tasklog.noKeepSplits=4\nhadoop.tasklog.totalLogFileSize=100\nhadoop.tasklog.purgeLogSplits=true\nhadoop.tasklog.logsRetainHours=12\n\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\n\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n\n#\n#Security audit appender\n#\nhadoop.security.logger=INFO,console\nhadoop.security.log.maxfilesize=256MB\nhadoop.security.log.maxbackupindex=20\nlog4j.category.SecurityLogger=${hadoop.security.logg
 er}\nhadoop.security.log.file=SecurityAuth.audit\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\n\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\n\n#\n# hdfs audit logging\n#\nhdfs.audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=
 false\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# NameNode metrics logging.\n# The default is to retain two namenode-metrics.log files up to 64MB each.\n#\nnamenode.metrics.logger=INFO,NullAppender\nlog4j.logger.NameNodeMetricsLog=${namenode.metrics.logger}\nlog4j.additivity.NameNodeMetricsLog=false\nlog4j.appender.NNMETRICSRFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.NNMETRICSRFA.File=${hadoop.log.dir}/namenode-metrics.log\nlog4j.appender.NNMETRICSRFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.NNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n\nlog4j.appender.NNMETRICSRFA.MaxBackupIndex=1\nlog4j.appender.NNMETRICSRFA.MaxFileSize=64MB\n\n#\n# mapred audit logging\n#\nmapred
 .audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# Rolling File Appender\n#\n\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Logfile size and and 30-day backups\nlog4j.appender.RFA.MaxFileSize=256MB\nlog4j.appender.RFA.MaxBackupIndex=10\n\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n# Custom Logging leve
 ls\n\nhadoop.metrics.log.level=INFO\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\n\n# Jets3t library\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\n\n#\n# Null Appender\n# Trap security logger on the hadoop client side\n#\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\n\n#\n# Event Counter Appender\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\n#\nlog4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter\n\n# Removes \"deprecated\" messages\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\n\n#\n# HDFS block state change log from block manager\n#\n# Uncomment the following to suppress normal block state change\n# messages from BlockManager in NameNode.\n#log4j.logger.BlockStateCh
 ange=WARN"
-        }, 
+        },
         "krb5-conf": {
-            "domains": "", 
-            "manage_krb5_conf": "true", 
-            "content": "\n[libdefaults]\n  renew_lifetime = 7d\n  forwardable = true\n  default_realm = {{realm}}\n  ticket_lifetime = 24h\n  dns_lookup_realm = false\n  dns_lookup_kdc = false\n  default_ccache_name = /tmp/krb5cc_%{uid}\n  #default_tgs_enctypes = {{encryption_types}}\n  #default_tkt_enctypes = {{encryption_types}}\n{% if domains %}\n[domain_realm]\n{%- for domain in domains.split(',') %}\n  {{domain|trim()}} = {{realm}}\n{%- endfor %}\n{% endif %}\n[logging]\n  default = FILE:/var/log/krb5kdc.log\n  admin_server = FILE:/var/log/kadmind.log\n  kdc = FILE:/var/log/krb5kdc.log\n\n[realms]\n  {{realm}} = {\n{%- if kdc_hosts > 0 -%}\n{%- set kdc_host_list = kdc_hosts.split(',')  -%}\n{%- if kdc_host_list and kdc_host_list|length > 0 %}\n    admin_server = {{admin_server_host|default(kdc_host_list[0]|trim(), True)}}\n{%- if kdc_host_list -%}\n{% for kdc_host in kdc_host_list %}\n    kdc = {{kdc_host|trim()}}\n{%- endfor -%}\n{% endif %}\n{%- endif %}\n{%- endif %}\n  }\n\
 n{# Append additional realm declarations below #}", 
+            "domains": "",
+            "manage_krb5_conf": "true",
+            "content": "\n[libdefaults]\n  renew_lifetime = 7d\n  forwardable = true\n  default_realm = {{realm}}\n  ticket_lifetime = 24h\n  dns_lookup_realm = false\n  dns_lookup_kdc = false\n  default_ccache_name = /tmp/krb5cc_%{uid}\n  #default_tgs_enctypes = {{encryption_types}}\n  #default_tkt_enctypes = {{encryption_types}}\n{% if domains %}\n[domain_realm]\n{%- for domain in domains.split(',') %}\n  {{domain|trim()}} = {{realm}}\n{%- endfor %}\n{% endif %}\n[logging]\n  default = FILE:/var/log/krb5kdc.log\n  admin_server = FILE:/var/log/kadmind.log\n  kdc = FILE:/var/log/krb5kdc.log\n\n[realms]\n  {{realm}} = {\n{%- if kdc_hosts > 0 -%}\n{%- set kdc_host_list = kdc_hosts.split(',')  -%}\n{%- if kdc_host_list and kdc_host_list|length > 0 %}\n    admin_server = {{admin_server_host|default(kdc_host_list[0]|trim(), True)}}\n{%- if kdc_host_list -%}\n{% for kdc_host in kdc_host_list %}\n    kdc = {{kdc_host|trim()}}\n{%- endfor -%}\n{% endif %}\n{%- endif %}\n{%- endif %}\n  }\n\
 n{# Append additional realm declarations below #}",
             "conf_dir": "/etc"
-        }, 
+        },
         "core-site": {
-            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py", 
-            "hadoop.proxyuser.hdfs.groups": "*", 
-            "fs.trash.interval": "360", 
-            "ipc.server.tcpnodelay": "true", 
-            "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec", 
-            "ipc.client.idlethreshold": "8000", 
-            "io.file.buffer.size": "131072", 
-            "hadoop.proxyuser.ambari-server-test_cluster01.groups": "*", 
-            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
-            "hadoop.security.authentication": "kerberos", 
-            "mapreduce.jobtracker.webinterface.trusted": "false", 
-            "hadoop.proxyuser.hdfs.hosts": "*", 
-            "hadoop.proxyuser.HTTP.groups": "users", 
-            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020", 
-            "ha.failover-controller.active-standby-elector.zk.op.retries": "120", 
-            "hadoop.security.key.provider.path": "kms://http@c6401.ambari.apache.org:9292/kms", 
-            "hadoop.security.authorization": "true", 
-            "hadoop.http.authentication.simple.anonymous.allowed": "true", 
-            "ipc.client.connect.max.retries": "50", 
-            "hadoop.security.auth_to_local": "RULE:[1:$1@$0](ambari-qa-test_cluster01@EXAMPLE.COM)s/.*/ambari-qa/\nRULE:[1:$1@$0](hdfs-test_cluster01@EXAMPLE.COM)s/.*/hdfs/\nRULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nRULE:[2:$1@$0](dn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](nn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](rangeradmin@EXAMPLE.COM)s/.*/ranger/\nRULE:[2:$1@$0](rangertagsync@EXAMPLE.COM)s/.*/rangertagsync/\nRULE:[2:$1@$0](rangerusersync@EXAMPLE.COM)s/.*/rangerusersync/\nDEFAULT", 
-            "hadoop.proxyuser.ambari-server-test_cluster01.hosts": "c6401.ambari.apache.org", 
+            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py",
+            "hadoop.proxyuser.hdfs.groups": "*",
+            "fs.trash.interval": "360",
+            "ipc.server.tcpnodelay": "true",
+            "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec",
+            "ipc.client.idlethreshold": "8000",
+            "io.file.buffer.size": "131072",
+            "hadoop.proxyuser.ambari-server-test_cluster01.groups": "*",
+            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization",
+            "hadoop.security.authentication": "kerberos",
+            "mapreduce.jobtracker.webinterface.trusted": "false",
+            "hadoop.proxyuser.hdfs.hosts": "*",
+            "hadoop.proxyuser.HTTP.groups": "users",
+            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020",
+            "ha.failover-controller.active-standby-elector.zk.op.retries": "120",
+            "hadoop.security.key.provider.path": "kms://http@c6401.ambari.apache.org:9292/kms",
+            "hadoop.security.authorization": "true",
+            "hadoop.http.authentication.simple.anonymous.allowed": "true",
+            "ipc.client.connect.max.retries": "50",
+            "hadoop.security.auth_to_local": "RULE:[1:$1@$0](ambari-qa-test_cluster01@EXAMPLE.COM)s/.*/ambari-qa/\nRULE:[1:$1@$0](hdfs-test_cluster01@EXAMPLE.COM)s/.*/hdfs/\nRULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nRULE:[2:$1@$0](dn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](nn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](rangeradmin@EXAMPLE.COM)s/.*/ranger/\nRULE:[2:$1@$0](rangertagsync@EXAMPLE.COM)s/.*/rangertagsync/\nRULE:[2:$1@$0](rangerusersync@EXAMPLE.COM)s/.*/rangerusersync/\nDEFAULT",
+            "hadoop.proxyuser.ambari-server-test_cluster01.hosts": "c6401.ambari.apache.org",
             "ipc.client.connection.maxidletime": "30000"
-        }, 
+        },
         "hadoop-env": {
-            "keyserver_port": "", 
-            "proxyuser_group": "users", 
-            "hdfs_user_nproc_limit": "65536", 
-            "hdfs_log_dir_prefix": "/var/log/hadoop", 
-            "hdfs_user_nofile_limit": "128000", 
-            "hdfs_user": "hdfs", 
-            "hdfs_principal_name": "hdfs-test_cluster01@EXAMPLE.COM", 
-            "keyserver_host": " ", 
-            "namenode_opt_maxnewsize": "128m", 
-            "hdfs_user_keytab": "/etc/security/keytabs/hdfs.headless.keytab", 
-            "namenode_opt_maxpermsize": "256m", 
-            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}", 
-            "namenode_heapsize": "1024m", 
-            "namenode_opt_newsize": "128m", 
-            "nfsgateway_heapsize": "1024", 
-            "dtnode_heapsize": "1024m", 
-            "hadoop_root_logger": "INFO,RFA", 
-            "hadoop_heapsize": "1024", 
-            "hadoop_pid_dir_prefix": "/var/run/hadoop", 
-            "namenode_opt_permsize": "128m", 
+            "keyserver_port": "",
+            "proxyuser_group": "users",
+            "hdfs_user_nproc_limit": "65536",
+            "hdfs_log_dir_prefix": "/var/log/hadoop",
+            "hdfs_user_nofile_limit": "128000",
+            "hdfs_user": "hdfs",
+            "hdfs_principal_name": "hdfs-test_cluster01@EXAMPLE.COM",
+            "keyserver_host": " ",
+            "namenode_opt_maxnewsize": "128m",
+            "hdfs_user_keytab": "/etc/security/keytabs/hdfs.headless.keytab",
+            "namenode_opt_maxpermsize": "256m",
+            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}",
+            "namenode_heapsize": "1024m",
+            "namenode_opt_newsize": "128m",
+            "nfsgateway_heapsize": "1024",
+            "dtnode_heapsize": "1024m",
+            "hadoop_root_logger": "INFO,RFA",
+            "hadoop_heapsize": "1024",
+            "hadoop_pid_dir_prefix": "/var/run/hadoop",
+            "namenode_opt_permsize": "128m",
             "hdfs_tmp_dir": "/tmp"
-        }, 
+        },
         "zookeeper-log4j": {
             "content": "\n#\n#\n# Licensed to the Apache Softwa

<TRUNCATED>

[13/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/properties/ranger-solrconfig.xml.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/properties/ranger-solrconfig.xml.j2 b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/properties/ranger-solrconfig.xml.j2
deleted file mode 100644
index 25dbb7a..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/properties/ranger-solrconfig.xml.j2
+++ /dev/null
@@ -1,1874 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- 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.
--->
-
-<!--
-     For more details about configurations options that may appear in
-     this file, see http://wiki.apache.org/solr/SolrConfigXml.
--->
-<config>
-  <!-- In all configuration below, a prefix of "solr." for class names
-       is an alias that causes solr to search appropriate packages,
-       including org.apache.solr.(search|update|request|core|analysis)
-
-       You may also specify a fully qualified Java classname if you
-       have your own custom plugins.
-    -->
-
-  <!-- Controls what version of Lucene various components of Solr
-       adhere to.  Generally, you want to use the latest version to
-       get all bug fixes and improvements. It is highly recommended
-       that you fully re-index after changing this setting as it can
-       affect both how text is indexed and queried.
-  -->
-  <luceneMatchVersion>5.2.0</luceneMatchVersion>
-
-  <!-- <lib/> directives can be used to instruct Solr to load any Jars
-       identified and use them to resolve any "plugins" specified in
-       your solrconfig.xml or schema.xml (ie: Analyzers, Request
-       Handlers, etc...).
-
-       All directories and paths are resolved relative to the
-       instanceDir.
-
-       Please note that <lib/> directives are processed in the order
-       that they appear in your solrconfig.xml file, and are "stacked"
-       on top of each other when building a ClassLoader - so if you have
-       plugin jars with dependencies on other jars, the "lower level"
-       dependency jars should be loaded first.
-
-       If a "./lib" directory exists in your instanceDir, all files
-       found in it are included as if you had used the following
-       syntax...
-
-              <lib dir="./lib" />
-    -->
-
-  <!-- A 'dir' option by itself adds any files found in the directory
-       to the classpath, this is useful for including all jars in a
-       directory.
-
-       When a 'regex' is specified in addition to a 'dir', only the
-       files in that directory which completely match the regex
-       (anchored on both ends) will be included.
-
-       If a 'dir' option (with or without a regex) is used and nothing
-       is found that matches, a warning will be logged.
-
-       The examples below can be used to load some solr-contribs along
-       with their external dependencies.
-    -->
-  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar" />
-
-  <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
-  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
-
-  <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
-  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
-
-  <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
-  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
-
-  <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
-  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
-
-  <!-- an exact 'path' can be used instead of a 'dir' to specify a
-       specific jar file.  This will cause a serious error to be logged
-       if it can't be loaded.
-    -->
-  <!--
-     <lib path="../a-jar-that-does-not-exist.jar" />
-  -->
-
-  <!-- Data Directory
-
-       Used to specify an alternate directory to hold all index data
-       other than the default ./data under the Solr home.  If
-       replication is in use, this should match the replication
-       configuration.
-    -->
-  <dataDir>${solr.data.dir:}</dataDir>
-
-
-  <!-- The DirectoryFactory to use for indexes.
-
-       solr.StandardDirectoryFactory is filesystem
-       based and tries to pick the best implementation for the current
-       JVM and platform.  solr.NRTCachingDirectoryFactory, the default,
-       wraps solr.StandardDirectoryFactory and caches small files in memory
-       for better NRT performance.
-
-       One can force a particular implementation via solr.MMapDirectoryFactory,
-       solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
-
-       solr.RAMDirectoryFactory is memory based, not
-       persistent, and doesn't work with replication.
-    -->
-  <directoryFactory name="DirectoryFactory"
-                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
-
-
-    <!-- These will be used if you are using the solr.HdfsDirectoryFactory,
-         otherwise they will be ignored. If you don't plan on using hdfs,
-         you can safely remove this section. -->
-    <!-- The root directory that collection data should be written to. -->
-    <str name="solr.hdfs.home">${solr.hdfs.home:}</str>
-    <!-- The hadoop configuration files to use for the hdfs client. -->
-    <str name="solr.hdfs.confdir">${solr.hdfs.confdir:}</str>
-    <!-- Enable/Disable the hdfs cache. -->
-    <str name="solr.hdfs.blockcache.enabled">${solr.hdfs.blockcache.enabled:true}</str>
-    <!-- Enable/Disable using one global cache for all SolrCores.
-         The settings used will be from the first HdfsDirectoryFactory created. -->
-    <str name="solr.hdfs.blockcache.global">${solr.hdfs.blockcache.global:true}</str>
-
-  </directoryFactory>
-
-  <!-- The CodecFactory for defining the format of the inverted index.
-       The default implementation is SchemaCodecFactory, which is the official Lucene
-       index format, but hooks into the schema to provide per-field customization of
-       the postings lists and per-document values in the fieldType element
-       (postingsFormat/docValuesFormat). Note that most of the alternative implementations
-       are experimental, so if you choose to customize the index format, it's a good
-       idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
-       before upgrading to a newer version to avoid unnecessary reindexing.
-  -->
-  <codecFactory class="solr.SchemaCodecFactory"/>
-
-  <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>: -->
-
-       <schemaFactory class="ManagedIndexSchemaFactory">
-         <bool name="mutable">true</bool>
-         <str name="managedSchemaResourceName">managed-schema</str>
-       </schemaFactory>
-<!--
-       When ManagedIndexSchemaFactory is specified, Solr will load the schema from
-       the resource named in 'managedSchemaResourceName', rather than from schema.xml.
-       Note that the managed schema resource CANNOT be named schema.xml.  If the managed
-       schema does not exist, Solr will create it after reading schema.xml, then rename
-       'schema.xml' to 'schema.xml.bak'.
-
-       Do NOT hand edit the managed schema - external modifications will be ignored and
-       overwritten as a result of schema modification REST API calls.
-
-       When ManagedIndexSchemaFactory is specified with mutable = true, schema
-       modification REST API calls will be allowed; otherwise, error responses will be
-       sent back for these requests.
-
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-  -->
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-       Index Config - These settings control low-level behavior of indexing
-       Most example settings here show the default value, but are commented
-       out, to more easily see where customizations have been made.
-
-       Note: This replaces <indexDefaults> and <mainIndex> from older versions
-       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <indexConfig>
-    <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
-         LimitTokenCountFilterFactory in your fieldType definition. E.g.
-     <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
-    -->
-    <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
-    <!-- <writeLockTimeout>1000</writeLockTimeout>  -->
-
-    <!-- The maximum number of simultaneous threads that may be
-         indexing documents at once in IndexWriter; if more than this
-         many threads arrive they will wait for others to finish.
-         Default in Solr/Lucene is 8. -->
-    <!-- <maxIndexingThreads>8</maxIndexingThreads>  -->
-
-    <!-- Expert: Enabling compound file will use less files for the index,
-         using fewer file descriptors on the expense of performance decrease.
-         Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
-    <!-- <useCompoundFile>false</useCompoundFile> -->
-
-    <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
-         indexing for buffering added documents and deletions before they are
-         flushed to the Directory.
-         maxBufferedDocs sets a limit on the number of documents buffered
-         before flushing.
-         If both ramBufferSizeMB and maxBufferedDocs is set, then
-         Lucene will flush based on whichever limit is hit first.
-         The default is 100 MB.  -->
-    <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
-    <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
-
-    <!-- Expert: Merge Policy
-         The Merge Policy in Lucene controls how merging of segments is done.
-         The default since Solr/Lucene 3.3 is TieredMergePolicy.
-         The default since Lucene 2.3 was the LogByteSizeMergePolicy,
-         Even older versions of Lucene used LogDocMergePolicy.
-      -->
-    <!--
-        <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
-          <int name="maxMergeAtOnce">10</int>
-          <int name="segmentsPerTier">10</int>
-        </mergePolicy>
-      -->
-
-    <!-- Merge Factor
-         The merge factor controls how many segments will get merged at a time.
-         For TieredMergePolicy, mergeFactor is a convenience parameter which
-         will set both MaxMergeAtOnce and SegmentsPerTier at once.
-         For LogByteSizeMergePolicy, mergeFactor decides how many new segments
-         will be allowed before they are merged into one.
-         Default is 10 for both merge policies.
-      -->
-    <!--
-    <mergeFactor>10</mergeFactor>
-      -->
-
-    <!-- Ranger customization. Set to 5 to trigger purging of deleted documents more often -->
-    <mergeFactor>{{ranger_audit_logs_merge_factor}}</mergeFactor>
-
-    <!-- Expert: Merge Scheduler
-         The Merge Scheduler in Lucene controls how merges are
-         performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)
-         can perform merges in the background using separate threads.
-         The SerialMergeScheduler (Lucene 2.2 default) does not.
-     -->
-    <!--
-       <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
-       -->
-
-    <!-- LockFactory
-
-         This option specifies which Lucene LockFactory implementation
-         to use.
-
-         single = SingleInstanceLockFactory - suggested for a
-                  read-only index or when there is no possibility of
-                  another process trying to modify the index.
-         native = NativeFSLockFactory - uses OS native file locking.
-                  Do not use when multiple solr webapps in the same
-                  JVM are attempting to share a single index.
-         simple = SimpleFSLockFactory  - uses a plain file for locking
-
-         Defaults: 'native' is default for Solr3.6 and later, otherwise
-                   'simple' is the default
-
-         More details on the nuances of each LockFactory...
-         http://wiki.apache.org/lucene-java/AvailableLockFactories
-    -->
-    <lockType>${solr.lock.type:native}</lockType>
-
-    <!-- Unlock On Startup
-
-         If true, unlock any held write or commit locks on startup.
-         This defeats the locking mechanism that allows multiple
-         processes to safely access a lucene index, and should be used
-         with care. Default is "false".
-
-         This is not needed if lock type is 'single'
-     -->
-    <!--
-    <unlockOnStartup>false</unlockOnStartup>
-      -->
-
-    <!-- Commit Deletion Policy
-         Custom deletion policies can be specified here. The class must
-         implement org.apache.lucene.index.IndexDeletionPolicy.
-
-         The default Solr IndexDeletionPolicy implementation supports
-         deleting index commit points on number of commits, age of
-         commit point and optimized status.
-
-         The latest commit point should always be preserved regardless
-         of the criteria.
-    -->
-    <!--
-    <deletionPolicy class="solr.SolrDeletionPolicy">
-    -->
-      <!-- The number of commit points to be kept -->
-      <!-- <str name="maxCommitsToKeep">1</str> -->
-      <!-- The number of optimized commit points to be kept -->
-      <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
-      <!--
-          Delete all commit points once they have reached the given age.
-          Supports DateMathParser syntax e.g.
-        -->
-      <!--
-         <str name="maxCommitAge">30MINUTES</str>
-         <str name="maxCommitAge">1DAY</str>
-      -->
-    <!--
-    </deletionPolicy>
-    -->
-
-    <!-- Lucene Infostream
-
-         To aid in advanced debugging, Lucene provides an "InfoStream"
-         of detailed information when indexing.
-
-         Setting the value to true will instruct the underlying Lucene
-         IndexWriter to write its info stream to solr's log. By default,
-         this is enabled here, and controlled through log4j.properties.
-      -->
-     <infoStream>true</infoStream>
-  </indexConfig>
-
-
-  <!-- JMX
-
-       This example enables JMX if and only if an existing MBeanServer
-       is found, use this if you want to configure JMX through JVM
-       parameters. Remove this to disable exposing Solr configuration
-       and statistics to JMX.
-
-       For more details see http://wiki.apache.org/solr/SolrJmx
-    -->
-  <jmx />
-  <!-- If you want to connect to a particular server, specify the
-       agentId
-    -->
-  <!-- <jmx agentId="myAgent" /> -->
-  <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
-  <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
-    -->
-
-  <!-- The default high-performance update handler -->
-  <updateHandler class="solr.DirectUpdateHandler2">
-
-    <!-- Enables a transaction log, used for real-time get, durability, and
-         and solr cloud replica recovery.  The log can grow as big as
-         uncommitted changes to the index, so use of a hard autoCommit
-         is recommended (see below).
-         "dir" - the target directory for transaction logs, defaults to the
-                solr data directory.  -->
-    <updateLog>
-      <str name="dir">${solr.ulog.dir:}</str>
-    </updateLog>
-
-    <!-- AutoCommit
-
-         Perform a hard commit automatically under certain conditions.
-         Instead of enabling autoCommit, consider using "commitWithin"
-         when adding documents.
-
-         http://wiki.apache.org/solr/UpdateXmlMessages
-
-         maxDocs - Maximum number of documents to add since the last
-                   commit before automatically triggering a new commit.
-
-         maxTime - Maximum amount of time in ms that is allowed to pass
-                   since a document was added before automatically
-                   triggering a new commit.
-         openSearcher - if false, the commit causes recent index changes
-           to be flushed to stable storage, but does not cause a new
-           searcher to be opened to make those changes visible.
-
-         If the updateLog is enabled, then it's highly recommended to
-         have some sort of hard autoCommit to limit the log size.
-      -->
-     <autoCommit>
-       <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
-       <openSearcher>false</openSearcher>
-     </autoCommit>
-
-    <!-- softAutoCommit is like autoCommit except it causes a
-         'soft' commit which only ensures that changes are visible
-         but does not ensure that data is synced to disk.  This is
-         faster and more near-realtime friendly than a hard commit.
-      -->
-
-     <autoSoftCommit>
-       <maxTime>${solr.autoSoftCommit.maxTime:5000}</maxTime>
-     </autoSoftCommit>
-
-    <!-- Update Related Event Listeners
-
-         Various IndexWriter related events can trigger Listeners to
-         take actions.
-
-         postCommit - fired after every commit or optimize command
-         postOptimize - fired after every optimize command
-      -->
-    <!-- The RunExecutableListener executes an external command from a
-         hook such as postCommit or postOptimize.
-
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. (default=".")
-         wait - the calling thread waits until the executable returns.
-                (default="true")
-         args - the arguments to pass to the program.  (default is none)
-         env - environment variables to set.  (default is none)
-      -->
-    <!-- This example shows how RunExecutableListener could be used
-         with the script based replication...
-         http://wiki.apache.org/solr/CollectionDistribution
-      -->
-    <!--
-       <listener event="postCommit" class="solr.RunExecutableListener">
-         <str name="exe">solr/bin/snapshooter</str>
-         <str name="dir">.</str>
-         <bool name="wait">true</bool>
-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-         <arr name="env"> <str>MYVAR=val1</str> </arr>
-       </listener>
-      -->
-
-  </updateHandler>
-
-  <!-- IndexReaderFactory
-
-       Use the following format to specify a custom IndexReaderFactory,
-       which allows for alternate IndexReader implementations.
-
-       ** Experimental Feature **
-
-       Please note - Using a custom IndexReaderFactory may prevent
-       certain other features from working. The API to
-       IndexReaderFactory may change without warning or may even be
-       removed from future releases if the problems cannot be
-       resolved.
-
-
-       ** Features that may not work with custom IndexReaderFactory **
-
-       The ReplicationHandler assumes a disk-resident index. Using a
-       custom IndexReader implementation may cause incompatibility
-       with ReplicationHandler and may cause replication to not work
-       correctly. See SOLR-1366 for details.
-
-    -->
-  <!--
-  <indexReaderFactory name="IndexReaderFactory" class="package.class">
-    <str name="someArg">Some Value</str>
-  </indexReaderFactory >
-  -->
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-       Query section - these settings control query time things like caches
-       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <query>
-    <!-- Max Boolean Clauses
-
-         Maximum number of clauses in each BooleanQuery,  an exception
-         is thrown if exceeded.
-
-         ** WARNING **
-
-         This option actually modifies a global Lucene property that
-         will affect all SolrCores.  If multiple solrconfig.xml files
-         disagree on this property, the value at any given moment will
-         be based on the last SolrCore to be initialized.
-
-      -->
-    <maxBooleanClauses>1024</maxBooleanClauses>
-
-
-    <!-- Solr Internal Query Caches
-
-         There are two implementations of cache available for Solr,
-         LRUCache, based on a synchronized LinkedHashMap, and
-         FastLRUCache, based on a ConcurrentHashMap.
-
-         FastLRUCache has faster gets and slower puts in single
-         threaded operation and thus is generally faster than LRUCache
-         when the hit ratio of the cache is high (> 75%), and may be
-         faster under other scenarios on multi-cpu systems.
-    -->
-
-    <!-- Filter Cache
-
-         Cache used by SolrIndexSearcher for filters (DocSets),
-         unordered sets of *all* documents that match a query.  When a
-         new searcher is opened, its caches may be prepopulated or
-         "autowarmed" using data from caches in the old searcher.
-         autowarmCount is the number of items to prepopulate.  For
-         LRUCache, the autowarmed items will be the most recently
-         accessed items.
-
-         Parameters:
-           class - the SolrCache implementation LRUCache or
-               (LRUCache or FastLRUCache)
-           size - the maximum number of entries in the cache
-           initialSize - the initial capacity (number of entries) of
-               the cache.  (see java.util.HashMap)
-           autowarmCount - the number of entries to prepopulate from
-               and old cache.
-      -->
-    <filterCache class="solr.FastLRUCache"
-                 size="512"
-                 initialSize="512"
-                 autowarmCount="0"/>
-
-    <!-- Query Result Cache
-
-         Caches results of searches - ordered lists of document ids
-         (DocList) based on a query, a sort, and the range of documents requested.
-      -->
-    <queryResultCache class="solr.LRUCache"
-                     size="512"
-                     initialSize="512"
-                     autowarmCount="0"/>
-
-    <!-- Document Cache
-
-         Caches Lucene Document objects (the stored fields for each
-         document).  Since Lucene internal document ids are transient,
-         this cache will not be autowarmed.
-      -->
-    <documentCache class="solr.LRUCache"
-                   size="512"
-                   initialSize="512"
-                   autowarmCount="0"/>
-
-    <!-- custom cache currently used by block join -->
-    <cache name="perSegFilter"
-      class="solr.search.LRUCache"
-      size="10"
-      initialSize="0"
-      autowarmCount="10"
-      regenerator="solr.NoOpRegenerator" />
-
-    <!-- Field Value Cache
-
-         Cache used to hold field values that are quickly accessible
-         by document id.  The fieldValueCache is created by default
-         even if not configured here.
-      -->
-    <!--
-       <fieldValueCache class="solr.FastLRUCache"
-                        size="512"
-                        autowarmCount="128"
-                        showItems="32" />
-      -->
-
-    <!-- Custom Cache
-
-         Example of a generic cache.  These caches may be accessed by
-         name through SolrIndexSearcher.getCache(),cacheLookup(), and
-         cacheInsert().  The purpose is to enable easy caching of
-         user/application level data.  The regenerator argument should
-         be specified as an implementation of solr.CacheRegenerator
-         if autowarming is desired.
-      -->
-    <!--
-       <cache name="myUserCache"
-              class="solr.LRUCache"
-              size="4096"
-              initialSize="1024"
-              autowarmCount="1024"
-              regenerator="com.mycompany.MyRegenerator"
-              />
-      -->
-
-
-    <!-- Lazy Field Loading
-
-         If true, stored fields that are not requested will be loaded
-         lazily.  This can result in a significant speed improvement
-         if the usual case is to not load all stored fields,
-         especially if the skipped fields are large compressed text
-         fields.
-    -->
-    <enableLazyFieldLoading>true</enableLazyFieldLoading>
-
-   <!-- Use Filter For Sorted Query
-
-        A possible optimization that attempts to use a filter to
-        satisfy a search.  If the requested sort does not include
-        score, then the filterCache will be checked for a filter
-        matching the query. If found, the filter will be used as the
-        source of document ids, and then the sort will be applied to
-        that.
-
-        For most situations, this will not be useful unless you
-        frequently get the same search repeatedly with different sort
-        options, and none of them ever use "score"
-     -->
-   <!--
-      <useFilterForSortedQuery>true</useFilterForSortedQuery>
-     -->
-
-   <!-- Result Window Size
-
-        An optimization for use with the queryResultCache.  When a search
-        is requested, a superset of the requested number of document ids
-        are collected.  For example, if a search for a particular query
-        requests matching documents 10 through 19, and queryWindowSize is 50,
-        then documents 0 through 49 will be collected and cached.  Any further
-        requests in that range can be satisfied via the cache.
-     -->
-   <queryResultWindowSize>20</queryResultWindowSize>
-
-   <!-- Maximum number of documents to cache for any entry in the
-        queryResultCache.
-     -->
-   <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
-
-   <!-- Query Related Event Listeners
-
-        Various IndexSearcher related events can trigger Listeners to
-        take actions.
-
-        newSearcher - fired whenever a new searcher is being prepared
-        and there is a current searcher handling requests (aka
-        registered).  It can be used to prime certain caches to
-        prevent long request times for certain requests.
-
-        firstSearcher - fired whenever a new searcher is being
-        prepared but there is no current registered searcher to handle
-        requests or to gain autowarming data from.
-
-
-     -->
-    <!-- QuerySenderListener takes an array of NamedList and executes a
-         local query request for each NamedList in sequence.
-      -->
-    <listener event="newSearcher" class="solr.QuerySenderListener">
-      <arr name="queries">
-        <!--
-           <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
-           <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
-          -->
-      </arr>
-    </listener>
-    <listener event="firstSearcher" class="solr.QuerySenderListener">
-      <arr name="queries">
-        <lst>
-          <str name="q">static firstSearcher warming in solrconfig.xml</str>
-        </lst>
-      </arr>
-    </listener>
-
-    <!-- Use Cold Searcher
-
-         If a search request comes in and there is no current
-         registered searcher, then immediately register the still
-         warming searcher and use it.  If "false" then all requests
-         will block until the first searcher is done warming.
-      -->
-    <useColdSearcher>true</useColdSearcher>
-
-    <!-- Max Warming Searchers
-
-         Maximum number of searchers that may be warming in the
-         background concurrently.  An error is returned if this limit
-         is exceeded.
-
-         Recommend values of 1-2 for read-only slaves, higher for
-         masters w/o cache warming.
-      -->
-    <maxWarmingSearchers>2</maxWarmingSearchers>
-
-  </query>
-
-
-  <!-- Request Dispatcher
-
-       This section contains instructions for how the SolrDispatchFilter
-       should behave when processing requests for this SolrCore.
-
-       handleSelect is a legacy option that affects the behavior of requests
-       such as /select?qt=XXX
-
-       handleSelect="true" will cause the SolrDispatchFilter to process
-       the request and dispatch the query to a handler specified by the
-       "qt" param, assuming "/select" isn't already registered.
-
-       handleSelect="false" will cause the SolrDispatchFilter to
-       ignore "/select" requests, resulting in a 404 unless a handler
-       is explicitly registered with the name "/select"
-
-       handleSelect="true" is not recommended for new users, but is the default
-       for backwards compatibility
-    -->
-  <requestDispatcher handleSelect="false" >
-    <!-- Request Parsing
-
-         These settings indicate how Solr Requests may be parsed, and
-         what restrictions may be placed on the ContentStreams from
-         those requests
-
-         enableRemoteStreaming - enables use of the stream.file
-         and stream.url parameters for specifying remote streams.
-
-         multipartUploadLimitInKB - specifies the max size (in KiB) of
-         Multipart File Uploads that Solr will allow in a Request.
-
-         formdataUploadLimitInKB - specifies the max size (in KiB) of
-         form data (application/x-www-form-urlencoded) sent via
-         POST. You can use POST to pass request parameters not
-         fitting into the URL.
-
-         addHttpRequestToContext - if set to true, it will instruct
-         the requestParsers to include the original HttpServletRequest
-         object in the context map of the SolrQueryRequest under the
-         key "httpRequest". It will not be used by any of the existing
-         Solr components, but may be useful when developing custom
-         plugins.
-
-         *** WARNING ***
-         The settings below authorize Solr to fetch remote files, You
-         should make sure your system has some authentication before
-         using enableRemoteStreaming="true"
-
-      -->
-    <requestParsers enableRemoteStreaming="true"
-                    multipartUploadLimitInKB="2048000"
-                    formdataUploadLimitInKB="2048"
-                    addHttpRequestToContext="false"/>
-
-    <!-- HTTP Caching
-
-         Set HTTP caching related parameters (for proxy caches and clients).
-
-         The options below instruct Solr not to output any HTTP Caching
-         related headers
-      -->
-    <httpCaching never304="true" />
-    <!-- If you include a <cacheControl> directive, it will be used to
-         generate a Cache-Control header (as well as an Expires header
-         if the value contains "max-age=")
-
-         By default, no Cache-Control header is generated.
-
-         You can use the <cacheControl> option even if you have set
-         never304="true"
-      -->
-    <!--
-       <httpCaching never304="true" >
-         <cacheControl>max-age=30, public</cacheControl>
-       </httpCaching>
-      -->
-    <!-- To enable Solr to respond with automatically generated HTTP
-         Caching headers, and to response to Cache Validation requests
-         correctly, set the value of never304="false"
-
-         This will cause Solr to generate Last-Modified and ETag
-         headers based on the properties of the Index.
-
-         The following options can also be specified to affect the
-         values of these headers...
-
-         lastModFrom - the default value is "openTime" which means the
-         Last-Modified value (and validation against If-Modified-Since
-         requests) will all be relative to when the current Searcher
-         was opened.  You can change it to lastModFrom="dirLastMod" if
-         you want the value to exactly correspond to when the physical
-         index was last modified.
-
-         etagSeed="..." is an option you can change to force the ETag
-         header (and validation against If-None-Match requests) to be
-         different even if the index has not changed (ie: when making
-         significant changes to your config file)
-
-         (lastModifiedFrom and etagSeed are both ignored if you use
-         the never304="true" option)
-      -->
-    <!--
-       <httpCaching lastModifiedFrom="openTime"
-                    etagSeed="Solr">
-         <cacheControl>max-age=30, public</cacheControl>
-       </httpCaching>
-      -->
-  </requestDispatcher>
-
-  <!-- Request Handlers
-
-       http://wiki.apache.org/solr/SolrRequestHandler
-
-       Incoming queries will be dispatched to a specific handler by name
-       based on the path specified in the request.
-
-       Legacy behavior: If the request path uses "/select" but no Request
-       Handler has that name, and if handleSelect="true" has been specified in
-       the requestDispatcher, then the Request Handler is dispatched based on
-       the qt parameter.  Handlers without a leading '/' are accessed this way
-       like so: http://host/app/[core/]select?qt=name  If no qt is
-       given, then the requestHandler that declares default="true" will be
-       used or the one named "standard".
-
-       If a Request Handler is declared with startup="lazy", then it will
-       not be initialized until the first request that uses it.
-
-    -->
-
-  <requestHandler name="/dataimport" class="solr.DataImportHandler">
-    <lst name="defaults">
-      <str name="config">solr-data-config.xml</str>
-    </lst>
-  </requestHandler>
-
-  <!-- SearchHandler
-
-       http://wiki.apache.org/solr/SearchHandler
-
-       For processing Search Queries, the primary Request Handler
-       provided with Solr is "SearchHandler" It delegates to a sequent
-       of SearchComponents (see below) and supports distributed
-       queries across multiple shards
-    -->
-  <requestHandler name="/select" class="solr.SearchHandler">
-    <!-- default values for query parameters can be specified, these
-         will be overridden by parameters in the request
-      -->
-     <lst name="defaults">
-       <str name="echoParams">explicit</str>
-       <int name="rows">10</int>
-       <str name="df">text</str>
-     </lst>
-    <!-- In addition to defaults, "appends" params can be specified
-         to identify values which should be appended to the list of
-         multi-val params from the query (or the existing "defaults").
-      -->
-    <!-- In this example, the param "fq=instock:true" would be appended to
-         any query time fq params the user may specify, as a mechanism for
-         partitioning the index, independent of any user selected filtering
-         that may also be desired (perhaps as a result of faceted searching).
-
-         NOTE: there is *absolutely* nothing a client can do to prevent these
-         "appends" values from being used, so don't use this mechanism
-         unless you are sure you always want it.
-      -->
-    <!--
-       <lst name="appends">
-         <str name="fq">inStock:true</str>
-       </lst>
-      -->
-    <!-- "invariants" are a way of letting the Solr maintainer lock down
-         the options available to Solr clients.  Any params values
-         specified here are used regardless of what values may be specified
-         in either the query, the "defaults", or the "appends" params.
-
-         In this example, the facet.field and facet.query params would
-         be fixed, limiting the facets clients can use.  Faceting is
-         not turned on by default - but if the client does specify
-         facet=true in the request, these are the only facets they
-         will be able to see counts for; regardless of what other
-         facet.field or facet.query params they may specify.
-
-         NOTE: there is *absolutely* nothing a client can do to prevent these
-         "invariants" values from being used, so don't use this mechanism
-         unless you are sure you always want it.
-      -->
-    <!--
-       <lst name="invariants">
-         <str name="facet.field">cat</str>
-         <str name="facet.field">manu_exact</str>
-         <str name="facet.query">price:[* TO 500]</str>
-         <str name="facet.query">price:[500 TO *]</str>
-       </lst>
-      -->
-    <!-- If the default list of SearchComponents is not desired, that
-         list can either be overridden completely, or components can be
-         prepended or appended to the default list.  (see below)
-      -->
-    <!--
-       <arr name="components">
-         <str>nameOfCustomComponent1</str>
-         <str>nameOfCustomComponent2</str>
-       </arr>
-      -->
-    </requestHandler>
-
-  <!-- A request handler that returns indented JSON by default -->
-  <requestHandler name="/query" class="solr.SearchHandler">
-     <lst name="defaults">
-       <str name="echoParams">explicit</str>
-       <str name="wt">json</str>
-       <str name="indent">true</str>
-       <str name="df">text</str>
-     </lst>
-  </requestHandler>
-
-
-  <!-- realtime get handler, guaranteed to return the latest stored fields of
-       any document, without the need to commit or open a new searcher.  The
-       current implementation relies on the updateLog feature being enabled.
-
-       ** WARNING **
-       Do NOT disable the realtime get handler at /get if you are using
-       SolrCloud otherwise any leader election will cause a full sync in ALL
-       replicas for the shard in question. Similarly, a replica recovery will
-       also always fetch the complete index from the leader because a partial
-       sync will not be possible in the absence of this handler.
-  -->
-  <requestHandler name="/get" class="solr.RealTimeGetHandler">
-     <lst name="defaults">
-       <str name="omitHeader">true</str>
-       <str name="wt">json</str>
-       <str name="indent">true</str>
-     </lst>
-  </requestHandler>
-
-
-  <!-- A Robust Example
-
-       This example SearchHandler declaration shows off usage of the
-       SearchHandler with many defaults declared
-
-       Note that multiple instances of the same Request Handler
-       (SearchHandler) can be registered multiple times with different
-       names (and different init parameters)
-    -->
-  <requestHandler name="/browse" class="solr.SearchHandler">
-    <lst name="defaults">
-      <str name="echoParams">explicit</str>
-
-      <!-- VelocityResponseWriter settings -->
-      <str name="wt">velocity</str>
-      <str name="v.template">browse</str>
-      <str name="v.layout">layout</str>
-
-      <!-- Query settings -->
-      <str name="defType">edismax</str>
-      <str name="q.alt">*:*</str>
-      <str name="rows">10</str>
-      <str name="fl">*,score</str>
-
-      <!-- Faceting defaults -->
-      <str name="facet">on</str>
-      <str name="facet.mincount">1</str>
-    </lst>
-  </requestHandler>
-
-
-  <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
-    <lst name="defaults">
-      <str name="df">text</str>
-      <str name="update.chain">add-unknown-fields-to-the-schema</str>
-    </lst>
-  </initParams>
-
-  <!-- Update Request Handler.
-
-       http://wiki.apache.org/solr/UpdateXmlMessages
-
-       The canonical Request Handler for Modifying the Index through
-       commands specified using XML, JSON, CSV, or JAVABIN
-
-       Note: Since solr1.1 requestHandlers requires a valid content
-       type header if posted in the body. For example, curl now
-       requires: -H 'Content-type:text/xml; charset=utf-8'
-
-       To override the request content type and force a specific
-       Content-type, use the request parameter:
-         ?update.contentType=text/csv
-
-       This handler will pick a response format to match the input
-       if the 'wt' parameter is not explicit
-    -->
-  <requestHandler name="/update" class="solr.UpdateRequestHandler">
-    <!-- See below for information on defining
-         updateRequestProcessorChains that can be used by name
-         on each Update Request
-      -->
-    <!--
-       <lst name="defaults">
-         <str name="update.chain">dedupe</str>
-       </lst>
-       -->
-  </requestHandler>
-
-  <!-- Solr Cell Update Request Handler
-
-       http://wiki.apache.org/solr/ExtractingRequestHandler
-
-    -->
-  <requestHandler name="/update/extract"
-                  startup="lazy"
-                  class="solr.extraction.ExtractingRequestHandler" >
-    <lst name="defaults">
-      <str name="lowernames">true</str>
-      <str name="uprefix">ignored_</str>
-
-      <!-- capture link hrefs but ignore div attributes -->
-      <str name="captureAttr">true</str>
-      <str name="fmap.a">links</str>
-      <str name="fmap.div">ignored_</str>
-    </lst>
-  </requestHandler>
-
-
-  <!-- Field Analysis Request Handler
-
-       RequestHandler that provides much the same functionality as
-       analysis.jsp. Provides the ability to specify multiple field
-       types and field names in the same request and outputs
-       index-time and query-time analysis for each of them.
-
-       Request parameters are:
-       analysis.fieldname - field name whose analyzers are to be used
-
-       analysis.fieldtype - field type whose analyzers are to be used
-       analysis.fieldvalue - text for index-time analysis
-       q (or analysis.q) - text for query time analysis
-       analysis.showmatch (true|false) - When set to true and when
-           query analysis is performed, the produced tokens of the
-           field value analysis will be marked as "matched" for every
-           token that is produces by the query analysis
-   -->
-  <requestHandler name="/analysis/field"
-                  startup="lazy"
-                  class="solr.FieldAnalysisRequestHandler" />
-
-
-  <!-- Document Analysis Handler
-
-       http://wiki.apache.org/solr/AnalysisRequestHandler
-
-       An analysis handler that provides a breakdown of the analysis
-       process of provided documents. This handler expects a (single)
-       content stream with the following format:
-
-       <docs>
-         <doc>
-           <field name="id">1</field>
-           <field name="name">The Name</field>
-           <field name="text">The Text Value</field>
-         </doc>
-         <doc>...</doc>
-         <doc>...</doc>
-         ...
-       </docs>
-
-    Note: Each document must contain a field which serves as the
-    unique key. This key is used in the returned response to associate
-    an analysis breakdown to the analyzed document.
-
-    Like the FieldAnalysisRequestHandler, this handler also supports
-    query analysis by sending either an "analysis.query" or "q"
-    request parameter that holds the query text to be analyzed. It
-    also supports the "analysis.showmatch" parameter which when set to
-    true, all field tokens that match the query tokens will be marked
-    as a "match".
-  -->
-  <requestHandler name="/analysis/document"
-                  class="solr.DocumentAnalysisRequestHandler"
-                  startup="lazy" />
-
-  <!-- This single handler is equivalent to the following... -->
-  <!--
-     <requestHandler name="/admin/luke"       class="solr.admin.LukeRequestHandler" />
-     <requestHandler name="/admin/system"     class="solr.admin.SystemInfoHandler" />
-     <requestHandler name="/admin/plugins"    class="solr.admin.PluginInfoHandler" />
-     <requestHandler name="/admin/threads"    class="solr.admin.ThreadDumpHandler" />
-     <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
-     <requestHandler name="/admin/file"       class="solr.admin.ShowFileRequestHandler" >
-    -->
-  <!-- If you wish to hide files under ${solr.home}/conf, explicitly
-       register the ShowFileRequestHandler using the definition below.
-       NOTE: The glob pattern ('*') is the only pattern supported at present, *.xml will
-             not exclude all files ending in '.xml'. Use it to exclude _all_ updates
-    -->
-  <!--
-     <requestHandler name="/admin/file"
-                     class="solr.admin.ShowFileRequestHandler" >
-       <lst name="invariants">
-         <str name="hidden">synonyms.txt</str>
-         <str name="hidden">anotherfile.txt</str>
-         <str name="hidden">*</str>
-       </lst>
-     </requestHandler>
-    -->
-
-  <!--
-    Enabling this request handler (which is NOT a default part of the admin handler) will allow the Solr UI to edit
-    all the config files. This is intended for secure/development use ONLY! Leaving available and publically
-    accessible is a security vulnerability and should be done with extreme caution!
-  -->
-  <!--
-  <requestHandler name="/admin/fileedit" class="solr.admin.EditFileRequestHandler" >
-    <lst name="invariants">
-         <str name="hidden">synonyms.txt</str>
-         <str name="hidden">anotherfile.txt</str>
-    </lst>
-  </requestHandler>
-  -->
-  <!-- ping/healthcheck -->
-  <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
-    <lst name="invariants">
-      <str name="q">solrpingquery</str>
-    </lst>
-    <lst name="defaults">
-      <str name="echoParams">all</str>
-    </lst>
-    <!-- An optional feature of the PingRequestHandler is to configure the
-         handler with a "healthcheckFile" which can be used to enable/disable
-         the PingRequestHandler.
-         relative paths are resolved against the data dir
-      -->
-    <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
-  </requestHandler>
-
-  <!-- Echo the request contents back to the client -->
-  <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
-    <lst name="defaults">
-     <str name="echoParams">explicit</str>
-     <str name="echoHandler">true</str>
-    </lst>
-  </requestHandler>
-
-  <!-- Solr Replication
-
-       The SolrReplicationHandler supports replicating indexes from a
-       "master" used for indexing and "slaves" used for queries.
-
-       http://wiki.apache.org/solr/SolrReplication
-
-       It is also necessary for SolrCloud to function (in Cloud mode, the
-       replication handler is used to bulk transfer segments when nodes
-       are added or need to recover).
-
-       https://wiki.apache.org/solr/SolrCloud/
-    -->
-  <requestHandler name="/replication" class="solr.ReplicationHandler" >
-    <!--
-       To enable simple master/slave replication, uncomment one of the
-       sections below, depending on whether this solr instance should be
-       the "master" or a "slave".  If this instance is a "slave" you will
-       also need to fill in the masterUrl to point to a real machine.
-    -->
-    <!--
-       <lst name="master">
-         <str name="replicateAfter">commit</str>
-         <str name="replicateAfter">startup</str>
-         <str name="confFiles">schema.xml,stopwords.txt</str>
-       </lst>
-    -->
-    <!--
-       <lst name="slave">
-         <str name="masterUrl">http://your-master-hostname:8983/solr</str>
-         <str name="pollInterval">00:00:60</str>
-       </lst>
-    -->
-  </requestHandler>
-
-  <!-- Search Components
-
-       Search components are registered to SolrCore and used by
-       instances of SearchHandler (which can access them by name)
-
-       By default, the following components are available:
-
-       <searchComponent name="query"     class="solr.QueryComponent" />
-       <searchComponent name="facet"     class="solr.FacetComponent" />
-       <searchComponent name="mlt"       class="solr.MoreLikeThisComponent" />
-       <searchComponent name="highlight" class="solr.HighlightComponent" />
-       <searchComponent name="stats"     class="solr.StatsComponent" />
-       <searchComponent name="debug"     class="solr.DebugComponent" />
-
-       Default configuration in a requestHandler would look like:
-
-       <arr name="components">
-         <str>query</str>
-         <str>facet</str>
-         <str>mlt</str>
-         <str>highlight</str>
-         <str>stats</str>
-         <str>debug</str>
-       </arr>
-
-       If you register a searchComponent to one of the standard names,
-       that will be used instead of the default.
-
-       To insert components before or after the 'standard' components, use:
-
-       <arr name="first-components">
-         <str>myFirstComponentName</str>
-       </arr>
-
-       <arr name="last-components">
-         <str>myLastComponentName</str>
-       </arr>
-
-       NOTE: The component registered with the name "debug" will
-       always be executed after the "last-components"
-
-     -->
-
-   <!-- Spell Check
-
-        The spell check component can return a list of alternative spelling
-        suggestions.
-
-        http://wiki.apache.org/solr/SpellCheckComponent
-     -->
-  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
-
-    <str name="queryAnalyzerFieldType">text_general</str>
-
-    <!-- Multiple "Spell Checkers" can be declared and used by this
-         component
-      -->
-
-    <!-- a spellchecker built from a field of the main index -->
-    <lst name="spellchecker">
-      <str name="name">default</str>
-      <str name="field">text</str>
-      <str name="classname">solr.DirectSolrSpellChecker</str>
-      <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
-      <str name="distanceMeasure">internal</str>
-      <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
-      <float name="accuracy">0.5</float>
-      <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
-      <int name="maxEdits">2</int>
-      <!-- the minimum shared prefix when enumerating terms -->
-      <int name="minPrefix">1</int>
-      <!-- maximum number of inspections per result. -->
-      <int name="maxInspections">5</int>
-      <!-- minimum length of a query term to be considered for correction -->
-      <int name="minQueryLength">4</int>
-      <!-- maximum threshold of documents a query term can appear to be considered for correction -->
-      <float name="maxQueryFrequency">0.01</float>
-      <!-- uncomment this to require suggestions to occur in 1% of the documents
-      	<float name="thresholdTokenFrequency">.01</float>
-      -->
-    </lst>
-
-    <!-- a spellchecker that can break or combine words.  See "/spell" handler below for usage -->
-    <lst name="spellchecker">
-      <str name="name">wordbreak</str>
-      <str name="classname">solr.WordBreakSolrSpellChecker</str>
-      <str name="field">name</str>
-      <str name="combineWords">true</str>
-      <str name="breakWords">true</str>
-      <int name="maxChanges">10</int>
-    </lst>
-
-    <!-- a spellchecker that uses a different distance measure -->
-    <!--
-       <lst name="spellchecker">
-         <str name="name">jarowinkler</str>
-         <str name="field">spell</str>
-         <str name="classname">solr.DirectSolrSpellChecker</str>
-         <str name="distanceMeasure">
-           org.apache.lucene.search.spell.JaroWinklerDistance
-         </str>
-       </lst>
-     -->
-
-    <!-- a spellchecker that use an alternate comparator
-
-         comparatorClass be one of:
-          1. score (default)
-          2. freq (Frequency first, then score)
-          3. A fully qualified class name
-      -->
-    <!--
-       <lst name="spellchecker">
-         <str name="name">freq</str>
-         <str name="field">lowerfilt</str>
-         <str name="classname">solr.DirectSolrSpellChecker</str>
-         <str name="comparatorClass">freq</str>
-      -->
-
-    <!-- A spellchecker that reads the list of words from a file -->
-    <!--
-       <lst name="spellchecker">
-         <str name="classname">solr.FileBasedSpellChecker</str>
-         <str name="name">file</str>
-         <str name="sourceLocation">spellings.txt</str>
-         <str name="characterEncoding">UTF-8</str>
-         <str name="spellcheckIndexDir">spellcheckerFile</str>
-       </lst>
-      -->
-  </searchComponent>
-
-  <!-- A request handler for demonstrating the spellcheck component.
-
-       NOTE: This is purely as an example.  The whole purpose of the
-       SpellCheckComponent is to hook it into the request handler that
-       handles your normal user queries so that a separate request is
-       not needed to get suggestions.
-
-       IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
-       NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
-
-       See http://wiki.apache.org/solr/SpellCheckComponent for details
-       on the request parameters.
-    -->
-  <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
-    <lst name="defaults">
-      <str name="df">text</str>
-      <!-- Solr will use suggestions from both the 'default' spellchecker
-           and from the 'wordbreak' spellchecker and combine them.
-           collations (re-written queries) can include a combination of
-           corrections from both spellcheckers -->
-      <str name="spellcheck.dictionary">default</str>
-      <str name="spellcheck.dictionary">wordbreak</str>
-      <str name="spellcheck">on</str>
-      <str name="spellcheck.extendedResults">true</str>
-      <str name="spellcheck.count">10</str>
-      <str name="spellcheck.alternativeTermCount">5</str>
-      <str name="spellcheck.maxResultsForSuggest">5</str>
-      <str name="spellcheck.collate">true</str>
-      <str name="spellcheck.collateExtendedResults">true</str>
-      <str name="spellcheck.maxCollationTries">10</str>
-      <str name="spellcheck.maxCollations">5</str>
-    </lst>
-    <arr name="last-components">
-      <str>spellcheck</str>
-    </arr>
-  </requestHandler>
-
-  <searchComponent name="suggest" class="solr.SuggestComponent">
-  	<lst name="suggester">
-      <str name="name">mySuggester</str>
-      <str name="lookupImpl">FuzzyLookupFactory</str>      <!-- org.apache.solr.spelling.suggest.fst -->
-      <str name="dictionaryImpl">DocumentDictionaryFactory</str>     <!-- org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory -->
-      <str name="field">cat</str>
-      <str name="weightField">price</str>
-      <str name="suggestAnalyzerFieldType">string</str>
-    </lst>
-  </searchComponent>
-
-  <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
-    <lst name="defaults">
-      <str name="suggest">true</str>
-      <str name="suggest.count">10</str>
-    </lst>
-    <arr name="components">
-      <str>suggest</str>
-    </arr>
-  </requestHandler>
-  <!-- Term Vector Component
-
-       http://wiki.apache.org/solr/TermVectorComponent
-    -->
-  <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
-
-  <!-- A request handler for demonstrating the term vector component
-
-       This is purely as an example.
-
-       In reality you will likely want to add the component to your
-       already specified request handlers.
-    -->
-  <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
-    <lst name="defaults">
-      <str name="df">text</str>
-      <bool name="tv">true</bool>
-    </lst>
-    <arr name="last-components">
-      <str>tvComponent</str>
-    </arr>
-  </requestHandler>
-
-  <!-- Clustering Component
-
-       You'll need to set the solr.clustering.enabled system property
-       when running solr to run with clustering enabled:
-
-            java -Dsolr.clustering.enabled=true -jar start.jar
-
-       http://wiki.apache.org/solr/ClusteringComponent
-       http://carrot2.github.io/solr-integration-strategies/
-    -->
-  <searchComponent name="clustering"
-                   enable="${solr.clustering.enabled:false}"
-                   class="solr.clustering.ClusteringComponent" >
-    <lst name="engine">
-      <str name="name">lingo</str>
-
-      <!-- Class name of a clustering algorithm compatible with the Carrot2 framework.
-
-           Currently available open source algorithms are:
-           * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
-           * org.carrot2.clustering.stc.STCClusteringAlgorithm
-           * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
-
-           See http://project.carrot2.org/algorithms.html for more information.
-
-           A commercial algorithm Lingo3G (needs to be installed separately) is defined as:
-           * com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm
-        -->
-      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
-
-      <!-- Override location of the clustering algorithm's resources
-           (attribute definitions and lexical resources).
-
-           A directory from which to load algorithm-specific stop words,
-           stop labels and attribute definition XMLs.
-
-           For an overview of Carrot2 lexical resources, see:
-           http://download.carrot2.org/head/manual/#chapter.lexical-resources
-
-           For an overview of Lingo3G lexical resources, see:
-           http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources
-       -->
-      <str name="carrot.resourcesDir">clustering/carrot2</str>
-    </lst>
-
-    <!-- An example definition for the STC clustering algorithm. -->
-    <lst name="engine">
-      <str name="name">stc</str>
-      <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
-    </lst>
-
-    <!-- An example definition for the bisecting kmeans clustering algorithm. -->
-    <lst name="engine">
-      <str name="name">kmeans</str>
-      <str name="carrot.algorithm">org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm</str>
-    </lst>
-  </searchComponent>
-
-  <!-- A request handler for demonstrating the clustering component
-
-       This is purely as an example.
-
-       In reality you will likely want to add the component to your
-       already specified request handlers.
-    -->
-  <requestHandler name="/clustering"
-                  startup="lazy"
-                  enable="${solr.clustering.enabled:false}"
-                  class="solr.SearchHandler">
-    <lst name="defaults">
-      <bool name="clustering">true</bool>
-      <bool name="clustering.results">true</bool>
-      <!-- Field name with the logical "title" of a each document (optional) -->
-      <str name="carrot.title">name</str>
-      <!-- Field name with the logical "URL" of a each document (optional) -->
-      <str name="carrot.url">id</str>
-      <!-- Field name with the logical "content" of a each document (optional) -->
-      <str name="carrot.snippet">features</str>
-      <!-- Apply highlighter to the title/ content and use this for clustering. -->
-      <bool name="carrot.produceSummary">true</bool>
-      <!-- the maximum number of labels per cluster -->
-      <!--<int name="carrot.numDescriptions">5</int>-->
-      <!-- produce sub clusters -->
-      <bool name="carrot.outputSubClusters">false</bool>
-
-      <!-- Configure the remaining request handler parameters. -->
-      <str name="defType">edismax</str>
-      <str name="qf">
-        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
-      </str>
-      <str name="q.alt">*:*</str>
-      <str name="rows">10</str>
-      <str name="fl">*,score</str>
-    </lst>
-    <arr name="last-components">
-      <str>clustering</str>
-    </arr>
-  </requestHandler>
-
-  <!-- Terms Component
-
-       http://wiki.apache.org/solr/TermsComponent
-
-       A component to return terms and document frequency of those
-       terms
-    -->
-  <searchComponent name="terms" class="solr.TermsComponent"/>
-
-  <!-- A request handler for demonstrating the terms component -->
-  <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
-     <lst name="defaults">
-      <bool name="terms">true</bool>
-      <bool name="distrib">false</bool>
-    </lst>
-    <arr name="components">
-      <str>terms</str>
-    </arr>
-  </requestHandler>
-
-
-  <!-- Query Elevation Component
-
-       http://wiki.apache.org/solr/QueryElevationComponent
-
-       a search component that enables you to configure the top
-       results for a given query regardless of the normal lucene
-       scoring.
-    -->
-  <searchComponent name="elevator" class="solr.QueryElevationComponent" >
-    <!-- pick a fieldType to analyze queries -->
-    <str name="queryFieldType">string</str>
-    <str name="config-file">elevate.xml</str>
-  </searchComponent>
-
-  <!-- A request handler for demonstrating the elevator component -->
-  <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
-    <lst name="defaults">
-      <str name="echoParams">explicit</str>
-      <str name="df">text</str>
-    </lst>
-    <arr name="last-components">
-      <str>elevator</str>
-    </arr>
-  </requestHandler>
-
-  <!-- Highlighting Component
-
-       http://wiki.apache.org/solr/HighlightingParameters
-    -->
-  <searchComponent class="solr.HighlightComponent" name="highlight">
-    <highlighting>
-      <!-- Configure the standard fragmenter -->
-      <!-- This could most likely be commented out in the "default" case -->
-      <fragmenter name="gap"
-                  default="true"
-                  class="solr.highlight.GapFragmenter">
-        <lst name="defaults">
-          <int name="hl.fragsize">100</int>
-        </lst>
-      </fragmenter>
-
-      <!-- A regular-expression-based fragmenter
-           (for sentence extraction)
-        -->
-      <fragmenter name="regex"
-                  class="solr.highlight.RegexFragmenter">
-        <lst name="defaults">
-          <!-- slightly smaller fragsizes work better because of slop -->
-          <int name="hl.fragsize">70</int>
-          <!-- allow 50% slop on fragment sizes -->
-          <float name="hl.regex.slop">0.5</float>
-          <!-- a basic sentence pattern -->
-          <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
-        </lst>
-      </fragmenter>
-
-      <!-- Configure the standard formatter -->
-      <formatter name="html"
-                 default="true"
-                 class="solr.highlight.HtmlFormatter">
-        <lst name="defaults">
-          <str name="hl.simple.pre"><![CDATA[<em>]]></str>
-          <str name="hl.simple.post"><![CDATA[</em>]]></str>
-        </lst>
-      </formatter>
-
-      <!-- Configure the standard encoder -->
-      <encoder name="html"
-               class="solr.highlight.HtmlEncoder" />
-
-      <!-- Configure the standard fragListBuilder -->
-      <fragListBuilder name="simple"
-                       class="solr.highlight.SimpleFragListBuilder"/>
-
-      <!-- Configure the single fragListBuilder -->
-      <fragListBuilder name="single"
-                       class="solr.highlight.SingleFragListBuilder"/>
-
-      <!-- Configure the weighted fragListBuilder -->
-      <fragListBuilder name="weighted"
-                       default="true"
-                       class="solr.highlight.WeightedFragListBuilder"/>
-
-      <!-- default tag FragmentsBuilder -->
-      <fragmentsBuilder name="default"
-                        default="true"
-                        class="solr.highlight.ScoreOrderFragmentsBuilder">
-        <!--
-        <lst name="defaults">
-          <str name="hl.multiValuedSeparatorChar">/</str>
-        </lst>
-        -->
-      </fragmentsBuilder>
-
-      <!-- multi-colored tag FragmentsBuilder -->
-      <fragmentsBuilder name="colored"
-                        class="solr.highlight.ScoreOrderFragmentsBuilder">
-        <lst name="defaults">
-          <str name="hl.tag.pre"><![CDATA[
-               <b style="background:yellow">,<b style="background:lawgreen">,
-               <b style="background:aquamarine">,<b style="background:magenta">,
-               <b style="background:palegreen">,<b style="background:coral">,
-               <b style="background:wheat">,<b style="background:khaki">,
-               <b style="background:lime">,<b style="background:deepskyblue">]]></str>
-          <str name="hl.tag.post"><![CDATA[</b>]]></str>
-        </lst>
-      </fragmentsBuilder>
-
-      <boundaryScanner name="default"
-                       default="true"
-                       class="solr.highlight.SimpleBoundaryScanner">
-        <lst name="defaults">
-          <str name="hl.bs.maxScan">10</str>
-          <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
-        </lst>
-      </boundaryScanner>
-
-      <boundaryScanner name="breakIterator"
-                       class="solr.highlight.BreakIteratorBoundaryScanner">
-        <lst name="defaults">
-          <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
-          <str name="hl.bs.type">WORD</str>
-          <!-- language and country are used when constructing Locale object.  -->
-          <!-- And the Locale object will be used when getting instance of BreakIterator -->
-          <str name="hl.bs.language">en</str>
-          <str name="hl.bs.country">US</str>
-        </lst>
-      </boundaryScanner>
-    </highlighting>
-  </searchComponent>
-
-  <!-- Update Processors
-
-       Chains of Update Processor Factories for dealing with Update
-       Requests can be declared, and then used by name in Update
-       Request Processors
-
-       http://wiki.apache.org/solr/UpdateRequestProcessor
-
-    -->
-
-  <!-- Add unknown fields to the schema
-
-       An example field type guessing update processor that will
-       attempt to parse string-typed field values as Booleans, Longs,
-       Doubles, or Dates, and then add schema fields with the guessed
-       field types.
-
-       This requires that the schema is both managed and mutable, by
-       declaring schemaFactory as ManagedIndexSchemaFactory, with
-       mutable specified as true.
-
-       See http://wiki.apache.org/solr/GuessingFieldTypes
-    -->
-  <updateRequestProcessorChain name="add-unknown-fields-to-the-schema">
-    <processor class="solr.DefaultValueUpdateProcessorFactory">
-        <str name="fieldName">_ttl_</str>
-        <str name="value">+{{ranger_audit_max_retention_days}}DAYS</str>
-    </processor>
-    <processor class="solr.processor.DocExpirationUpdateProcessorFactory">
-        <int name="autoDeletePeriodSeconds">86400</int>
-        <str name="ttlFieldName">_ttl_</str>
-        <str name="expirationFieldName">_expire_at_</str>
-    </processor>
-    <processor class="solr.FirstFieldValueUpdateProcessorFactory">
-      <str name="fieldName">_expire_at_</str>
-    </processor>
-
-    <processor class="solr.RemoveBlankFieldUpdateProcessorFactory"/>
-    <processor class="solr.ParseBooleanFieldUpdateProcessorFactory"/>
-    <processor class="solr.ParseLongFieldUpdateProcessorFactory"/>
-    <processor class="solr.ParseDoubleFieldUpdateProcessorFactory"/>
-    <processor class="solr.ParseDateFieldUpdateProcessorFactory">
-      <arr name="format">
-        <str>yyyy-MM-dd'T'HH:mm:ss.SSSZ</str>
-        <str>yyyy-MM-dd'T'HH:mm:ss,SSSZ</str>
-        <str>yyyy-MM-dd'T'HH:mm:ss.SSS</str>
-        <str>yyyy-MM-dd'T'HH:mm:ss,SSS</str>
-        <str>yyyy-MM-dd'T'HH:mm:ssZ</str>
-        <str>yyyy-MM-dd'T'HH:mm:ss</str>
-        <str>yyyy-MM-dd'T'HH:mmZ</str>
-        <str>yyyy-MM-dd'T'HH:mm</str>
-        <str>yyyy-MM-dd HH:mm:ss.SSSZ</str>
-        <str>yyyy-MM-dd HH:mm:ss,SSSZ</str>
-        <str>yyyy-MM-dd HH:mm:ss.SSS</str>
-        <str>yyyy-MM-dd HH:mm:ss,SSS</str>
-        <str>yyyy-MM-dd HH:mm:ssZ</str>
-        <str>yyyy-MM-dd HH:mm:ss</str>
-        <str>yyyy-MM-dd HH:mmZ</str>
-        <str>yyyy-MM-dd HH:mm</str>
-        <str>yyyy-MM-dd</str>
-      </arr>
-    </processor>
-    <processor class="solr.AddSchemaFieldsUpdateProcessorFactory">
-      <str name="defaultFieldType">key_lower_case</str>
-      <lst name="typeMapping">
-        <str name="valueClass">java.lang.Boolean</str>
-        <str name="fieldType">boolean</str>
-      </lst>
-      <lst name="typeMapping">
-        <str name="valueClass">java.util.Date</str>
-        <str name="fieldType">tdate</str>
-      </lst>
-      <lst name="typeMapping">
-        <str name="valueClass">java.lang.Long</str>
-        <str name="valueClass">java.lang.Integer</str>
-        <str name="fieldType">tlong</str>
-      </lst>
-      <lst name="typeMapping">
-        <str name="valueClass">java.lang.Number</str>
-        <str name="fieldType">tdouble</str>
-      </lst>
-    </processor>
-    <processor class="solr.LogUpdateProcessorFactory"/>
-    <processor class="solr.RunUpdateProcessorFactory"/>
-  </updateRequestProcessorChain>
-
-
-  <!-- Deduplication
-
-       An example dedup update processor that creates the "id" field
-       on the fly based on the hash code of some other fields.  This
-       example has overwriteDupes set to false since we are using the
-       id field as the signatureField and Solr will maintain
-       uniqueness based on that anyway.
-
-    -->
-  <!--
-     <updateRequestProcessorChain name="dedupe">
-       <processor class="solr.processor.SignatureUpdateProcessorFactory">
-         <bool name="enabled">true</bool>
-         <str name="signatureField">id</str>
-         <bool name="overwriteDupes">false</bool>
-         <str name="fields">name,features,cat</str>
-         <str name="signatureClass">solr.processor.Lookup3Signature</str>
-       </processor>
-       <processor class="solr.LogUpdateProcessorFactory" />
-       <processor class="solr.RunUpdateProcessorFactory" />
-     </updateRequestProcessorChain>
-    -->
-
-  <!-- Language identification
-
-       This example update chain identifies the language of the incoming
-       documents using the langid contrib. The detected language is
-       written to field language_s. No field name mapping is done.
-       The fields used for detection are text, title, subject and description,
-       making this example suitable for detecting languages form full-text
-       rich documents injected via ExtractingRequestHandler.
-       See more about langId at http://wiki.apache.org/solr/LanguageDetection
-    -->
-    <!--
-     <updateRequestProcessorChain name="langid">
-       <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
-         <str name="langid.fl">text,title,subject,description</str>
-         <str name="langid.langField">language_s</str>
-         <str name="langid.fallback">en</str>
-       </processor>
-       <processor class="solr.LogUpdateProcessorFactory" />
-       <processor class="solr.RunUpdateProcessorFactory" />
-     </updateRequestProcessorChain>
-    -->
-
-  <!-- Script update processor
-
-    This example hooks in an update processor implemented using JavaScript.
-
-    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
-  -->
-  <!--
-    <updateRequestProcessorChain name="script">
-      <processor class="solr.StatelessScriptUpdateProcessorFactory">
-        <str name="script">update-script.js</str>
-        <lst name="params">
-          <str name="config_param">example config parameter</str>
-        </lst>
-      </processor>
-      <processor class="solr.RunUpdateProcessorFactory" />
-    </updateRequestProcessorChain>
-  -->
-
-  <!-- Response Writers
-
-       http://wiki.apache.org/solr/QueryResponseWriter
-
-       Request responses will be written using the writer specified by
-       the 'wt' request parameter matching the name of a registered
-       writer.
-
-       The "default" writer is the default and will be used if 'wt' is
-       not specified in the request.
-    -->
-  <!-- The following response writers are implicitly configured unless
-       overridden...
-    -->
-  <!--
-     <queryResponseWriter name="xml"
-                          default="true"
-                          class="solr.XMLResponseWriter" />
-     <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
-     <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
-     <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
-     <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
-     <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
-     <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
-     <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
-    -->
-
-  <queryResponseWriter name="json" class="solr.JSONResponseWriter">
-     <!-- For the purposes of the tutorial, JSON responses are written as
-      plain text so that they are easy to read in *any* browser.
-      If you expect a MIME type of "application/json" just remove this override.
-     -->
-    <str name="content-type">text/plain; charset=UTF-8</str>
-  </queryResponseWriter>
-
-  <!--
-     Custom response writers can be declared as needed...
-    -->
-  <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy">
-    <str name="template.base.dir">${velocity.template.base.dir:}</str>
-  </queryResponseWriter>
-
-  <!-- XSLT response writer transforms the XML output by any xslt file found
-       in Solr's conf/xslt directory.  Changes to xslt files are checked for
-       every xsltCacheLifetimeSeconds.
-    -->
-  <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
-    <int name="xsltCacheLifetimeSeconds">5</int>
-  </queryResponseWriter>
-
-  <!-- Query Parsers
-
-       http://wiki.apache.org/solr/SolrQuerySyntax
-
-       Multiple QParserPlugins can be registered by name, and then
-       used in either the "defType" param for the QueryComponent (used
-       by SearchHandler) or in LocalParams
-    -->
-  <!-- example of registering a query parser -->
-  <!--
-     <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
-    -->
-
-  <!-- Function Parsers
-
-       http://wiki.apache.org/solr/FunctionQuery
-
-       Multiple ValueSourceParsers can be registered by name, and then
-       used as function names when using the "func" QParser.
-    -->
-  <!-- example of registering a custom function parser  -->
-  <!--
-     <valueSourceParser name="myfunc"
-                        class="com.mycompany.MyValueSourceParser" />
-    -->
-
-
-  <!-- Document Transformers
-       http://wiki.apache.org/solr/DocTransformers
-    -->
-  <!--
-     Could be something like:
-     <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
-       <int name="connection">jdbc://....</int>
-     </transformer>
-
-     To add a constant value to all docs, use:
-     <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
-       <int name="value">5</int>
-     </transformer>
-
-     If you want the user to still be able to change it with _value:something_ use this:
-     <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
-       <double name="defaultValue">5</double>
-     </transformer>
-
-      If you are using the QueryElevationComponent, you may wish to mark documents that get boosted.  The
-      EditorialMarkerFactory will do exactly that:
-     <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
-    -->
-
-
-  <!-- Legacy config for the admin interface -->
-  <admin>
-    <defaultQuery>*:*</defaultQuery>
-  </admin>
-
-</config>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/quicklinks/quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/quicklinks/quicklinks.json b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/quicklinks/quicklinks.json
deleted file mode 100644
index d75d5f1..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/quicklinks/quicklinks.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
-  "name": "default",
-  "description": "default quick links configuration",
-  "configuration": {
-    "protocol":
-    {
-      "type":"https",
-      "checks":[
-        {
-          "property":"ranger.service.https.attrib.ssl.enabled",
-          "desired":"true",
-          "site":"ranger-admin-site"
-        },
-        {
-          "property":"ranger.service.http.enabled",
-          "desired":"false",
-          "site":"ranger-admin-site"
-        }
-      ]
-    },
-
-    "links": [
-      {
-        "name": "ranger_admin_ui",
-        "label": "Ranger Admin UI",
-        "component_name" : "RANGER_ADMIN",
-        "requires_user_name": "false",
-        "url": "%@://%@:%@",
-        "attributes": ["authenticated", "sso"],
-        "port":{
-          "http_property": "ranger.service.http.port",
-          "http_default_port": "6080",
-          "https_property": "ranger.service.https.port",
-          "https_default_port": "6182",
-          "regex": "(\\d*)+",
-          "site": "ranger-admin-site"
-        }
-      }
-    ]
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/role_command_order.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/role_command_order.json b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/role_command_order.json
deleted file mode 100644
index 557e9ac..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/role_command_order.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "general_deps" : {
-    "_comment" : "dependencies for RANGER",
-    "RANGER_SERVICE_CHECK-SERVICE_CHECK" : ["RANGER_ADMIN-START"],
-    "RANGER_SERVICE_CHECK-SERVICE_CHECK" : ["RANGER_USERSYNC-START"],
-    "RANGER_USERSYNC-START" : ["RANGER_ADMIN-START"],
-    "RANGER_ADMIN-START": ["ZOOKEEPER_SERVER-START", "INFRA_SOLR-START"]
-  }
-}


[27/52] [abbrv] ambari git commit: AMBARI-21384. Message for deleted hosts is confusing (alexantonenko)

Posted by jl...@apache.org.
AMBARI-21384. Message for deleted hosts is confusing (alexantonenko)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: f17d317b725012ccc687ee070b1e1dbc604e8d12
Parents: 8e719f7
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Jun 30 17:42:53 2017 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Jul 7 10:38:45 2017 +0300

----------------------------------------------------------------------
 .../app/controllers/main/host/bulk_operations_controller.js    | 6 +++---
 ambari-web/app/messages.js                                     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f17d317b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/bulk_operations_controller.js b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
index 92ae12e..b053fc3 100644
--- a/ambari-web/app/controllers/main/host/bulk_operations_controller.js
+++ b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
@@ -444,7 +444,7 @@ App.BulkOperationsController = Em.Controller.extend({
         templateName: require('templates/main/host/delete_hosts_result_popup'),
         message: Em.I18n.t('hosts.bulkOperation.deleteHosts.dryRun.message').format(undeletableHosts.length),
         undeletableHosts: undeletableHosts,
-        deletedHosts: deletedHosts,
+        deletedHosts: deletedHosts.sortProperty('deleted.key'),
         onToggleHost: function (host) {
           host.contexts[0].toggleProperty('isCollapsed');
         }
@@ -823,7 +823,7 @@ App.BulkOperationsController = Em.Controller.extend({
         templateName: require('templates/main/host/delete_hosts_result_popup'),
         message: Em.I18n.t('hosts.bulkOperation.delete.component.dryRun.message').format(undeletableHosts.length),
         undeletableHosts: undeletableHosts,
-        deletedHosts: deletedHosts,
+        deletedHosts: deletedHosts.sortProperty('deleted.key'),
         onToggleHost: function (host) {
           host.contexts[0].toggleProperty('isCollapsed');
         }
@@ -1295,4 +1295,4 @@ App.BulkOperationsController = Em.Controller.extend({
     return hostNamesSkipped;
   }
 
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f17d317b/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e88ec42..5e1d08f 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2593,7 +2593,7 @@ Em.I18n.translations = {
   'hosts.bulkOperation.deleteHosts.confirmation.body.msg3': 'To completely delete the hosts, first stop ambari-agent on them.',
   'hosts.bulkOperation.deleteHosts.confirmation.body.msg4': 'If the hosts were hosting a Zookeeper Server, the Zookeeper Service should be restarted. Go to the <i>Services</i> page.',
   'hosts.bulkOperation.deleteHosts.result.header':'Delete Hosts',
-  'hosts.bulkOperation.deleteHosts.result.body': 'The following hosts were deleted successfully:',
+  'hosts.bulkOperation.deleteHosts.result.body': 'The following hosts and host components were deleted successfully:',
   'hosts.bulkOperation.confirmation.delete.component.minimum.body': 'At least {0} {1} should be installed in the cluster.',
   'hosts.bulkOperation.confirmation.delete.component.nothingToDo.body': '{0} are neither installed on selected hosts nor in the states that can be deleted.',
   'hosts.bulkOperation.confirmation.delete.component.skip':'The following hosts are skipped as {0} on them are not in the states that can be deleted.',


[07/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/properties/ranger-solrconfig.xml.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/properties/ranger-solrconfig.xml.j2 b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/properties/ranger-solrconfig.xml.j2
new file mode 100644
index 0000000..a1975fd
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/properties/ranger-solrconfig.xml.j2
@@ -0,0 +1,1874 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+
+<!--
+     For more details about configurations options that may appear in
+     this file, see http://wiki.apache.org/solr/SolrConfigXml.
+-->
+<config>
+  <!-- In all configuration below, a prefix of "solr." for class names
+       is an alias that causes solr to search appropriate packages,
+       including org.apache.solr.(search|update|request|core|analysis)
+
+       You may also specify a fully qualified Java classname if you
+       have your own custom plugins.
+    -->
+
+  <!-- Controls what version of Lucene various components of Solr
+       adhere to.  Generally, you want to use the latest version to
+       get all bug fixes and improvements. It is highly recommended
+       that you fully re-index after changing this setting as it can
+       affect both how text is indexed and queried.
+  -->
+  <luceneMatchVersion>5.2.0</luceneMatchVersion>
+
+  <!-- <lib/> directives can be used to instruct Solr to load any Jars
+       identified and use them to resolve any "plugins" specified in
+       your solrconfig.xml or schema.xml (ie: Analyzers, Request
+       Handlers, etc...).
+
+       All directories and paths are resolved relative to the
+       instanceDir.
+
+       Please note that <lib/> directives are processed in the order
+       that they appear in your solrconfig.xml file, and are "stacked"
+       on top of each other when building a ClassLoader - so if you have
+       plugin jars with dependencies on other jars, the "lower level"
+       dependency jars should be loaded first.
+
+       If a "./lib" directory exists in your instanceDir, all files
+       found in it are included as if you had used the following
+       syntax...
+
+              <lib dir="./lib" />
+    -->
+
+  <!-- A 'dir' option by itself adds any files found in the directory
+       to the classpath, this is useful for including all jars in a
+       directory.
+
+       When a 'regex' is specified in addition to a 'dir', only the
+       files in that directory which completely match the regex
+       (anchored on both ends) will be included.
+
+       If a 'dir' option (with or without a regex) is used and nothing
+       is found that matches, a warning will be logged.
+
+       The examples below can be used to load some solr-contribs along
+       with their external dependencies.
+    -->
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar" />
+
+  <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
+
+  <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
+
+  <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
+
+  <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
+
+  <!-- an exact 'path' can be used instead of a 'dir' to specify a
+       specific jar file.  This will cause a serious error to be logged
+       if it can't be loaded.
+    -->
+  <!--
+     <lib path="../a-jar-that-does-not-exist.jar" />
+  -->
+
+  <!-- Data Directory
+
+       Used to specify an alternate directory to hold all index data
+       other than the default ./data under the Solr home.  If
+       replication is in use, this should match the replication
+       configuration.
+    -->
+  <dataDir>${solr.data.dir:}</dataDir>
+
+
+  <!-- The DirectoryFactory to use for indexes.
+
+       solr.StandardDirectoryFactory is filesystem
+       based and tries to pick the best implementation for the current
+       JVM and platform.  solr.NRTCachingDirectoryFactory, the default,
+       wraps solr.StandardDirectoryFactory and caches small files in memory
+       for better NRT performance.
+
+       One can force a particular implementation via solr.MMapDirectoryFactory,
+       solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
+
+       solr.RAMDirectoryFactory is memory based, not
+       persistent, and doesn't work with replication.
+    -->
+  <directoryFactory name="DirectoryFactory"
+                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
+
+
+    <!-- These will be used if you are using the solr.HdfsDirectoryFactory,
+         otherwise they will be ignored. If you don't plan on using hdfs,
+         you can safely remove this section. -->
+    <!-- The root directory that collection data should be written to. -->
+    <str name="solr.hdfs.home">${solr.hdfs.home:}</str>
+    <!-- The hadoop configuration files to use for the hdfs client. -->
+    <str name="solr.hdfs.confdir">${solr.hdfs.confdir:}</str>
+    <!-- Enable/Disable the hdfs cache. -->
+    <str name="solr.hdfs.blockcache.enabled">${solr.hdfs.blockcache.enabled:true}</str>
+    <!-- Enable/Disable using one global cache for all SolrCores.
+         The settings used will be from the first HdfsDirectoryFactory created. -->
+    <str name="solr.hdfs.blockcache.global">${solr.hdfs.blockcache.global:true}</str>
+
+  </directoryFactory>
+
+  <!-- The CodecFactory for defining the format of the inverted index.
+       The default implementation is SchemaCodecFactory, which is the official Lucene
+       index format, but hooks into the schema to provide per-field customization of
+       the postings lists and per-document values in the fieldType element
+       (postingsFormat/docValuesFormat). Note that most of the alternative implementations
+       are experimental, so if you choose to customize the index format, it's a good
+       idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
+       before upgrading to a newer version to avoid unnecessary reindexing.
+  -->
+  <codecFactory class="solr.SchemaCodecFactory"/>
+
+  <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>: -->
+
+       <schemaFactory class="ManagedIndexSchemaFactory">
+         <bool name="mutable">true</bool>
+         <str name="managedSchemaResourceName">managed-schema</str>
+       </schemaFactory>
+<!--
+       When ManagedIndexSchemaFactory is specified, Solr will load the schema from
+       the resource named in 'managedSchemaResourceName', rather than from schema.xml.
+       Note that the managed schema resource CANNOT be named schema.xml.  If the managed
+       schema does not exist, Solr will create it after reading schema.xml, then rename
+       'schema.xml' to 'schema.xml.bak'.
+
+       Do NOT hand edit the managed schema - external modifications will be ignored and
+       overwritten as a result of schema modification REST API calls.
+
+       When ManagedIndexSchemaFactory is specified with mutable = true, schema
+       modification REST API calls will be allowed; otherwise, error responses will be
+       sent back for these requests.
+
+  <schemaFactory class="ClassicIndexSchemaFactory"/>
+  -->
+
+  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       Index Config - These settings control low-level behavior of indexing
+       Most example settings here show the default value, but are commented
+       out, to more easily see where customizations have been made.
+
+       Note: This replaces <indexDefaults> and <mainIndex> from older versions
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <indexConfig>
+    <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
+         LimitTokenCountFilterFactory in your fieldType definition. E.g.
+     <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
+    -->
+    <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
+    <!-- <writeLockTimeout>1000</writeLockTimeout>  -->
+
+    <!-- The maximum number of simultaneous threads that may be
+         indexing documents at once in IndexWriter; if more than this
+         many threads arrive they will wait for others to finish.
+         Default in Solr/Lucene is 8. -->
+    <!-- <maxIndexingThreads>8</maxIndexingThreads>  -->
+
+    <!-- Expert: Enabling compound file will use less files for the index,
+         using fewer file descriptors on the expense of performance decrease.
+         Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
+    <!-- <useCompoundFile>false</useCompoundFile> -->
+
+    <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
+         indexing for buffering added documents and deletions before they are
+         flushed to the Directory.
+         maxBufferedDocs sets a limit on the number of documents buffered
+         before flushing.
+         If both ramBufferSizeMB and maxBufferedDocs is set, then
+         Lucene will flush based on whichever limit is hit first.
+         The default is 100 MB.  -->
+    <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
+    <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
+
+    <!-- Expert: Merge Policy
+         The Merge Policy in Lucene controls how merging of segments is done.
+         The default since Solr/Lucene 3.3 is TieredMergePolicy.
+         The default since Lucene 2.3 was the LogByteSizeMergePolicy,
+         Even older versions of Lucene used LogDocMergePolicy.
+      -->
+    <!--
+        <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
+          <int name="maxMergeAtOnce">10</int>
+          <int name="segmentsPerTier">10</int>
+        </mergePolicy>
+      -->
+
+    <!-- Merge Factor
+         The merge factor controls how many segments will get merged at a time.
+         For TieredMergePolicy, mergeFactor is a convenience parameter which
+         will set both MaxMergeAtOnce and SegmentsPerTier at once.
+         For LogByteSizeMergePolicy, mergeFactor decides how many new segments
+         will be allowed before they are merged into one.
+         Default is 10 for both merge policies.
+      -->
+    <!--
+    <mergeFactor>10</mergeFactor>
+      -->
+
+    <!-- Ranger customization. Set to 5 to trigger purging of deleted documents more often -->
+    <mergeFactor>{{ranger_audit_logs_merge_factor}}</mergeFactor>
+
+    <!-- Expert: Merge Scheduler
+         The Merge Scheduler in Lucene controls how merges are
+         performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)
+         can perform merges in the background using separate threads.
+         The SerialMergeScheduler (Lucene 2.2 default) does not.
+     -->
+    <!--
+       <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
+       -->
+
+    <!-- LockFactory
+
+         This option specifies which Lucene LockFactory implementation
+         to use.
+
+         single = SingleInstanceLockFactory - suggested for a
+                  read-only index or when there is no possibility of
+                  another process trying to modify the index.
+         native = NativeFSLockFactory - uses OS native file locking.
+                  Do not use when multiple solr webapps in the same
+                  JVM are attempting to share a single index.
+         simple = SimpleFSLockFactory  - uses a plain file for locking
+
+         Defaults: 'native' is default for Solr3.6 and later, otherwise
+                   'simple' is the default
+
+         More details on the nuances of each LockFactory...
+         http://wiki.apache.org/lucene-java/AvailableLockFactories
+    -->
+    <lockType>${solr.lock.type:native}</lockType>
+
+    <!-- Unlock On Startup
+
+         If true, unlock any held write or commit locks on startup.
+         This defeats the locking mechanism that allows multiple
+         processes to safely access a lucene index, and should be used
+         with care. Default is "false".
+
+         This is not needed if lock type is 'single'
+     -->
+    <!--
+    <unlockOnStartup>false</unlockOnStartup>
+      -->
+
+    <!-- Commit Deletion Policy
+         Custom deletion policies can be specified here. The class must
+         implement org.apache.lucene.index.IndexDeletionPolicy.
+
+         The default Solr IndexDeletionPolicy implementation supports
+         deleting index commit points on number of commits, age of
+         commit point and optimized status.
+
+         The latest commit point should always be preserved regardless
+         of the criteria.
+    -->
+    <!--
+    <deletionPolicy class="solr.SolrDeletionPolicy">
+    -->
+      <!-- The number of commit points to be kept -->
+      <!-- <str name="maxCommitsToKeep">1</str> -->
+      <!-- The number of optimized commit points to be kept -->
+      <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
+      <!--
+          Delete all commit points once they have reached the given age.
+          Supports DateMathParser syntax e.g.
+        -->
+      <!--
+         <str name="maxCommitAge">30MINUTES</str>
+         <str name="maxCommitAge">1DAY</str>
+      -->
+    <!--
+    </deletionPolicy>
+    -->
+
+    <!-- Lucene Infostream
+
+         To aid in advanced debugging, Lucene provides an "InfoStream"
+         of detailed information when indexing.
+
+         Setting the value to true will instruct the underlying Lucene
+         IndexWriter to write its info stream to solr's log. By default,
+         this is enabled here, and controlled through log4j.properties.
+      -->
+     <infoStream>true</infoStream>
+  </indexConfig>
+
+
+  <!-- JMX
+
+       This example enables JMX if and only if an existing MBeanServer
+       is found, use this if you want to configure JMX through JVM
+       parameters. Remove this to disable exposing Solr configuration
+       and statistics to JMX.
+
+       For more details see http://wiki.apache.org/solr/SolrJmx
+    -->
+  <jmx />
+  <!-- If you want to connect to a particular server, specify the
+       agentId
+    -->
+  <!-- <jmx agentId="myAgent" /> -->
+  <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
+  <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
+    -->
+
+  <!-- The default high-performance update handler -->
+  <updateHandler class="solr.DirectUpdateHandler2">
+
+    <!-- Enables a transaction log, used for real-time get, durability, and
+         and solr cloud replica recovery.  The log can grow as big as
+         uncommitted changes to the index, so use of a hard autoCommit
+         is recommended (see below).
+         "dir" - the target directory for transaction logs, defaults to the
+                solr data directory.  -->
+    <updateLog>
+      <str name="dir">${solr.ulog.dir:}</str>
+    </updateLog>
+
+    <!-- AutoCommit
+
+         Perform a hard commit automatically under certain conditions.
+         Instead of enabling autoCommit, consider using "commitWithin"
+         when adding documents.
+
+         http://wiki.apache.org/solr/UpdateXmlMessages
+
+         maxDocs - Maximum number of documents to add since the last
+                   commit before automatically triggering a new commit.
+
+         maxTime - Maximum amount of time in ms that is allowed to pass
+                   since a document was added before automatically
+                   triggering a new commit.
+         openSearcher - if false, the commit causes recent index changes
+           to be flushed to stable storage, but does not cause a new
+           searcher to be opened to make those changes visible.
+
+         If the updateLog is enabled, then it's highly recommended to
+         have some sort of hard autoCommit to limit the log size.
+      -->
+     <autoCommit>
+       <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
+       <openSearcher>false</openSearcher>
+     </autoCommit>
+
+    <!-- softAutoCommit is like autoCommit except it causes a
+         'soft' commit which only ensures that changes are visible
+         but does not ensure that data is synced to disk.  This is
+         faster and more near-realtime friendly than a hard commit.
+      -->
+
+     <autoSoftCommit>
+       <maxTime>${solr.autoSoftCommit.maxTime:5000}</maxTime>
+     </autoSoftCommit>
+
+    <!-- Update Related Event Listeners
+
+         Various IndexWriter related events can trigger Listeners to
+         take actions.
+
+         postCommit - fired after every commit or optimize command
+         postOptimize - fired after every optimize command
+      -->
+    <!-- The RunExecutableListener executes an external command from a
+         hook such as postCommit or postOptimize.
+
+         exe - the name of the executable to run
+         dir - dir to use as the current working directory. (default=".")
+         wait - the calling thread waits until the executable returns.
+                (default="true")
+         args - the arguments to pass to the program.  (default is none)
+         env - environment variables to set.  (default is none)
+      -->
+    <!-- This example shows how RunExecutableListener could be used
+         with the script based replication...
+         http://wiki.apache.org/solr/CollectionDistribution
+      -->
+    <!--
+       <listener event="postCommit" class="solr.RunExecutableListener">
+         <str name="exe">solr/bin/snapshooter</str>
+         <str name="dir">.</str>
+         <bool name="wait">true</bool>
+         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
+         <arr name="env"> <str>MYVAR=val1</str> </arr>
+       </listener>
+      -->
+
+  </updateHandler>
+
+  <!-- IndexReaderFactory
+
+       Use the following format to specify a custom IndexReaderFactory,
+       which allows for alternate IndexReader implementations.
+
+       ** Experimental Feature **
+
+       Please note - Using a custom IndexReaderFactory may prevent
+       certain other features from working. The API to
+       IndexReaderFactory may change without warning or may even be
+       removed from future releases if the problems cannot be
+       resolved.
+
+
+       ** Features that may not work with custom IndexReaderFactory **
+
+       The ReplicationHandler assumes a disk-resident index. Using a
+       custom IndexReader implementation may cause incompatibility
+       with ReplicationHandler and may cause replication to not work
+       correctly. See SOLR-1366 for details.
+
+    -->
+  <!--
+  <indexReaderFactory name="IndexReaderFactory" class="package.class">
+    <str name="someArg">Some Value</str>
+  </indexReaderFactory >
+  -->
+
+  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       Query section - these settings control query time things like caches
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <query>
+    <!-- Max Boolean Clauses
+
+         Maximum number of clauses in each BooleanQuery,  an exception
+         is thrown if exceeded.
+
+         ** WARNING **
+
+         This option actually modifies a global Lucene property that
+         will affect all SolrCores.  If multiple solrconfig.xml files
+         disagree on this property, the value at any given moment will
+         be based on the last SolrCore to be initialized.
+
+      -->
+    <maxBooleanClauses>1024</maxBooleanClauses>
+
+
+    <!-- Solr Internal Query Caches
+
+         There are two implementations of cache available for Solr,
+         LRUCache, based on a synchronized LinkedHashMap, and
+         FastLRUCache, based on a ConcurrentHashMap.
+
+         FastLRUCache has faster gets and slower puts in single
+         threaded operation and thus is generally faster than LRUCache
+         when the hit ratio of the cache is high (> 75%), and may be
+         faster under other scenarios on multi-cpu systems.
+    -->
+
+    <!-- Filter Cache
+
+         Cache used by SolrIndexSearcher for filters (DocSets),
+         unordered sets of *all* documents that match a query.  When a
+         new searcher is opened, its caches may be prepopulated or
+         "autowarmed" using data from caches in the old searcher.
+         autowarmCount is the number of items to prepopulate.  For
+         LRUCache, the autowarmed items will be the most recently
+         accessed items.
+
+         Parameters:
+           class - the SolrCache implementation LRUCache or
+               (LRUCache or FastLRUCache)
+           size - the maximum number of entries in the cache
+           initialSize - the initial capacity (number of entries) of
+               the cache.  (see java.util.HashMap)
+           autowarmCount - the number of entries to prepopulate from
+               and old cache.
+      -->
+    <filterCache class="solr.FastLRUCache"
+                 size="512"
+                 initialSize="512"
+                 autowarmCount="0"/>
+
+    <!-- Query Result Cache
+
+         Caches results of searches - ordered lists of document ids
+         (DocList) based on a query, a sort, and the range of documents requested.
+      -->
+    <queryResultCache class="solr.LRUCache"
+                     size="512"
+                     initialSize="512"
+                     autowarmCount="0"/>
+
+    <!-- Document Cache
+
+         Caches Lucene Document objects (the stored fields for each
+         document).  Since Lucene internal document ids are transient,
+         this cache will not be autowarmed.
+      -->
+    <documentCache class="solr.LRUCache"
+                   size="512"
+                   initialSize="512"
+                   autowarmCount="0"/>
+
+    <!-- custom cache currently used by block join -->
+    <cache name="perSegFilter"
+      class="solr.search.LRUCache"
+      size="10"
+      initialSize="0"
+      autowarmCount="10"
+      regenerator="solr.NoOpRegenerator" />
+
+    <!-- Field Value Cache
+
+         Cache used to hold field values that are quickly accessible
+         by document id.  The fieldValueCache is created by default
+         even if not configured here.
+      -->
+    <!--
+       <fieldValueCache class="solr.FastLRUCache"
+                        size="512"
+                        autowarmCount="128"
+                        showItems="32" />
+      -->
+
+    <!-- Custom Cache
+
+         Example of a generic cache.  These caches may be accessed by
+         name through SolrIndexSearcher.getCache(),cacheLookup(), and
+         cacheInsert().  The purpose is to enable easy caching of
+         user/application level data.  The regenerator argument should
+         be specified as an implementation of solr.CacheRegenerator
+         if autowarming is desired.
+      -->
+    <!--
+       <cache name="myUserCache"
+              class="solr.LRUCache"
+              size="4096"
+              initialSize="1024"
+              autowarmCount="1024"
+              regenerator="com.mycompany.MyRegenerator"
+              />
+      -->
+
+
+    <!-- Lazy Field Loading
+
+         If true, stored fields that are not requested will be loaded
+         lazily.  This can result in a significant speed improvement
+         if the usual case is to not load all stored fields,
+         especially if the skipped fields are large compressed text
+         fields.
+    -->
+    <enableLazyFieldLoading>true</enableLazyFieldLoading>
+
+   <!-- Use Filter For Sorted Query
+
+        A possible optimization that attempts to use a filter to
+        satisfy a search.  If the requested sort does not include
+        score, then the filterCache will be checked for a filter
+        matching the query. If found, the filter will be used as the
+        source of document ids, and then the sort will be applied to
+        that.
+
+        For most situations, this will not be useful unless you
+        frequently get the same search repeatedly with different sort
+        options, and none of them ever use "score"
+     -->
+   <!--
+      <useFilterForSortedQuery>true</useFilterForSortedQuery>
+     -->
+
+   <!-- Result Window Size
+
+        An optimization for use with the queryResultCache.  When a search
+        is requested, a superset of the requested number of document ids
+        are collected.  For example, if a search for a particular query
+        requests matching documents 10 through 19, and queryWindowSize is 50,
+        then documents 0 through 49 will be collected and cached.  Any further
+        requests in that range can be satisfied via the cache.
+     -->
+   <queryResultWindowSize>20</queryResultWindowSize>
+
+   <!-- Maximum number of documents to cache for any entry in the
+        queryResultCache.
+     -->
+   <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
+
+   <!-- Query Related Event Listeners
+
+        Various IndexSearcher related events can trigger Listeners to
+        take actions.
+
+        newSearcher - fired whenever a new searcher is being prepared
+        and there is a current searcher handling requests (aka
+        registered).  It can be used to prime certain caches to
+        prevent long request times for certain requests.
+
+        firstSearcher - fired whenever a new searcher is being
+        prepared but there is no current registered searcher to handle
+        requests or to gain autowarming data from.
+
+
+     -->
+    <!-- QuerySenderListener takes an array of NamedList and executes a
+         local query request for each NamedList in sequence.
+      -->
+    <listener event="newSearcher" class="solr.QuerySenderListener">
+      <arr name="queries">
+        <!--
+           <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
+           <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
+          -->
+      </arr>
+    </listener>
+    <listener event="firstSearcher" class="solr.QuerySenderListener">
+      <arr name="queries">
+        <lst>
+          <str name="q">static firstSearcher warming in solrconfig.xml</str>
+        </lst>
+      </arr>
+    </listener>
+
+    <!-- Use Cold Searcher
+
+         If a search request comes in and there is no current
+         registered searcher, then immediately register the still
+         warming searcher and use it.  If "false" then all requests
+         will block until the first searcher is done warming.
+      -->
+    <useColdSearcher>true</useColdSearcher>
+
+    <!-- Max Warming Searchers
+
+         Maximum number of searchers that may be warming in the
+         background concurrently.  An error is returned if this limit
+         is exceeded.
+
+         Recommend values of 1-2 for read-only slaves, higher for
+         masters w/o cache warming.
+      -->
+    <maxWarmingSearchers>2</maxWarmingSearchers>
+
+  </query>
+
+
+  <!-- Request Dispatcher
+
+       This section contains instructions for how the SolrDispatchFilter
+       should behave when processing requests for this SolrCore.
+
+       handleSelect is a legacy option that affects the behavior of requests
+       such as /select?qt=XXX
+
+       handleSelect="true" will cause the SolrDispatchFilter to process
+       the request and dispatch the query to a handler specified by the
+       "qt" param, assuming "/select" isn't already registered.
+
+       handleSelect="false" will cause the SolrDispatchFilter to
+       ignore "/select" requests, resulting in a 404 unless a handler
+       is explicitly registered with the name "/select"
+
+       handleSelect="true" is not recommended for new users, but is the default
+       for backwards compatibility
+    -->
+  <requestDispatcher handleSelect="false" >
+    <!-- Request Parsing
+
+         These settings indicate how Solr Requests may be parsed, and
+         what restrictions may be placed on the ContentStreams from
+         those requests
+
+         enableRemoteStreaming - enables use of the stream.file
+         and stream.url parameters for specifying remote streams.
+
+         multipartUploadLimitInKB - specifies the max size (in KiB) of
+         Multipart File Uploads that Solr will allow in a Request.
+
+         formdataUploadLimitInKB - specifies the max size (in KiB) of
+         form data (application/x-www-form-urlencoded) sent via
+         POST. You can use POST to pass request parameters not
+         fitting into the URL.
+
+         addHttpRequestToContext - if set to true, it will instruct
+         the requestParsers to include the original HttpServletRequest
+         object in the context map of the SolrQueryRequest under the
+         key "httpRequest". It will not be used by any of the existing
+         Solr components, but may be useful when developing custom
+         plugins.
+
+         *** WARNING ***
+         The settings below authorize Solr to fetch remote files, You
+         should make sure your system has some authentication before
+         using enableRemoteStreaming="true"
+
+      -->
+    <requestParsers enableRemoteStreaming="true"
+                    multipartUploadLimitInKB="2048000"
+                    formdataUploadLimitInKB="2048"
+                    addHttpRequestToContext="false"/>
+
+    <!-- HTTP Caching
+
+         Set HTTP caching related parameters (for proxy caches and clients).
+
+         The options below instruct Solr not to output any HTTP Caching
+         related headers
+      -->
+    <httpCaching never304="true" />
+    <!-- If you include a <cacheControl> directive, it will be used to
+         generate a Cache-Control header (as well as an Expires header
+         if the value contains "max-age=")
+
+         By default, no Cache-Control header is generated.
+
+         You can use the <cacheControl> option even if you have set
+         never304="true"
+      -->
+    <!--
+       <httpCaching never304="true" >
+         <cacheControl>max-age=30, public</cacheControl>
+       </httpCaching>
+      -->
+    <!-- To enable Solr to respond with automatically generated HTTP
+         Caching headers, and to response to Cache Validation requests
+         correctly, set the value of never304="false"
+
+         This will cause Solr to generate Last-Modified and ETag
+         headers based on the properties of the Index.
+
+         The following options can also be specified to affect the
+         values of these headers...
+
+         lastModFrom - the default value is "openTime" which means the
+         Last-Modified value (and validation against If-Modified-Since
+         requests) will all be relative to when the current Searcher
+         was opened.  You can change it to lastModFrom="dirLastMod" if
+         you want the value to exactly correspond to when the physical
+         index was last modified.
+
+         etagSeed="..." is an option you can change to force the ETag
+         header (and validation against If-None-Match requests) to be
+         different even if the index has not changed (ie: when making
+         significant changes to your config file)
+
+         (lastModifiedFrom and etagSeed are both ignored if you use
+         the never304="true" option)
+      -->
+    <!--
+       <httpCaching lastModifiedFrom="openTime"
+                    etagSeed="Solr">
+         <cacheControl>max-age=30, public</cacheControl>
+       </httpCaching>
+      -->
+  </requestDispatcher>
+
+  <!-- Request Handlers
+
+       http://wiki.apache.org/solr/SolrRequestHandler
+
+       Incoming queries will be dispatched to a specific handler by name
+       based on the path specified in the request.
+
+       Legacy behavior: If the request path uses "/select" but no Request
+       Handler has that name, and if handleSelect="true" has been specified in
+       the requestDispatcher, then the Request Handler is dispatched based on
+       the qt parameter.  Handlers without a leading '/' are accessed this way
+       like so: http://host/app/[core/]select?qt=name  If no qt is
+       given, then the requestHandler that declares default="true" will be
+       used or the one named "standard".
+
+       If a Request Handler is declared with startup="lazy", then it will
+       not be initialized until the first request that uses it.
+
+    -->
+
+  <requestHandler name="/dataimport" class="solr.DataImportHandler">
+    <lst name="defaults">
+      <str name="config">solr-data-config.xml</str>
+    </lst>
+  </requestHandler>
+
+  <!-- SearchHandler
+
+       http://wiki.apache.org/solr/SearchHandler
+
+       For processing Search Queries, the primary Request Handler
+       provided with Solr is "SearchHandler" It delegates to a sequent
+       of SearchComponents (see below) and supports distributed
+       queries across multiple shards
+    -->
+  <requestHandler name="/select" class="solr.SearchHandler">
+    <!-- default values for query parameters can be specified, these
+         will be overridden by parameters in the request
+      -->
+     <lst name="defaults">
+       <str name="echoParams">explicit</str>
+       <int name="rows">10</int>
+       <str name="df">text</str>
+     </lst>
+    <!-- In addition to defaults, "appends" params can be specified
+         to identify values which should be appended to the list of
+         multi-val params from the query (or the existing "defaults").
+      -->
+    <!-- In this example, the param "fq=instock:true" would be appended to
+         any query time fq params the user may specify, as a mechanism for
+         partitioning the index, independent of any user selected filtering
+         that may also be desired (perhaps as a result of faceted searching).
+
+         NOTE: there is *absolutely* nothing a client can do to prevent these
+         "appends" values from being used, so don't use this mechanism
+         unless you are sure you always want it.
+      -->
+    <!--
+       <lst name="appends">
+         <str name="fq">inStock:true</str>
+       </lst>
+      -->
+    <!-- "invariants" are a way of letting the Solr maintainer lock down
+         the options available to Solr clients.  Any params values
+         specified here are used regardless of what values may be specified
+         in either the query, the "defaults", or the "appends" params.
+
+         In this example, the facet.field and facet.query params would
+         be fixed, limiting the facets clients can use.  Faceting is
+         not turned on by default - but if the client does specify
+         facet=true in the request, these are the only facets they
+         will be able to see counts for; regardless of what other
+         facet.field or facet.query params they may specify.
+
+         NOTE: there is *absolutely* nothing a client can do to prevent these
+         "invariants" values from being used, so don't use this mechanism
+         unless you are sure you always want it.
+      -->
+    <!--
+       <lst name="invariants">
+         <str name="facet.field">cat</str>
+         <str name="facet.field">manu_exact</str>
+         <str name="facet.query">price:[* TO 500]</str>
+         <str name="facet.query">price:[500 TO *]</str>
+       </lst>
+      -->
+    <!-- If the default list of SearchComponents is not desired, that
+         list can either be overridden completely, or components can be
+         prepended or appended to the default list.  (see below)
+      -->
+    <!--
+       <arr name="components">
+         <str>nameOfCustomComponent1</str>
+         <str>nameOfCustomComponent2</str>
+       </arr>
+      -->
+    </requestHandler>
+
+  <!-- A request handler that returns indented JSON by default -->
+  <requestHandler name="/query" class="solr.SearchHandler">
+     <lst name="defaults">
+       <str name="echoParams">explicit</str>
+       <str name="wt">json</str>
+       <str name="indent">true</str>
+       <str name="df">text</str>
+     </lst>
+  </requestHandler>
+
+
+  <!-- realtime get handler, guaranteed to return the latest stored fields of
+       any document, without the need to commit or open a new searcher.  The
+       current implementation relies on the updateLog feature being enabled.
+
+       ** WARNING **
+       Do NOT disable the realtime get handler at /get if you are using
+       SolrCloud otherwise any leader election will cause a full sync in ALL
+       replicas for the shard in question. Similarly, a replica recovery will
+       also always fetch the complete index from the leader because a partial
+       sync will not be possible in the absence of this handler.
+  -->
+  <requestHandler name="/get" class="solr.RealTimeGetHandler">
+     <lst name="defaults">
+       <str name="omitHeader">true</str>
+       <str name="wt">json</str>
+       <str name="indent">true</str>
+     </lst>
+  </requestHandler>
+
+
+  <!-- A Robust Example
+
+       This example SearchHandler declaration shows off usage of the
+       SearchHandler with many defaults declared
+
+       Note that multiple instances of the same Request Handler
+       (SearchHandler) can be registered multiple times with different
+       names (and different init parameters)
+    -->
+  <requestHandler name="/browse" class="solr.SearchHandler">
+    <lst name="defaults">
+      <str name="echoParams">explicit</str>
+
+      <!-- VelocityResponseWriter settings -->
+      <str name="wt">velocity</str>
+      <str name="v.template">browse</str>
+      <str name="v.layout">layout</str>
+
+      <!-- Query settings -->
+      <str name="defType">edismax</str>
+      <str name="q.alt">*:*</str>
+      <str name="rows">10</str>
+      <str name="fl">*,score</str>
+
+      <!-- Faceting defaults -->
+      <str name="facet">on</str>
+      <str name="facet.mincount">1</str>
+    </lst>
+  </requestHandler>
+
+
+  <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
+    <lst name="defaults">
+      <str name="df">text</str>
+      <str name="update.chain">add-unknown-fields-to-the-schema</str>
+    </lst>
+  </initParams>
+
+  <!-- Update Request Handler.
+
+       http://wiki.apache.org/solr/UpdateXmlMessages
+
+       The canonical Request Handler for Modifying the Index through
+       commands specified using XML, JSON, CSV, or JAVABIN
+
+       Note: Since solr1.1 requestHandlers requires a valid content
+       type header if posted in the body. For example, curl now
+       requires: -H 'Content-type:text/xml; charset=utf-8'
+
+       To override the request content type and force a specific
+       Content-type, use the request parameter:
+         ?update.contentType=text/csv
+
+       This handler will pick a response format to match the input
+       if the 'wt' parameter is not explicit
+    -->
+  <requestHandler name="/update" class="solr.UpdateRequestHandler">
+    <!-- See below for information on defining
+         updateRequestProcessorChains that can be used by name
+         on each Update Request
+      -->
+    <!--
+       <lst name="defaults">
+         <str name="update.chain">dedupe</str>
+       </lst>
+       -->
+  </requestHandler>
+
+  <!-- Solr Cell Update Request Handler
+
+       http://wiki.apache.org/solr/ExtractingRequestHandler
+
+    -->
+  <requestHandler name="/update/extract"
+                  startup="lazy"
+                  class="solr.extraction.ExtractingRequestHandler" >
+    <lst name="defaults">
+      <str name="lowernames">true</str>
+      <str name="uprefix">ignored_</str>
+
+      <!-- capture link hrefs but ignore div attributes -->
+      <str name="captureAttr">true</str>
+      <str name="fmap.a">links</str>
+      <str name="fmap.div">ignored_</str>
+    </lst>
+  </requestHandler>
+
+
+  <!-- Field Analysis Request Handler
+
+       RequestHandler that provides much the same functionality as
+       analysis.jsp. Provides the ability to specify multiple field
+       types and field names in the same request and outputs
+       index-time and query-time analysis for each of them.
+
+       Request parameters are:
+       analysis.fieldname - field name whose analyzers are to be used
+
+       analysis.fieldtype - field type whose analyzers are to be used
+       analysis.fieldvalue - text for index-time analysis
+       q (or analysis.q) - text for query time analysis
+       analysis.showmatch (true|false) - When set to true and when
+           query analysis is performed, the produced tokens of the
+           field value analysis will be marked as "matched" for every
+           token that is produces by the query analysis
+   -->
+  <requestHandler name="/analysis/field"
+                  startup="lazy"
+                  class="solr.FieldAnalysisRequestHandler" />
+
+
+  <!-- Document Analysis Handler
+
+       http://wiki.apache.org/solr/AnalysisRequestHandler
+
+       An analysis handler that provides a breakdown of the analysis
+       process of provided documents. This handler expects a (single)
+       content stream with the following format:
+
+       <docs>
+         <doc>
+           <field name="id">1</field>
+           <field name="name">The Name</field>
+           <field name="text">The Text Value</field>
+         </doc>
+         <doc>...</doc>
+         <doc>...</doc>
+         ...
+       </docs>
+
+    Note: Each document must contain a field which serves as the
+    unique key. This key is used in the returned response to associate
+    an analysis breakdown to the analyzed document.
+
+    Like the FieldAnalysisRequestHandler, this handler also supports
+    query analysis by sending either an "analysis.query" or "q"
+    request parameter that holds the query text to be analyzed. It
+    also supports the "analysis.showmatch" parameter which when set to
+    true, all field tokens that match the query tokens will be marked
+    as a "match".
+  -->
+  <requestHandler name="/analysis/document"
+                  class="solr.DocumentAnalysisRequestHandler"
+                  startup="lazy" />
+
+  <!-- This single handler is equivalent to the following... -->
+  <!--
+     <requestHandler name="/admin/luke"       class="solr.admin.LukeRequestHandler" />
+     <requestHandler name="/admin/system"     class="solr.admin.SystemInfoHandler" />
+     <requestHandler name="/admin/plugins"    class="solr.admin.PluginInfoHandler" />
+     <requestHandler name="/admin/threads"    class="solr.admin.ThreadDumpHandler" />
+     <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
+     <requestHandler name="/admin/file"       class="solr.admin.ShowFileRequestHandler" >
+    -->
+  <!-- If you wish to hide files under ${solr.home}/conf, explicitly
+       register the ShowFileRequestHandler using the definition below.
+       NOTE: The glob pattern ('*') is the only pattern supported at present, *.xml will
+             not exclude all files ending in '.xml'. Use it to exclude _all_ updates
+    -->
+  <!--
+     <requestHandler name="/admin/file"
+                     class="solr.admin.ShowFileRequestHandler" >
+       <lst name="invariants">
+         <str name="hidden">synonyms.txt</str>
+         <str name="hidden">anotherfile.txt</str>
+         <str name="hidden">*</str>
+       </lst>
+     </requestHandler>
+    -->
+
+  <!--
+    Enabling this request handler (which is NOT a default part of the admin handler) will allow the Solr UI to edit
+    all the config files. This is intended for secure/development use ONLY! Leaving available and publically
+    accessible is a security vulnerability and should be done with extreme caution!
+  -->
+  <!--
+  <requestHandler name="/admin/fileedit" class="solr.admin.EditFileRequestHandler" >
+    <lst name="invariants">
+         <str name="hidden">synonyms.txt</str>
+         <str name="hidden">anotherfile.txt</str>
+    </lst>
+  </requestHandler>
+  -->
+  <!-- ping/healthcheck -->
+  <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
+    <lst name="invariants">
+      <str name="q">solrpingquery</str>
+    </lst>
+    <lst name="defaults">
+      <str name="echoParams">all</str>
+    </lst>
+    <!-- An optional feature of the PingRequestHandler is to configure the
+         handler with a "healthcheckFile" which can be used to enable/disable
+         the PingRequestHandler.
+         relative paths are resolved against the data dir
+      -->
+    <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
+  </requestHandler>
+
+  <!-- Echo the request contents back to the client -->
+  <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
+    <lst name="defaults">
+     <str name="echoParams">explicit</str>
+     <str name="echoHandler">true</str>
+    </lst>
+  </requestHandler>
+
+  <!-- Solr Replication
+
+       The SolrReplicationHandler supports replicating indexes from a
+       "master" used for indexing and "slaves" used for queries.
+
+       http://wiki.apache.org/solr/SolrReplication
+
+       It is also necessary for SolrCloud to function (in Cloud mode, the
+       replication handler is used to bulk transfer segments when nodes
+       are added or need to recover).
+
+       https://wiki.apache.org/solr/SolrCloud/
+    -->
+  <requestHandler name="/replication" class="solr.ReplicationHandler" >
+    <!--
+       To enable simple master/slave replication, uncomment one of the
+       sections below, depending on whether this solr instance should be
+       the "master" or a "slave".  If this instance is a "slave" you will
+       also need to fill in the masterUrl to point to a real machine.
+    -->
+    <!--
+       <lst name="master">
+         <str name="replicateAfter">commit</str>
+         <str name="replicateAfter">startup</str>
+         <str name="confFiles">schema.xml,stopwords.txt</str>
+       </lst>
+    -->
+    <!--
+       <lst name="slave">
+         <str name="masterUrl">http://your-master-hostname:8983/solr</str>
+         <str name="pollInterval">00:00:60</str>
+       </lst>
+    -->
+  </requestHandler>
+
+  <!-- Search Components
+
+       Search components are registered to SolrCore and used by
+       instances of SearchHandler (which can access them by name)
+
+       By default, the following components are available:
+
+       <searchComponent name="query"     class="solr.QueryComponent" />
+       <searchComponent name="facet"     class="solr.FacetComponent" />
+       <searchComponent name="mlt"       class="solr.MoreLikeThisComponent" />
+       <searchComponent name="highlight" class="solr.HighlightComponent" />
+       <searchComponent name="stats"     class="solr.StatsComponent" />
+       <searchComponent name="debug"     class="solr.DebugComponent" />
+
+       Default configuration in a requestHandler would look like:
+
+       <arr name="components">
+         <str>query</str>
+         <str>facet</str>
+         <str>mlt</str>
+         <str>highlight</str>
+         <str>stats</str>
+         <str>debug</str>
+       </arr>
+
+       If you register a searchComponent to one of the standard names,
+       that will be used instead of the default.
+
+       To insert components before or after the 'standard' components, use:
+
+       <arr name="first-components">
+         <str>myFirstComponentName</str>
+       </arr>
+
+       <arr name="last-components">
+         <str>myLastComponentName</str>
+       </arr>
+
+       NOTE: The component registered with the name "debug" will
+       always be executed after the "last-components"
+
+     -->
+
+   <!-- Spell Check
+
+        The spell check component can return a list of alternative spelling
+        suggestions.
+
+        http://wiki.apache.org/solr/SpellCheckComponent
+     -->
+  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
+
+    <str name="queryAnalyzerFieldType">text_general</str>
+
+    <!-- Multiple "Spell Checkers" can be declared and used by this
+         component
+      -->
+
+    <!-- a spellchecker built from a field of the main index -->
+    <lst name="spellchecker">
+      <str name="name">default</str>
+      <str name="field">text</str>
+      <str name="classname">solr.DirectSolrSpellChecker</str>
+      <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
+      <str name="distanceMeasure">internal</str>
+      <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
+      <float name="accuracy">0.5</float>
+      <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
+      <int name="maxEdits">2</int>
+      <!-- the minimum shared prefix when enumerating terms -->
+      <int name="minPrefix">1</int>
+      <!-- maximum number of inspections per result. -->
+      <int name="maxInspections">5</int>
+      <!-- minimum length of a query term to be considered for correction -->
+      <int name="minQueryLength">4</int>
+      <!-- maximum threshold of documents a query term can appear to be considered for correction -->
+      <float name="maxQueryFrequency">0.01</float>
+      <!-- uncomment this to require suggestions to occur in 1% of the documents
+        <float name="thresholdTokenFrequency">.01</float>
+      -->
+    </lst>
+
+    <!-- a spellchecker that can break or combine words.  See "/spell" handler below for usage -->
+    <lst name="spellchecker">
+      <str name="name">wordbreak</str>
+      <str name="classname">solr.WordBreakSolrSpellChecker</str>
+      <str name="field">name</str>
+      <str name="combineWords">true</str>
+      <str name="breakWords">true</str>
+      <int name="maxChanges">10</int>
+    </lst>
+
+    <!-- a spellchecker that uses a different distance measure -->
+    <!--
+       <lst name="spellchecker">
+         <str name="name">jarowinkler</str>
+         <str name="field">spell</str>
+         <str name="classname">solr.DirectSolrSpellChecker</str>
+         <str name="distanceMeasure">
+           org.apache.lucene.search.spell.JaroWinklerDistance
+         </str>
+       </lst>
+     -->
+
+    <!-- a spellchecker that use an alternate comparator
+
+         comparatorClass be one of:
+          1. score (default)
+          2. freq (Frequency first, then score)
+          3. A fully qualified class name
+      -->
+    <!--
+       <lst name="spellchecker">
+         <str name="name">freq</str>
+         <str name="field">lowerfilt</str>
+         <str name="classname">solr.DirectSolrSpellChecker</str>
+         <str name="comparatorClass">freq</str>
+      -->
+
+    <!-- A spellchecker that reads the list of words from a file -->
+    <!--
+       <lst name="spellchecker">
+         <str name="classname">solr.FileBasedSpellChecker</str>
+         <str name="name">file</str>
+         <str name="sourceLocation">spellings.txt</str>
+         <str name="characterEncoding">UTF-8</str>
+         <str name="spellcheckIndexDir">spellcheckerFile</str>
+       </lst>
+      -->
+  </searchComponent>
+
+  <!-- A request handler for demonstrating the spellcheck component.
+
+       NOTE: This is purely as an example.  The whole purpose of the
+       SpellCheckComponent is to hook it into the request handler that
+       handles your normal user queries so that a separate request is
+       not needed to get suggestions.
+
+       IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
+       NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
+
+       See http://wiki.apache.org/solr/SpellCheckComponent for details
+       on the request parameters.
+    -->
+  <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
+    <lst name="defaults">
+      <str name="df">text</str>
+      <!-- Solr will use suggestions from both the 'default' spellchecker
+           and from the 'wordbreak' spellchecker and combine them.
+           collations (re-written queries) can include a combination of
+           corrections from both spellcheckers -->
+      <str name="spellcheck.dictionary">default</str>
+      <str name="spellcheck.dictionary">wordbreak</str>
+      <str name="spellcheck">on</str>
+      <str name="spellcheck.extendedResults">true</str>
+      <str name="spellcheck.count">10</str>
+      <str name="spellcheck.alternativeTermCount">5</str>
+      <str name="spellcheck.maxResultsForSuggest">5</str>
+      <str name="spellcheck.collate">true</str>
+      <str name="spellcheck.collateExtendedResults">true</str>
+      <str name="spellcheck.maxCollationTries">10</str>
+      <str name="spellcheck.maxCollations">5</str>
+    </lst>
+    <arr name="last-components">
+      <str>spellcheck</str>
+    </arr>
+  </requestHandler>
+
+  <searchComponent name="suggest" class="solr.SuggestComponent">
+        <lst name="suggester">
+      <str name="name">mySuggester</str>
+      <str name="lookupImpl">FuzzyLookupFactory</str>      <!-- org.apache.solr.spelling.suggest.fst -->
+      <str name="dictionaryImpl">DocumentDictionaryFactory</str>     <!-- org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory -->
+      <str name="field">cat</str>
+      <str name="weightField">price</str>
+      <str name="suggestAnalyzerFieldType">string</str>
+    </lst>
+  </searchComponent>
+
+  <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
+    <lst name="defaults">
+      <str name="suggest">true</str>
+      <str name="suggest.count">10</str>
+    </lst>
+    <arr name="components">
+      <str>suggest</str>
+    </arr>
+  </requestHandler>
+  <!-- Term Vector Component
+
+       http://wiki.apache.org/solr/TermVectorComponent
+    -->
+  <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
+
+  <!-- A request handler for demonstrating the term vector component
+
+       This is purely as an example.
+
+       In reality you will likely want to add the component to your
+       already specified request handlers.
+    -->
+  <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
+    <lst name="defaults">
+      <str name="df">text</str>
+      <bool name="tv">true</bool>
+    </lst>
+    <arr name="last-components">
+      <str>tvComponent</str>
+    </arr>
+  </requestHandler>
+
+  <!-- Clustering Component
+
+       You'll need to set the solr.clustering.enabled system property
+       when running solr to run with clustering enabled:
+
+            java -Dsolr.clustering.enabled=true -jar start.jar
+
+       http://wiki.apache.org/solr/ClusteringComponent
+       http://carrot2.github.io/solr-integration-strategies/
+    -->
+  <searchComponent name="clustering"
+                   enable="${solr.clustering.enabled:false}"
+                   class="solr.clustering.ClusteringComponent" >
+    <lst name="engine">
+      <str name="name">lingo</str>
+
+      <!-- Class name of a clustering algorithm compatible with the Carrot2 framework.
+
+           Currently available open source algorithms are:
+           * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
+           * org.carrot2.clustering.stc.STCClusteringAlgorithm
+           * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
+
+           See http://project.carrot2.org/algorithms.html for more information.
+
+           A commercial algorithm Lingo3G (needs to be installed separately) is defined as:
+           * com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm
+        -->
+      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
+
+      <!-- Override location of the clustering algorithm's resources
+           (attribute definitions and lexical resources).
+
+           A directory from which to load algorithm-specific stop words,
+           stop labels and attribute definition XMLs.
+
+           For an overview of Carrot2 lexical resources, see:
+           http://download.carrot2.org/head/manual/#chapter.lexical-resources
+
+           For an overview of Lingo3G lexical resources, see:
+           http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources
+       -->
+      <str name="carrot.resourcesDir">clustering/carrot2</str>
+    </lst>
+
+    <!-- An example definition for the STC clustering algorithm. -->
+    <lst name="engine">
+      <str name="name">stc</str>
+      <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
+    </lst>
+
+    <!-- An example definition for the bisecting kmeans clustering algorithm. -->
+    <lst name="engine">
+      <str name="name">kmeans</str>
+      <str name="carrot.algorithm">org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm</str>
+    </lst>
+  </searchComponent>
+
+  <!-- A request handler for demonstrating the clustering component
+
+       This is purely as an example.
+
+       In reality you will likely want to add the component to your
+       already specified request handlers.
+    -->
+  <requestHandler name="/clustering"
+                  startup="lazy"
+                  enable="${solr.clustering.enabled:false}"
+                  class="solr.SearchHandler">
+    <lst name="defaults">
+      <bool name="clustering">true</bool>
+      <bool name="clustering.results">true</bool>
+      <!-- Field name with the logical "title" of a each document (optional) -->
+      <str name="carrot.title">name</str>
+      <!-- Field name with the logical "URL" of a each document (optional) -->
+      <str name="carrot.url">id</str>
+      <!-- Field name with the logical "content" of a each document (optional) -->
+      <str name="carrot.snippet">features</str>
+      <!-- Apply highlighter to the title/ content and use this for clustering. -->
+      <bool name="carrot.produceSummary">true</bool>
+      <!-- the maximum number of labels per cluster -->
+      <!--<int name="carrot.numDescriptions">5</int>-->
+      <!-- produce sub clusters -->
+      <bool name="carrot.outputSubClusters">false</bool>
+
+      <!-- Configure the remaining request handler parameters. -->
+      <str name="defType">edismax</str>
+      <str name="qf">
+        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+      </str>
+      <str name="q.alt">*:*</str>
+      <str name="rows">10</str>
+      <str name="fl">*,score</str>
+    </lst>
+    <arr name="last-components">
+      <str>clustering</str>
+    </arr>
+  </requestHandler>
+
+  <!-- Terms Component
+
+       http://wiki.apache.org/solr/TermsComponent
+
+       A component to return terms and document frequency of those
+       terms
+    -->
+  <searchComponent name="terms" class="solr.TermsComponent"/>
+
+  <!-- A request handler for demonstrating the terms component -->
+  <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
+     <lst name="defaults">
+      <bool name="terms">true</bool>
+      <bool name="distrib">false</bool>
+    </lst>
+    <arr name="components">
+      <str>terms</str>
+    </arr>
+  </requestHandler>
+
+
+  <!-- Query Elevation Component
+
+       http://wiki.apache.org/solr/QueryElevationComponent
+
+       a search component that enables you to configure the top
+       results for a given query regardless of the normal lucene
+       scoring.
+    -->
+  <searchComponent name="elevator" class="solr.QueryElevationComponent" >
+    <!-- pick a fieldType to analyze queries -->
+    <str name="queryFieldType">string</str>
+    <str name="config-file">elevate.xml</str>
+  </searchComponent>
+
+  <!-- A request handler for demonstrating the elevator component -->
+  <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
+    <lst name="defaults">
+      <str name="echoParams">explicit</str>
+      <str name="df">text</str>
+    </lst>
+    <arr name="last-components">
+      <str>elevator</str>
+    </arr>
+  </requestHandler>
+
+  <!-- Highlighting Component
+
+       http://wiki.apache.org/solr/HighlightingParameters
+    -->
+  <searchComponent class="solr.HighlightComponent" name="highlight">
+    <highlighting>
+      <!-- Configure the standard fragmenter -->
+      <!-- This could most likely be commented out in the "default" case -->
+      <fragmenter name="gap"
+                  default="true"
+                  class="solr.highlight.GapFragmenter">
+        <lst name="defaults">
+          <int name="hl.fragsize">100</int>
+        </lst>
+      </fragmenter>
+
+      <!-- A regular-expression-based fragmenter
+           (for sentence extraction)
+        -->
+      <fragmenter name="regex"
+                  class="solr.highlight.RegexFragmenter">
+        <lst name="defaults">
+          <!-- slightly smaller fragsizes work better because of slop -->
+          <int name="hl.fragsize">70</int>
+          <!-- allow 50% slop on fragment sizes -->
+          <float name="hl.regex.slop">0.5</float>
+          <!-- a basic sentence pattern -->
+          <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
+        </lst>
+      </fragmenter>
+
+      <!-- Configure the standard formatter -->
+      <formatter name="html"
+                 default="true"
+                 class="solr.highlight.HtmlFormatter">
+        <lst name="defaults">
+          <str name="hl.simple.pre"><![CDATA[<em>]]></str>
+          <str name="hl.simple.post"><![CDATA[</em>]]></str>
+        </lst>
+      </formatter>
+
+      <!-- Configure the standard encoder -->
+      <encoder name="html"
+               class="solr.highlight.HtmlEncoder" />
+
+      <!-- Configure the standard fragListBuilder -->
+      <fragListBuilder name="simple"
+                       class="solr.highlight.SimpleFragListBuilder"/>
+
+      <!-- Configure the single fragListBuilder -->
+      <fragListBuilder name="single"
+                       class="solr.highlight.SingleFragListBuilder"/>
+
+      <!-- Configure the weighted fragListBuilder -->
+      <fragListBuilder name="weighted"
+                       default="true"
+                       class="solr.highlight.WeightedFragListBuilder"/>
+
+      <!-- default tag FragmentsBuilder -->
+      <fragmentsBuilder name="default"
+                        default="true"
+                        class="solr.highlight.ScoreOrderFragmentsBuilder">
+        <!--
+        <lst name="defaults">
+          <str name="hl.multiValuedSeparatorChar">/</str>
+        </lst>
+        -->
+      </fragmentsBuilder>
+
+      <!-- multi-colored tag FragmentsBuilder -->
+      <fragmentsBuilder name="colored"
+                        class="solr.highlight.ScoreOrderFragmentsBuilder">
+        <lst name="defaults">
+          <str name="hl.tag.pre"><![CDATA[
+               <b style="background:yellow">,<b style="background:lawgreen">,
+               <b style="background:aquamarine">,<b style="background:magenta">,
+               <b style="background:palegreen">,<b style="background:coral">,
+               <b style="background:wheat">,<b style="background:khaki">,
+               <b style="background:lime">,<b style="background:deepskyblue">]]></str>
+          <str name="hl.tag.post"><![CDATA[</b>]]></str>
+        </lst>
+      </fragmentsBuilder>
+
+      <boundaryScanner name="default"
+                       default="true"
+                       class="solr.highlight.SimpleBoundaryScanner">
+        <lst name="defaults">
+          <str name="hl.bs.maxScan">10</str>
+          <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
+        </lst>
+      </boundaryScanner>
+
+      <boundaryScanner name="breakIterator"
+                       class="solr.highlight.BreakIteratorBoundaryScanner">
+        <lst name="defaults">
+          <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
+          <str name="hl.bs.type">WORD</str>
+          <!-- language and country are used when constructing Locale object.  -->
+          <!-- And the Locale object will be used when getting instance of BreakIterator -->
+          <str name="hl.bs.language">en</str>
+          <str name="hl.bs.country">US</str>
+        </lst>
+      </boundaryScanner>
+    </highlighting>
+  </searchComponent>
+
+  <!-- Update Processors
+
+       Chains of Update Processor Factories for dealing with Update
+       Requests can be declared, and then used by name in Update
+       Request Processors
+
+       http://wiki.apache.org/solr/UpdateRequestProcessor
+
+    -->
+
+  <!-- Add unknown fields to the schema
+
+       An example field type guessing update processor that will
+       attempt to parse string-typed field values as Booleans, Longs,
+       Doubles, or Dates, and then add schema fields with the guessed
+       field types.
+
+       This requires that the schema is both managed and mutable, by
+       declaring schemaFactory as ManagedIndexSchemaFactory, with
+       mutable specified as true.
+
+       See http://wiki.apache.org/solr/GuessingFieldTypes
+    -->
+  <updateRequestProcessorChain name="add-unknown-fields-to-the-schema">
+    <processor class="solr.DefaultValueUpdateProcessorFactory">
+        <str name="fieldName">_ttl_</str>
+        <str name="value">+{{ranger_audit_max_retention_days}}DAYS</str>
+    </processor>
+    <processor class="solr.processor.DocExpirationUpdateProcessorFactory">
+        <int name="autoDeletePeriodSeconds">86400</int>
+        <str name="ttlFieldName">_ttl_</str>
+        <str name="expirationFieldName">_expire_at_</str>
+    </processor>
+    <processor class="solr.FirstFieldValueUpdateProcessorFactory">
+      <str name="fieldName">_expire_at_</str>
+    </processor>
+
+    <processor class="solr.RemoveBlankFieldUpdateProcessorFactory"/>
+    <processor class="solr.ParseBooleanFieldUpdateProcessorFactory"/>
+    <processor class="solr.ParseLongFieldUpdateProcessorFactory"/>
+    <processor class="solr.ParseDoubleFieldUpdateProcessorFactory"/>
+    <processor class="solr.ParseDateFieldUpdateProcessorFactory">
+      <arr name="format">
+        <str>yyyy-MM-dd'T'HH:mm:ss.SSSZ</str>
+        <str>yyyy-MM-dd'T'HH:mm:ss,SSSZ</str>
+        <str>yyyy-MM-dd'T'HH:mm:ss.SSS</str>
+        <str>yyyy-MM-dd'T'HH:mm:ss,SSS</str>
+        <str>yyyy-MM-dd'T'HH:mm:ssZ</str>
+        <str>yyyy-MM-dd'T'HH:mm:ss</str>
+        <str>yyyy-MM-dd'T'HH:mmZ</str>
+        <str>yyyy-MM-dd'T'HH:mm</str>
+        <str>yyyy-MM-dd HH:mm:ss.SSSZ</str>
+        <str>yyyy-MM-dd HH:mm:ss,SSSZ</str>
+        <str>yyyy-MM-dd HH:mm:ss.SSS</str>
+        <str>yyyy-MM-dd HH:mm:ss,SSS</str>
+        <str>yyyy-MM-dd HH:mm:ssZ</str>
+        <str>yyyy-MM-dd HH:mm:ss</str>
+        <str>yyyy-MM-dd HH:mmZ</str>
+        <str>yyyy-MM-dd HH:mm</str>
+        <str>yyyy-MM-dd</str>
+      </arr>
+    </processor>
+    <processor class="solr.AddSchemaFieldsUpdateProcessorFactory">
+      <str name="defaultFieldType">key_lower_case</str>
+      <lst name="typeMapping">
+        <str name="valueClass">java.lang.Boolean</str>
+        <str name="fieldType">boolean</str>
+      </lst>
+      <lst name="typeMapping">
+        <str name="valueClass">java.util.Date</str>
+        <str name="fieldType">tdate</str>
+      </lst>
+      <lst name="typeMapping">
+        <str name="valueClass">java.lang.Long</str>
+        <str name="valueClass">java.lang.Integer</str>
+        <str name="fieldType">tlong</str>
+      </lst>
+      <lst name="typeMapping">
+        <str name="valueClass">java.lang.Number</str>
+        <str name="fieldType">tdouble</str>
+      </lst>
+    </processor>
+    <processor class="solr.LogUpdateProcessorFactory"/>
+    <processor class="solr.RunUpdateProcessorFactory"/>
+  </updateRequestProcessorChain>
+
+
+  <!-- Deduplication
+
+       An example dedup update processor that creates the "id" field
+       on the fly based on the hash code of some other fields.  This
+       example has overwriteDupes set to false since we are using the
+       id field as the signatureField and Solr will maintain
+       uniqueness based on that anyway.
+
+    -->
+  <!--
+     <updateRequestProcessorChain name="dedupe">
+       <processor class="solr.processor.SignatureUpdateProcessorFactory">
+         <bool name="enabled">true</bool>
+         <str name="signatureField">id</str>
+         <bool name="overwriteDupes">false</bool>
+         <str name="fields">name,features,cat</str>
+         <str name="signatureClass">solr.processor.Lookup3Signature</str>
+       </processor>
+       <processor class="solr.LogUpdateProcessorFactory" />
+       <processor class="solr.RunUpdateProcessorFactory" />
+     </updateRequestProcessorChain>
+    -->
+
+  <!-- Language identification
+
+       This example update chain identifies the language of the incoming
+       documents using the langid contrib. The detected language is
+       written to field language_s. No field name mapping is done.
+       The fields used for detection are text, title, subject and description,
+       making this example suitable for detecting languages form full-text
+       rich documents injected via ExtractingRequestHandler.
+       See more about langId at http://wiki.apache.org/solr/LanguageDetection
+    -->
+    <!--
+     <updateRequestProcessorChain name="langid">
+       <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
+         <str name="langid.fl">text,title,subject,description</str>
+         <str name="langid.langField">language_s</str>
+         <str name="langid.fallback">en</str>
+       </processor>
+       <processor class="solr.LogUpdateProcessorFactory" />
+       <processor class="solr.RunUpdateProcessorFactory" />
+     </updateRequestProcessorChain>
+    -->
+
+  <!-- Script update processor
+
+    This example hooks in an update processor implemented using JavaScript.
+
+    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
+  -->
+  <!--
+    <updateRequestProcessorChain name="script">
+      <processor class="solr.StatelessScriptUpdateProcessorFactory">
+        <str name="script">update-script.js</str>
+        <lst name="params">
+          <str name="config_param">example config parameter</str>
+        </lst>
+      </processor>
+      <processor class="solr.RunUpdateProcessorFactory" />
+    </updateRequestProcessorChain>
+  -->
+
+  <!-- Response Writers
+
+       http://wiki.apache.org/solr/QueryResponseWriter
+
+       Request responses will be written using the writer specified by
+       the 'wt' request parameter matching the name of a registered
+       writer.
+
+       The "default" writer is the default and will be used if 'wt' is
+       not specified in the request.
+    -->
+  <!-- The following response writers are implicitly configured unless
+       overridden...
+    -->
+  <!--
+     <queryResponseWriter name="xml"
+                          default="true"
+                          class="solr.XMLResponseWriter" />
+     <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
+     <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
+     <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
+     <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
+     <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
+     <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
+     <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
+    -->
+
+  <queryResponseWriter name="json" class="solr.JSONResponseWriter">
+     <!-- For the purposes of the tutorial, JSON responses are written as
+      plain text so that they are easy to read in *any* browser.
+      If you expect a MIME type of "application/json" just remove this override.
+     -->
+    <str name="content-type">text/plain; charset=UTF-8</str>
+  </queryResponseWriter>
+
+  <!--
+     Custom response writers can be declared as needed...
+    -->
+  <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy">
+    <str name="template.base.dir">${velocity.template.base.dir:}</str>
+  </queryResponseWriter>
+
+  <!-- XSLT response writer transforms the XML output by any xslt file found
+       in Solr's conf/xslt directory.  Changes to xslt files are checked for
+       every xsltCacheLifetimeSeconds.
+    -->
+  <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
+    <int name="xsltCacheLifetimeSeconds">5</int>
+  </queryResponseWriter>
+
+  <!-- Query Parsers
+
+       http://wiki.apache.org/solr/SolrQuerySyntax
+
+       Multiple QParserPlugins can be registered by name, and then
+       used in either the "defType" param for the QueryComponent (used
+       by SearchHandler) or in LocalParams
+    -->
+  <!-- example of registering a query parser -->
+  <!--
+     <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
+    -->
+
+  <!-- Function Parsers
+
+       http://wiki.apache.org/solr/FunctionQuery
+
+       Multiple ValueSourceParsers can be registered by name, and then
+       used as function names when using the "func" QParser.
+    -->
+  <!-- example of registering a custom function parser  -->
+  <!--
+     <valueSourceParser name="myfunc"
+                        class="com.mycompany.MyValueSourceParser" />
+    -->
+
+
+  <!-- Document Transformers
+       http://wiki.apache.org/solr/DocTransformers
+    -->
+  <!--
+     Could be something like:
+     <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
+       <int name="connection">jdbc://....</int>
+     </transformer>
+
+     To add a constant value to all docs, use:
+     <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
+       <int name="value">5</int>
+     </transformer>
+
+     If you want the user to still be able to change it with _value:something_ use this:
+     <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
+       <double name="defaultValue">5</double>
+     </transformer>
+
+      If you are using the QueryElevationComponent, you may wish to mark documents that get boosted.  The
+      EditorialMarkerFactory will do exactly that:
+     <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
+    -->
+
+
+  <!-- Legacy config for the admin interface -->
+  <admin>
+    <defaultQuery>*:*</defaultQuery>
+  </admin>
+
+</config>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/quicklinks/quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/quicklinks/quicklinks.json b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/quicklinks/quicklinks.json
new file mode 100644
index 0000000..d75d5f1
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/quicklinks/quicklinks.json
@@ -0,0 +1,41 @@
+{
+  "name": "default",
+  "description": "default quick links configuration",
+  "configuration": {
+    "protocol":
+    {
+      "type":"https",
+      "checks":[
+        {
+          "property":"ranger.service.https.attrib.ssl.enabled",
+          "desired":"true",
+          "site":"ranger-admin-site"
+        },
+        {
+          "property":"ranger.service.http.enabled",
+          "desired":"false",
+          "site":"ranger-admin-site"
+        }
+      ]
+    },
+
+    "links": [
+      {
+        "name": "ranger_admin_ui",
+        "label": "Ranger Admin UI",
+        "component_name" : "RANGER_ADMIN",
+        "requires_user_name": "false",
+        "url": "%@://%@:%@",
+        "attributes": ["authenticated", "sso"],
+        "port":{
+          "http_property": "ranger.service.http.port",
+          "http_default_port": "6080",
+          "https_property": "ranger.service.https.port",
+          "https_default_port": "6182",
+          "regex": "(\\d*)+",
+          "site": "ranger-admin-site"
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/role_command_order.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/role_command_order.json b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/role_command_order.json
new file mode 100644
index 0000000..557e9ac
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/role_command_order.json
@@ -0,0 +1,9 @@
+{
+  "general_deps" : {
+    "_comment" : "dependencies for RANGER",
+    "RANGER_SERVICE_CHECK-SERVICE_CHECK" : ["RANGER_ADMIN-START"],
+    "RANGER_SERVICE_CHECK-SERVICE_CHECK" : ["RANGER_USERSYNC-START"],
+    "RANGER_USERSYNC-START" : ["RANGER_ADMIN-START"],
+    "RANGER_ADMIN-START": ["ZOOKEEPER_SERVER-START", "INFRA_SOLR-START"]
+  }
+}


[35/52] [abbrv] ambari git commit: AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
index abe84ab..e5abe32 100644
--- a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
+++ b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
@@ -1,143 +1,143 @@
 {
     "localComponents": [
-        "NAMENODE", 
-        "SECONDARY_NAMENODE", 
-        "ZOOKEEPER_SERVER", 
-        "DATANODE", 
-        "HDFS_CLIENT", 
-        "ZOOKEEPER_CLIENT", 
-        "RANGER_USERSYNC", 
-        "RANGER_ADMIN", 
+        "NAMENODE",
+        "SECONDARY_NAMENODE",
+        "ZOOKEEPER_SERVER",
+        "DATANODE",
+        "HDFS_CLIENT",
+        "ZOOKEEPER_CLIENT",
+        "RANGER_USERSYNC",
+        "RANGER_ADMIN",
         "RANGER_TAGSYNC",
         "LOGSEARCH_SOLR",
         "LOGSEARCH_SOLR_CLIENT"
-    ], 
+    ],
     "configuration_attributes": {
-        "ranger-hdfs-audit": {}, 
-        "ssl-client": {}, 
-        "ranger-admin-site": {}, 
-        "ranger-hdfs-policymgr-ssl": {}, 
-        "tagsync-application-properties": {}, 
-        "ranger-env": {}, 
-        "usersync-log4j": {}, 
-        "admin-properties": {}, 
-        "ranger-ugsync-site": {}, 
+        "ranger-hdfs-audit": {},
+        "ssl-client": {},
+        "ranger-admin-site": {},
+        "ranger-hdfs-policymgr-ssl": {},
+        "tagsync-application-properties": {},
+        "ranger-env": {},
+        "usersync-log4j": {},
+        "admin-properties": {},
+        "ranger-ugsync-site": {},
         "hdfs-site": {
             "final": {
-                "dfs.datanode.data.dir": "true", 
-                "dfs.namenode.http-address": "true", 
-                "dfs.datanode.failed.volumes.tolerated": "true", 
-                "dfs.support.append": "true", 
-                "dfs.namenode.name.dir": "true", 
+                "dfs.datanode.data.dir": "true",
+                "dfs.namenode.http-address": "true",
+                "dfs.datanode.failed.volumes.tolerated": "true",
+                "dfs.support.append": "true",
+                "dfs.namenode.name.dir": "true",
                 "dfs.webhdfs.enabled": "true"
             }
-        }, 
+        },
         "ranger-tagsync-site": {},
         "ranger-tagsync-policymgr-ssl": {},
         "zoo.cfg": {},
         "hadoop-policy": {},
-        "hdfs-log4j": {}, 
-        "ranger-hdfs-plugin-properties": {}, 
+        "hdfs-log4j": {},
+        "ranger-hdfs-plugin-properties": {},
         "core-site": {
             "final": {
                 "fs.defaultFS": "true"
             }
-        }, 
-        "hadoop-env": {}, 
-        "zookeeper-log4j": {}, 
-        "ssl-server": {}, 
-        "ranger-site": {}, 
-        "admin-log4j": {}, 
-        "tagsync-log4j": {}, 
-        "ranger-hdfs-security": {}, 
+        },
+        "hadoop-env": {},
+        "zookeeper-log4j": {},
+        "ssl-server": {},
+        "ranger-site": {},
+        "admin-log4j": {},
+        "tagsync-log4j": {},
+        "ranger-hdfs-security": {},
         "ranger-solr-configuration": {},
         "usersync-properties": {},
         "zookeeper-env": {},
         "infra-solr-env": {},
         "infra-solr-client-log4j": {},
         "cluster-env": {}
-    }, 
-    "public_hostname": "c6401.ambari.apache.org", 
-    "commandId": "11-0", 
-    "hostname": "c6401.ambari.apache.org", 
-    "kerberosCommandParams": [], 
-    "serviceName": "RANGER", 
-    "role": "RANGER_ADMIN", 
-    "forceRefreshConfigTagsBeforeExecution": [], 
-    "requestId": 11, 
+    },
+    "public_hostname": "c6401.ambari.apache.org",
+    "commandId": "11-0",
+    "hostname": "c6401.ambari.apache.org",
+    "kerberosCommandParams": [],
+    "serviceName": "RANGER",
+    "role": "RANGER_ADMIN",
+    "forceRefreshConfigTagsBeforeExecution": [],
+    "requestId": 11,
     "agentConfigParams": {
         "agent": {
             "parallel_execution": 0
         }
-    }, 
-    "clusterName": "c1", 
-    "commandType": "EXECUTION_COMMAND", 
-    "taskId": 31, 
-    "roleParams": {}, 
+    },
+    "clusterName": "c1",
+    "commandType": "EXECUTION_COMMAND",
+    "taskId": 31,
+    "roleParams": {},
     "configurationTags": {
         "ranger-hdfs-audit": {
             "tag": "version1466705299922"
-        }, 
+        },
         "ssl-client": {
             "tag": "version1"
-        }, 
+        },
         "ranger-admin-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
             "tag": "version1466705299922"
-        }, 
+        },
         "tagsync-application-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-env": {
             "tag": "version1466705299949"
-        }, 
+        },
         "usersync-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "admin-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-ugsync-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "hdfs-site": {
             "tag": "version1"
-        }, 
+        },
         "ranger-tagsync-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "zoo.cfg": {
             "tag": "version1"
-        }, 
+        },
         "hadoop-policy": {
             "tag": "version1"
-        }, 
+        },
         "hdfs-log4j": {
             "tag": "version1"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
             "tag": "version1466705299922"
-        }, 
+        },
         "core-site": {
             "tag": "version1"
-        }, 
+        },
         "hadoop-env": {
             "tag": "version1"
-        }, 
+        },
         "zookeeper-log4j": {
             "tag": "version1"
-        }, 
+        },
         "ssl-server": {
             "tag": "version1"
-        }, 
+        },
         "ranger-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "admin-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "tagsync-log4j": {
             "tag": "version1466705299949"
         },
@@ -146,7 +146,7 @@
         },
         "ranger-hdfs-security": {
             "tag": "version1466705299922"
-        }, 
+        },
         "usersync-properties": {
             "tag": "version1466705299949"
         },
@@ -165,116 +165,116 @@
         "cluster-env": {
             "tag": "version1"
         }
-    }, 
-    "roleCommand": "START", 
+    },
+    "roleCommand": "START",
     "hostLevelParams": {
-        "agent_stack_retry_on_unavailability": "false", 
-        "stack_name": "HDP", 
+        "agent_stack_retry_on_unavailability": "false",
+        "stack_name": "HDP",
         "package_version": "2_6_0_0_*",
         "custom_mysql_jdbc_name": "mysql-connector-java.jar",
         "previous_custom_mysql_jdbc_name": "mysql-connector-java-old.jar",
-        "host_sys_prepped": "false", 
-        "ambari_db_rca_username": "mapred", 
+        "host_sys_prepped": "false",
+        "ambari_db_rca_username": "mapred",
         "current_version": "2.6.0.0-801",
         "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar",
         "agent_stack_retry_count": "5",
         "stack_version": "2.6",
-        "jdk_name": "jdk-8u60-linux-x64.tar.gz", 
-        "ambari_db_rca_driver": "org.postgresql.Driver", 
-        "java_home": "/usr/jdk64/jdk1.7.0_45", 
-        "repository_version_id": "1", 
-        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
-        "not_managed_hdfs_path_list": "[\"/tmp\"]", 
-        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
-        "java_version": "8", 
+        "jdk_name": "jdk-8u60-linux-x64.tar.gz",
+        "ambari_db_rca_driver": "org.postgresql.Driver",
+        "java_home": "/usr/jdk64/jdk1.7.0_45",
+        "repository_version_id": "1",
+        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/",
+        "not_managed_hdfs_path_list": "[\"/tmp\"]",
+        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+        "java_version": "8",
         "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.0.0-801\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.6\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.6.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.0.0-801\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]",
         "package_list": "[{\"name\":\"ranger_${stack_version}-admin\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-usersync\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-tagsync\",\"condition\":\"should_install_ranger_tagsync\",\"skipUpgrade\":false},{\"name\":\"ambari-logsearch-solr-client\",\"condition\":\"should_install_logsearch_solr_client\",\"skipUpgrade\":false}]",
-        "db_name": "ambari", 
-        "group_list": "[\"ranger\",\"hadoop\",\"users\"]", 
-        "agentCacheDir": "/var/lib/ambari-agent/cache", 
-        "ambari_db_rca_password": "mapred", 
-        "jce_name": "jce_policy-8.zip", 
-        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar", 
-        "db_driver_filename": "mysql-connector-java.jar", 
-        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]", 
+        "db_name": "ambari",
+        "group_list": "[\"ranger\",\"hadoop\",\"users\"]",
+        "agentCacheDir": "/var/lib/ambari-agent/cache",
+        "ambari_db_rca_password": "mapred",
+        "jce_name": "jce_policy-8.zip",
+        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar",
+        "db_driver_filename": "mysql-connector-java.jar",
+        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]",
         "clientsToUpdateConfigs": "[\"*\"]"
-    }, 
+    },
     "commandParams": {
-        "service_package_folder": "common-services/RANGER/0.4.0/package", 
-        "script": "scripts/ranger_admin.py", 
+        "service_package_folder": "common-services/RANGER/0.4.0/package",
+        "script": "scripts/ranger_admin.py",
         "hooks_folder": "HDP/2.0.6/hooks",
         "version": "2.6.0.0-801",
-        "max_duration_for_retries": "0", 
-        "command_retry_enabled": "false", 
-        "command_timeout": "600", 
+        "max_duration_for_retries": "0",
+        "command_retry_enabled": "false",
+        "command_timeout": "600",
         "script_type": "PYTHON"
-    }, 
-    "forceRefreshConfigTags": [], 
-    "stageId": 0, 
+    },
+    "forceRefreshConfigTags": [],
+    "stageId": 0,
     "clusterHostInfo": {
         "snamenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_use_ssl": [
             "false"
-        ], 
+        ],
         "all_ping_ports": [
             "8670"
-        ], 
+        ],
         "ranger_tagsync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ranger_usersync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "slave_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "namenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_port": [
             "8080"
-        ], 
+        ],
         "ranger_admin_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_racks": [
             "/default-rack"
-        ], 
+        ],
         "all_ipv4_ips": [
             "172.22.83.73"
-        ], 
+        ],
         "ambari_server_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "zookeeper_hosts": [
             "c6401.ambari.apache.org"
         ],
         "infra_solr_hosts": [
             "c6401.ambari.apache.org"
         ]
-    }, 
+    },
     "configurations": {
         "ranger-hdfs-audit": {
-            "xasecure.audit.destination.solr.zookeepers": "NONE", 
-            "xasecure.audit.destination.solr.urls": "", 
-            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool", 
-            "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/hdfs/spool", 
+            "xasecure.audit.destination.solr.zookeepers": "NONE",
+            "xasecure.audit.destination.solr.urls": "",
+            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool",
+            "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/hdfs/spool",
             "xasecure.audit.destination.hdfs": "true",
-            "xasecure.audit.destination.solr": "false", 
+            "xasecure.audit.destination.solr": "false",
             "xasecure.audit.provider.summary.enabled": "false",
             "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
             "xasecure.audit.is.enabled": "true"
         },
         "ranger-tagsync-policymgr-ssl": {
-            "xasecure.policymgr.clientssl.keystore": "/etc/security/serverKeys/ranger-tagsync-keystore.jks", 
-            "xasecure.policymgr.clientssl.truststore.password": "changeit", 
+            "xasecure.policymgr.clientssl.keystore": "/etc/security/serverKeys/ranger-tagsync-keystore.jks",
+            "xasecure.policymgr.clientssl.truststore.password": "changeit",
             "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{ranger_tagsync_credential_file}}",
-            "xasecure.policymgr.clientssl.truststore": "/etc/security/serverKeys/ranger-tagsync-mytruststore.jks", 
+            "xasecure.policymgr.clientssl.truststore": "/etc/security/serverKeys/ranger-tagsync-mytruststore.jks",
             "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{ranger_tagsync_credential_file}}",
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
         },
@@ -287,143 +287,143 @@
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
         },
         "ssl-client": {
-            "ssl.client.truststore.reload.interval": "10000", 
-            "ssl.client.keystore.password": "bigdata", 
-            "ssl.client.truststore.type": "jks", 
-            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks", 
-            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks", 
-            "ssl.client.truststore.password": "bigdata", 
+            "ssl.client.truststore.reload.interval": "10000",
+            "ssl.client.keystore.password": "bigdata",
+            "ssl.client.truststore.type": "jks",
+            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks",
+            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks",
+            "ssl.client.truststore.password": "bigdata",
             "ssl.client.keystore.type": "jks"
-        }, 
+        },
         "ranger-admin-site": {
             "ranger.admin.kerberos.cookie.domain": "",
-            "ranger.kms.service.user.hdfs": "hdfs", 
-            "ranger.spnego.kerberos.principal": "", 
-            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.plugins.hive.serviceuser": "hive", 
-            "ranger.lookup.kerberos.keytab": "", 
-            "ranger.plugins.kms.serviceuser": "kms", 
-            "ranger.service.https.attrib.ssl.enabled": "false", 
-            "ranger.sso.browser.useragent": "Mozilla,chrome", 
-            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01", 
-            "ranger.plugins.hbase.serviceuser": "hbase", 
-            "ranger.plugins.hdfs.serviceuser": "hdfs", 
-            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}", 
-            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net", 
-            "ranger.plugins.knox.serviceuser": "knox", 
-            "ranger.ldap.base.dn": "dc=example,dc=com", 
-            "ranger.sso.publicKey": "", 
-            "ranger.admin.kerberos.cookie.path": "/", 
-            "ranger.service.https.attrib.clientAuth": "want", 
-            "ranger.jpa.jdbc.user": "{{ranger_db_user}}", 
-            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})", 
-            "ranger.ldap.group.roleattribute": "cn", 
-            "ranger.plugins.kafka.serviceuser": "kafka", 
-            "ranger.admin.kerberos.principal": "", 
-            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
-            "ranger.credential.provider.path": "/etc/ranger/admin/rangeradmin.jceks", 
-            "ranger.ldap.referral": "ignore", 
-            "ranger.service.http.port": "6080", 
-            "ranger.ldap.user.searchfilter": "(uid={0})", 
-            "ranger.plugins.atlas.serviceuser": "atlas", 
+            "ranger.kms.service.user.hdfs": "hdfs",
+            "ranger.spnego.kerberos.principal": "",
+            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}",
+            "ranger.plugins.hive.serviceuser": "hive",
+            "ranger.lookup.kerberos.keytab": "",
+            "ranger.plugins.kms.serviceuser": "kms",
+            "ranger.service.https.attrib.ssl.enabled": "false",
+            "ranger.sso.browser.useragent": "Mozilla,chrome",
+            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01",
+            "ranger.plugins.hbase.serviceuser": "hbase",
+            "ranger.plugins.hdfs.serviceuser": "hdfs",
+            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}",
+            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net",
+            "ranger.plugins.knox.serviceuser": "knox",
+            "ranger.ldap.base.dn": "dc=example,dc=com",
+            "ranger.sso.publicKey": "",
+            "ranger.admin.kerberos.cookie.path": "/",
+            "ranger.service.https.attrib.clientAuth": "want",
+            "ranger.jpa.jdbc.user": "{{ranger_db_user}}",
+            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})",
+            "ranger.ldap.group.roleattribute": "cn",
+            "ranger.plugins.kafka.serviceuser": "kafka",
+            "ranger.admin.kerberos.principal": "",
+            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
+            "ranger.credential.provider.path": "/etc/ranger/admin/rangeradmin.jceks",
+            "ranger.ldap.referral": "ignore",
+            "ranger.service.http.port": "6080",
+            "ranger.ldap.user.searchfilter": "(uid={0})",
+            "ranger.plugins.atlas.serviceuser": "atlas",
             "ranger.truststore.password": "changeit",
             "ranger.truststore.alias": "trustStoreAlias",
-            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.password": "NONE", 
+            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.password": "NONE",
             "ranger.audit.solr.zookeepers": "c6401.ambari.apache.org:2181/infra-solr",
-            "ranger.lookup.kerberos.principal": "", 
-            "ranger.service.https.port": "6182", 
-            "ranger.plugins.storm.serviceuser": "storm", 
-            "ranger.externalurl": "{{ranger_external_url}}", 
-            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.kms.service.user.hive": "", 
-            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}", 
-            "ranger.service.host": "{{ranger_host}}", 
-            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin", 
-            "ranger.service.https.attrib.keystore.pass": "xasecure", 
-            "ranger.unixauth.remote.login.enabled": "true", 
-            "ranger.jpa.jdbc.credential.alias": "rangeradmin", 
-            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.username": "ranger_solr", 
-            "ranger.sso.enabled": "false", 
-            "ranger.audit.solr.urls": "", 
-            "ranger.ldap.ad.domain": "", 
-            "ranger.plugins.yarn.serviceuser": "yarn", 
-            "ranger.audit.source.type": "solr", 
-            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
-            "ranger.ldap.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.authentication.method": "UNIX", 
-            "ranger.service.http.enabled": "true", 
-            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}", 
-            "ranger.ldap.ad.referral": "ignore", 
-            "ranger.ldap.ad.base.dn": "dc=example,dc=com", 
-            "ranger.jpa.jdbc.password": "_", 
-            "ranger.spnego.kerberos.keytab": "", 
-            "ranger.sso.providerurl": "", 
-            "ranger.unixauth.service.hostname": "{{ugsync_host}}", 
-            "ranger.admin.kerberos.keytab": "", 
-            "ranger.admin.kerberos.token.valid.seconds": "30", 
-            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver", 
+            "ranger.lookup.kerberos.principal": "",
+            "ranger.service.https.port": "6182",
+            "ranger.plugins.storm.serviceuser": "storm",
+            "ranger.externalurl": "{{ranger_external_url}}",
+            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.kms.service.user.hive": "",
+            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}",
+            "ranger.service.host": "{{ranger_host}}",
+            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin",
+            "ranger.service.https.attrib.keystore.pass": "xasecure",
+            "ranger.unixauth.remote.login.enabled": "true",
+            "ranger.jpa.jdbc.credential.alias": "rangeradmin",
+            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.username": "ranger_solr",
+            "ranger.sso.enabled": "false",
+            "ranger.audit.solr.urls": "",
+            "ranger.ldap.ad.domain": "",
+            "ranger.plugins.yarn.serviceuser": "yarn",
+            "ranger.audit.source.type": "solr",
+            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
+            "ranger.ldap.url": "{{ranger_ug_ldap_url}}",
+            "ranger.authentication.method": "UNIX",
+            "ranger.service.http.enabled": "true",
+            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}",
+            "ranger.ldap.ad.referral": "ignore",
+            "ranger.ldap.ad.base.dn": "dc=example,dc=com",
+            "ranger.jpa.jdbc.password": "_",
+            "ranger.spnego.kerberos.keytab": "",
+            "ranger.sso.providerurl": "",
+            "ranger.unixauth.service.hostname": "{{ugsync_host}}",
+            "ranger.admin.kerberos.keytab": "",
+            "ranger.admin.kerberos.token.valid.seconds": "30",
+            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver",
             "ranger.unixauth.service.port": "5151",
             "ranger.service.https.attrib.keystore.credential.alias": "keyStoreCredentialAlias"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
-            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks", 
-            "xasecure.policymgr.clientssl.truststore.password": "changeit", 
-            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}", 
-            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks", 
-            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}", 
+            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks",
+            "xasecure.policymgr.clientssl.truststore.password": "changeit",
+            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}",
+            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks",
+            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}",
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
-        }, 
+        },
         "tagsync-application-properties": {
-            "atlas.kafka.entities.group.id": "ranger_entities_consumer", 
-            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181", 
+            "atlas.kafka.entities.group.id": "ranger_entities_consumer",
+            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181",
             "atlas.kafka.bootstrap.servers": "localhost:6667"
-        }, 
+        },
         "ranger-env": {
-            "ranger_solr_shards": "1", 
-            "ranger_solr_config_set": "ranger_audits", 
-            "ranger_user": "ranger", 
+            "ranger_solr_shards": "1",
+            "ranger_solr_config_set": "ranger_audits",
+            "ranger_user": "ranger",
             "ranger_solr_replication_factor": "1",
-            "xml_configurations_supported": "true", 
-            "ranger-atlas-plugin-enabled": "No", 
-            "ranger-hbase-plugin-enabled": "No", 
-            "ranger-yarn-plugin-enabled": "No", 
-            "bind_anonymous": "false", 
-            "ranger_admin_username": "amb_ranger_admin", 
-            "admin_password": "admin", 
-            "is_solrCloud_enabled": "true", 
-            "ranger-storm-plugin-enabled": "No", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "ranger_group": "ranger", 
-            "ranger-knox-plugin-enabled": "No", 
-            "ranger_admin_log_dir": "/var/log/ranger/admin", 
-            "ranger-kafka-plugin-enabled": "No", 
-            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306", 
-            "ranger-hive-plugin-enabled": "No", 
-            "xasecure.audit.destination.solr": "true", 
-            "ranger_pid_dir": "/var/run/ranger", 
-            "xasecure.audit.destination.hdfs": "true", 
-            "admin_username": "admin", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
-            "create_db_dbuser": "true", 
-            "ranger_solr_collection_name": "ranger_audits", 
-            "ranger_admin_password": "P1!q9xa96SMi5NCl", 
+            "xml_configurations_supported": "true",
+            "ranger-atlas-plugin-enabled": "No",
+            "ranger-hbase-plugin-enabled": "No",
+            "ranger-yarn-plugin-enabled": "No",
+            "bind_anonymous": "false",
+            "ranger_admin_username": "amb_ranger_admin",
+            "admin_password": "admin",
+            "is_solrCloud_enabled": "true",
+            "ranger-storm-plugin-enabled": "No",
+            "ranger-hdfs-plugin-enabled": "No",
+            "ranger_group": "ranger",
+            "ranger-knox-plugin-enabled": "No",
+            "ranger_admin_log_dir": "/var/log/ranger/admin",
+            "ranger-kafka-plugin-enabled": "No",
+            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306",
+            "ranger-hive-plugin-enabled": "No",
+            "xasecure.audit.destination.solr": "true",
+            "ranger_pid_dir": "/var/run/ranger",
+            "xasecure.audit.destination.hdfs": "true",
+            "admin_username": "admin",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
+            "create_db_dbuser": "true",
+            "ranger_solr_collection_name": "ranger_audits",
+            "ranger_admin_password": "P1!q9xa96SMi5NCl",
             "ranger_usersync_log_dir": "/var/log/ranger/usersync"
-        }, 
+        },
         "usersync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/usersync.
 log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n"
-        }, 
+        },
         "admin-properties": {
-            "db_user": "rangeradmin01", 
-            "DB_FLAVOR": "MYSQL", 
-            "db_password": "rangeradmin01", 
-            "db_root_user": "root", 
-            "policymgr_external_url": "http://c6401.ambari.apache.org:6080", 
-            "db_name": "ranger01", 
-            "db_host": "c6401.ambari.apache.org", 
-            "db_root_password": "vagrant", 
+            "db_user": "rangeradmin01",
+            "DB_FLAVOR": "MYSQL",
+            "db_password": "rangeradmin01",
+            "db_root_user": "root",
+            "policymgr_external_url": "http://c6401.ambari.apache.org:6080",
+            "db_name": "ranger01",
+            "db_host": "c6401.ambari.apache.org",
+            "db_root_password": "vagrant",
             "SQL_CONNECTOR_JAR": "{{driver_curl_target}}"
         },
         "ranger-solr-configuration": {
@@ -432,248 +432,248 @@
             "ranger_audit_logs_merge_factor": "5"
         },
         "ranger-ugsync-site": {
-            "ranger.usersync.ldap.binddn": "", 
-            "ranger.usersync.policymgr.username": "rangerusersync", 
-            "ranger.usersync.policymanager.mockrun": "false", 
-            "ranger.usersync.group.searchbase": "", 
-            "ranger.usersync.ldap.bindalias": "testldapalias", 
-            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks", 
-            "ranger.usersync.port": "5151", 
-            "ranger.usersync.pagedresultssize": "500", 
-            "ranger.usersync.group.memberattributename": "", 
-            "ranger.usersync.kerberos.principal": "", 
-            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder", 
-            "ranger.usersync.ldap.referral": "ignore", 
-            "ranger.usersync.group.searchfilter": "", 
-            "ranger.usersync.ldap.user.objectclass": "person", 
-            "ranger.usersync.logdir": "{{usersync_log_dir}}", 
-            "ranger.usersync.ldap.user.searchfilter": "", 
-            "ranger.usersync.ldap.groupname.caseconversion": "none", 
-            "ranger.usersync.ldap.ldapbindpassword": "", 
-            "ranger.usersync.unix.minUserId": "500", 
-            "ranger.usersync.policymanager.maxrecordsperapicall": "1000", 
-            "ranger.usersync.group.nameattribute": "", 
-            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password", 
-            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks", 
-            "ranger.usersync.user.searchenabled": "false", 
-            "ranger.usersync.group.usermapsyncenabled": "true", 
-            "ranger.usersync.ldap.bindkeystore": "", 
-            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof", 
-            "ranger.usersync.kerberos.keytab": "", 
-            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe", 
-            "ranger.usersync.group.objectclass": "", 
-            "ranger.usersync.ldap.user.searchscope": "sub", 
-            "ranger.usersync.unix.password.file": "/etc/passwd", 
-            "ranger.usersync.ldap.user.nameattribute": "", 
-            "ranger.usersync.pagedresultsenabled": "true", 
-            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}", 
-            "ranger.usersync.group.search.first.enabled": "false", 
-            "ranger.usersync.group.searchenabled": "false", 
-            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder", 
-            "ranger.usersync.ssl": "true", 
-            "ranger.usersync.ldap.url": "", 
-            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org", 
-            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.ldap.user.searchbase": "", 
-            "ranger.usersync.ldap.username.caseconversion": "none", 
-            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.keystore.password": "UnIx529p", 
-            "ranger.usersync.unix.group.file": "/etc/group", 
-            "ranger.usersync.filesource.file": "/tmp/usergroup.txt", 
-            "ranger.usersync.group.searchscope": "", 
-            "ranger.usersync.truststore.password": "changeit", 
-            "ranger.usersync.enabled": "true", 
-            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000", 
+            "ranger.usersync.ldap.binddn": "",
+            "ranger.usersync.policymgr.username": "rangerusersync",
+            "ranger.usersync.policymanager.mockrun": "false",
+            "ranger.usersync.group.searchbase": "",
+            "ranger.usersync.ldap.bindalias": "testldapalias",
+            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks",
+            "ranger.usersync.port": "5151",
+            "ranger.usersync.pagedresultssize": "500",
+            "ranger.usersync.group.memberattributename": "",
+            "ranger.usersync.kerberos.principal": "",
+            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
+            "ranger.usersync.ldap.referral": "ignore",
+            "ranger.usersync.group.searchfilter": "",
+            "ranger.usersync.ldap.user.objectclass": "person",
+            "ranger.usersync.logdir": "{{usersync_log_dir}}",
+            "ranger.usersync.ldap.user.searchfilter": "",
+            "ranger.usersync.ldap.groupname.caseconversion": "none",
+            "ranger.usersync.ldap.ldapbindpassword": "",
+            "ranger.usersync.unix.minUserId": "500",
+            "ranger.usersync.policymanager.maxrecordsperapicall": "1000",
+            "ranger.usersync.group.nameattribute": "",
+            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password",
+            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks",
+            "ranger.usersync.user.searchenabled": "false",
+            "ranger.usersync.group.usermapsyncenabled": "true",
+            "ranger.usersync.ldap.bindkeystore": "",
+            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof",
+            "ranger.usersync.kerberos.keytab": "",
+            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe",
+            "ranger.usersync.group.objectclass": "",
+            "ranger.usersync.ldap.user.searchscope": "sub",
+            "ranger.usersync.unix.password.file": "/etc/passwd",
+            "ranger.usersync.ldap.user.nameattribute": "",
+            "ranger.usersync.pagedresultsenabled": "true",
+            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}",
+            "ranger.usersync.group.search.first.enabled": "false",
+            "ranger.usersync.group.searchenabled": "false",
+            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder",
+            "ranger.usersync.ssl": "true",
+            "ranger.usersync.ldap.url": "",
+            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org",
+            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.ldap.user.searchbase": "",
+            "ranger.usersync.ldap.username.caseconversion": "none",
+            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.keystore.password": "UnIx529p",
+            "ranger.usersync.unix.group.file": "/etc/group",
+            "ranger.usersync.filesource.file": "/tmp/usergroup.txt",
+            "ranger.usersync.group.searchscope": "",
+            "ranger.usersync.truststore.password": "changeit",
+            "ranger.usersync.enabled": "true",
+            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000",
             "ranger.usersync.filesource.text.delimiter": ","
-        }, 
+        },
         "hdfs-site": {
-            "dfs.namenode.checkpoint.period": "21600", 
-            "dfs.namenode.avoid.write.stale.datanode": "true", 
-            "dfs.namenode.startup.delay.block.deletion.sec": "3600", 
-            "dfs.namenode.checkpoint.txns": "1000000", 
-            "dfs.content-summary.limit": "5000", 
-            "dfs.support.append": "true", 
-            "dfs.datanode.address": "0.0.0.0:50010", 
-            "dfs.cluster.administrators": " hdfs", 
-            "dfs.namenode.audit.log.async": "true", 
-            "dfs.datanode.balance.bandwidthPerSec": "6250000", 
-            "dfs.namenode.safemode.threshold-pct": "1", 
-            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}", 
-            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020", 
-            "dfs.permissions.enabled": "true", 
-            "dfs.client.read.shortcircuit": "true", 
-            "dfs.https.port": "50470", 
-            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470", 
-            "nfs.file.dump.dir": "/tmp/.hdfs-nfs", 
-            "dfs.blocksize": "134217728", 
-            "dfs.blockreport.initialDelay": "120", 
-            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode", 
-            "dfs.namenode.fslock.fair": "false", 
-            "dfs.datanode.max.transfer.threads": "4096", 
-            "dfs.heartbeat.interval": "3", 
-            "dfs.replication": "3", 
-            "dfs.namenode.handler.count": "50", 
-            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary", 
-            "fs.permissions.umask-mode": "022", 
-            "dfs.namenode.stale.datanode.interval": "30000", 
-            "dfs.datanode.ipc.address": "0.0.0.0:8010", 
-            "dfs.datanode.failed.volumes.tolerated": "0", 
-            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data", 
-            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070", 
-            "dfs.webhdfs.enabled": "true", 
-            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding", 
-            "dfs.namenode.accesstime.precision": "0", 
-            "dfs.datanode.https.address": "0.0.0.0:50475", 
-            "dfs.namenode.write.stale.datanode.ratio": "1.0f", 
-            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090", 
-            "nfs.exports.allowed.hosts": "* rw", 
-            "dfs.datanode.http.address": "0.0.0.0:50075", 
-            "dfs.datanode.du.reserved": "33011188224", 
-            "dfs.client.read.shortcircuit.streams.cache.size": "4096", 
-            "dfs.http.policy": "HTTP_ONLY", 
-            "dfs.block.access.token.enable": "true", 
-            "dfs.client.retry.policy.enabled": "false", 
-            "dfs.namenode.name.dir.restore": "true", 
-            "dfs.permissions.superusergroup": "hdfs", 
-            "dfs.journalnode.https-address": "0.0.0.0:8481", 
-            "dfs.journalnode.http-address": "0.0.0.0:8480", 
-            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket", 
-            "dfs.namenode.avoid.read.stale.datanode": "true", 
-            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude", 
-            "dfs.datanode.data.dir.perm": "750", 
-            "dfs.encryption.key.provider.uri": "", 
-            "dfs.replication.max": "50", 
+            "dfs.namenode.checkpoint.period": "21600",
+            "dfs.namenode.avoid.write.stale.datanode": "true",
+            "dfs.namenode.startup.delay.block.deletion.sec": "3600",
+            "dfs.namenode.checkpoint.txns": "1000000",
+            "dfs.content-summary.limit": "5000",
+            "dfs.support.append": "true",
+            "dfs.datanode.address": "0.0.0.0:50010",
+            "dfs.cluster.administrators": " hdfs",
+            "dfs.namenode.audit.log.async": "true",
+            "dfs.datanode.balance.bandwidthPerSec": "6250000",
+            "dfs.namenode.safemode.threshold-pct": "1",
+            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}",
+            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020",
+            "dfs.permissions.enabled": "true",
+            "dfs.client.read.shortcircuit": "true",
+            "dfs.https.port": "50470",
+            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470",
+            "nfs.file.dump.dir": "/tmp/.hdfs-nfs",
+            "dfs.blocksize": "134217728",
+            "dfs.blockreport.initialDelay": "120",
+            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode",
+            "dfs.namenode.fslock.fair": "false",
+            "dfs.datanode.max.transfer.threads": "4096",
+            "dfs.heartbeat.interval": "3",
+            "dfs.replication": "3",
+            "dfs.namenode.handler.count": "50",
+            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary",
+            "fs.permissions.umask-mode": "022",
+            "dfs.namenode.stale.datanode.interval": "30000",
+            "dfs.datanode.ipc.address": "0.0.0.0:8010",
+            "dfs.datanode.failed.volumes.tolerated": "0",
+            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data",
+            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070",
+            "dfs.webhdfs.enabled": "true",
+            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding",
+            "dfs.namenode.accesstime.precision": "0",
+            "dfs.datanode.https.address": "0.0.0.0:50475",
+            "dfs.namenode.write.stale.datanode.ratio": "1.0f",
+            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090",
+            "nfs.exports.allowed.hosts": "* rw",
+            "dfs.datanode.http.address": "0.0.0.0:50075",
+            "dfs.datanode.du.reserved": "33011188224",
+            "dfs.client.read.shortcircuit.streams.cache.size": "4096",
+            "dfs.http.policy": "HTTP_ONLY",
+            "dfs.block.access.token.enable": "true",
+            "dfs.client.retry.policy.enabled": "false",
+            "dfs.namenode.name.dir.restore": "true",
+            "dfs.permissions.superusergroup": "hdfs",
+            "dfs.journalnode.https-address": "0.0.0.0:8481",
+            "dfs.journalnode.http-address": "0.0.0.0:8480",
+            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket",
+            "dfs.namenode.avoid.read.stale.datanode": "true",
+            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude",
+            "dfs.datanode.data.dir.perm": "750",
+            "dfs.encryption.key.provider.uri": "",
+            "dfs.replication.max": "50",
             "dfs.namenode.name.dir": "/grid/0/hadoop/hdfs/namenode"
-        }, 
+        },
         "ranger-tagsync-site": {
             "ranger.tagsync.dest.ranger.ssl.config.filename": "{{stack_root}}/current/ranger-tagsync/conf/ranger-policymgr-ssl.xml",
             "ranger.tagsync.source.atlasrest.username": "",
-            "ranger.tagsync.logdir": "/var/log/ranger/tagsync", 
-            "ranger.tagsync.source.atlasrest.download.interval.millis": "", 
-            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks", 
-            "ranger.tagsync.source.file.check.interval.millis": "", 
-            "ranger.tagsync.source.atlasrest.endpoint": "", 
-            "ranger.tagsync.dest.ranger.username": "rangertagsync", 
-            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}", 
-            "ranger.tagsync.kerberos.principal": "", 
-            "ranger.tagsync.kerberos.keytab": "", 
-            "ranger.tagsync.source.atlas": "false", 
-            "ranger.tagsync.source.atlasrest": "false", 
-            "ranger.tagsync.source.file": "false", 
+            "ranger.tagsync.logdir": "/var/log/ranger/tagsync",
+            "ranger.tagsync.source.atlasrest.download.interval.millis": "",
+            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks",
+            "ranger.tagsync.source.file.check.interval.millis": "",
+            "ranger.tagsync.source.atlasrest.endpoint": "",
+            "ranger.tagsync.dest.ranger.username": "rangertagsync",
+            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}",
+            "ranger.tagsync.kerberos.principal": "",
+            "ranger.tagsync.kerberos.keytab": "",
+            "ranger.tagsync.source.atlas": "false",
+            "ranger.tagsync.source.atlasrest": "false",
+            "ranger.tagsync.source.file": "false",
             "ranger.tagsync.source.file.filename": ""
-        }, 
+        },
         "zoo.cfg": {
-            "clientPort": "2181", 
-            "autopurge.purgeInterval": "24", 
-            "syncLimit": "5", 
-            "dataDir": "/grid/0/hadoop/zookeeper", 
-            "initLimit": "10", 
-            "tickTime": "2000", 
+            "clientPort": "2181",
+            "autopurge.purgeInterval": "24",
+            "syncLimit": "5",
+            "dataDir": "/grid/0/hadoop/zookeeper",
+            "initLimit": "10",
+            "tickTime": "2000",
             "autopurge.snapRetainCount": "30"
-        }, 
+        },
         "hadoop-policy": {
-            "security.job.client.protocol.acl": "*", 
-            "security.job.task.protocol.acl": "*", 
-            "security.datanode.protocol.acl": "*", 
-            "security.namenode.protocol.acl": "*", 
-            "security.client.datanode.protocol.acl": "*", 
-            "security.inter.tracker.protocol.acl": "*", 
-            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop", 
-            "security.client.protocol.acl": "*", 
-            "security.refresh.policy.protocol.acl": "hadoop", 
-            "security.admin.operations.protocol.acl": "hadoop", 
+            "security.job.client.protocol.acl": "*",
+            "security.job.task.protocol.acl": "*",
+            "security.datanode.protocol.acl": "*",
+            "security.namenode.protocol.acl": "*",
+            "security.client.datanode.protocol.acl": "*",
+            "security.inter.tracker.protocol.acl": "*",
+            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop",
+            "security.client.protocol.acl": "*",
+            "security.refresh.policy.protocol.acl": "hadoop",
+            "security.admin.operations.protocol.acl": "hadoop",
             "security.inter.datanode.protocol.acl": "*"
-        }, 
+        },
         "hdfs-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#  http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n\n# Define some default values that can be overridden by system properties\n# To change daemon root logger use hadoop_root_logger in hadoop-env\nhadoop.root.lo
 gger=INFO,console\nhadoop.log.dir=.\nhadoop.log.file=hadoop.log\n\n\n# Define the root logger to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\n\n# Logging Threshold\nlog4j.threshhold=ALL\n\n#\n# Daily Rolling File Appender\n#\n\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Rollver at midnight\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\n\n# 30-day backup\n#log4j.appender.DRFA.MaxBackupIndex=30\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\n\n# Pattern format: Date LogLevel LoggerName LogMessage\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n# Debugging Pattern format\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender
 .console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\n\n#\n# TaskLog Appender\n#\n\n#Default values\nhadoop.tasklog.taskid=null\nhadoop.tasklog.iscleanup=false\nhadoop.tasklog.noKeepSplits=4\nhadoop.tasklog.totalLogFileSize=100\nhadoop.tasklog.purgeLogSplits=true\nhadoop.tasklog.logsRetainHours=12\n\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\n\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n\n#\n#Security audit appender\n#\nhadoop.security.logger=INFO,console\nhadoop.security.log.maxfilesize=256MB\nhadoop.security.log.maxbackupindex=20\nlog4j.category.SecurityLogger=${hadoop.security.logg
 er}\nhadoop.security.log.file=SecurityAuth.audit\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\n\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\n\n#\n# hdfs audit logging\n#\nhdfs.audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=
 false\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# NameNode metrics logging.\n# The default is to retain two namenode-metrics.log files up to 64MB each.\n#\nnamenode.metrics.logger=INFO,NullAppender\nlog4j.logger.NameNodeMetricsLog=${namenode.metrics.logger}\nlog4j.additivity.NameNodeMetricsLog=false\nlog4j.appender.NNMETRICSRFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.NNMETRICSRFA.File=${hadoop.log.dir}/namenode-metrics.log\nlog4j.appender.NNMETRICSRFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.NNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n\nlog4j.appender.NNMETRICSRFA.MaxBackupIndex=1\nlog4j.appender.NNMETRICSRFA.MaxFileSize=64MB\n\n#\n# mapred audit logging\n#\nmapred
 .audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# Rolling File Appender\n#\n\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Logfile size and and 30-day backups\nlog4j.appender.RFA.MaxFileSize=256MB\nlog4j.appender.RFA.MaxBackupIndex=10\n\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n# Custom Logging leve
 ls\n\nhadoop.metrics.log.level=INFO\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\n\n# Jets3t library\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\n\n#\n# Null Appender\n# Trap security logger on the hadoop client side\n#\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\n\n#\n# Event Counter Appender\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\n#\nlog4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter\n\n# Removes \"deprecated\" messages\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\n\n#\n# HDFS block state change log from block manager\n#\n# Uncomment the following to suppress normal block state change\n# messages from BlockManager in NameNode.\n#log4j.logger.BlockStateCh
 ange=WARN"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
-            "hadoop.rpc.protection": "authentication", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "REPOSITORY_CONFIG_USERNAME": "hadoop", 
-            "policy_user": "ambari-qa", 
-            "common.name.for.certificate": "", 
+            "hadoop.rpc.protection": "authentication",
+            "ranger-hdfs-plugin-enabled": "No",
+            "REPOSITORY_CONFIG_USERNAME": "hadoop",
+            "policy_user": "ambari-qa",
+            "common.name.for.certificate": "",
             "REPOSITORY_CONFIG_PASSWORD": "hadoop"
-        }, 
+        },
         "core-site": {
-            "hadoop.proxyuser.root.hosts": "c6401.ambari.apache.org", 
-            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
-            "fs.trash.interval": "360", 
-            "ha.failover-controller.active-standby-elector.zk.op.retries": "120", 
-            "hadoop.http.authentication.simple.anonymous.allowed": "true", 
-            "hadoop.security.authentication": "simple", 
-            "hadoop.proxyuser.root.groups": "*", 
-            "ipc.client.connection.maxidletime": "30000", 
-            "hadoop.security.key.provider.path": "", 
-            "mapreduce.jobtracker.webinterface.trusted": "false", 
-            "hadoop.security.authorization": "false", 
-            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py", 
-            "ipc.server.tcpnodelay": "true", 
-            "ipc.client.connect.max.retries": "50", 
-            "hadoop.security.auth_to_local": "DEFAULT", 
-            "io.file.buffer.size": "131072", 
-            "hadoop.proxyuser.hdfs.hosts": "*", 
-            "hadoop.proxyuser.hdfs.groups": "*", 
-            "ipc.client.idlethreshold": "8000", 
-            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020", 
+            "hadoop.proxyuser.root.hosts": "c6401.ambari.apache.org",
+            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization",
+            "fs.trash.interval": "360",
+            "ha.failover-controller.active-standby-elector.zk.op.retries": "120",
+            "hadoop.http.authentication.simple.anonymous.allowed": "true",
+            "hadoop.security.authentication": "simple",
+            "hadoop.proxyuser.root.groups": "*",
+            "ipc.client.connection.maxidletime": "30000",
+            "hadoop.security.key.provider.path": "",
+            "mapreduce.jobtracker.webinterface.trusted": "false",
+            "hadoop.security.authorization": "false",
+            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py",
+            "ipc.server.tcpnodelay": "true",
+            "ipc.client.connect.max.retries": "50",
+            "hadoop.security.auth_to_local": "DEFAULT",
+            "io.file.buffer.size": "131072",
+            "hadoop.proxyuser.hdfs.hosts": "*",
+            "hadoop.proxyuser.hdfs.groups": "*",
+            "ipc.client.idlethreshold": "8000",
+            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020",
             "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec"
-        }, 
+        },
         "hadoop-env": {
-            "keyserver_port": "", 
-            "proxyuser_group": "users", 
-            "hdfs_user_nproc_limit": "65536", 
-            "hdfs_log_dir_prefix": "/var/log/hadoop", 
-            "hdfs_user_nofile_limit": "128000", 
-            "hdfs_user": "hdfs", 
-            "keyserver_host": " ", 
-            "namenode_opt_maxnewsize": "128m", 
-            "namenode_opt_maxpermsize": "256m", 
-            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}", 
-            "namenode_heapsize": "1024m", 
-            "namenode_opt_newsize": "128m", 
-            "nfsgateway_heapsize": "1024", 
-            "dtnode_heapsize": "1024m", 
-            "hadoop_root_logger": "INFO,RFA", 
-            "hadoop_heapsize": "1024", 
-            "hadoop_pid_dir_prefix": "/var/run/hadoop", 
-            "namenode_opt_permsize": "128m", 
+            "keyserver_port": "",
+            "proxyuser_group": "users",
+            "hdfs_user_nproc_limit": "65536",
+            "hdfs_log_dir_prefix": "/var/log/hadoop",
+            "hdfs_user_nofile_limit": "128000",
+            "hdfs_user": "hdfs",
+            "keyserver_host": " ",
+            "namenode_opt_maxnewsize": "128m",
+            "namenode_opt_maxpermsize": "256m",
+            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}",
+            "namenode_heapsize": "1024m",
+            "namenode_opt_newsize": "128m",
+            "nfsgateway_heapsize": "1024",
+            "dtnode_heapsize": "1024m",
+            "hadoop_root_logger": "INFO,RFA",
+            "hadoop_heapsize": "1024",
+            "hadoop_pid_dir_prefix": "/var/run/hadoop",
+            "namenode_opt_permsize": "128m",
             "hdfs_tmp_dir": "/tmp"
-        }, 
+        },
         "zookeeper-log4j": {
             "content": "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n#\n#\n\n#\n# ZooKeeper Logging Configuration\n#\n\n# DEFAULT: console appender only\nlog4j.rootLogger=INFO, CONSOLE\n\n# Example with rolling log file\n#log4
 j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE\n\n# Example with rolling log file and tracing\n#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE\n\n#\n# Log INFO level and above messages to the console\n#\nlog4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender\nlog4j.appender.CONSOLE.Threshold=INFO\nlog4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout\nlog4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n\n\n#\n# Add ROLLINGFILE to rootLogger to get log file output\n#    Log DEBUG level and above messages to a log file\nlog4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender\nlog4j.appender.ROLLINGFILE.Threshold=DEBUG\nlog4j.appender.ROLLINGFILE.File=zookeeper.log\n\n# Max log file size of 10MB\nlog4j.appender.ROLLINGFILE.MaxFileSize=10MB\n# uncomment the next line to limit number of backup files\n#log4j.appender.ROLLINGFILE.MaxBackupIndex=10\n\nlog4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout\nlog4j.appender.ROLLIN
 GFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n\n\n\n#\n# Add TRACEFILE to rootLogger to get log file output\n#    Log DEBUG level and above messages to a log file\nlog4j.appender.TRACEFILE=org.apache.log4j.FileAppender\nlog4j.appender.TRACEFILE.Threshold=TRACE\nlog4j.appender.TRACEFILE.File=zookeeper_trace.log\n\nlog4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout\n### Notice we are including log4j's NDC here (%x)\nlog4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L][%x] - %m%n"
-        }, 
+        },
         "ssl-server": {
-            "ssl.server.keystore.location": "/etc/security/serverKeys/keystore.jks", 
-            "ssl.server.keystore.keypassword": "bigdata", 
-            "ssl.server.truststore.location": "/etc/security/serverKeys/all.jks", 
-            "ssl.server.keystore.password": "bigdata", 
-            "ssl.server.truststore.password": "bigdata", 
-            "ssl.server.truststore.type": "jks", 
-            "ssl.server.keystore.type": "jks", 
+            "ssl.server.keystore.location": "/etc/security/serverKeys/keystore.jks",
+            "ssl.server.keystore.keypassword": "bigdata",
+            "ssl.server.truststore.location": "/etc/security/serverKeys/all.jks",
+            "ssl.server.keystore.password": "bigdata",
+            "ssl.server.truststore.password": "bigdata",
+            "ssl.server.truststore.type": "jks",
+            "ssl.server.keystore.type": "jks",
             "ssl.server.truststore.reload.interval": "10000"
-        }, 
-        "ranger-site": {}, 
+        },
+        "ranger-site": {},
         "admin-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\nlog4j.rootLogger = warn,xa_log_appender\n\n\n# xa_logger\nlog4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.xa_log_app
 ender.file=${logdir}/xa_portal.log\nlog4j.appender.xa_log_appender.datePattern='.'yyyy-MM-dd\nlog4j.appender.xa_log_appender.append=true\nlog4j.appender.xa_log_appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.xa_log_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n\n# xa_log_appender : category and additivity\nlog4j.category.org.springframework=warn,xa_log_appender\nlog4j.additivity.org.springframework=false\n\nlog4j.category.org.apache.ranger=info,xa_log_appender\nlog4j.additivity.org.apache.ranger=false\n\nlog4j.category.xa=info,xa_log_appender\nlog4j.additivity.xa=false\n\n# perf_logger\nlog4j.appender.perf_appender=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.perf_appender.file=${logdir}/ranger_admin_perf.log\nlog4j.appender.perf_appender.datePattern='.'yyyy-MM-dd\nlog4j.appender.perf_appender.append=true\nlog4j.appender.perf_appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.perf_appender.layout.ConversionPattern=%d [%t] 
 %m%n\n\n\n# sql_appender\nlog4j.appender.sql_appender=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.sql_appender.file=${logdir}/xa_portal_sql.log\nlog4j.appender.sql_appender.datePattern='.'yyyy-MM-dd\nlog4j.appender.sql_appender.append=true\nlog4j.appender.sql_appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.sql_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n\n\n# sql_appender : category and additivity\nlog4j.category.org.hibernate.SQL=warn,sql_appender\nlog4j.additivity.org.hibernate.SQL=false\n\nlog4j.category.jdbc.sqlonly=fatal,sql_appender\nlog4j.additivity.jdbc.sqlonly=false\n\nlog4j.category.jdbc.sqltiming=warn,sql_appender\nlog4j.additivity.jdbc.sqltiming=false\n\nlog4j.category.jdbc.audit=fatal,sql_appender\nlog4j.additivity.jdbc.audit=false\n\nlog4j.category.jdbc.resultset=fatal,sql_appender\nlog4j.additivity.jdbc.resultset=false\n\nlog4j.category.jdbc.connection=fatal,sql_appender\nlog4j.additivity.jdbc.connection=false"
-        }, 
+        },
         "tagsync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/tagsync
 .log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n"
-        }, 
+        },
         "ranger-hdfs-security": {
-            "ranger.plugin.hdfs.policy.source.impl": "org.apache.ranger.admin.client.RangerAdminRESTClient", 
-            "ranger.plugin.hdfs.service.name": "{{repo_name}}", 
-            "ranger.plugin.hdfs.policy.cache.dir": "/etc/ranger/{{repo_name}}/policycache", 
-            "ranger.plugin.hdfs.policy.pollIntervalMs": "30000", 
-            "ranger.plugin.hdfs.policy.rest.url": "{{policymgr_mgr_url}}", 
-            "ranger.plugin.hdfs.policy.rest.ssl.config.file": "/etc/hadoop/conf/ranger-policymgr-ssl.xml", 
+            "ranger.plugin.hdfs.policy.source.impl": "org.apache.ranger.admin.client.RangerAdminRESTClient",
+            "ranger.plugin.hdfs.service.name": "{{repo_name}}",
+            "ranger.plugin.hdfs.policy.cache.dir": "/etc/ranger/{{repo_name}}/policycache",
+            "ranger.plugin.hdfs.policy.pollIntervalMs": "30000",
+            "ranger.plugin.hdfs.policy.rest.url": "{{policymgr_mgr_url}}",
+            "ranger.plugin.hdfs.policy.rest.ssl.config.file": "/etc/hadoop/conf/ranger-policymgr-ssl.xml",
             "xasecure.add-hadoop-authorization": "true"
-        }, 
-        "usersync-properties": {}, 
+        },
+        "usersync-properties": {},
         "zookeeper-env": {
-            "zk_log_dir": "/var/log/zookeeper", 
-            "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOOKEEPER_HOME={{zk_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}", 
-            "zk_server_heapsize": "1024m", 
-            "zk_pid_dir": "/var/run/zookeeper", 
+            "zk_log_dir": "/var/log/zookeeper",
+            "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOOKEEPER_HOME={{zk_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}",
+            "zk_server_heapsize": "1024m",
+            "zk_pid_dir": "/var/run/zookeeper",
             "zk_user": "zookeeper"
         },
         "infra-solr-env": {
@@ -682,7 +682,7 @@
             "infra_solr_kerberos_name_rules": "DEFAULT",
             "infra_solr_user": "infra-solr",
             "infra_solr_maxmem": "1024",
-            "content": "#!/bin/bash\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# By default the script will use JAVA_HOME to determine which java\n# to use, but you can set a specific path for Solr to use without\n# affecting other Java applica
 tions on your server/workstation.\nSOLR_JAVA_HOME

<TRUNCATED>

[37/52] [abbrv] ambari git commit: AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-default.json b/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-default.json
index 05cb78a..cafbede 100644
--- a/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-default.json
+++ b/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-default.json
@@ -1,55 +1,55 @@
 {
     "localComponents": [
-        "SECONDARY_NAMENODE", 
-        "HDFS_CLIENT", 
-        "DATANODE", 
-        "NAMENODE", 
-        "ZOOKEEPER_SERVER", 
-        "ZOOKEEPER_CLIENT", 
-        "RANGER_USERSYNC", 
-        "RANGER_ADMIN", 
+        "SECONDARY_NAMENODE",
+        "HDFS_CLIENT",
+        "DATANODE",
+        "NAMENODE",
+        "ZOOKEEPER_SERVER",
+        "ZOOKEEPER_CLIENT",
+        "RANGER_USERSYNC",
+        "RANGER_ADMIN",
         "RANGER_TAGSYNC",
         "RANGER_KMS_SERVER"
-    ], 
+    ],
     "configuration_attributes": {
-        "ranger-hdfs-audit": {}, 
-        "ssl-client": {}, 
-        "ranger-admin-site": {}, 
-        "ranger-hdfs-policymgr-ssl": {}, 
-        "tagsync-application-properties": {}, 
-        "ranger-env": {}, 
-        "usersync-log4j": {}, 
-        "admin-properties": {}, 
-        "ranger-ugsync-site": {}, 
+        "ranger-hdfs-audit": {},
+        "ssl-client": {},
+        "ranger-admin-site": {},
+        "ranger-hdfs-policymgr-ssl": {},
+        "tagsync-application-properties": {},
+        "ranger-env": {},
+        "usersync-log4j": {},
+        "admin-properties": {},
+        "ranger-ugsync-site": {},
         "hdfs-site": {
             "final": {
-                "dfs.datanode.data.dir": "true", 
-                "dfs.namenode.http-address": "true", 
-                "dfs.datanode.failed.volumes.tolerated": "true", 
-                "dfs.support.append": "true", 
-                "dfs.namenode.name.dir": "true", 
+                "dfs.datanode.data.dir": "true",
+                "dfs.namenode.http-address": "true",
+                "dfs.datanode.failed.volumes.tolerated": "true",
+                "dfs.support.append": "true",
+                "dfs.namenode.name.dir": "true",
                 "dfs.webhdfs.enabled": "true"
             }
-        }, 
-        "ranger-tagsync-site": {}, 
-        "zoo.cfg": {}, 
-        "hadoop-policy": {}, 
-        "hdfs-log4j": {}, 
-        "ranger-hdfs-plugin-properties": {}, 
+        },
+        "ranger-tagsync-site": {},
+        "zoo.cfg": {},
+        "hadoop-policy": {},
+        "hdfs-log4j": {},
+        "ranger-hdfs-plugin-properties": {},
         "core-site": {
             "final": {
                 "fs.defaultFS": "true"
             }
-        }, 
-        "hadoop-env": {}, 
-        "zookeeper-log4j": {}, 
-        "ssl-server": {}, 
-        "ranger-site": {}, 
-        "admin-log4j": {}, 
-        "tagsync-log4j": {}, 
-        "ranger-hdfs-security": {}, 
-        "usersync-properties": {}, 
-        "zookeeper-env": {}, 
+        },
+        "hadoop-env": {},
+        "zookeeper-log4j": {},
+        "ssl-server": {},
+        "ranger-site": {},
+        "admin-log4j": {},
+        "tagsync-log4j": {},
+        "ranger-hdfs-security": {},
+        "usersync-properties": {},
+        "zookeeper-env": {},
         "cluster-env": {},
         "dbks-site": {},
         "kms-env": {},
@@ -60,744 +60,744 @@
         "ranger-kms-site": {},
         "ranger-kms-policymgr-ssl": {},
         "ranger-kms-audit": {}
-    }, 
-    "public_hostname": "c6401.ambari.apache.org", 
-    "commandId": "9-1", 
-    "hostname": "c6401.ambari.apache.org", 
-    "kerberosCommandParams": [], 
-    "serviceName": "RANGER_KMS", 
-    "role": "RANGER_KMS_SERVER", 
-    "forceRefreshConfigTagsBeforeExecution": [], 
-    "requestId": 9, 
+    },
+    "public_hostname": "c6401.ambari.apache.org",
+    "commandId": "9-1",
+    "hostname": "c6401.ambari.apache.org",
+    "kerberosCommandParams": [],
+    "serviceName": "RANGER_KMS",
+    "role": "RANGER_KMS_SERVER",
+    "forceRefreshConfigTagsBeforeExecution": [],
+    "requestId": 9,
     "agentConfigParams": {
         "agent": {
             "parallel_execution": 0
         }
-    }, 
-    "clusterName": "c1", 
-    "commandType": "EXECUTION_COMMAND", 
-    "taskId": 64, 
-    "roleParams": {}, 
+    },
+    "clusterName": "c1",
+    "commandType": "EXECUTION_COMMAND",
+    "taskId": 64,
+    "roleParams": {},
     "configurationTags": {
         "ranger-hdfs-audit": {
             "tag": "version1466427664617"
-        }, 
+        },
         "ssl-client": {
             "tag": "version1"
-        }, 
+        },
         "ranger-admin-site": {
             "tag": "version1466427664621"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
             "tag": "version1466427664617"
-        }, 
+        },
         "tagsync-application-properties": {
             "tag": "version1466427664621"
-        }, 
+        },
         "ranger-env": {
             "tag": "version1466427664621"
-        }, 
+        },
         "usersync-log4j": {
             "tag": "version1466427664621"
-        }, 
+        },
         "admin-properties": {
             "tag": "version1466427664621"
-        }, 
+        },
         "ranger-ugsync-site": {
             "tag": "version1466427664621"
-        }, 
+        },
         "hdfs-site": {
             "tag": "version1"
-        }, 
+        },
         "ranger-tagsync-site": {
             "tag": "version1466427664621"
-        }, 
+        },
         "zoo.cfg": {
             "tag": "version1"
-        }, 
+        },
         "hadoop-policy": {
             "tag": "version1"
-        }, 
+        },
         "hdfs-log4j": {
             "tag": "version1"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
             "tag": "version1466427664617"
-        }, 
+        },
         "core-site": {
             "tag": "version1"
-        }, 
+        },
         "hadoop-env": {
             "tag": "version1"
-        }, 
+        },
         "zookeeper-log4j": {
             "tag": "version1"
-        }, 
+        },
         "ssl-server": {
             "tag": "version1"
-        }, 
+        },
         "ranger-site": {
             "tag": "version1466427664621"
-        }, 
+        },
         "admin-log4j": {
             "tag": "version1466427664621"
-        }, 
+        },
         "tagsync-log4j": {
             "tag": "version1466427664621"
-        }, 
+        },
         "ranger-hdfs-security": {
             "tag": "version1466427664617"
-        }, 
+        },
         "usersync-properties": {
             "tag": "version1466427664621"
-        }, 
+        },
         "zookeeper-env": {
             "tag": "version1"
-        }, 
+        },
         "cluster-env": {
             "tag": "version1"
         },
         "dbks-site": {
-            "tag": "version1"            
+            "tag": "version1"
             },
         "kms-env": {
-            "tag": "version1"            
+            "tag": "version1"
             },
         "kms-log4j": {
-            "tag": "version1"            
+            "tag": "version1"
             },
         "kms-properties": {
-            "tag": "version1"            
+            "tag": "version1"
             },
         "kms-site": {
-            "tag": "version1"            
+            "tag": "version1"
             },
         "ranger-kms-security": {
-            "tag": "version1"            
+            "tag": "version1"
             },
         "ranger-kms-site": {
-            "tag": "version1"            
+            "tag": "version1"
             },
         "ranger-kms-policymgr-ssl": {
-            "tag": "version1"            
+            "tag": "version1"
             },
         "ranger-kms-audit": {
-            "tag": "version1"            
+            "tag": "version1"
         }
-    }, 
-    "roleCommand": "START", 
+    },
+    "roleCommand": "START",
     "hostLevelParams": {
-        "agent_stack_retry_on_unavailability": "false", 
-        "stack_name": "HDP", 
+        "agent_stack_retry_on_unavailability": "false",
+        "stack_name": "HDP",
         "custom_mysql_jdbc_name": "mysql-connector-java.jar",
         "previous_custom_mysql_jdbc_name": "mysql-connector-java-old.jar",
-        "host_sys_prepped": "false", 
-        "ambari_db_rca_username": "mapred", 
-        "current_version": "2.5.0.0-777", 
-        "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar", 
-        "agent_stack_retry_count": "5", 
-        "stack_version": "2.5", 
-        "jdk_name": "jdk-8u60-linux-x64.tar.gz", 
-        "ambari_db_rca_driver": "org.postgresql.Driver", 
+        "host_sys_prepped": "false",
+        "ambari_db_rca_username": "mapred",
+        "current_version": "2.5.0.0-777",
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar",
+        "agent_stack_retry_count": "5",
+        "stack_version": "2.5",
+        "jdk_name": "jdk-8u60-linux-x64.tar.gz",
+        "ambari_db_rca_driver": "org.postgresql.Driver",
         "java_home": "/usr/jdk64/jdk1.7.0_45",
-        "repository_version_id": "1", 
-        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
-        "not_managed_hdfs_path_list": "[\"/tmp\"]", 
-        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
-        "java_version": "8", 
-        "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-777\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.5\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-776\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]", 
-        "package_list": "[{\"name\":\"ranger_${stack_version}-admin\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-usersync\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-tagsync\",\"condition\":\"should_install_ranger_tagsync\",\"skipUpgrade\":false},{\"name\":\"ambari-logsearch-solr-client\",\"condition\":\"should_install_logsearch_solr_client\",\"skipUpgrade\":false}]", 
-        "db_name": "ambari", 
-        "group_list": "[\"ranger\",\"hadoop\",\"users\"]", 
-        "agentCacheDir": "/var/lib/ambari-agent/cache", 
-        "ambari_db_rca_password": "mapred", 
+        "repository_version_id": "1",
+        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/",
+        "not_managed_hdfs_path_list": "[\"/tmp\"]",
+        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+        "java_version": "8",
+        "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-777\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.5\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-776\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]",
+        "package_list": "[{\"name\":\"ranger_${stack_version}-admin\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-usersync\",\"condition\":\"\",\"skipUpgrade\":false},{\"name\":\"ranger_${stack_version}-tagsync\",\"condition\":\"should_install_ranger_tagsync\",\"skipUpgrade\":false},{\"name\":\"ambari-logsearch-solr-client\",\"condition\":\"should_install_logsearch_solr_client\",\"skipUpgrade\":false}]",
+        "db_name": "ambari",
+        "group_list": "[\"ranger\",\"hadoop\",\"users\"]",
+        "agentCacheDir": "/var/lib/ambari-agent/cache",
+        "ambari_db_rca_password": "mapred",
         "jce_name": "UnlimitedJCEPolicyJDK7.zip",
-        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar", 
-        "db_driver_filename": "mysql-connector-java.jar", 
-        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]", 
+        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar",
+        "db_driver_filename": "mysql-connector-java.jar",
+        "user_list": "[\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]",
         "clientsToUpdateConfigs": "[\"*\"]"
-    }, 
+    },
     "commandParams": {
-        "service_package_folder": "common-services/RANGER/0.4.0/package", 
-        "script": "scripts/ranger_usersync.py", 
-        "hooks_folder": "HDP/2.0.6/hooks", 
-        "version": "2.5.0.0-777", 
-        "max_duration_for_retries": "0", 
-        "command_retry_enabled": "false", 
-        "command_timeout": "600", 
+        "service_package_folder": "common-services/RANGER/0.4.0/package",
+        "script": "scripts/ranger_usersync.py",
+        "hooks_folder": "HDP/2.0.6/hooks",
+        "version": "2.5.0.0-777",
+        "max_duration_for_retries": "0",
+        "command_retry_enabled": "false",
+        "command_timeout": "600",
         "script_type": "PYTHON"
-    }, 
-    "forceRefreshConfigTags": [], 
-    "stageId": 1, 
+    },
+    "forceRefreshConfigTags": [],
+    "stageId": 1,
     "clusterHostInfo": {
         "snamenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_use_ssl": [
             "false"
-        ], 
+        ],
         "all_ping_ports": [
             "8670"
-        ], 
+        ],
         "ranger_tagsync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ranger_usersync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "slave_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "namenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_port": [
             "8080"
-        ], 
+        ],
         "ranger_admin_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_racks": [
             "/default-rack"
-        ], 
+        ],
         "all_ipv4_ips": [
             "172.22.125.4"
-        ], 
+        ],
         "ambari_server_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "zookeeper_hosts": [
             "c6401.ambari.apache.org"
         ],
         "ranger_kms_server_hosts": [
             "c6401.ambari.apache.org"
         ]
-    }, 
+    },
     "configurations": {
         "ranger-hdfs-audit": {
             "xasecure.audit.destination.solr.zookeepers": "c6401.ambari.apache.org:2181/ranger_audits",
-            "xasecure.audit.destination.solr.urls": "", 
-            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool", 
-            "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/hdfs/spool", 
+            "xasecure.audit.destination.solr.urls": "",
+            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool",
+            "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/hdfs/spool",
             "xasecure.audit.destination.hdfs": "true",
-            "xasecure.audit.destination.solr": "true", 
-            "xasecure.audit.provider.summary.enabled": "false", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
+            "xasecure.audit.destination.solr": "true",
+            "xasecure.audit.provider.summary.enabled": "false",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
             "xasecure.audit.is.enabled": "true"
-        }, 
+        },
         "ssl-client": {
-            "ssl.client.truststore.reload.interval": "10000", 
-            "ssl.client.keystore.password": "bigdata", 
-            "ssl.client.truststore.type": "jks", 
-            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks", 
-            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks", 
-            "ssl.client.truststore.password": "bigdata", 
+            "ssl.client.truststore.reload.interval": "10000",
+            "ssl.client.keystore.password": "bigdata",
+            "ssl.client.truststore.type": "jks",
+            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks",
+            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks",
+            "ssl.client.truststore.password": "bigdata",
             "ssl.client.keystore.type": "jks"
-        }, 
+        },
         "ranger-admin-site": {
-            "ranger.admin.kerberos.cookie.domain": "", 
-            "ranger.kms.service.user.hdfs": "hdfs", 
-            "ranger.spnego.kerberos.principal": "", 
-            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.plugins.hive.serviceuser": "hive", 
-            "ranger.lookup.kerberos.keytab": "", 
-            "ranger.plugins.kms.serviceuser": "kms", 
-            "ranger.service.https.attrib.ssl.enabled": "false", 
-            "ranger.sso.browser.useragent": "Mozilla,chrome", 
-            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01", 
-            "ranger.plugins.hbase.serviceuser": "hbase", 
-            "ranger.plugins.hdfs.serviceuser": "hdfs", 
-            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}", 
-            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net", 
-            "ranger.plugins.knox.serviceuser": "knox", 
-            "ranger.ldap.base.dn": "dc=example,dc=com", 
-            "ranger.sso.publicKey": "", 
-            "ranger.admin.kerberos.cookie.path": "/", 
-            "ranger.service.https.attrib.clientAuth": "want", 
-            "ranger.jpa.jdbc.user": "{{ranger_db_user}}", 
-            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})", 
-            "ranger.ldap.group.roleattribute": "cn", 
-            "ranger.plugins.kafka.serviceuser": "kafka", 
-            "ranger.admin.kerberos.principal": "", 
-            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
+            "ranger.admin.kerberos.cookie.domain": "",
+            "ranger.kms.service.user.hdfs": "hdfs",
+            "ranger.spnego.kerberos.principal": "",
+            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}",
+            "ranger.plugins.hive.serviceuser": "hive",
+            "ranger.lookup.kerberos.keytab": "",
+            "ranger.plugins.kms.serviceuser": "kms",
+            "ranger.service.https.attrib.ssl.enabled": "false",
+            "ranger.sso.browser.useragent": "Mozilla,chrome",
+            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01",
+            "ranger.plugins.hbase.serviceuser": "hbase",
+            "ranger.plugins.hdfs.serviceuser": "hdfs",
+            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}",
+            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net",
+            "ranger.plugins.knox.serviceuser": "knox",
+            "ranger.ldap.base.dn": "dc=example,dc=com",
+            "ranger.sso.publicKey": "",
+            "ranger.admin.kerberos.cookie.path": "/",
+            "ranger.service.https.attrib.clientAuth": "want",
+            "ranger.jpa.jdbc.user": "{{ranger_db_user}}",
+            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})",
+            "ranger.ldap.group.roleattribute": "cn",
+            "ranger.plugins.kafka.serviceuser": "kafka",
+            "ranger.admin.kerberos.principal": "",
+            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
             "ranger.credential.provider.path": "/etc/ranger/admin/rangeradmin.jceks",
-            "ranger.ldap.referral": "ignore", 
-            "ranger.service.http.port": "6080", 
-            "ranger.ldap.user.searchfilter": "(uid={0})", 
-            "ranger.plugins.atlas.serviceuser": "atlas", 
-            "ranger.truststore.password": "changeit", 
-            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.password": "NONE", 
-            "ranger.audit.solr.zookeepers": "c6401.ambari.apache.org:2181/ranger_audits", 
-            "ranger.lookup.kerberos.principal": "", 
-            "ranger.service.https.port": "6182", 
-            "ranger.plugins.storm.serviceuser": "storm", 
-            "ranger.externalurl": "{{ranger_external_url}}", 
-            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.kms.service.user.hive": "", 
-            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}", 
-            "ranger.service.host": "{{ranger_host}}", 
-            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin", 
-            "ranger.service.https.attrib.keystore.pass": "xasecure", 
-            "ranger.unixauth.remote.login.enabled": "true", 
-            "ranger.jpa.jdbc.credential.alias": "rangeradmin", 
-            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.username": "ranger_solr", 
-            "ranger.sso.enabled": "false", 
-            "ranger.audit.solr.urls": "", 
-            "ranger.ldap.ad.domain": "", 
-            "ranger.plugins.yarn.serviceuser": "yarn", 
-            "ranger.audit.source.type": "solr", 
-            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
-            "ranger.ldap.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.authentication.method": "UNIX", 
-            "ranger.service.http.enabled": "true", 
-            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}", 
-            "ranger.ldap.ad.referral": "ignore", 
-            "ranger.ldap.ad.base.dn": "dc=example,dc=com", 
-            "ranger.jpa.jdbc.password": "_", 
-            "ranger.spnego.kerberos.keytab": "", 
-            "ranger.sso.providerurl": "", 
-            "ranger.unixauth.service.hostname": "{{ugsync_host}}", 
-            "ranger.admin.kerberos.keytab": "", 
-            "ranger.admin.kerberos.token.valid.seconds": "30", 
-            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver", 
+            "ranger.ldap.referral": "ignore",
+            "ranger.service.http.port": "6080",
+            "ranger.ldap.user.searchfilter": "(uid={0})",
+            "ranger.plugins.atlas.serviceuser": "atlas",
+            "ranger.truststore.password": "changeit",
+            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.password": "NONE",
+            "ranger.audit.solr.zookeepers": "c6401.ambari.apache.org:2181/ranger_audits",
+            "ranger.lookup.kerberos.principal": "",
+            "ranger.service.https.port": "6182",
+            "ranger.plugins.storm.serviceuser": "storm",
+            "ranger.externalurl": "{{ranger_external_url}}",
+            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.kms.service.user.hive": "",
+            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}",
+            "ranger.service.host": "{{ranger_host}}",
+            "ranger.service.https.attrib.keystore.keyalias": "rangeradmin",
+            "ranger.service.https.attrib.keystore.pass": "xasecure",
+            "ranger.unixauth.remote.login.enabled": "true",
+            "ranger.jpa.jdbc.credential.alias": "rangeradmin",
+            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.username": "ranger_solr",
+            "ranger.sso.enabled": "false",
+            "ranger.audit.solr.urls": "",
+            "ranger.ldap.ad.domain": "",
+            "ranger.plugins.yarn.serviceuser": "yarn",
+            "ranger.audit.source.type": "solr",
+            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
+            "ranger.ldap.url": "{{ranger_ug_ldap_url}}",
+            "ranger.authentication.method": "UNIX",
+            "ranger.service.http.enabled": "true",
+            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}",
+            "ranger.ldap.ad.referral": "ignore",
+            "ranger.ldap.ad.base.dn": "dc=example,dc=com",
+            "ranger.jpa.jdbc.password": "_",
+            "ranger.spnego.kerberos.keytab": "",
+            "ranger.sso.providerurl": "",
+            "ranger.unixauth.service.hostname": "{{ugsync_host}}",
+            "ranger.admin.kerberos.keytab": "",
+            "ranger.admin.kerberos.token.valid.seconds": "30",
+            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver",
             "ranger.unixauth.service.port": "5151"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
-            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks", 
-            "xasecure.policymgr.clientssl.truststore.password": "changeit", 
-            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}", 
-            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks", 
-            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}", 
+            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks",
+            "xasecure.policymgr.clientssl.truststore.password": "changeit",
+            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}",
+            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks",
+            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}",
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
-        }, 
+        },
         "tagsync-application-properties": {
-            "atlas.kafka.entities.group.id": "ranger_entities_consumer", 
-            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181", 
+            "atlas.kafka.entities.group.id": "ranger_entities_consumer",
+            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181",
             "atlas.kafka.bootstrap.servers": "localhost:6667"
-        }, 
+        },
         "ranger-env": {
-            "ranger_solr_shards": "1", 
-            "ranger_solr_config_set": "ranger_audits", 
-            "ranger_user": "ranger", 
-            "xml_configurations_supported": "true", 
-            "ranger-atlas-plugin-enabled": "No", 
-            "ranger-hbase-plugin-enabled": "No", 
-            "ranger-yarn-plugin-enabled": "No", 
-            "bind_anonymous": "false", 
-            "ranger_admin_username": "amb_ranger_admin", 
-            "admin_password": "admin", 
-            "is_solrCloud_enabled": "true", 
-            "ranger-storm-plugin-enabled": "No", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "ranger_group": "ranger", 
-            "ranger-knox-plugin-enabled": "No", 
-            "ranger_admin_log_dir": "/var/log/ranger/admin", 
-            "ranger-kafka-plugin-enabled": "No", 
-            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306", 
-            "ranger-hive-plugin-enabled": "No", 
-            "xasecure.audit.destination.solr": "true", 
-            "ranger_pid_dir": "/var/run/ranger", 
-            "xasecure.audit.destination.hdfs": "true", 
-            "admin_username": "admin", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
-            "create_db_dbuser": "true", 
-            "ranger_solr_collection_name": "ranger_audits", 
-            "ranger_admin_password": "P1!qLEQwP24KVlWY", 
+            "ranger_solr_shards": "1",
+            "ranger_solr_config_set": "ranger_audits",
+            "ranger_user": "ranger",
+            "xml_configurations_supported": "true",
+            "ranger-atlas-plugin-enabled": "No",
+            "ranger-hbase-plugin-enabled": "No",
+            "ranger-yarn-plugin-enabled": "No",
+            "bind_anonymous": "false",
+            "ranger_admin_username": "amb_ranger_admin",
+            "admin_password": "admin",
+            "is_solrCloud_enabled": "true",
+            "ranger-storm-plugin-enabled": "No",
+            "ranger-hdfs-plugin-enabled": "No",
+            "ranger_group": "ranger",
+            "ranger-knox-plugin-enabled": "No",
+            "ranger_admin_log_dir": "/var/log/ranger/admin",
+            "ranger-kafka-plugin-enabled": "No",
+            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306",
+            "ranger-hive-plugin-enabled": "No",
+            "xasecure.audit.destination.solr": "true",
+            "ranger_pid_dir": "/var/run/ranger",
+            "xasecure.audit.destination.hdfs": "true",
+            "admin_username": "admin",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
+            "create_db_dbuser": "true",
+            "ranger_solr_collection_name": "ranger_audits",
+            "ranger_admin_password": "P1!qLEQwP24KVlWY",
             "ranger_usersync_log_dir": "/var/log/ranger/usersync"
-        }, 
+        },
         "usersync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/usersync.
 log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n"
-        }, 
+        },
         "admin-properties": {
-            "db_user": "rangeradmin01", 
-            "DB_FLAVOR": "MYSQL", 
-            "db_password": "rangeradmin01", 
-            "db_root_user": "root", 
-            "policymgr_external_url": "http://c6401.ambari.apache.org:6080", 
-            "db_name": "ranger01", 
-            "db_host": "c6401.ambari.apache.org", 
-            "db_root_password": "vagrant", 
+            "db_user": "rangeradmin01",
+            "DB_FLAVOR": "MYSQL",
+            "db_password": "rangeradmin01",
+            "db_root_user": "root",
+            "policymgr_external_url": "http://c6401.ambari.apache.org:6080",
+            "db_name": "ranger01",
+            "db_host": "c6401.ambari.apache.org",
+            "db_root_password": "vagrant",
             "SQL_CONNECTOR_JAR": "{{driver_curl_target}}"
-        }, 
+        },
         "ranger-ugsync-site": {
-            "ranger.usersync.ldap.binddn": "", 
-            "ranger.usersync.policymgr.username": "rangerusersync", 
-            "ranger.usersync.policymanager.mockrun": "false", 
-            "ranger.usersync.group.searchbase": "", 
-            "ranger.usersync.ldap.bindalias": "testldapalias", 
-            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks", 
-            "ranger.usersync.port": "5151", 
-            "ranger.usersync.pagedresultssize": "500", 
-            "ranger.usersync.group.memberattributename": "", 
-            "ranger.usersync.kerberos.principal": "", 
-            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder", 
-            "ranger.usersync.ldap.referral": "ignore", 
-            "ranger.usersync.group.searchfilter": "", 
-            "ranger.usersync.ldap.user.objectclass": "person", 
-            "ranger.usersync.logdir": "{{usersync_log_dir}}", 
-            "ranger.usersync.ldap.user.searchfilter": "", 
-            "ranger.usersync.ldap.groupname.caseconversion": "none", 
-            "ranger.usersync.ldap.ldapbindpassword": "", 
-            "ranger.usersync.unix.minUserId": "500", 
-            "ranger.usersync.policymanager.maxrecordsperapicall": "1000", 
-            "ranger.usersync.group.nameattribute": "", 
-            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password", 
-            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks", 
-            "ranger.usersync.user.searchenabled": "false", 
-            "ranger.usersync.group.usermapsyncenabled": "true", 
-            "ranger.usersync.ldap.bindkeystore": "", 
-            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof", 
-            "ranger.usersync.kerberos.keytab": "", 
-            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe", 
-            "ranger.usersync.group.objectclass": "", 
-            "ranger.usersync.ldap.user.searchscope": "sub", 
-            "ranger.usersync.unix.password.file": "/etc/passwd", 
-            "ranger.usersync.ldap.user.nameattribute": "", 
-            "ranger.usersync.pagedresultsenabled": "true", 
-            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}", 
-            "ranger.usersync.group.search.first.enabled": "false", 
-            "ranger.usersync.group.searchenabled": "false", 
-            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder", 
-            "ranger.usersync.ssl": "true", 
-            "ranger.usersync.ldap.url": "", 
-            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org", 
-            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.ldap.user.searchbase": "", 
-            "ranger.usersync.ldap.username.caseconversion": "none", 
-            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.keystore.password": "UnIx529p", 
-            "ranger.usersync.unix.group.file": "/etc/group", 
-            "ranger.usersync.filesource.file": "/tmp/usergroup.txt", 
-            "ranger.usersync.group.searchscope": "", 
-            "ranger.usersync.truststore.password": "changeit", 
-            "ranger.usersync.enabled": "true", 
-            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000", 
+            "ranger.usersync.ldap.binddn": "",
+            "ranger.usersync.policymgr.username": "rangerusersync",
+            "ranger.usersync.policymanager.mockrun": "false",
+            "ranger.usersync.group.searchbase": "",
+            "ranger.usersync.ldap.bindalias": "testldapalias",
+            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks",
+            "ranger.usersync.port": "5151",
+            "ranger.usersync.pagedresultssize": "500",
+            "ranger.usersync.group.memberattributename": "",
+            "ranger.usersync.kerberos.principal": "",
+            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
+            "ranger.usersync.ldap.referral": "ignore",
+            "ranger.usersync.group.searchfilter": "",
+            "ranger.usersync.ldap.user.objectclass": "person",
+            "ranger.usersync.logdir": "{{usersync_log_dir}}",
+            "ranger.usersync.ldap.user.searchfilter": "",
+            "ranger.usersync.ldap.groupname.caseconversion": "none",
+            "ranger.usersync.ldap.ldapbindpassword": "",
+            "ranger.usersync.unix.minUserId": "500",
+            "ranger.usersync.policymanager.maxrecordsperapicall": "1000",
+            "ranger.usersync.group.nameattribute": "",
+            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password",
+            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks",
+            "ranger.usersync.user.searchenabled": "false",
+            "ranger.usersync.group.usermapsyncenabled": "true",
+            "ranger.usersync.ldap.bindkeystore": "",
+            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof",
+            "ranger.usersync.kerberos.keytab": "",
+            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe",
+            "ranger.usersync.group.objectclass": "",
+            "ranger.usersync.ldap.user.searchscope": "sub",
+            "ranger.usersync.unix.password.file": "/etc/passwd",
+            "ranger.usersync.ldap.user.nameattribute": "",
+            "ranger.usersync.pagedresultsenabled": "true",
+            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}",
+            "ranger.usersync.group.search.first.enabled": "false",
+            "ranger.usersync.group.searchenabled": "false",
+            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder",
+            "ranger.usersync.ssl": "true",
+            "ranger.usersync.ldap.url": "",
+            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org",
+            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.ldap.user.searchbase": "",
+            "ranger.usersync.ldap.username.caseconversion": "none",
+            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.keystore.password": "UnIx529p",
+            "ranger.usersync.unix.group.file": "/etc/group",
+            "ranger.usersync.filesource.file": "/tmp/usergroup.txt",
+            "ranger.usersync.group.searchscope": "",
+            "ranger.usersync.truststore.password": "changeit",
+            "ranger.usersync.enabled": "true",
+            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000",
             "ranger.usersync.filesource.text.delimiter": ","
-        }, 
+        },
         "hdfs-site": {
-            "dfs.namenode.checkpoint.period": "21600", 
-            "dfs.namenode.avoid.write.stale.datanode": "true", 
-            "dfs.namenode.startup.delay.block.deletion.sec": "3600", 
-            "dfs.namenode.checkpoint.txns": "1000000", 
-            "dfs.content-summary.limit": "5000", 
-            "dfs.support.append": "true", 
-            "dfs.datanode.address": "0.0.0.0:50010", 
-            "dfs.cluster.administrators": " hdfs", 
-            "dfs.namenode.audit.log.async": "true", 
-            "dfs.datanode.balance.bandwidthPerSec": "6250000", 
-            "dfs.namenode.safemode.threshold-pct": "1", 
-            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}", 
-            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020", 
-            "dfs.permissions.enabled": "true", 
-            "dfs.client.read.shortcircuit": "true", 
-            "dfs.https.port": "50470", 
-            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470", 
-            "nfs.file.dump.dir": "/tmp/.hdfs-nfs", 
-            "dfs.blocksize": "134217728", 
-            "dfs.blockreport.initialDelay": "120", 
-            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode", 
-            "dfs.namenode.fslock.fair": "false", 
-            "dfs.datanode.max.transfer.threads": "4096", 
-            "dfs.heartbeat.interval": "3", 
-            "dfs.replication": "3", 
-            "dfs.namenode.handler.count": "50", 
-            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary", 
-            "fs.permissions.umask-mode": "022", 
-            "dfs.namenode.stale.datanode.interval": "30000", 
-            "dfs.datanode.ipc.address": "0.0.0.0:8010", 
-            "dfs.datanode.failed.volumes.tolerated": "0", 
-            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data", 
-            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070", 
-            "dfs.webhdfs.enabled": "true", 
-            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding", 
-            "dfs.namenode.accesstime.precision": "0", 
-            "dfs.datanode.https.address": "0.0.0.0:50475", 
-            "dfs.namenode.write.stale.datanode.ratio": "1.0f", 
-            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090", 
-            "nfs.exports.allowed.hosts": "* rw", 
-            "dfs.datanode.http.address": "0.0.0.0:50075", 
-            "dfs.datanode.du.reserved": "33011188224", 
-            "dfs.client.read.shortcircuit.streams.cache.size": "4096", 
-            "dfs.http.policy": "HTTP_ONLY", 
-            "dfs.block.access.token.enable": "true", 
-            "dfs.client.retry.policy.enabled": "false", 
-            "dfs.namenode.name.dir.restore": "true", 
-            "dfs.permissions.superusergroup": "hdfs", 
-            "dfs.journalnode.https-address": "0.0.0.0:8481", 
-            "dfs.journalnode.http-address": "0.0.0.0:8480", 
-            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket", 
-            "dfs.namenode.avoid.read.stale.datanode": "true", 
-            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude", 
-            "dfs.datanode.data.dir.perm": "750", 
-            "dfs.encryption.key.provider.uri": "", 
-            "dfs.replication.max": "50", 
+            "dfs.namenode.checkpoint.period": "21600",
+            "dfs.namenode.avoid.write.stale.datanode": "true",
+            "dfs.namenode.startup.delay.block.deletion.sec": "3600",
+            "dfs.namenode.checkpoint.txns": "1000000",
+            "dfs.content-summary.limit": "5000",
+            "dfs.support.append": "true",
+            "dfs.datanode.address": "0.0.0.0:50010",
+            "dfs.cluster.administrators": " hdfs",
+            "dfs.namenode.audit.log.async": "true",
+            "dfs.datanode.balance.bandwidthPerSec": "6250000",
+            "dfs.namenode.safemode.threshold-pct": "1",
+            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}",
+            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020",
+            "dfs.permissions.enabled": "true",
+            "dfs.client.read.shortcircuit": "true",
+            "dfs.https.port": "50470",
+            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470",
+            "nfs.file.dump.dir": "/tmp/.hdfs-nfs",
+            "dfs.blocksize": "134217728",
+            "dfs.blockreport.initialDelay": "120",
+            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode",
+            "dfs.namenode.fslock.fair": "false",
+            "dfs.datanode.max.transfer.threads": "4096",
+            "dfs.heartbeat.interval": "3",
+            "dfs.replication": "3",
+            "dfs.namenode.handler.count": "50",
+            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary",
+            "fs.permissions.umask-mode": "022",
+            "dfs.namenode.stale.datanode.interval": "30000",
+            "dfs.datanode.ipc.address": "0.0.0.0:8010",
+            "dfs.datanode.failed.volumes.tolerated": "0",
+            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data",
+            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070",
+            "dfs.webhdfs.enabled": "true",
+            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding",
+            "dfs.namenode.accesstime.precision": "0",
+            "dfs.datanode.https.address": "0.0.0.0:50475",
+            "dfs.namenode.write.stale.datanode.ratio": "1.0f",
+            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090",
+            "nfs.exports.allowed.hosts": "* rw",
+            "dfs.datanode.http.address": "0.0.0.0:50075",
+            "dfs.datanode.du.reserved": "33011188224",
+            "dfs.client.read.shortcircuit.streams.cache.size": "4096",
+            "dfs.http.policy": "HTTP_ONLY",
+            "dfs.block.access.token.enable": "true",
+            "dfs.client.retry.policy.enabled": "false",
+            "dfs.namenode.name.dir.restore": "true",
+            "dfs.permissions.superusergroup": "hdfs",
+            "dfs.journalnode.https-address": "0.0.0.0:8481",
+            "dfs.journalnode.http-address": "0.0.0.0:8480",
+            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket",
+            "dfs.namenode.avoid.read.stale.datanode": "true",
+            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude",
+            "dfs.datanode.data.dir.perm": "750",
+            "dfs.encryption.key.provider.uri": "",
+            "dfs.replication.max": "50",
             "dfs.namenode.name.dir": "/grid/0/hadoop/hdfs/namenode"
-        }, 
+        },
         "ranger-tagsync-site": {
-            "ranger.tagsync.atlas.to.ranger.service.mapping": "", 
-            "ranger.tagsync.dest.ranger.ssl.config.filename": "/usr/hdp/current/ranger-tagsync/conf/mytruststore.jks", 
-            "ranger.tagsync.source.file.check.interval.millis": "", 
-            "ranger.tagsync.logdir": "/var/log/ranger/tagsync", 
-            "ranger.tagsync.source.atlasrest.download.interval.millis": "", 
-            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks", 
-            "ranger.tagsync.source.atlasrest.endpoint": "", 
-            "ranger.tagsync.dest.ranger.username": "rangertagsync", 
-            "ranger.tagsync.kerberos.principal": "", 
-            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}", 
-            "ranger.tagsync.atlas.custom.resource.mappers": "", 
-            "ranger.tagsync.kerberos.keytab": "", 
-            "ranger.tagsync.source.atlas": "false", 
-            "ranger.tagsync.source.atlasrest": "false", 
-            "ranger.tagsync.source.file": "false", 
+            "ranger.tagsync.atlas.to.ranger.service.mapping": "",
+            "ranger.tagsync.dest.ranger.ssl.config.filename": "/usr/hdp/current/ranger-tagsync/conf/mytruststore.jks",
+            "ranger.tagsync.source.file.check.interval.millis": "",
+            "ranger.tagsync.logdir": "/var/log/ranger/tagsync",
+            "ranger.tagsync.source.atlasrest.download.interval.millis": "",
+            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks",
+            "ranger.tagsync.source.atlasrest.endpoint": "",
+            "ranger.tagsync.dest.ranger.username": "rangertagsync",
+            "ranger.tagsync.kerberos.principal": "",
+            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}",
+            "ranger.tagsync.atlas.custom.resource.mappers": "",
+            "ranger.tagsync.kerberos.keytab": "",
+            "ranger.tagsync.source.atlas": "false",
+            "ranger.tagsync.source.atlasrest": "false",
+            "ranger.tagsync.source.file": "false",
             "ranger.tagsync.source.file.filename": ""
-        }, 
+        },
         "zoo.cfg": {
-            "clientPort": "2181", 
-            "autopurge.purgeInterval": "24", 
-            "syncLimit": "5", 
-            "dataDir": "/grid/0/hadoop/zookeeper", 
-            "initLimit": "10", 
-            "tickTime": "2000", 
+            "clientPort": "2181",
+            "autopurge.purgeInterval": "24",
+            "syncLimit": "5",
+            "dataDir": "/grid/0/hadoop/zookeeper",
+            "initLimit": "10",
+            "tickTime": "2000",
             "autopurge.snapRetainCount": "30"
-        }, 
+        },
         "hadoop-policy": {
-            "security.job.client.protocol.acl": "*", 
-            "security.job.task.protocol.acl": "*", 
-            "security.datanode.protocol.acl": "*", 
-            "security.namenode.protocol.acl": "*", 
-            "security.client.datanode.protocol.acl": "*", 
-            "security.inter.tracker.protocol.acl": "*", 
-            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop", 
-            "security.client.protocol.acl": "*", 
-            "security.refresh.policy.protocol.acl": "hadoop", 
-            "security.admin.operations.protocol.acl": "hadoop", 
+            "security.job.client.protocol.acl": "*",
+            "security.job.task.protocol.acl": "*",
+            "security.datanode.protocol.acl": "*",
+            "security.namenode.protocol.acl": "*",
+            "security.client.datanode.protocol.acl": "*",
+            "security.inter.tracker.protocol.acl": "*",
+            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop",
+            "security.client.protocol.acl": "*",
+            "security.refresh.policy.protocol.acl": "hadoop",
+            "security.admin.operations.protocol.acl": "hadoop",
             "security.inter.datanode.protocol.acl": "*"
-        }, 
+        },
         "hdfs-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#  http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n\n# Define some default values that can be overridden by system properties\n# To change daemon root logger use hadoop_root_logger in hadoop-env\nhadoop.root.lo
 gger=INFO,console\nhadoop.log.dir=.\nhadoop.log.file=hadoop.log\n\n\n# Define the root logger to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\n\n# Logging Threshold\nlog4j.threshhold=ALL\n\n#\n# Daily Rolling File Appender\n#\n\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Rollver at midnight\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\n\n# 30-day backup\n#log4j.appender.DRFA.MaxBackupIndex=30\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\n\n# Pattern format: Date LogLevel LoggerName LogMessage\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n# Debugging Pattern format\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender
 .console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\n\n#\n# TaskLog Appender\n#\n\n#Default values\nhadoop.tasklog.taskid=null\nhadoop.tasklog.iscleanup=false\nhadoop.tasklog.noKeepSplits=4\nhadoop.tasklog.totalLogFileSize=100\nhadoop.tasklog.purgeLogSplits=true\nhadoop.tasklog.logsRetainHours=12\n\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\n\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n\n#\n#Security audit appender\n#\nhadoop.security.logger=INFO,console\nhadoop.security.log.maxfilesize=256MB\nhadoop.security.log.maxbackupindex=20\nlog4j.category.SecurityLogger=${hadoop.security.logg
 er}\nhadoop.security.log.file=SecurityAuth.audit\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\n\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\n\n#\n# hdfs audit logging\n#\nhdfs.audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=
 false\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# NameNode metrics logging.\n# The default is to retain two namenode-metrics.log files up to 64MB each.\n#\nnamenode.metrics.logger=INFO,NullAppender\nlog4j.logger.NameNodeMetricsLog=${namenode.metrics.logger}\nlog4j.additivity.NameNodeMetricsLog=false\nlog4j.appender.NNMETRICSRFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.NNMETRICSRFA.File=${hadoop.log.dir}/namenode-metrics.log\nlog4j.appender.NNMETRICSRFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.NNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n\nlog4j.appender.NNMETRICSRFA.MaxBackupIndex=1\nlog4j.appender.NNMETRICSRFA.MaxFileSize=64MB\n\n#\n# mapred audit logging\n#\nmapred
 .audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# Rolling File Appender\n#\n\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Logfile size and and 30-day backups\nlog4j.appender.RFA.MaxFileSize=256MB\nlog4j.appender.RFA.MaxBackupIndex=10\n\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n# Custom Logging leve
 ls\n\nhadoop.metrics.log.level=INFO\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\n\n# Jets3t library\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\n\n#\n# Null Appender\n# Trap security logger on the hadoop client side\n#\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\n\n#\n# Event Counter Appender\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\n#\nlog4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter\n\n# Removes \"deprecated\" messages\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\n\n#\n# HDFS block state change log from block manager\n#\n# Uncomment the following to suppress normal block state change\n# messages from BlockManager in NameNode.\n#log4j.logger.BlockStateCh
 ange=WARN"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
-            "hadoop.rpc.protection": "authentication", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "REPOSITORY_CONFIG_USERNAME": "hadoop", 
-            "policy_user": "ambari-qa", 
-            "common.name.for.certificate": "", 
+            "hadoop.rpc.protection": "authentication",
+            "ranger-hdfs-plugin-enabled": "No",
+            "REPOSITORY_CONFIG_USERNAME": "hadoop",
+            "policy_user": "ambari-qa",
+            "common.name.for.certificate": "",
             "REPOSITORY_CONFIG_PASSWORD": "hadoop"
-        }, 
+        },
         "core-site": {
-            "hadoop.proxyuser.root.hosts": "*", 
-            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
-            "fs.trash.interval": "360", 
-            "ha.failover-controller.active-standby-elector.zk.op.retries": "120", 
-            "hadoop.http.authentication.simple.anonymous.allowed": "true", 
-            "hadoop.security.authentication": "simple", 
-            "hadoop.proxyuser.root.groups": "*", 
-            "ipc.client.connection.maxidletime": "30000", 
-            "hadoop.security.key.provider.path": "", 
-            "mapreduce.jobtracker.webinterface.trusted": "false", 
-            "hadoop.security.authorization": "false", 
-            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py", 
-            "ipc.server.tcpnodelay": "true", 
-            "ipc.client.connect.max.retries": "50", 
-            "hadoop.security.auth_to_local": "DEFAULT", 
-            "io.file.buffer.size": "131072", 
-            "hadoop.proxyuser.hdfs.hosts": "*", 
-            "hadoop.proxyuser.hdfs.groups": "*", 
-            "ipc.client.idlethreshold": "8000", 
-            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020", 
+            "hadoop.proxyuser.root.hosts": "*",
+            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization",
+            "fs.trash.interval": "360",
+            "ha.failover-controller.active-standby-elector.zk.op.retries": "120",
+            "hadoop.http.authentication.simple.anonymous.allowed": "true",
+            "hadoop.security.authentication": "simple",
+            "hadoop.proxyuser.root.groups": "*",
+            "ipc.client.connection.maxidletime": "30000",
+            "hadoop.security.key.provider.path": "",
+            "mapreduce.jobtracker.webinterface.trusted": "false",
+            "hadoop.security.authorization": "false",
+            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py",
+            "ipc.server.tcpnodelay": "true",
+            "ipc.client.connect.max.retries": "50",
+            "hadoop.security.auth_to_local": "DEFAULT",
+            "io.file.buffer.size": "131072",
+            "hadoop.proxyuser.hdfs.hosts": "*",
+            "hadoop.proxyuser.hdfs.groups": "*",
+            "ipc.client.idlethreshold": "8000",
+            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020",
             "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec"
-        }, 
+        },
         "hadoop-env": {
-            "keyserver_port": "", 
-            "proxyuser_group": "users", 
-            "hdfs_user_nproc_limit": "65536", 
-            "hdfs_log_dir_prefix": "/var/log/hadoop", 
-            "hdfs_user_nofile_limit": "128000", 
-            "hdfs_user": "hdfs", 
-            "keyserver_host": " ", 
-            "namenode_opt_maxnewsize": "128m", 
-            "namenode_opt_maxpermsize": "256m", 
-            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}", 
-            "namenode_heapsize": "1024m", 
-            "namenode_opt_newsize": "128m", 
-            "nfsgateway_heapsize": "1024", 
-            "dtnode_heapsize": "1024m", 
-            "hadoop_root_logger": "INFO,RFA", 
-            "hadoop_heapsize": "1024", 
-            "hadoop_pid_dir_prefix": "/var/run/hadoop", 
-            "namenode_opt_permsize": "128m", 
+            "keyserver_port": "",
+            "proxyuser_group": "users",
+            "hdfs_user_nproc_limit": "65536",
+            "hdfs_log_dir_prefix": "/var/log/hadoop",
+            "hdfs_user_nofile_limit": "128000",
+            "hdfs_user": "hdfs",
+            "keyserver_host": " ",
+            "namenode_opt_maxnewsize": "128m",
+            "namenode_opt_maxpermsize": "256m",
+            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARY
 NAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{% endif %}\n\nHADOOP_NFS3_OPTS=\"-Xmx{{nfsgateway_heapsize}}m -Dhadoop.security.logger=ERROR,DRFAS ${HADOOP_NFS3_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_D
 N_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The schedul
 ing priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Add database libraries\nJAVA_JDBC_LIBS=\"\"\nif [ -d \"/usr/share/java\" ]; then\n  for jarFile in `ls /usr/share/java | grep -E \"(mysql|ojdbc|postgresql|sqljdbc)\" 2>/dev/null`\n  do\n    JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\n  done\nfi\n\n# Add libraries to the hadoop classpath - some may not need a colon as they already include it\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_S
 ECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{% endif %}",
+            "namenode_heapsize": "1024m",
+            "namenode_opt_newsize": "128m",
+            "nfsgateway_heapsize": "1024",
+            "dtnode_heapsize": "1024m",
+            "hadoop_root_logger": "INFO,RFA",
+            "hadoop_heapsize": "1024",
+            "hadoop_pid_dir_prefix": "/var/run/hadoop",
+            "namenode_opt_permsize": "128m",
             "hdfs_tmp_dir": "/tmp"
-        }, 
+        },
         "zookeeper-log4j": {
             "content": "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n#\n#\n\n#\n# ZooKeeper Logging Configuration\n#\n\n# DEFAULT: console appender only\nlog4j.rootLogger=INFO, CONSOLE\n\n# Example with rolling log file\n#log4
 j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE\n\n# Example with rolling log file and tracing\n#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE\n\n#\n# Log INFO level and above messages to the console\n#\nlog4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender\nlog4j.appender.CONSOLE.Threshold=INFO\nlog4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout\nlog4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n\n\n#\n# Add ROLLINGFILE to rootLogger to get log file output\n#    Log DEBUG level and above messages to a log file\nlog4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender\nlog4j.appender.ROLLINGFILE.Threshold=DEBUG\nlog4j.appender.ROLLINGFILE.File=zookeeper.log\n\n# Max log file size of 10MB\nlog4j.appender.ROLLINGFILE.MaxFileSize=10MB\n# uncomment the next line to limit number of backup files\n#log4j.appender.ROLLINGFILE.MaxBackupIndex=10\n\nlog4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout\nlog4j.appender.ROLLIN
 GFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n\n\n\n#\n# Add TRACEFILE to rootLogger to get log file output\n#    Log DEBUG level and above messages to a log file\nlog4j.appender.TRACEFILE=org.apache.log4j.FileAppender\nlog4j.appender.TRACEFILE.Threshold=TRACE\nlog4j.appender.TRACEFILE.File=zookeeper_trace.log\n\nlog4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout\n### Notice we are including log4j's NDC here (%x)\nlog4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L][%x] - %m%n"
-        }, 
+        },
         "ssl-server": {
-            "ssl.server.keystore.location": "/etc/security/serverKeys/keystore.jks", 
-            "ssl.server.keystore.keypassword": "bigdata", 
-            "ssl.server.truststore.location": "/etc/security/serverKeys/all.jks", 
-            "ssl.server.keystore.password": "bigdata", 
-            "ssl.server.truststore.password": "bigdata", 
-            "ssl.server.truststore.type": "jks", 
-            "ssl.server.keystore.type": "jks", 
+            "ssl.server.keystore.location": "/etc/security/serverKeys/keystore.jks",
+            "ssl.server.keystore.keypassword": "bigdata",
+            "ssl.server.truststore.location": "/etc/security/serverKeys/all.jks",
+            "ssl.server.keystore.password": "bigdata",
+            "ssl.server.truststore.password": "bigdata",
+            "ssl.server.truststore.type": "jks",
+            "ssl.server.keystore.type": "jks",
             "ssl.server.truststore.reload.interval": "10000"
-        }, 
-        "ranger-site": {}, 
+        },
+        "ranger-site": {},
         "admin-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\nlog4j.rootLogger = warn,xa_log_appender\n\n\n# xa_logger\nlog4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.xa_log_app
 ender.file=${logdir}/xa_portal.log\nlog4j.appender.xa_log_appender.datePattern='.'yyyy-MM-dd\nlog4j.appender.xa_log_appender.append=true\nlog4j.appender.xa_log_appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.xa_log_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n\n# xa_log_appender : category and additivity\nlog4j.category.org.springframework=warn,xa_log_appender\nlog4j.additivity.org.springframework=false\n\nlog4j.category.org.apache.ranger=info,xa_log_appender\nlog4j.additivity.org.apache.ranger=false\n\nlog4j.category.xa=info,xa_log_appender\nlog4j.additivity.xa=false\n\n# perf_logger\nlog4j.appender.perf_appender=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.perf_appender.file=${logdir}/ranger_admin_perf.log\nlog4j.appender.perf_appender.datePattern='.'yyyy-MM-dd\nlog4j.appender.perf_appender.append=true\nlog4j.appender.perf_appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.perf_appender.layout.ConversionPattern=%d [%t] 
 %m%n\n\n\n# sql_appender\nlog4j.appender.sql_appender=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.sql_appender.file=${logdir}/xa_portal_sql.log\nlog4j.appender.sql_appender.datePattern='.'yyyy-MM-dd\nlog4j.appender.sql_appender.append=true\nlog4j.appender.sql_appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.sql_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n\n\n# sql_appender : category and additivity\nlog4j.category.org.hibernate.SQL=warn,sql_appender\nlog4j.additivity.org.hibernate.SQL=false\n\nlog4j.category.jdbc.sqlonly=fatal,sql_appender\nlog4j.additivity.jdbc.sqlonly=false\n\nlog4j.category.jdbc.sqltiming=warn,sql_appender\nlog4j.additivity.jdbc.sqltiming=false\n\nlog4j.category.jdbc.audit=fatal,sql_appender\nlog4j.additivity.jdbc.audit=false\n\nlog4j.category.jdbc.resultset=fatal,sql_appender\nlog4j.additivity.jdbc.resultset=false\n\nlog4j.category.jdbc.connection=fatal,sql_appender\nlog4j.additivity.jdbc.connection=false"
-        }, 
+        },
         "tagsync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/tagsync
 .log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n"
-        }, 
+        },
         "ranger-hdfs-security": {
-            "ranger.plugin.hdfs.policy.source.impl": "org.apache.ranger.admin.client.RangerAdminRESTClient", 
-            "ranger.plugin.hdfs.service.name": "{{repo_name}}", 
-            "ranger.plugin.hdfs.policy.cache.dir": "/etc/ranger/{{repo_name}}/policycache", 
-            "ranger.plugin.hdfs.policy.pollIntervalMs": "30000", 
-            "ranger.plugin.hdfs.policy.rest.url": "{{policymgr_mgr_url}}", 
-            "ranger.plugin.hdfs.policy.rest.ssl.config.file": "/etc/hadoop/conf/ranger-policymgr-ssl.xml", 
+            "ranger.plugin.hdfs.policy.source.impl": "org.apache.ranger.admin.client.RangerAdminRESTClient",
+            "ranger.plugin.hdfs.service.name": "{{repo_name}}",
+            "ranger.plugin.hdfs.policy.cache.dir": "/etc/ranger/{{repo_name}}/policycache",
+            "ranger.plugin.hdfs.policy.pollIntervalMs": "30000",
+            "ranger.plugin.hdfs.policy.rest.url": "{{policymgr_mgr_url}}",
+            "ranger.plugin.hdfs.policy.rest.ssl.config.file": "/etc/hadoop/conf/ranger-policymgr-ssl.xml",
             "xasecure.add-hadoop-authorization": "true"
-        }, 
-        "usersync-properties": {}, 
+        },
+        "usersync-properties": {},
         "zookeeper-env": {
-            "zk_log_dir": "/var/log/zookeeper", 
-            "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOOKEEPER_HOME={{zk_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}", 
-            "zk_server_heapsize": "1024m", 
-            "zk_pid_dir": "/var/run/zookeeper", 
+            "zk_log_dir": "/var/log/zookeeper",
+            "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOOKEEPER_HOME={{zk_home}}\nexport ZOO_LOG_DIR={{zk

<TRUNCATED>

[46/52] [abbrv] ambari git commit: AMBARI-21423 Add REST end point for the documentation of the Log Feeder shipper properties (mgergely)

Posted by jl...@apache.org.
AMBARI-21423 Add REST end point for the documentation of the Log Feeder shipper properties (mgergely)

Change-Id: If6d1b66c3a1f74b118ae60a7edc26624d49fb7e6


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 15dd999fff99fb80bc65ddfc94513e890a6efdef
Parents: c088289
Author: Miklos Gergely <mg...@hortonworks.com>
Authored: Mon Jul 10 14:51:23 2017 +0200
Committer: Miklos Gergely <mg...@hortonworks.com>
Committed: Mon Jul 10 14:51:23 2017 +0200

----------------------------------------------------------------------
 .../api/ShipperConfigElementDescription.java    |  59 +++++++++++
 .../api/ShipperConfigTypeDescription.java       |  44 ++++++++
 .../model/inputconfig/impl/ConditionsImpl.java  |  13 +++
 .../model/inputconfig/impl/FieldsImpl.java      |  14 +++
 .../inputconfig/impl/FilterDescriptorImpl.java  |  51 ++++++++++
 .../impl/FilterGrokDescriptorImpl.java          |  24 +++++
 .../impl/FilterKeyValueDescriptorImpl.java      |  28 +++++
 .../model/inputconfig/impl/InputConfigImpl.java |  18 ++++
 .../inputconfig/impl/InputDescriptorImpl.java   | 101 +++++++++++++++++++
 .../impl/InputFileBaseDescriptorImpl.java       |  27 +++++
 .../impl/InputS3FileDescriptorImpl.java         |  16 +++
 .../impl/MapAnonymizeDescriptorImpl.java        |  21 +++-
 .../inputconfig/impl/MapDateDescriptorImpl.java |  20 +++-
 .../impl/MapFieldCopyDescriptorImpl.java        |  14 ++-
 .../impl/MapFieldDescriptorImpl.java            |  33 ++++++
 .../impl/MapFieldNameDescriptorImpl.java        |  14 ++-
 .../impl/MapFieldValueDescriptorImpl.java       |  20 +++-
 .../inputconfig/impl/PostMapValuesAdapter.java  |   2 +-
 .../ambari-logsearch-logfeeder/docs/filter.md   |   4 +-
 .../ambari-logsearch-logfeeder/docs/input.md    |  10 +-
 .../docs/postMapValues.md                       |   2 +-
 .../ambari/logfeeder/filter/FilterJSONTest.java |  12 ++-
 .../common/ShipperConfigDescriptionStorage.java |  67 ++++++++++++
 .../ambari/logsearch/doc/DocConstants.java      |   1 +
 .../ambari/logsearch/manager/InfoManager.java   |   9 ++
 .../response/ShipperConfigDescriptionData.java  |  52 ++++++++++
 .../ambari/logsearch/rest/InfoResource.java     |  10 ++
 27 files changed, 667 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/ShipperConfigElementDescription.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/ShipperConfigElementDescription.java b/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/ShipperConfigElementDescription.java
new file mode 100644
index 0000000..d65bf8e
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/ShipperConfigElementDescription.java
@@ -0,0 +1,59 @@
+/*
+ * 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.logsearch.config.api;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker for the shipper configuration properties.
+ * Can be used to generate documentation about the shipper configs.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface ShipperConfigElementDescription {
+
+  /**
+   * The path of the json element.
+   */
+  String path();
+
+  /**
+   * The type of the json element.
+   */
+  String type();
+
+  /**
+   * Describe what the json element is used for.
+   */
+  String description();
+
+  /**
+   * An example value for the element, if applicable.
+   */
+  String[] examples() default {};
+
+  /**
+   * Default value of the json element, if applicable.
+   */
+  String defaultValue() default "";
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/ShipperConfigTypeDescription.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/ShipperConfigTypeDescription.java b/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/ShipperConfigTypeDescription.java
new file mode 100644
index 0000000..1c112d8
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/ShipperConfigTypeDescription.java
@@ -0,0 +1,44 @@
+/*
+ * 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.logsearch.config.api;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker for the shipper configuration types.
+ * Can be used to generate documentation about the shipper configs.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE})
+public @interface ShipperConfigTypeDescription {
+
+  /**
+   * The name of the element type.
+   */
+  String name();
+
+  /**
+   * The description of the json element.
+   */
+  String description();
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/ConditionsImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/ConditionsImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/ConditionsImpl.java
index 8bbff8f..2ba472c 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/ConditionsImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/ConditionsImpl.java
@@ -19,11 +19,24 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.Conditions;
 
 import com.google.gson.annotations.Expose;
 
+@ShipperConfigTypeDescription(
+  name = "Conditions",
+  description = "Describes the conditions that should be met in order to match a filter to an input element.\n" +
+                "\n" +
+                "It has the following attributes:"
+)
 public class ConditionsImpl implements Conditions {
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/conditions/fields",
+    type = "json object",
+    description = "The fields in the input element of which's value should be met."
+  )
   @Expose
   private FieldsImpl fields;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FieldsImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FieldsImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FieldsImpl.java
index 68cd0e2..32a0348 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FieldsImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FieldsImpl.java
@@ -21,11 +21,25 @@ package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
 import java.util.Set;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.Fields;
 
 import com.google.gson.annotations.Expose;
 
+@ShipperConfigTypeDescription(
+    name = "Fields",
+    description = "Describes a the fields which's value should be met in order to match a filter to an input element.\n" +
+                  "\n" +
+                  "It has the following attributes:"
+  )
 public class FieldsImpl implements Fields {
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/conditions/fields/type",
+    type = "list of strings",
+    description = "The acceptable values for the type field in the input element.",
+    examples = {"ambari_server", "\"spark_jobhistory_server\", \"spark_thriftserver\", \"livy_server\""}
+  )
   @Expose
   private Set<String> type;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterDescriptorImpl.java
index 4e11715..eb9d38c 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterDescriptorImpl.java
@@ -22,35 +22,86 @@ package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.FilterDescriptor;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.PostMapValues;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
+@ShipperConfigTypeDescription(
+  name = "Filter",
+  description = "The filter element in the [input configuration](inputConfig.md) contains a list of filter descriptions, each describing one filter applied on an input.\n" +
+                "\n" +
+                "The general elements in the json are the following:"
+)
 public abstract class FilterDescriptorImpl implements FilterDescriptor {
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/filter",
+    type = "string",
+    description = "The type of the filter.",
+    examples = {"grok", "keyvalue", "json"}
+  )
   @Expose
   private String filter;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/conditions",
+    type = "json object",
+    description = "The conditions of which input to filter."
+  )
   @Expose
   private ConditionsImpl conditions;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/sort_order",
+    type = "integer",
+    description = "Describes the order in which the filters should be applied.",
+    examples = {"1", "3"}
+  )
   @Expose
   @SerializedName("sort_order")
   private Integer sortOrder;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/source_field",
+    type = "integer",
+    description = "The source of the filter, must be set for keyvalue filters.",
+    examples = {"field_further_to_filter"},
+    defaultValue = "log_message"
+  )
   @Expose
   @SerializedName("source_field")
   private String sourceField;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/remove_source_field",
+    type = "boolean",
+    description = "Remove the source field after the filter is applied.",
+    examples = {"true", "false"},
+    defaultValue = "false"
+  )
   @Expose
   @SerializedName("remove_source_field")
   private Boolean removeSourceField;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/post_map_values",
+    type = "dictionary string to list of json objects",
+    description = "Mappings done after the filtering provided it's result."
+  )
   @Expose
   @SerializedName("post_map_values")
   private Map<String, List<PostMapValuesImpl>> postMapValues;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/is_enabled",
+    type = "boolean",
+    description = "A flag to show if the filter should be used.",
+    examples = {"true", "false"},
+    defaultValue = "true"
+  )
   @Expose
   @SerializedName("is_enabled")
   private Boolean isEnabled;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterGrokDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterGrokDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterGrokDescriptorImpl.java
index 995f76b..e140df0 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterGrokDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterGrokDescriptorImpl.java
@@ -19,20 +19,44 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.FilterGrokDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
+@ShipperConfigTypeDescription(
+  name = "Grok Filter",
+  description = "Grok filters have the following additional parameters:"
+)
 public class FilterGrokDescriptorImpl extends FilterDescriptorImpl implements FilterGrokDescriptor {
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/log4j_format",
+    type = "string",
+    description = "The log4j pattern of the log, not used, it is only there for documentation.",
+    examples = {"%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n"}
+  )
   @Expose
   @SerializedName("log4j_format")
   private String log4jFormat;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/multiline_pattern",
+    type = "string",
+    description = "The grok pattern that shows that the line is not a log line on it's own but the part of a multi line entry.",
+    examples = {"^(%{TIMESTAMP_ISO8601:logtime})"}
+  )
   @Expose
   @SerializedName("multiline_pattern")
   private String multilinePattern;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/message_pattern",
+    type = "string",
+    description = "The grok pattern to use to parse the log entry.",
+    examples = {"(?m)^%{TIMESTAMP_ISO8601:logtime}%{SPACE}-%{SPACE}%{LOGLEVEL:level}%{SPACE}\\[%{DATA:thread_name}\\@%{INT:line_number}\\]%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}"}
+  )
   @Expose
   @SerializedName("message_pattern")
   private String messagePattern;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterKeyValueDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterKeyValueDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterKeyValueDescriptorImpl.java
index 8e89990..1c782c5 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterKeyValueDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/FilterKeyValueDescriptorImpl.java
@@ -19,20 +19,48 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.FilterKeyValueDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
+@ShipperConfigTypeDescription(
+    name = "Key-value Filter",
+    description = "value_borders is only used if it is specified, and value_split is not.\n" +
+                  "\n" +
+                  "Key-value filters have the following additional parameters:"
+)
 public class FilterKeyValueDescriptorImpl extends FilterDescriptorImpl implements FilterKeyValueDescriptor {
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/field_split",
+    type = "string",
+    description = "The string that splits the key-value pairs.",
+    examples = {" ", ","},
+    defaultValue = "\\t"
+  )
   @Expose
   @SerializedName("field_split")
   private String fieldSplit;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/value_split",
+    type = "string",
+    description = "The string that separates keys from values.",
+    examples = {":", "->"},
+    defaultValue = "="
+  )
   @Expose
   @SerializedName("value_split")
   private String valueSplit;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/value_borders",
+    type = "string",
+    description = "The borders around the value, must be 2 characters long, first before it, second after it.",
+    examples = {"()", "[]", "{}"}
+  )
   @Expose
   @SerializedName("value_borders")
   private String valueBorders;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputConfigImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputConfigImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputConfigImpl.java
index a4eba8e..6ce634f 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputConfigImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputConfigImpl.java
@@ -21,16 +21,34 @@ package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
 import java.util.List;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.FilterDescriptor;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.InputConfig;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.InputDescriptor;
 
 import com.google.gson.annotations.Expose;
 
+@ShipperConfigTypeDescription(
+  name = "Input Config",
+  description = "The input configurations are stored in json files. Each of them are describing the processing of the log files of a service.\n" +
+                "\n" +
+                "The json contains two elements:"
+)
 public class InputConfigImpl implements InputConfig {
+  @ShipperConfigElementDescription(
+    path = "/input",
+    type = "list of json objects",
+    description = "A list of input descriptions"
+  )
   @Expose
   private List<InputDescriptorImpl> input;
 
+  @ShipperConfigElementDescription(
+    path = "/filter",
+    type = "list of json objects",
+    description = "A list of filter descriptions"
+  )
   @Expose
   private List<FilterDescriptorImpl> filter;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputDescriptorImpl.java
index 54b4b9b..cec16c8 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputDescriptorImpl.java
@@ -21,59 +21,160 @@ package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
 import java.util.Map;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.InputDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
+@ShipperConfigTypeDescription(
+  name = "Input",
+  description = "The input element in the input configuration contains a list of input descriptions, each describing one source of input.\n" +
+                "\n" +
+                "The general elements in the json are the following:"
+)
 public abstract class InputDescriptorImpl implements InputDescriptor {
+  @ShipperConfigElementDescription(
+    path = "/input/[]/type",
+    type = "string",
+    description = "The log id for this source.",
+    examples = {"zookeeper", "ambari_server"}
+  )
   @Expose
   private String type;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/rowtype",
+    type = "string",
+    description = "The type of the row.",
+    examples = {"service", "audit"}
+  )
   @Expose
   private String rowtype;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/path",
+    type = "string",
+    description = "The path of the source, may contain '*' characters too.",
+    examples = {"/var/log/ambari-logsearch-logfeeder/logsearch-logfeeder.json", "/var/log/zookeeper/zookeeper*.log"}
+  )
   @Expose
   private String path;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/add_fields",
+    type = "dictionary",
+    description = "The element contains field_name: field_value pairs which will be added to each rows data.",
+    examples = {"\"cluster\":\"cluster_name\""}
+  )
   @Expose
   @SerializedName("add_fields")
   private Map<String, String> addFields;
   
+  @ShipperConfigElementDescription(
+    path = "/input/[]/source",
+    type = "dictionary",
+    description = "The type of the input source.",
+    examples = {"file", "s3_file"}
+  )
   @Expose
   private String source;
   
+  @ShipperConfigElementDescription(
+    path = "/input/[]/tail",
+    type = "boolean",
+    description = "The input should check for only the latest file matching the pattern, not all of them.",
+    examples = {"true", "false"},
+    defaultValue = "true"
+  )
   @Expose
   private Boolean tail;
   
+  @ShipperConfigElementDescription(
+    path = "/input/[]/gen_event_md5",
+    type = "boolean",
+    description = "Generate an event_md5 field for each row by creating a hash of the row data.",
+    examples = {"true", "false"},
+    defaultValue = "true"
+  )
   @Expose
   @SerializedName("gen_event_md5")
   private Boolean genEventMd5;
   
+  @ShipperConfigElementDescription(
+    path = "/input/[]/use_event_md5_as_id",
+    type = "boolean",
+    description = "Generate an id for each row by creating a hash of the row data.",
+    examples = {"true", "false"},
+    defaultValue = "false"
+  )
   @Expose
   @SerializedName("use_event_md5_as_id")
   private Boolean useEventMd5AsId;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/cache_enabled",
+    type = "boolean",
+    description = "Allows the input to use a cache to filter out duplications.",
+    examples = {"true", "false"},
+    defaultValue = "false"
+  )
   @Expose
   @SerializedName("cache_enabled")
   private Boolean cacheEnabled;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/cache_key_field",
+    type = "string",
+    description = "Specifies the field for which to use the cache to find duplications of.",
+    examples = {"some_field_prone_to_repeating_value"},
+    defaultValue = "log_message"
+  )
   @Expose
   @SerializedName("cache_key_field")
   private String cacheKeyField;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/cache_last_dedup_enabled",
+    type = "boolean",
+    description = "Allow to filter out entries which are same as the most recent one irrelevant of it's time.",
+    examples = {"true", "false"},
+    defaultValue = "false"
+  )
   @Expose
   @SerializedName("cache_last_dedup_enabled")
   private Boolean cacheLastDedupEnabled;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/cache_size",
+    type = "integer",
+    description = "The number of entries to store in the cache.",
+    examples = {"50"},
+    defaultValue = "100"
+  )
   @Expose
   @SerializedName("cache_size")
   private Integer cacheSize;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/cache_dedup_interval",
+    type = "integer",
+    description = "The maximum interval in ms which may pass between two identical log messages to filter the latter out.",
+    examples = {"500"},
+    defaultValue = "1000"
+  )
   @Expose
   @SerializedName("cache_dedup_interval")
   private Long cacheDedupInterval;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/is_enabled",
+    type = "boolean",
+    description = "A flag to show if the input should be used.",
+    examples = {"true", "false"},
+    defaultValue = "true"
+  )
   @Expose
   @SerializedName("is_enabled")
   private Boolean isEnabled;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileBaseDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileBaseDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileBaseDescriptorImpl.java
index 51c7ec8..8281daa 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileBaseDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileBaseDescriptorImpl.java
@@ -19,20 +19,47 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.InputFileBaseDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
+@ShipperConfigTypeDescription(
+  name = "File Input",
+  description = "File inputs have some additional parameters:"
+)
 public class InputFileBaseDescriptorImpl extends InputDescriptorImpl implements InputFileBaseDescriptor {
+  @ShipperConfigElementDescription(
+    path = "/input/[]/checkpoint_interval_ms",
+    type = "integer",
+    description = "The time interval in ms when the checkpoint file should be updated.",
+    examples = {"10000"},
+    defaultValue = "5000"
+  )
   @Expose
   @SerializedName("checkpoint_interval_ms")
   private Integer checkpointIntervalMs;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/process_file",
+    type = "boolean",
+    description = "Should the file be processed.",
+    examples = {"true", "false"},
+    defaultValue = "true"
+  )
   @Expose
   @SerializedName("process_file")
   private Boolean processFile;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/copy_file",
+    type = "boolean",
+    description = "Should the file be copied (only if not processed).",
+    examples = {"true", "false"},
+    defaultValue = "false"
+  )
   @Expose
   @SerializedName("copy_file")
   private Boolean copyFile;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputS3FileDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputS3FileDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputS3FileDescriptorImpl.java
index 277a57c..19f52d3 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputS3FileDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputS3FileDescriptorImpl.java
@@ -19,16 +19,32 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.InputS3FileDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
+@ShipperConfigTypeDescription(
+  name = "S3 File Input",
+  description = "S3 file inputs have the following parameters in addition to the general file parameters:"
+)
 public class InputS3FileDescriptorImpl extends InputFileBaseDescriptorImpl implements InputS3FileDescriptor {
+  @ShipperConfigElementDescription(
+    path = "/input/[]/s3_access_key",
+    type = "string",
+    description = "The access key used for AWS credentials."
+  )
   @Expose
   @SerializedName("s3_access_key")
   private String s3AccessKey;
 
+  @ShipperConfigElementDescription(
+    path = "/input/[]/s3_secret_key",
+    type = "string",
+    description = "The secret key used for AWS credentials."
+  )
   @Expose
   @SerializedName("s3_secret_key")
   private String s3SecretKey;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapAnonymizeDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapAnonymizeDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapAnonymizeDescriptorImpl.java
index 5fdbbab..8c128de 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapAnonymizeDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapAnonymizeDescriptorImpl.java
@@ -19,20 +19,39 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.MapAnonymizeDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
-public class MapAnonymizeDescriptorImpl implements MapAnonymizeDescriptor {
+@ShipperConfigTypeDescription(
+    name = "Map Anonymize",
+    description = "The name of the mapping element should be map_anonymize. The value json element should contain the following parameter:"
+)
+public class MapAnonymizeDescriptorImpl extends MapFieldDescriptorImpl implements MapAnonymizeDescriptor {
   @Override
   public String getJsonName() {
     return "map_anonymize";
   }
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/post_map_values/{field_name}/[]/map_anonymize/pattern",
+    type = "string",
+    description = "The pattern to use to identify parts to anonymize. The parts to hide should be marked with the \"<hide>\" string.",
+    examples = {"Some secret is here: <hide>, and another one is here: <hide>"}
+  )
   @Expose
   private String pattern;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/post_map_values/{field_name}/[]/map_anonymize/hide_char",
+    type = "string",
+    description = "The character to hide with",
+    defaultValue = "*",
+    examples = {"X", "-"}
+  )
   @Expose
   @SerializedName("hide_char")
   private Character hideChar;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapDateDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapDateDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapDateDescriptorImpl.java
index 2e54e7a..feec4b6 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapDateDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapDateDescriptorImpl.java
@@ -19,21 +19,39 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.MapDateDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
-public class MapDateDescriptorImpl implements MapDateDescriptor {
+@ShipperConfigTypeDescription(
+    name = "Map Date",
+    description = "The name of the mapping element should be map_date. The value json element may contain the following parameters:"
+)
+public class MapDateDescriptorImpl extends MapFieldDescriptorImpl implements MapDateDescriptor {
   @Override
   public String getJsonName() {
     return "map_date";
   }
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/post_map_values/{field_name}/[]/map_date/src_date_pattern",
+    type = "string",
+    description = "If it is specified than the mapper converts from this format to the target, and also adds missing year",
+    examples = {"MMM dd HH:mm:ss"}
+  )
   @Expose
   @SerializedName("src_date_pattern")
   private String sourceDatePattern;
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/post_map_values/{field_name}/[]/map_date/target_date_pattern",
+    type = "string",
+    description = "If 'epoch' then the field is parsed as seconds from 1970, otherwise the content used as pattern",
+    examples = {"yyyy-MM-dd HH:mm:ss,SSS", "epoch"}
+  )
   @Expose
   @SerializedName("target_date_pattern")
   private String targetDatePattern;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldCopyDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldCopyDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldCopyDescriptorImpl.java
index 4a8d746..e7b8fdf 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldCopyDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldCopyDescriptorImpl.java
@@ -19,17 +19,29 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.MapFieldCopyDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
-public class MapFieldCopyDescriptorImpl implements MapFieldCopyDescriptor {
+@ShipperConfigTypeDescription(
+    name = "Map Copy",
+    description = "The name of the mapping element should be map_copy. The value json element should contain the following parameter:"
+)
+public class MapFieldCopyDescriptorImpl extends MapFieldDescriptorImpl implements MapFieldCopyDescriptor {
   @Override
   public String getJsonName() {
     return "map_fieldcopy";
   }
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/post_map_values/{field_name}/[]/map_copy/copy_name",
+    type = "string",
+    description = "The name of the copied field",
+    examples = {"new_name"}
+  )
   @Expose
   @SerializedName("copy_name")
   private String copyName;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldDescriptorImpl.java
new file mode 100644
index 0000000..101e0d4
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldDescriptorImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.logsearch.config.zookeeper.model.inputconfig.impl;
+
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
+import org.apache.ambari.logsearch.config.api.model.inputconfig.MapFieldDescriptor;
+
+@ShipperConfigTypeDescription(
+    name = "Post Map Values",
+    description = "The Post Map Values element in the [filter](filter.md) field names as keys, the values are lists of sets of " +
+                  "post map values, each describing one mapping done on a field named before obtained after filtering.\n" +
+                  "\n" +
+                  "Currently there are four kind of mappings are supported:"
+  )
+public abstract class MapFieldDescriptorImpl implements MapFieldDescriptor {
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldNameDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldNameDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldNameDescriptorImpl.java
index bd32018..e1b71e6 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldNameDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldNameDescriptorImpl.java
@@ -19,17 +19,29 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.MapFieldNameDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
-public class MapFieldNameDescriptorImpl implements MapFieldNameDescriptor {
+@ShipperConfigTypeDescription(
+    name = "Map Field Name",
+    description = "The name of the mapping element should be map_fieldname. The value json element should contain the following parameter:"
+)
+public class MapFieldNameDescriptorImpl extends MapFieldDescriptorImpl implements MapFieldNameDescriptor {
   @Override
   public String getJsonName() {
     return "map_fieldname";
   }
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/post_map_values/{field_name}/[]/map_fieldname/new_field_name",
+    type = "string",
+    description = "The name of the renamed field",
+    examples = {"new_name"}
+  )
   @Expose
   @SerializedName("new_field_name")
   private String newFieldName;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldValueDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldValueDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldValueDescriptorImpl.java
index 599e152..a80a994 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldValueDescriptorImpl.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/MapFieldValueDescriptorImpl.java
@@ -19,21 +19,39 @@
 
 package org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl;
 
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.MapFieldValueDescriptor;
 
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
-public class MapFieldValueDescriptorImpl implements MapFieldValueDescriptor {
+@ShipperConfigTypeDescription(
+    name = "Map Field Value",
+    description = "The name of the mapping element should be map_fieldvalue. The value json element should contain the following parameter:"
+)
+public class MapFieldValueDescriptorImpl extends MapFieldDescriptorImpl implements MapFieldValueDescriptor {
   @Override
   public String getJsonName() {
     return "map_fieldvalue";
   }
 
+  @ShipperConfigElementDescription(
+    path = "/filter/[]/post_map_values/{field_name}/[]/map_fieldvalue/pre_value",
+    type = "string",
+    description = "The value that the field must match (ignoring case) to be mapped",
+    examples = {"old_value"}
+  )
   @Expose
   @SerializedName("pre_value")
   private String preValue;
 
+  @ShipperConfigElementDescription(
+      path = "/filter/[]/post_map_values/{field_name}/[]/map_fieldvalue/post_value",
+      type = "string",
+      description = "The value to which the field is modified to",
+      examples = {"new_value"}
+    )
   @Expose
   @SerializedName("post_value")
   private String postValue;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/PostMapValuesAdapter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/PostMapValuesAdapter.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/PostMapValuesAdapter.java
index 3c21fd8..e3f9886 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/PostMapValuesAdapter.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/PostMapValuesAdapter.java
@@ -95,7 +95,7 @@ public class PostMapValuesAdapter implements JsonDeserializer<List<PostMapValues
   private JsonElement createMapperObject(PostMapValuesImpl postMapValues, JsonSerializationContext context) {
     JsonObject jsonObject = new JsonObject();
     for (MapFieldDescriptor m : postMapValues.getMappers()) {
-      jsonObject.add(((MapFieldDescriptor)m).getJsonName(), context.serialize(m));
+      jsonObject.add(((MapFieldDescriptorImpl)m).getJsonName(), context.serialize(m));
     }
     return jsonObject;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-logfeeder/docs/filter.md
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/docs/filter.md b/ambari-logsearch/ambari-logsearch-logfeeder/docs/filter.md
index 129279b..d825290 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/docs/filter.md
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/docs/filter.md
@@ -48,6 +48,8 @@ Grok filters have the following additional parameters:
 
 ## Key-value Filter
 
+value\_borders is only used if it is specified, and value\_split is not.
+
 Key-value filters have the following additional parameters:
 
 | Field          | Description                                                                               | Default |
@@ -56,4 +58,4 @@ Key-value filters have the following additional parameters:
 | value\_split   | The string that separates keys from values                                                | "="     |
 | value\_borders | The borders around the value, must be 2 characters long, first before it, second after it | -       |
 
-If value\_borders is only used if it is specified, and value\_split is not.
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-logfeeder/docs/input.md
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/docs/input.md b/ambari-logsearch/ambari-logsearch-logfeeder/docs/input.md
index 661eeb8..1a9ce8d 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/docs/input.md
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/docs/input.md
@@ -20,20 +20,18 @@ limitations under the License.
 # Input
 
 The input element in the [input configuration](inputConfig.md) contains a list of input descriptions, each describing one source
-of input.
-
-The general elements in the json are the following:
+of input. The general elements in the json are the following:
 
 | Field                       | Description                                                                                           | Default      |
 |-----------------------------|-------------------------------------------------------------------------------------------------------|--------------|
-| type                        | The type of the input source, currently file and s3_file are supported                                | -            |
+| type                        | The log id for this source                                                                            | -            |
 | rowtype                     | The type of the row, can be service / audit                                                           | -            |
 | path                        | The path of the source, may contain '*' characters too                                                | -            |
 | add\_fields                 | The element contains field\_name: field\_value pairs which will be added to each rows data            | -            |
+| source                      | The type of the input source, currently file and s3_file are supported                                | -            |
 | tail                        | The input should check for only the latest file matching the pattern, not all of them                 | true         |
 | gen\_event\_md5             | Generate an event\_md5 field for each row by creating a hash of the row data                          | true         |
 | use\_event\_md5\_as\_id     | Generate an id for each row by creating a hash of the row data                                        | false        |
-| start\_position             | Should the parsing start from the beginning                                                           | beginning    |
 | cache\_enabled              | Allows the input to use a cache to filter out duplications                                            | true         |
 | cache\_key\_field           | Specifies the field for which to use the cache to find duplications of                                | log\_message |
 | cache\_last\_dedup\_enabled | Allow to filter out entries which are same as the most recent one irrelevant of it's time             | false        |
@@ -44,7 +42,7 @@ The general elements in the json are the following:
 
 ## File Input
 
-File inputs have the following parameters too:
+File inputs have some additional parameters:
 
 | Field                    | Description                                                        | Default |
 |--------------------------|--------------------------------------------------------------------|---------|

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-logfeeder/docs/postMapValues.md
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/docs/postMapValues.md b/ambari-logsearch/ambari-logsearch-logfeeder/docs/postMapValues.md
index 7ec439a..bc219df 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/docs/postMapValues.md
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/docs/postMapValues.md
@@ -67,4 +67,4 @@ The name of the mapping element should be map\_anonymize. The value json element
 | Field      | Description                                                                                                     |
 |------------|-----------------------------------------------------------------------------------------------------------------|
 | pattern    | The pattern to use to identify parts to anonymize. The parts to hide should be marked with the "<hide>" string. |
-| hide\_char | The character to hide with, if it is not specified then the default is 'X'                                      |
+| hide\_char | The character to hide with, if it is not specified then the default is '*'                                      |

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java
index 7abf177..acc3d4d 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java
@@ -131,13 +131,15 @@ public class FilterJSONTest {
   @Test
   public void testJSONFilterCode_invalidJson() throws Exception {
     LOG.info("testJSONFilterCode_invalidJson()");
+    
     init(new FilterJsonDescriptorImpl());
-    String inputStr="invalid json";
+    
+    String inputStr = "invalid json";
     try{
-    filterJson.apply(inputStr,new InputMarker(null, null, 0));
-    fail("Expected LogFeederException was not occured");
-    }catch(LogFeederException logFeederException){
-      assertEquals("Json parsing failed for inputstr = "+inputStr, logFeederException.getLocalizedMessage());
+      filterJson.apply(inputStr,new InputMarker(null, null, 0));
+      fail("Expected LogFeederException was not occured");
+    } catch(LogFeederException logFeederException) {
+      assertEquals("Json parsing failed for inputstr = " + inputStr, logFeederException.getLocalizedMessage());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/ShipperConfigDescriptionStorage.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/ShipperConfigDescriptionStorage.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/ShipperConfigDescriptionStorage.java
new file mode 100644
index 0000000..7d4bc2c
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/ShipperConfigDescriptionStorage.java
@@ -0,0 +1,67 @@
+/*
+ * 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.logsearch.common;
+
+import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
+import org.apache.ambari.logsearch.model.response.ShipperConfigDescriptionData;
+import org.reflections.Reflections;
+import org.reflections.scanners.FieldAnnotationsScanner;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Named;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+@Named
+public class ShipperConfigDescriptionStorage {
+
+  private static final String SHIPPER_CONFIG_PACKAGE = "org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl";
+  
+  private final List<ShipperConfigDescriptionData> shipperConfigDescription = new ArrayList<>();
+
+  @PostConstruct
+  public void postConstruct() {
+    Thread loadShipperConfigDescriptionThread = new Thread("load_shipper_config_description") {
+      @Override
+      public void run() {
+        fillShipperConfigDescriptions();
+      }
+    };
+    loadShipperConfigDescriptionThread.setDaemon(true);
+    loadShipperConfigDescriptionThread.start();
+  }
+
+  public List<ShipperConfigDescriptionData> getShipperConfigDescription() {
+    return shipperConfigDescription;
+  }
+
+  private void fillShipperConfigDescriptions() {
+    Reflections reflections = new Reflections(SHIPPER_CONFIG_PACKAGE, new FieldAnnotationsScanner());
+    Set<Field> fields = reflections.getFieldsAnnotatedWith(ShipperConfigElementDescription.class);
+    for (Field field : fields) {
+      ShipperConfigElementDescription description = field.getAnnotation(ShipperConfigElementDescription.class);
+      shipperConfigDescription.add(new ShipperConfigDescriptionData(description.path(), description.description(),
+          description.examples(), description.defaultValue()));
+    }
+    
+    shipperConfigDescription.sort((o1, o2) -> o1.getPath().compareTo(o2.getPath()));
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/doc/DocConstants.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/doc/DocConstants.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/doc/DocConstants.java
index 6d1382d..da0a8bb 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/doc/DocConstants.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/doc/DocConstants.java
@@ -104,6 +104,7 @@ public class DocConstants {
     public static final String GET_AUTH_DETAILS_OD = "Get authentication details.";
     public static final String GET_ALL_PROPERTIES_INFO_OD = "List all available properties for Log Search and Log Feeder";
     public static final String GET_LOGSEARCH_PROPERTIES_INFO_OD = "List all available properties for Log Search property file (e.g: logsearch.properties/logfeeder.properties)";
+    public static final String GET_ALL_SHIPPER_CONFIG_INFO_OD = "List all available shipper configuration element";
   }
 
   public class EventHistoryDescriptions {

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/InfoManager.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/InfoManager.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/InfoManager.java
index f6d0449..2f63492 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/InfoManager.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/InfoManager.java
@@ -25,7 +25,9 @@ import java.util.Map;
 
 import org.apache.ambari.logsearch.conf.AuthPropsConfig;
 import org.apache.ambari.logsearch.common.PropertyDescriptionStorage;
+import org.apache.ambari.logsearch.common.ShipperConfigDescriptionStorage;
 import org.apache.ambari.logsearch.model.response.PropertyDescriptionData;
+import org.apache.ambari.logsearch.model.response.ShipperConfigDescriptionData;
 
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -39,6 +41,9 @@ public class InfoManager extends JsonManagerBase {
   @Inject
   private PropertyDescriptionStorage propertyDescriptionStore;
 
+  @Inject
+  private ShipperConfigDescriptionStorage shipperConfigDescriptionStore;
+
   public Map<String, Boolean> getAuthMap() {
     Map<String, Boolean> authMap = new HashMap<>();
     authMap.put("external", authPropsConfig.isAuthExternalEnabled());
@@ -56,4 +61,8 @@ public class InfoManager extends JsonManagerBase {
   public List<PropertyDescriptionData> getLogSearchPropertyDescriptions(String propertiesFile) {
     return getPropertyDescriptions().get(propertiesFile);
   }
+  
+  public List<ShipperConfigDescriptionData> getLogSearchShipperConfigDescription() {
+    return shipperConfigDescriptionStore.getShipperConfigDescription();
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/ShipperConfigDescriptionData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/ShipperConfigDescriptionData.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/ShipperConfigDescriptionData.java
new file mode 100644
index 0000000..91f7420
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/ShipperConfigDescriptionData.java
@@ -0,0 +1,52 @@
+/*
+ * 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.logsearch.model.response;
+
+public class ShipperConfigDescriptionData {
+  private final String path;
+
+  private final String description;
+
+  private final String[] examples;
+
+  private final String defaultValue;
+
+  public ShipperConfigDescriptionData(String path, String description, String[] examples, String defaultValue) {
+    this.path = path;
+    this.description = description;
+    this.examples = examples;
+    this.defaultValue = defaultValue;
+  }
+
+  public String getPath() {
+    return path;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  public String[] getExamples() {
+    return examples;
+  }
+
+  public String getDefaultValue() {
+    return defaultValue;
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/15dd999f/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/InfoResource.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/InfoResource.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/InfoResource.java
index 6ea0bab..e49be90 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/InfoResource.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/InfoResource.java
@@ -29,12 +29,14 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.ambari.logsearch.manager.InfoManager;
 import org.apache.ambari.logsearch.model.response.PropertyDescriptionData;
+import org.apache.ambari.logsearch.model.response.ShipperConfigDescriptionData;
 import org.springframework.context.annotation.Scope;
 
 import java.util.List;
 import java.util.Map;
 
 import static org.apache.ambari.logsearch.doc.DocConstants.PublicOperationDescriptions.GET_ALL_PROPERTIES_INFO_OD;
+import static org.apache.ambari.logsearch.doc.DocConstants.PublicOperationDescriptions.GET_ALL_SHIPPER_CONFIG_INFO_OD;
 import static org.apache.ambari.logsearch.doc.DocConstants.PublicOperationDescriptions.GET_LOGSEARCH_PROPERTIES_INFO_OD;
 import static org.apache.ambari.logsearch.doc.DocConstants.PublicOperationDescriptions.GET_AUTH_DETAILS_OD;
 
@@ -70,4 +72,12 @@ public class InfoResource {
   public List<PropertyDescriptionData> getPropertyFileDescription(@PathParam("propertyFile") String propertyFile) {
     return infoManager.getLogSearchPropertyDescriptions(propertyFile);
   }
+
+  @GET
+  @Path("/shipperconfig")
+  @Produces({"application/json"})
+  @ApiOperation(GET_ALL_SHIPPER_CONFIG_INFO_OD)
+  public List<ShipperConfigDescriptionData> getShipperConfigDescription() {
+    return infoManager.getLogSearchShipperConfigDescription();
+  }
 }


[28/52] [abbrv] ambari git commit: AMBARI-21385. Selected hosts are not dropped event if some of the selected hosts was deleted (alexantonenko)

Posted by jl...@apache.org.
AMBARI-21385. Selected hosts are not dropped event if some of the selected hosts was deleted (alexantonenko)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: ac5eaae59673740a43b56b54978948e73cd71a54
Parents: f17d317
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Jun 30 17:52:42 2017 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Jul 7 10:38:45 2017 +0300

----------------------------------------------------------------------
 .../main/host/bulk_operations_controller.js           | 11 +++++++++--
 ambari-web/app/controllers/main/host/details.js       |  2 +-
 ambari-web/app/mappers/hosts_mapper.js                |  2 +-
 ambari-web/app/utils/db.js                            | 14 ++++++++++----
 ambari-web/app/views/main/host.js                     |  8 +++-----
 ambari-web/test/views/main/host_test.js               |  4 ++--
 6 files changed, 26 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ac5eaae5/ambari-web/app/controllers/main/host/bulk_operations_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/bulk_operations_controller.js b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
index b053fc3..b921cd5 100644
--- a/ambari-web/app/controllers/main/host/bulk_operations_controller.js
+++ b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
@@ -450,13 +450,20 @@ App.BulkOperationsController = Em.Controller.extend({
         }
       }),
 
-      onPrimary: function () {
+      completeDelete() {
+        if (arg1 !== 'error') {
+          App.db.unselectHosts(arg2.hosts);
+        }
         location.reload();
+      },
+
+      onPrimary: function () {
+        this.completeDelete();
         this._super();
       },
 
       onClose: function () {
-        location.reload();
+        this.completeDelete();
         this._super();
       }
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/ac5eaae5/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 6f34dfe..382b09d 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -2678,7 +2678,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
         var popup = this;
         var completeCallback = function () {
           var remainingHosts = App.db.getSelectedHosts('mainHostController').removeObject(self.get('content.hostName'));
-          App.db.setSelectedHosts('mainHostController', remainingHosts);
+          App.db.setSelectedHosts(remainingHosts);
           popup.hide();
         };
         self.doDeleteHost(completeCallback);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ac5eaae5/ambari-web/app/mappers/hosts_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/hosts_mapper.js b/ambari-web/app/mappers/hosts_mapper.js
index 203cd67..e536269 100644
--- a/ambari-web/app/mappers/hosts_mapper.js
+++ b/ambari-web/app/mappers/hosts_mapper.js
@@ -103,7 +103,7 @@ App.hostsMapper = App.QuickDataMapper.create({
       var cacheServices = App.cache['services'];
       var currentServiceComponentsMap = App.get('componentConfigMapper').buildServiceComponentMap(cacheServices);
       var newHostComponentsMap = {};
-      var selectedHosts = App.db.getSelectedHosts('mainHostController');
+      var selectedHosts = App.db.getSelectedHosts();
       var clusterName = App.get('clusterName');
       var advancedHostComponents = [];
       var hostComponentLogs = [];

http://git-wip-us.apache.org/repos/asf/ambari/blob/ac5eaae5/ambari-web/app/utils/db.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js
index e41b9c0..eddd7ef 100644
--- a/ambari-web/app/utils/db.js
+++ b/ambari-web/app/utils/db.js
@@ -221,10 +221,16 @@ App.db.setSortingStatuses = function (name, sortingConditions) {
   App.db.set('app.tables.sortingConditions', name, sortingConditions);
 };
 
-App.db.setSelectedHosts = function (name, selectedHosts) {
-  App.db.set('app.tables.selectedItems', name, selectedHosts);
+App.db.setSelectedHosts = function (selectedHosts) {
+  App.db.set('app.tables.selectedItems', 'mainHostController', selectedHosts);
 };
 
+App.db.unselectHosts = function (hostsToUnselect = []) {
+  let selectedHosts = App.db.getSelectedHosts();
+  selectedHosts = selectedHosts.filter(host => hostsToUnselect.indexOf(host) === -1);
+  App.db.setSelectedHosts(selectedHosts);
+}
+
 App.db.setHosts = function (hostInfo) {
   App.db.set('Installer', 'hostInfo', hostInfo);
 };
@@ -405,8 +411,8 @@ App.db.getSortingStatuses = function (name) {
   return name ? App.db.get('app.tables.sortingConditions', name): null;
 };
 
-App.db.getSelectedHosts = function (name) {
-  return App.db.get('app.tables.selectedItems', name) || [];
+App.db.getSelectedHosts = function () {
+  return App.db.get('app.tables.selectedItems', 'mainHostController') || [];
 };
 
 /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ac5eaae5/ambari-web/app/views/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js
index 6a8dcf2..78eb82b 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -246,8 +246,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
     }
     this.combineSelectedFilter();
     //10 is an index of selected column
-    var controllerName = this.get('controller.name');
-    App.db.setSelectedHosts(controllerName, this.get('selectedHosts'));
+    App.db.setSelectedHosts(this.get('selectedHosts'));
 
     this.addObserver('selectAllHosts', this, this.toggleAllHosts);
   },
@@ -255,8 +254,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
    * combine selected hosts on page with selected hosts which are filtered out but added to cluster
    */
   combineSelectedFilter: function () {
-    var controllerName = this.get('controller.name');
-    var previouslySelectedHosts = App.db.getSelectedHosts(controllerName);
+    var previouslySelectedHosts = App.db.getSelectedHosts();
     var selectedHosts = [];
     var hostsOnPage = this.get('pageContent').mapProperty('hostName');
     selectedHosts = this.get('pageContent').filterProperty('selected').mapProperty('hostName');
@@ -306,7 +304,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
   clearSelection: function() {
     this.get('pageContent').setEach('selected', false);
     this.set('selectAllHosts', false);
-    App.db.setSelectedHosts(this.get('controller.name'), []);
+    App.db.setSelectedHosts([]);
     this.get('selectedHosts').clear();
     this.filterSelected();
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/ac5eaae5/ambari-web/test/views/main/host_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/host_test.js b/ambari-web/test/views/main/host_test.js
index e0eb9bc..15bdab2 100644
--- a/ambari-web/test/views/main/host_test.js
+++ b/ambari-web/test/views/main/host_test.js
@@ -523,7 +523,7 @@ describe('App.MainHostView', function () {
     it("App.db.setSelectedHosts should be called", function() {
       view.set('selectedHosts', []);
       view.updateCheckedFlags();
-      expect(App.db.setSelectedHosts.calledWith('ctrl1', [])).to.be.true;
+      expect(App.db.setSelectedHosts.calledWith([])).to.be.true;
     });
 
     it("addObserver should be called", function() {
@@ -620,7 +620,7 @@ describe('App.MainHostView', function () {
     });
 
     it("App.db.setSelectedHosts should be called", function() {
-      expect(App.db.setSelectedHosts.calledWith('ctrl1', [])).to.be.true;
+      expect(App.db.setSelectedHosts.calledWith([])).to.be.true;
     });
 
     it("filterSelected should be called", function() {


[23/52] [abbrv] ambari git commit: Revert "AMBARI-21344. Add Services Using Repository ID (alexantonenko)"

Posted by jl...@apache.org.
Revert "AMBARI-21344. Add Services Using Repository ID (alexantonenko)"

This reverts commit 08dd492e5fb801355be8e2dcd895d9cb09d3dd3c.


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 068f86a1c751a501acd78572a25c1d6e223e70e6
Parents: e666e9b
Author: Dmytro Grinenko <ha...@apache.org>
Authored: Thu Jul 6 15:42:55 2017 +0300
Committer: Dmytro Grinenko <ha...@apache.org>
Committed: Thu Jul 6 15:42:55 2017 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step8_controller.js      | 16 ++++++++++------
 ambari-web/app/models/stack.js                      |  4 +---
 2 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/068f86a1/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 42519e0..fa44a24 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -913,9 +913,6 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz
         installerController.postVersionDefinitionFileStep8(versionData.isXMLdata, versionData.data).done(function (versionInfo) {
           if (versionInfo.id && versionInfo.stackName && versionInfo.stackVersion) {
             var selectedStack = App.Stack.find().findProperty('isSelected', true);
-            if (selectedStack) {
-              selectedStack.set('versionInfoId', versionInfo.id);
-            }
             installerController.updateRepoOSInfo(versionInfo, selectedStack).done(function() {
               self._startDeploy();
             });
@@ -1014,13 +1011,20 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz
    * @method createSelectedServicesData
    */
   createSelectedServicesData: function () {
+
+    var isInstaller = this.get('isInstaller')
     var selectedStack;
     if (this.get('isInstaller')) {
       selectedStack = App.Stack.find().findProperty('isSelected', true);
     }
-    return this.get('selectedServices').map(service => selectedStack ?
-      {"ServiceInfo": { "service_name": service.get('serviceName'), "desired_repository_version_id": selectedStack.get('versionInfoId') }} :
-      {"ServiceInfo": { "service_name": service.get('serviceName') }});
+
+    return this.get('selectedServices').map(function (_service) {
+      if (selectedStack) {
+        return {"ServiceInfo": { "service_name": _service.get('serviceName'), "desired_repository_version": selectedStack.get('repositoryVersion') }};
+      } else {
+        return {"ServiceInfo": { "service_name": _service.get('serviceName') }};
+      }
+    });
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/068f86a1/ambari-web/app/models/stack.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack.js b/ambari-web/app/models/stack.js
index 657ee5c..47d1c44 100644
--- a/ambari-web/app/models/stack.js
+++ b/ambari-web/app/models/stack.js
@@ -34,8 +34,6 @@ App.Stack = DS.Model.extend({
   operatingSystems: DS.hasMany('App.OperatingSystem'),
   isSelected: DS.attr('boolean', {defaultValue: false}),
 
-  versionInfoId: null,
-
   stackNameVersion: Em.computed.concat('-', 'stackName', 'stackVersion'),
 
   isPatch: Em.computed.equal('type', 'PATCH'),
@@ -83,4 +81,4 @@ App.Stack = DS.Model.extend({
 });
 
 
-App.Stack.FIXTURES = [];
+App.Stack.FIXTURES = [];
\ No newline at end of file


[51/52] [abbrv] ambari git commit: Merge remote-tracking branch 'origin/trunk' into branch-feature-AMBARI-14714

Posted by jl...@apache.org.
Merge remote-tracking branch 'origin/trunk' into branch-feature-AMBARI-14714


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: f491f7b3b0e7fec608108d1b789c8737145e4d62
Parents: bf0bb2e 15dd999
Author: Jayush Luniya <jl...@hortonworks.com>
Authored: Mon Jul 10 10:04:32 2017 -0700
Committer: Jayush Luniya <jl...@hortonworks.com>
Committed: Mon Jul 10 10:04:32 2017 -0700

----------------------------------------------------------------------
 LICENSE.txt                                     |    17 +
 .../main/resources/ui/admin-web/app/index.html  |     2 +-
 .../controllers/ambariViews/ViewsListCtrl.js    |    20 +
 .../controllers/groups/GroupsEditCtrl.js        |    19 +-
 .../stackVersions/StackVersionsCreateCtrl.js    |     1 -
 .../scripts/controllers/users/UsersShowCtrl.js  |    13 +
 .../ui/admin-web/app/scripts/i18n.config.js     |     2 +-
 .../ui/admin-web/app/scripts/services/Stack.js  |    32 +-
 .../resources/ui/admin-web/app/styles/main.css  |     7 +-
 .../admin-web/app/views/ambariViews/edit.html   |     2 +-
 .../app/views/ambariViews/listTable.html        |     3 +
 .../ui/admin-web/app/views/groups/edit.html     |     3 +
 .../views/stackVersions/stackVersionPage.html   |     4 +-
 .../ui/admin-web/app/views/users/show.html      |     5 +-
 .../StackVersionsCreateCtrl_test.js             |     6 +-
 ambari-agent/conf/unix/install-helper.sh        |     8 +
 ambari-agent/etc/init.d/ambari-agent            |    22 +-
 ambari-agent/pom.xml                            |    17 +-
 .../org/apache/ambari/tools/zk/ZkMigrator.java  |    44 +-
 .../src/main/package/rpm/posttrans_agent.sh     |     7 +
 .../ambari_agent/AlertSchedulerHandler.py       |    10 +-
 .../src/main/python/ambari_agent/Controller.py  |     6 +-
 .../python/ambari_agent/alerts/base_alert.py    |     8 +-
 .../python/ambari_agent/alerts/port_alert.py    |   107 +-
 ambari-agent/src/packages/tarball/all.xml       |     2 +-
 .../apache/ambari/tools/zk/ZkMigratorTest.java  |    60 +-
 .../ambari_agent/TestAlertSchedulerHandler.py   |    17 +-
 .../test/python/ambari_agent/TestHostInfo.py    |   107 +
 ambari-client/groovy-client/pom.xml             |     2 +
 .../main/python/ambari_commons/inet_utils.py    |    44 +
 .../src/main/python/ambari_commons/os_check.py  |     6 +
 .../ambari_commons/resources/os_family.json     |    11 +
 .../core/providers/__init__.py                  |    19 +-
 .../core/resources/zkmigrator.py                |    17 +-
 .../libraries/functions/conf_select.py          |     1 -
 .../libraries/functions/decorator.py            |    22 +-
 .../libraries/functions/hive_check.py           |     5 +-
 .../libraries/functions/mounted_dirs_helper.py  |     1 +
 .../libraries/functions/packages_analyzer.py    |    62 +-
 .../libraries/functions/repository_util.py      |   127 +
 .../libraries/functions/solr_cloud_util.py      |    10 +
 .../libraries/functions/stack_features.py       |    16 +-
 .../libraries/functions/stack_tools.py          |    39 +
 .../libraries/functions/version.py              |    31 +-
 .../libraries/providers/__init__.py             |     3 -
 .../libraries/providers/hdfs_resource.py        |     9 +-
 .../providers/modify_properties_file.py         |     9 +-
 .../libraries/script/script.py                  |    64 +-
 ambari-funtest/pom.xml                          |     7 +-
 .../upgrades/upgrade_nonrolling_new_stack.xml   |     2 +-
 .../src/main/resources/solr                     |   826 +-
 ambari-infra/ambari-infra-manager/README.md     |    92 +-
 .../ambari-infra-manager/docs/api/swagger.yaml  |   784 +
 .../docs/images/batch-1.png                     |   Bin 0 -> 20521 bytes
 .../docs/images/batch-2.png                     |   Bin 0 -> 29388 bytes
 .../docs/images/batch-3.png                     |   Bin 0 -> 14105 bytes
 .../docs/images/batch-4.png                     |   Bin 0 -> 23277 bytes
 ambari-infra/ambari-infra-manager/pom.xml       |     1 -
 .../org/apache/ambari/infra/InfraManager.java   |    30 +-
 .../infra/common/InfraManagerConstants.java     |     2 +
 .../infra/conf/InfraManagerApiDocConfig.java    |    35 +-
 .../conf/batch/InfraManagerBatchConfig.java     |    70 +-
 .../ambari/infra/job/dummy/DummyItemWriter.java |    26 +
 .../infra/job/dummy/DummyJobListener.java       |    46 +
 .../infra/job/dummy/DummyStepListener.java      |    41 +
 .../apache/ambari/infra/manager/JobManager.java |   274 +
 .../infra/model/ExecutionContextResponse.java   |    40 +
 .../ambari/infra/model/JobDetailsResponse.java  |    53 +
 .../model/JobExecutionDetailsResponse.java      |    49 +
 .../infra/model/JobExecutionInfoResponse.java   |   141 +
 .../ambari/infra/model/JobExecutionRequest.java |    46 +
 .../infra/model/JobExecutionRestartRequest.java |    52 +
 .../infra/model/JobExecutionStopRequest.java    |    50 +
 .../infra/model/JobInstanceDetailsResponse.java |    54 +
 .../infra/model/JobInstanceStartRequest.java    |    49 +
 .../ambari/infra/model/JobOperationParams.java  |    31 +
 .../apache/ambari/infra/model/JobRequest.java   |    37 +
 .../apache/ambari/infra/model/PageRequest.java  |    49 +
 .../model/StepExecutionContextResponse.java     |    58 +
 .../infra/model/StepExecutionInfoResponse.java  |   115 +
 .../model/StepExecutionProgressResponse.java    |    53 +
 .../infra/model/StepExecutionRequest.java       |    49 +
 .../infra/model/wrapper/JobExecutionData.java   |   118 +
 .../infra/model/wrapper/StepExecutionData.java  |   133 +
 .../ambari/infra/rest/JobExceptionMapper.java   |   110 +
 .../apache/ambari/infra/rest/JobResource.java   |   151 +-
 ambari-infra/ambari-infra-solr-client/pom.xml   |     2 +
 .../ambari/infra/solr/AmbariSolrCloudCLI.java   |    14 +
 .../infra/solr/AmbariSolrCloudClient.java       |     8 +
 .../commands/RemoveAdminHandlersCommand.java    |    46 +
 .../commands/SetClusterPropertyZkCommand.java   |     6 +-
 ambari-infra/ambari-infra-solr-plugin/pom.xml   |     4 +-
 .../InfraKerberosHostValidator.java             |    54 -
 .../InfraRuleBasedAuthorizationPlugin.java      |   542 -
 .../InfraUserRolesLookupStrategy.java           |    49 -
 .../security/InfraKerberosHostValidator.java    |    54 +
 .../InfraRuleBasedAuthorizationPlugin.java      |   542 +
 .../security/InfraUserRolesLookupStrategy.java  |    49 +
 .../InfraRuleBasedAuthorizationPluginTest.java  |     5 +
 ambari-infra/pom.xml                            |     8 +-
 .../ambari-logsearch-appender/pom.xml           |     3 +-
 .../ambari-logsearch-config-api/pom.xml         |    14 +-
 .../config/api/InputConfigMonitor.java          |    13 +-
 .../logsearch/config/api/LogSearchConfig.java   |    18 +-
 .../config/api/LogSearchConfigFactory.java      |    18 +-
 .../api/LogSearchPropertyDescription.java       |    59 +
 .../api/ShipperConfigElementDescription.java    |    59 +
 .../api/ShipperConfigTypeDescription.java       |    44 +
 .../api/model/inputconfig/Conditions.java       |    24 +
 .../config/api/model/inputconfig/Fields.java    |    26 +
 .../api/model/inputconfig/FilterDescriptor.java |    39 +
 .../model/inputconfig/FilterGrokDescriptor.java |    30 +
 .../model/inputconfig/FilterJsonDescriptor.java |    23 +
 .../inputconfig/FilterKeyValueDescriptor.java   |    28 +
 .../api/model/inputconfig/InputConfig.java      |    28 +
 .../api/model/inputconfig/InputDescriptor.java  |    52 +
 .../inputconfig/InputFileBaseDescriptor.java    |    28 +
 .../model/inputconfig/InputFileDescriptor.java  |    23 +
 .../inputconfig/InputS3FileDescriptor.java      |    26 +
 .../inputconfig/MapAnonymizeDescriptor.java     |    26 +
 .../model/inputconfig/MapDateDescriptor.java    |    26 +
 .../inputconfig/MapFieldCopyDescriptor.java     |    24 +
 .../model/inputconfig/MapFieldDescriptor.java   |    24 +
 .../inputconfig/MapFieldNameDescriptor.java     |    24 +
 .../inputconfig/MapFieldValueDescriptor.java    |    26 +
 .../api/model/inputconfig/PostMapValues.java    |    26 +
 .../config/api/LogSearchConfigClass1.java       |    14 +-
 .../config/api/LogSearchConfigClass2.java       |    14 +-
 .../config/api/LogSearchConfigFactoryTest.java  |    18 +-
 .../ambari-logsearch-config-zookeeper/pom.xml   |     6 +
 .../config/zookeeper/LogSearchConfigZK.java     |   146 +-
 .../model/inputconfig/impl/ConditionsImpl.java  |    50 +
 .../model/inputconfig/impl/FieldsImpl.java      |    53 +
 .../model/inputconfig/impl/FilterAdapter.java   |    42 +
 .../inputconfig/impl/FilterDescriptorImpl.java  |   164 +
 .../impl/FilterGrokDescriptorImpl.java          |    91 +
 .../impl/FilterJsonDescriptorImpl.java          |    25 +
 .../impl/FilterKeyValueDescriptorImpl.java      |    91 +
 .../model/inputconfig/impl/InputAdapter.java    |    58 +
 .../model/inputconfig/impl/InputConfigGson.java |    46 +
 .../model/inputconfig/impl/InputConfigImpl.java |    72 +
 .../inputconfig/impl/InputDescriptorImpl.java   |   293 +
 .../impl/InputFileBaseDescriptorImpl.java       |    93 +
 .../impl/InputFileDescriptorImpl.java           |    25 +
 .../impl/InputS3FileDescriptorImpl.java         |    69 +
 .../impl/MapAnonymizeDescriptorImpl.java        |    76 +
 .../inputconfig/impl/MapDateDescriptorImpl.java |    76 +
 .../impl/MapFieldCopyDescriptorImpl.java        |    57 +
 .../impl/MapFieldDescriptorImpl.java            |    33 +
 .../impl/MapFieldNameDescriptorImpl.java        |    57 +
 .../impl/MapFieldValueDescriptorImpl.java       |    76 +
 .../inputconfig/impl/PostMapValuesAdapter.java  |   102 +
 .../inputconfig/impl/PostMapValuesImpl.java     |    40 +
 ambari-logsearch/ambari-logsearch-it/pom.xml    |     4 +-
 .../logsearch/steps/LogSearchApiSteps.java      |     6 +-
 .../ambari-logsearch-logfeeder/README.md        |    28 +-
 .../ambari-logsearch-logfeeder/docs/filter.md   |    61 +
 .../ambari-logsearch-logfeeder/docs/input.md    |    61 +
 .../docs/inputConfig.md                         |    29 +
 .../docs/postMapValues.md                       |    70 +
 .../ambari-logsearch-logfeeder/pom.xml          |    15 +-
 .../org/apache/ambari/logfeeder/LogFeeder.java  |    83 +-
 .../ambari/logfeeder/LogFeederCommandLine.java  |   168 +
 .../ambari/logfeeder/common/ConfigBlock.java    |   107 +-
 .../ambari/logfeeder/common/ConfigHandler.java  |   204 +-
 .../ambari/logfeeder/common/ConfigItem.java     |    97 +
 .../logfeeder/common/LogEntryParseTester.java   |   127 +
 .../logfeeder/common/LogFeederConstants.java    |     2 +-
 .../logfeeder/common/LogFeederException.java    |    31 +
 .../logfeeder/common/LogfeederException.java    |    31 -
 .../apache/ambari/logfeeder/filter/Filter.java  |    59 +-
 .../ambari/logfeeder/filter/FilterGrok.java     |    26 +-
 .../ambari/logfeeder/filter/FilterJSON.java     |     9 +-
 .../ambari/logfeeder/filter/FilterKeyValue.java |    18 +-
 .../logfeeder/input/AbstractInputFile.java      |   167 +-
 .../apache/ambari/logfeeder/input/Input.java    |   191 +-
 .../logfeeder/input/InputConfigUploader.java    |    18 +-
 .../ambari/logfeeder/input/InputFile.java       |    29 +-
 .../ambari/logfeeder/input/InputManager.java    |   163 +-
 .../ambari/logfeeder/input/InputS3File.java     |    22 +-
 .../ambari/logfeeder/input/InputSimulate.java   |    97 +-
 .../logfeeder/loglevelfilter/FilterLogData.java |     2 +-
 .../loglevelfilter/LogLevelFilterHandler.java   |    28 +-
 .../apache/ambari/logfeeder/mapper/Mapper.java  |     4 +-
 .../logfeeder/mapper/MapperAnonymize.java       |   120 +
 .../ambari/logfeeder/mapper/MapperDate.java     |    17 +-
 .../logfeeder/mapper/MapperFieldCopy.java       |    13 +-
 .../logfeeder/mapper/MapperFieldName.java       |    14 +-
 .../logfeeder/mapper/MapperFieldValue.java      |    14 +-
 .../logfeeder/metrics/LogFeederAMSClient.java   |    43 +-
 .../logfeeder/metrics/MetricsManager.java       |    25 +-
 .../apache/ambari/logfeeder/output/Output.java  |     3 -
 .../ambari/logfeeder/output/OutputHDFSFile.java |    10 +-
 .../logfeeder/output/OutputLineFilter.java      |     2 +-
 .../ambari/logfeeder/output/OutputManager.java  |     8 +-
 .../ambari/logfeeder/output/OutputS3File.java   |    98 +-
 .../ambari/logfeeder/output/OutputSolr.java     |    28 +-
 .../apache/ambari/logfeeder/util/AliasUtil.java |     6 +-
 .../apache/ambari/logfeeder/util/FileUtil.java  |    45 +-
 .../logfeeder/util/LogFeederHDFSUtil.java       |    77 +
 .../ambari/logfeeder/util/LogFeederUtil.java    |   118 +-
 .../logfeeder/util/LogfeederHDFSUtil.java       |    77 -
 .../apache/ambari/logfeeder/util/SSLUtil.java   |     9 +
 .../src/main/resources/alias_config.json        |     3 +
 .../src/main/resources/log4j.xml                |     3 +-
 .../src/main/scripts/run.sh                     |     4 +-
 .../ambari/logfeeder/filter/FilterGrokTest.java |    37 +-
 .../ambari/logfeeder/filter/FilterJSONTest.java |    28 +-
 .../logfeeder/filter/FilterKeyValueTest.java    |    41 +-
 .../ambari/logfeeder/input/InputFileTest.java   |    21 +-
 .../logfeeder/input/InputManagerTest.java       |    27 -
 .../logconfig/LogConfigHandlerTest.java         |    20 +-
 .../logfeeder/mapper/MapperAnonymizeTest.java   |    79 +
 .../ambari/logfeeder/mapper/MapperDateTest.java |    44 +-
 .../logfeeder/mapper/MapperFieldCopyTest.java   |    19 +-
 .../logfeeder/mapper/MapperFieldNameTest.java   |    19 +-
 .../logfeeder/mapper/MapperFieldValueTest.java  |    29 +-
 .../logfeeder/metrics/MetrcisManagerTest.java   |   128 -
 .../logfeeder/metrics/MetricsManagerTest.java   |   126 +
 .../logfeeder/output/OutputLineFilterTest.java  |    22 +-
 .../logfeeder/output/OutputManagerTest.java     |    10 +-
 .../logfeeder/output/OutputS3FileTest.java      |    17 +-
 .../src/test/resources/log4j.xml                |     2 +-
 .../src/test/resources/logfeeder.properties     |     1 -
 .../resources/samples/config/config_audit.json  |   339 +-
 .../samples/config/config_service.json          |    79 +-
 .../ambari-logsearch-server/pom.xml             |    41 +-
 .../configsets/audit_logs/conf/solrconfig.xml   |     3 +-
 .../configsets/hadoop_logs/conf/solrconfig.xml  |     3 +-
 .../main/configsets/history/conf/solrconfig.xml |     3 +-
 .../org/apache/ambari/logsearch/LogSearch.java  |    11 +-
 .../ambari/logsearch/common/ApiDocStorage.java  |    90 +
 .../logsearch/common/LogSearchConstants.java    |     2 +
 .../logsearch/common/PropertiesHelper.java      |    17 -
 .../common/PropertyDescriptionStorage.java      |   101 +
 .../common/ShipperConfigDescriptionStorage.java |    67 +
 .../ambari/logsearch/conf/ApiDocConfig.java     |    39 +-
 .../logsearch/conf/ApplicationConfig.java       |     4 +-
 .../ambari/logsearch/conf/AuthPropsConfig.java  |   122 +
 .../conf/LogSearchHttpHeaderConfig.java         |    31 +
 .../ambari/logsearch/conf/SecurityConfig.java   |    19 +-
 .../logsearch/conf/SolrAuditLogPropsConfig.java |    76 +
 .../ambari/logsearch/conf/SolrConfig.java       |    12 +-
 .../conf/SolrConnectionPropsConfig.java         |    28 +
 .../conf/SolrEventHistoryPropsConfig.java       |   148 +
 .../logsearch/conf/SolrKerberosConfig.java      |    17 +
 .../conf/SolrServiceLogPropsConfig.java         |    38 +
 .../logsearch/conf/SolrUserPropsConfig.java     |   116 -
 .../conf/global/SolrEventHistoryState.java      |    60 +
 .../conf/global/SolrUserConfigState.java        |    60 -
 .../configurer/LogSearchConfigConfigurer.java   |     2 +-
 .../AbstractLogRequestFacetQueryConverter.java  |     2 +
 .../EventHistoryRequestQueryConverter.java      |    67 +
 .../UserConfigRequestQueryConverter.java        |    67 -
 .../logsearch/dao/EventHistorySolrDao.java      |   117 +
 .../logsearch/dao/SolrSchemaFieldDao.java       |    10 +-
 .../ambari/logsearch/dao/UserConfigSolrDao.java |   117 -
 .../ambari/logsearch/doc/DocConstants.java      |    18 +-
 .../handler/ListCollectionHandler.java          |     1 +
 .../logsearch/manager/AuditLogsManager.java     |    11 +-
 .../logsearch/manager/EventHistoryManager.java  |   199 +
 .../ambari/logsearch/manager/InfoManager.java   |    68 +
 .../ambari/logsearch/manager/ManagerBase.java   |     5 +-
 .../ambari/logsearch/manager/PublicManager.java |    48 -
 .../logsearch/manager/ServiceLogsManager.java   |    62 +-
 .../logsearch/manager/ShipperConfigManager.java |    41 +-
 .../logsearch/manager/UserConfigManager.java    |   199 -
 .../model/common/LSServerConditions.java        |    48 +
 .../logsearch/model/common/LSServerFields.java  |    49 +
 .../logsearch/model/common/LSServerFilter.java  |   137 +
 .../common/LSServerFilterDeserializer.java      |    60 +
 .../model/common/LSServerFilterGrok.java        |    79 +
 .../model/common/LSServerFilterJson.java        |    33 +
 .../model/common/LSServerFilterKeyValue.java    |    73 +
 .../logsearch/model/common/LSServerInput.java   |   148 +
 .../model/common/LSServerInputConfig.java       |   100 +
 .../model/common/LSServerInputDeserializer.java |    62 +
 .../model/common/LSServerInputFile.java         |    33 +
 .../model/common/LSServerInputFileBase.java     |    74 +
 .../model/common/LSServerInputS3File.java       |    65 +
 .../model/common/LSServerLogLevelFilter.java    |    24 +-
 .../model/common/LSServerLogLevelFilterMap.java |     5 +
 .../logsearch/model/common/LSServerMapDate.java |    63 +
 .../model/common/LSServerMapField.java          |    33 +
 .../model/common/LSServerMapFieldAnonymize.java |    65 +
 .../model/common/LSServerMapFieldCopy.java      |    54 +
 .../model/common/LSServerMapFieldName.java      |    54 +
 .../model/common/LSServerMapFieldValue.java     |    67 +
 .../model/common/LSServerPostMapValues.java     |    73 +
 .../model/common/LSServerPostMapValuesList.java |    59 +
 .../LSServerPostMapValuesListDeserializer.java  |    83 +
 .../LSServerPostMapValuesListSerializer.java    |    44 +
 .../request/EventHistoryParamDefinition.java    |    38 +
 .../request/UserConfigParamDefinition.java      |    38 -
 .../model/request/impl/EventHistoryRequest.java |    53 +
 .../model/request/impl/UserConfigRequest.java   |    53 -
 .../model/response/EventHistoryData.java        |    97 +
 .../response/EventHistoryDataListResponse.java  |    55 +
 .../model/response/PropertyDescriptionData.java |    62 +
 .../response/ShipperConfigDescriptionData.java  |    52 +
 .../model/response/UserConfigData.java          |    97 -
 .../response/UserConfigDataListResponse.java    |    55 -
 .../logsearch/rest/AuditLogsResource.java       |     2 +-
 .../logsearch/rest/EventHistoryResource.java    |    82 +
 .../ambari/logsearch/rest/InfoResource.java     |    83 +
 .../ambari/logsearch/rest/PublicResource.java   |    48 -
 .../logsearch/rest/ShipperConfigResource.java   |    35 +-
 .../ambari/logsearch/rest/StatusResource.java   |    16 +-
 .../ambari/logsearch/rest/SwaggerResource.java  |    56 +
 .../logsearch/rest/UserConfigResource.java      |    82 -
 .../ambari/logsearch/solr/SolrConstants.java    |     4 +-
 .../apache/ambari/logsearch/util/SSLUtil.java   |    25 +
 .../LogsearchAuthSuccessHandler.java            |     4 -
 .../LogsearchEventHistoryStateFilter.java       |    52 +
 .../LogsearchKRBAuthenticationFilter.java       |    69 +-
 .../web/filters/LogsearchKrbFilter.java         |    62 +-
 .../filters/LogsearchUserConfigStateFilter.java |    52 -
 .../web/model/JWTAuthenticationToken.java       |     2 +-
 ...rchExternalServerAuthenticationProvider.java |    23 +-
 .../src/main/resources/default.properties       |     2 -
 .../src/main/resources/log4j.xml                |   158 +-
 .../src/main/resources/logsearch.properties     |     3 -
 .../EventHistoryRequestQueryConverterTest.java  |    50 +
 .../UserConfigRequestQueryConverterTest.java    |    50 -
 ...xternalServerAuthenticationProviderTest.java |     4 +
 .../src/main/webapp/login.html                  |    19 +-
 .../collection_bases/VEventHistoryListBase.js   |     8 +-
 .../scripts/model_bases/VUserFilterBase.js      |     2 +-
 .../main/webapp/scripts/views/common/Header.js  |     2 +-
 ambari-logsearch/docker/Dockerfile              |     8 +-
 ambari-logsearch/docker/bin/start.sh            |     4 +-
 .../test-config/logfeeder/logfeeder.properties  |     1 +
 .../logfeeder/shipper-conf/global.config.json   |     5 +-
 .../shipper-conf/input.config-hst.json          |     4 +-
 .../shipper-conf/input.config-zookeeper.json    |     4 +-
 .../logsearch/logsearch-https.properties        |     4 -
 .../test-config/logsearch/logsearch.properties  |     4 -
 ambari-logsearch/pom.xml                        |    11 +-
 ambari-metrics/ambari-metrics-common/pom.xml    |     9 +
 .../timeline/AbstractTimelineMetricsSink.java   |   109 +-
 .../sink/timeline/AppCookieManager.java         |   219 +
 .../metrics2/sink/timeline/Precision.java       |     2 +-
 .../sink/timeline/AppCookieManagerTest.java     |    52 +
 .../cache/HandleConnectExceptionTest.java       |    86 +-
 .../ambari-metrics/datasource.js                |     5 +-
 .../timeline/HadoopTimelineMetricsSink.java     |     2 +-
 .../timeline/HadoopTimelineMetricsSinkTest.java |     2 +-
 .../ambari-metrics-host-aggregator/pom.xml      |    30 +-
 .../AbstractMetricPublisherThread.java          |   134 -
 .../aggregator/AggregatedMetricsPublisher.java  |   101 -
 .../host/aggregator/AggregatorApplication.java  |    98 +-
 .../host/aggregator/AggregatorWebService.java   |     2 +-
 .../host/aggregator/RawMetricsPublisher.java    |    60 -
 .../host/aggregator/TimelineMetricsHolder.java  |    26 +-
 .../sink/timeline/AbstractMetricPublisher.java  |   169 +
 .../timeline/AggregatedMetricsPublisher.java    |   103 +
 .../sink/timeline/RawMetricsPublisher.java      |    65 +
 .../aggregator/AggregatorApplicationTest.java   |    55 +
 .../aggregator/AggregatorWebServiceTest.java    |   135 +
 .../aggregator/TimelineMetricsHolderTest.java   |   107 +
 .../timeline/AbstractMetricPublisherTest.java   |    82 +
 .../AggregatedMetricsPublisherTest.java         |   154 +
 .../sink/timeline/RawMetricsPublisherTest.java  |   151 +
 .../ambari-metrics-host-monitoring/pom.xml      |     1 +
 .../src/main/python/core/aggregator.py          |     6 +-
 .../src/main/python/core/controller.py          |     2 +-
 .../kafka/KafkaTimelineMetricsReporter.java     |     4 +-
 .../storm/StormTimelineMetricsReporter.java     |     6 +-
 .../sink/storm/StormTimelineMetricsSink.java    |     2 +-
 .../sink/storm/StormTimelineMetricsSink.java    |     2 +-
 .../ambari-metrics-timelineservice/pom.xml      |     8 +-
 .../timeline/HBaseTimelineMetricStore.java      |    15 +-
 .../timeline/TimelineMetricConfiguration.java   |    21 +
 .../timeline/TestTimelineMetricStore.java       |     1 +
 ambari-metrics/pom.xml                          |    81 +-
 ambari-project/pom.xml                          |    77 +-
 ambari-server/checkstyle.xml                    |     5 +
 ambari-server/conf/unix/ambari-env.sh           |     2 +-
 ambari-server/conf/unix/ambari.properties       |     4 +
 ambari-server/docs/api/generated/index.html     | 56183 +++++++++++++++++
 ambari-server/docs/api/generated/swagger.json   |  9285 +++
 ambari-server/docs/configuration/index.md       |    18 +-
 .../security/kerberos/kerberos_descriptor.md    |     5 +-
 ambari-server/pom.xml                           |   294 +-
 ambari-server/sbin/ambari-server                |     6 +-
 ambari-server/src/main/assemblies/server.xml    |     6 +-
 .../persist/jpa/AmbariJpaPersistModule.java     |     2 +-
 .../persist/jpa/AmbariJpaPersistService.java    |     2 +-
 .../apache/ambari/annotations/Experimental.java |     7 +-
 .../ambari/annotations/ExperimentalFeature.java |     9 +-
 .../org/apache/ambari/annotations/Markdown.java |     2 +-
 .../ambari/annotations/TransactionalLock.java   |     2 +-
 .../apache/ambari/server/AmbariException.java   |     2 +-
 .../org/apache/ambari/server/AmbariService.java |     2 +-
 .../ambari/server/ClusterNotFoundException.java |     2 +-
 .../server/ConfigGroupNotFoundException.java    |     2 +-
 .../ambari/server/DBConnectionVerification.java |     2 +-
 .../server/DuplicateResourceException.java      |     2 +-
 .../apache/ambari/server/EagerSingleton.java    |     2 +-
 .../ambari/server/HostNotFoundException.java    |     2 +-
 .../server/KdcServerConnectionVerification.java |     4 +-
 .../ambari/server/ObjectNotFoundException.java  |     2 +-
 .../server/ParentObjectNotFoundException.java   |     2 +-
 .../java/org/apache/ambari/server/Role.java     |     2 +-
 .../org/apache/ambari/server/RoleCommand.java   |     2 +-
 .../ServiceComponentHostNotFoundException.java  |     2 +-
 .../ServiceComponentNotFoundException.java      |     2 +-
 .../ambari/server/ServiceNotFoundException.java |     2 +-
 .../ambari/server/StackAccessException.java     |     2 +-
 .../ambari/server/StateRecoveryManager.java     |    34 +-
 .../apache/ambari/server/StaticallyInject.java  |     2 +-
 .../server/actionmanager/ActionDBAccessor.java  |     2 +-
 .../actionmanager/ActionDBAccessorImpl.java     |    25 +-
 .../server/actionmanager/ActionManager.java     |    10 +-
 .../server/actionmanager/ActionScheduler.java   |    20 +-
 .../ambari/server/actionmanager/ActionType.java |     2 +-
 .../actionmanager/ExecutionCommandWrapper.java  |    49 +-
 .../ExecutionCommandWrapperFactory.java         |     2 +-
 .../server/actionmanager/HostRoleCommand.java   |     2 +-
 .../server/actionmanager/HostRoleStatus.java    |     2 +-
 .../ambari/server/actionmanager/Request.java    |     8 +-
 .../server/actionmanager/RequestStatus.java     |     2 +-
 .../ServiceComponentHostEventWrapper.java       |     6 +-
 .../ambari/server/actionmanager/Stage.java      |    12 +-
 .../server/actionmanager/TargetHostType.java    |     2 +-
 .../apache/ambari/server/agent/ActionQueue.java |     4 +-
 .../ambari/server/agent/AgentCommand.java       |     2 +-
 .../apache/ambari/server/agent/AgentEnv.java    |     2 +-
 .../ambari/server/agent/AgentRequests.java      |    12 +-
 .../server/agent/AlertDefinitionCommand.java    |     9 +-
 .../server/agent/AlertExecutionCommand.java     |     2 +-
 .../ambari/server/agent/CancelCommand.java      |     2 +-
 .../ambari/server/agent/CommandReport.java      |     2 +-
 .../ambari/server/agent/CommandRepository.java  |   184 +
 .../server/agent/ComponentRecoveryReport.java   |     2 +-
 .../ambari/server/agent/ComponentStatus.java    |     2 +-
 .../ambari/server/agent/ComponentsResponse.java |     2 +-
 .../apache/ambari/server/agent/DiskInfo.java    |     2 +-
 .../ambari/server/agent/ExecutionCommand.java   |   131 +-
 .../apache/ambari/server/agent/HeartBeat.java   |     2 +-
 .../ambari/server/agent/HeartBeatHandler.java   |    86 +-
 .../ambari/server/agent/HeartBeatResponse.java  |     2 +-
 .../ambari/server/agent/HeartbeatMonitor.java   |    20 +-
 .../ambari/server/agent/HeartbeatProcessor.java |    25 +-
 .../apache/ambari/server/agent/HostInfo.java    |     4 +-
 .../apache/ambari/server/agent/HostStatus.java  |     2 +-
 .../ambari/server/agent/RecoveryConfig.java     |     2 +-
 .../server/agent/RecoveryConfigHelper.java      |     4 +-
 .../ambari/server/agent/RecoveryReport.java     |     2 +-
 .../apache/ambari/server/agent/Register.java    |     4 +-
 .../server/agent/RegistrationCommand.java       |     2 +-
 .../server/agent/RegistrationResponse.java      |     2 +-
 .../ambari/server/agent/RegistrationStatus.java |     2 +-
 .../ambari/server/agent/StatusCommand.java      |     2 +-
 .../ambari/server/agent/rest/AgentResource.java |    27 +-
 .../alerts/AgentHeartbeatAlertRunnable.java     |     2 +-
 .../ambari/server/alerts/AlertRunnable.java     |     2 +-
 .../alerts/AmbariPerformanceRunnable.java       |     2 +-
 .../alerts/ComponentVersionAlertRunnable.java   |    55 +-
 .../server/alerts/StaleAlertRunnable.java       |     2 +-
 .../ambari/server/api/GsonJsonProvider.java     |     2 +-
 .../server/api/UserNameOverrideFilter.java      |     2 +-
 .../api/handlers/BaseManagementHandler.java     |     2 +-
 .../server/api/handlers/CreateHandler.java      |     2 +-
 .../server/api/handlers/DeleteHandler.java      |     2 +-
 .../server/api/handlers/QueryCreateHandler.java |     2 +-
 .../ambari/server/api/handlers/ReadHandler.java |     2 +-
 .../server/api/handlers/RequestHandler.java     |     2 +-
 .../server/api/handlers/UpdateHandler.java      |     6 +-
 .../api/predicate/InvalidQueryException.java    |     2 +-
 .../server/api/predicate/PredicateCompiler.java |     2 +-
 .../ambari/server/api/predicate/QueryLexer.java |     6 +-
 .../server/api/predicate/QueryParser.java       |     2 +-
 .../ambari/server/api/predicate/Token.java      |     2 +-
 .../expressions/AbstractExpression.java         |     2 +-
 .../api/predicate/expressions/Expression.java   |     2 +-
 .../expressions/LogicalExpression.java          |     2 +-
 .../expressions/LogicalExpressionFactory.java   |     2 +-
 .../expressions/NotLogicalExpression.java       |     2 +-
 .../expressions/RelationalExpression.java       |     2 +-
 .../predicate/operators/AbstractOperator.java   |     2 +-
 .../api/predicate/operators/AndOperator.java    |     2 +-
 .../api/predicate/operators/EqualsOperator.java |     2 +-
 .../api/predicate/operators/FilterOperator.java |     2 +-
 .../operators/GreaterEqualsOperator.java        |     2 +-
 .../predicate/operators/GreaterOperator.java    |     2 +-
 .../api/predicate/operators/InOperator.java     |     2 +-
 .../predicate/operators/IsEmptyOperator.java    |     2 +-
 .../predicate/operators/LessEqualsOperator.java |     2 +-
 .../api/predicate/operators/LessOperator.java   |     2 +-
 .../predicate/operators/LogicalOperator.java    |     2 +-
 .../operators/LogicalOperatorFactory.java       |     2 +-
 .../predicate/operators/NotEqualsOperator.java  |     2 +-
 .../api/predicate/operators/NotOperator.java    |     2 +-
 .../api/predicate/operators/Operator.java       |     2 +-
 .../api/predicate/operators/OrOperator.java     |     2 +-
 .../predicate/operators/RelationalOperator.java |     2 +-
 .../operators/RelationalOperatorFactory.java    |     2 +-
 .../query/ExtendedResourcePredicateVisitor.java |     2 +-
 .../server/api/query/JpaPredicateVisitor.java   |    12 +-
 .../ambari/server/api/query/JpaSortBuilder.java |     2 +-
 .../api/query/ProcessingPredicateVisitor.java   |     2 +-
 .../apache/ambari/server/api/query/Query.java   |     2 +-
 .../ambari/server/api/query/QueryImpl.java      |     6 +-
 .../ambari/server/api/query/QueryInfo.java      |     2 +-
 .../api/query/SubResourcePredicateVisitor.java  |     2 +-
 .../api/query/render/AlertStateSummary.java     |     4 +-
 .../api/query/render/AlertStateValues.java      |     4 +-
 .../render/AlertSummaryGroupedRenderer.java     |     2 +-
 .../api/query/render/AlertSummaryRenderer.java  |     2 +-
 .../server/api/query/render/BaseRenderer.java   |     2 +-
 .../query/render/ClusterBlueprintRenderer.java  |     7 +-
 .../api/query/render/DefaultRenderer.java       |     2 +-
 .../query/render/MetricsPaddingRenderer.java    |     2 +-
 .../api/query/render/MinimalRenderer.java       |     2 +-
 .../server/api/query/render/Renderer.java       |     2 +-
 .../api/resources/ActionResourceDefinition.java |     2 +-
 .../ActiveWidgetLayoutResourceDefinition.java   |     2 +-
 .../resources/AlertDefResourceDefinition.java   |     2 +-
 .../resources/AlertGroupResourceDefinition.java |     2 +-
 .../AlertHistoryResourceDefinition.java         |     2 +-
 .../AlertNoticeResourceDefinition.java          |     2 +-
 .../api/resources/AlertResourceDefinition.java  |     2 +-
 .../AlertTargetResourceDefinition.java          |     2 +-
 .../api/resources/BaseResourceDefinition.java   |     2 +-
 .../resources/BlueprintResourceDefinition.java  |     2 +-
 .../ClientConfigResourceDefinition.java         |     2 +-
 .../resources/ClusterResourceDefinition.java    |     2 +-
 .../resources/ComponentResourceDefinition.java  |     2 +-
 ...ComponentStackVersionResourceDefinition.java |     2 +-
 .../ConfigGroupResourceDefinition.java          |     2 +-
 .../ConfigurationResourceDefinition.java        |     2 +-
 .../DetachedHostResourceDefinition.java         |     2 +-
 .../ExtensionLinkResourceDefinition.java        |     2 +-
 .../resources/ExtensionResourceDefinition.java  |     2 +-
 .../ExtensionVersionResourceDefinition.java     |     2 +-
 .../api/resources/FeedResourceDefinition.java   |     2 +-
 .../api/resources/GroupResourceDefinition.java  |     2 +-
 .../HostComponentProcessResourceDefinition.java |     2 +-
 .../HostComponentResourceDefinition.java        |     2 +-
 .../api/resources/HostResourceDefinition.java   |     2 +-
 .../resources/InstanceResourceDefinition.java   |     2 +-
 .../api/resources/JobResourceDefinition.java    |     2 +-
 .../LdapSyncEventResourceDefinition.java        |     2 +-
 .../resources/LoggingResourceDefinition.java    |     2 +-
 .../api/resources/MemberResourceDefinition.java |     2 +-
 .../OperatingSystemResourceDefinition.java      |     2 +-
 .../resources/PermissionResourceDefinition.java |     2 +-
 .../resources/PrivilegeResourceDefinition.java  |     2 +-
 .../RecommendationResourceDefinition.java       |     2 +-
 .../RemoteClusterResourceDefinition.java        |     2 +-
 .../resources/RepositoryResourceDefinition.java |     2 +-
 .../RepositoryVersionResourceDefinition.java    |     2 +-
 .../resources/RequestResourceDefinition.java    |     2 +-
 .../RequestScheduleResourceDefinition.java      |     2 +-
 .../api/resources/ResourceDefinition.java       |     2 +-
 .../server/api/resources/ResourceInstance.java  |     2 +-
 .../api/resources/ResourceInstanceFactory.java  |     2 +-
 .../resources/ResourceInstanceFactoryImpl.java  |     6 +-
 .../RootServiceComponentResourceDefinition.java |     2 +-
 ...tServiceHostComponentResourceDefinition.java |     2 +-
 .../RootServiceResourceDefinition.java          |     2 +-
 .../resources/ServiceResourceDefinition.java    |     2 +-
 .../api/resources/SimpleResourceDefinition.java |     4 +-
 ...nfigurationDependencyResourceDefinition.java |     2 +-
 .../StackConfigurationResourceDefinition.java   |     2 +-
 .../StackDependencyResourceDefinition.java      |     2 +-
 ...ackLevelConfigurationResourceDefinition.java |     2 +-
 .../api/resources/StackResourceDefinition.java  |     4 +-
 ...StackServiceComponentResourceDefinition.java |     2 +-
 .../StackServiceResourceDefinition.java         |     2 +-
 .../StackVersionResourceDefinition.java         |     2 +-
 .../api/resources/SubResourceDefinition.java    |     2 +-
 .../TargetClusterResourceDefinition.java        |     2 +-
 .../TaskAttemptResourceDefinition.java          |     2 +-
 .../api/resources/TaskResourceDefinition.java   |     4 +-
 .../resources/UpgradeResourceDefinition.java    |     2 +-
 .../api/resources/UserResourceDefinition.java   |     2 +-
 .../resources/ValidationResourceDefinition.java |     2 +-
 .../VersionDefinitionResourceDefinition.java    |     2 +-
 .../ViewExternalSubResourceDefinition.java      |     2 +-
 .../ViewInstanceResourceDefinition.java         |     2 +-
 .../ViewPermissionResourceDefinition.java       |     2 +-
 .../api/resources/ViewResourceDefinition.java   |     2 +-
 .../resources/ViewUrlResourceDefinition.java    |     2 +-
 .../ViewVersionResourceDefinition.java          |     2 +-
 .../WidgetLayoutResourceDefinition.java         |     2 +-
 .../api/resources/WidgetResourceDefinition.java |     3 +-
 .../resources/WorkflowResourceDefinition.java   |     2 +-
 .../server/api/rest/BootStrapResource.java      |    18 +-
 .../ambari/server/api/rest/HealthCheck.java     |    10 +-
 .../api/rest/KdcServerReachabilityCheck.java    |    12 +-
 .../server/api/services/ActionService.java      |   100 +-
 .../api/services/ActiveWidgetLayoutService.java |    76 -
 .../api/services/AlertDefinitionService.java    |    15 +-
 .../server/api/services/AlertGroupService.java  |    13 +-
 .../api/services/AlertHistoryService.java       |     7 +-
 .../server/api/services/AlertNoticeService.java |     7 +-
 .../server/api/services/AlertService.java       |     9 +-
 .../server/api/services/AlertTargetService.java |    15 +-
 .../server/api/services/AmbariMetaInfo.java     |   163 +-
 .../api/services/AmbariPrivilegeService.java    |     2 +-
 .../ambari/server/api/services/BaseRequest.java |     4 +-
 .../ambari/server/api/services/BaseService.java |    43 +-
 .../server/api/services/BlueprintService.java   |   107 +-
 .../ClusterKerberosDescriptorService.java       |     6 +-
 .../api/services/ClusterPrivilegeService.java   |     2 +-
 .../api/services/ClusterRequestSwagger.java     |    30 +
 .../server/api/services/ClusterService.java     |   307 +-
 .../services/ClusterStackVersionService.java    |    14 +-
 .../CompatibleRepositoryVersionService.java     |     7 +-
 .../server/api/services/ComponentService.java   |    17 +-
 .../server/api/services/ConfigGroupService.java |    14 +-
 .../api/services/ConfigurationService.java      |     7 +-
 .../server/api/services/CredentialService.java  |    11 +-
 .../server/api/services/DeleteRequest.java      |     2 +-
 .../api/services/DeleteResultMetadata.java      |     2 +-
 .../api/services/ExtensionLinksService.java     |    15 +-
 .../server/api/services/ExtensionsService.java  |    13 +-
 .../ambari/server/api/services/FeedService.java |    13 +-
 .../ambari/server/api/services/GetRequest.java  |     2 +-
 .../api/services/GroupPrivilegeService.java     |    77 -
 .../server/api/services/GroupService.java       |   155 -
 .../api/services/HostComponentService.java      |    22 +-
 .../services/HostKerberosIdentityService.java   |     5 +-
 .../ambari/server/api/services/HostService.java |   190 +-
 .../api/services/HostStackVersionService.java   |     9 +-
 .../server/api/services/InstanceService.java    |    13 +-
 .../ambari/server/api/services/JobService.java  |     7 +-
 .../api/services/KerberosDescriptorService.java |     9 +-
 .../ambari/server/api/services/KeyService.java  |     3 +-
 .../api/services/LdapSyncEventService.java      |    14 +-
 .../server/api/services/LocalUriInfo.java       |     2 +-
 .../server/api/services/LoggingService.java     |     8 +-
 .../server/api/services/LogoutService.java      |     3 +-
 .../server/api/services/MemberService.java      |   163 -
 .../server/api/services/NamedPropertySet.java   |     2 +-
 .../api/services/OperatingSystemService.java    |    24 +-
 .../server/api/services/PermissionService.java  |    14 +-
 .../api/services/PersistKeyValueImpl.java       |     2 +-
 .../api/services/PersistKeyValueService.java    |    27 +-
 .../ambari/server/api/services/PostRequest.java |     2 +-
 .../api/services/PreUpgradeCheckService.java    |     5 +-
 .../server/api/services/PrivilegeService.java   |    19 +-
 .../ambari/server/api/services/PutRequest.java  |     2 +-
 .../server/api/services/QueryPostRequest.java   |     2 +-
 .../api/services/RecommendationService.java     |     5 +-
 .../api/services/RemoteClustersService.java     |    20 +-
 .../server/api/services/RepositoryService.java  |    30 +-
 .../api/services/RepositoryVersionService.java  |    13 +-
 .../ambari/server/api/services/Request.java     |     2 +-
 .../ambari/server/api/services/RequestBody.java |     2 +-
 .../server/api/services/RequestFactory.java     |     2 +-
 .../api/services/RequestScheduleService.java    |    13 +-
 .../server/api/services/RequestService.java     |   107 +-
 .../ambari/server/api/services/Result.java      |     2 +-
 .../ambari/server/api/services/ResultImpl.java  |     2 +-
 .../server/api/services/ResultMetadata.java     |     2 +-
 .../api/services/ResultPostProcessor.java       |     2 +-
 .../api/services/ResultPostProcessorImpl.java   |     2 +-
 .../server/api/services/ResultStatus.java       |     2 +-
 .../api/services/RoleAuthorizationService.java  |     5 +-
 .../server/api/services/RootServiceService.java |   363 +-
 .../services/ServiceConfigVersionService.java   |     4 +-
 .../server/api/services/ServiceService.java     |   294 +-
 .../api/services/SettingRequestSwagger.java     |    30 +
 .../server/api/services/SettingService.java     |   126 +-
 .../server/api/services/StacksService.java      |   732 +-
 .../server/api/services/StageService.java       |    15 +-
 .../api/services/TargetClusterService.java      |    13 +-
 .../server/api/services/TaskAttemptService.java |     7 +-
 .../ambari/server/api/services/TaskService.java |     7 +-
 .../api/services/UpgradeGroupService.java       |     7 +-
 .../server/api/services/UpgradeItemService.java |     9 +-
 .../server/api/services/UpgradeService.java     |    13 +-
 .../api/services/UpgradeSummaryService.java     |    10 +-
 .../api/services/UserAuthorizationService.java  |   103 -
 .../api/services/UserPrivilegeService.java      |    79 -
 .../ambari/server/api/services/UserService.java |   175 -
 .../server/api/services/ValidationService.java  |     5 +-
 .../api/services/VersionDefinitionService.java  |    13 +-
 .../api/services/ViewDataMigrationService.java  |   122 -
 .../ViewExternalSubResourceService.java         |   146 -
 .../api/services/ViewInstanceService.java       |   282 -
 .../api/services/ViewPermissionService.java     |   186 -
 .../api/services/ViewPrivilegeService.java      |    55 -
 .../ambari/server/api/services/ViewService.java |   162 -
 .../api/services/ViewSubResourceService.java    |   134 -
 .../server/api/services/ViewUrlsService.java    |    20 +-
 .../server/api/services/ViewVersionService.java |   199 -
 .../api/services/WidgetLayoutService.java       |    17 +-
 .../server/api/services/WidgetService.java      |    17 +-
 .../server/api/services/WorkflowService.java    |     7 +-
 .../services/groups/GroupPrivilegeService.java  |   113 +
 .../api/services/groups/GroupService.java       |   177 +
 .../api/services/groups/MemberService.java      |   201 +
 .../services/parsers/BodyParseException.java    |     2 +-
 .../services/parsers/JsonRequestBodyParser.java |     4 +-
 .../api/services/parsers/RequestBodyParser.java |     2 +-
 .../persistence/PersistenceManager.java         |     2 +-
 .../persistence/PersistenceManagerImpl.java     |     2 +-
 .../services/serializers/JsonSerializer.java    |     2 +-
 .../services/serializers/ResultSerializer.java  |     2 +-
 .../StackAdvisorBlueprintProcessor.java         |     2 +-
 .../stackadvisor/StackAdvisorException.java     |     2 +-
 .../stackadvisor/StackAdvisorHelper.java        |    76 +-
 .../stackadvisor/StackAdvisorRequest.java       |     2 +-
 .../StackAdvisorRequestException.java           |     2 +-
 .../stackadvisor/StackAdvisorResponse.java      |     2 +-
 .../stackadvisor/StackAdvisorRunner.java        |   209 +-
 .../ComponentLayoutRecommendationCommand.java   |     7 +-
 .../ComponentLayoutValidationCommand.java       |    13 +-
 ...rationDependenciesRecommendationCommand.java |    13 +-
 .../ConfigurationRecommendationCommand.java     |    13 +-
 .../ConfigurationValidationCommand.java         |    13 +-
 .../commands/StackAdvisorCommand.java           |    33 +-
 .../commands/StackAdvisorCommandType.java       |     2 +-
 .../recommendations/RecommendationResponse.java |     2 +-
 .../validations/ValidationResponse.java         |     2 +-
 .../users/ActiveWidgetLayoutService.java        |   111 +
 .../users/UserAuthorizationService.java         |   120 +
 .../services/users/UserPrivilegeService.java    |   113 +
 .../server/api/services/users/UserService.java  |   194 +
 .../views/ViewDataMigrationService.java         |   113 +
 .../views/ViewExternalSubResourceService.java   |   147 +
 .../api/services/views/ViewInstanceService.java |   312 +
 .../services/views/ViewPermissionService.java   |   207 +
 .../services/views/ViewPrivilegeService.java    |   268 +
 .../server/api/services/views/ViewService.java  |   179 +
 .../services/views/ViewSubResourceService.java  |   136 +
 .../api/services/views/ViewVersionService.java  |   205 +
 .../apache/ambari/server/api/util/TreeNode.java |     2 +-
 .../ambari/server/api/util/TreeNodeImpl.java    |     2 +-
 .../ambari/server/audit/AsyncAuditLogger.java   |     2 +-
 .../apache/ambari/server/audit/AuditLogger.java |     2 +-
 .../server/audit/AuditLoggerDefaultImpl.java    |     2 +-
 .../ambari/server/audit/AuditLoggerModule.java  |     2 +-
 .../request/AddUpgradeRequestAuditEvent.java    |    10 +-
 .../eventcreator/DefaultEventCreator.java       |     2 +-
 .../request/eventcreator/HostEventCreator.java  |     4 +-
 .../eventcreator/UpgradeEventCreator.java       |     2 +-
 .../ambari/server/bootstrap/BSHostStatus.java   |     2 +-
 .../server/bootstrap/BSHostStatusCollector.java |    14 +-
 .../ambari/server/bootstrap/BSResponse.java     |     2 +-
 .../ambari/server/bootstrap/BSRunner.java       |    16 +-
 .../ambari/server/bootstrap/BootStrapImpl.java  |     8 +-
 .../server/bootstrap/BootStrapPostStatus.java   |     2 +-
 .../server/bootstrap/BootStrapStatus.java       |     2 +-
 .../DistributeRepositoriesStructuredOutput.java |    14 +-
 .../server/bootstrap/FifoLinkedHashMap.java     |     2 +-
 .../ambari/server/bootstrap/SshHostInfo.java    |     2 +-
 .../server/checks/AbstractCheckDescriptor.java  |    39 +-
 .../server/checks/AtlasPresenceCheck.java       |     2 +-
 .../ambari/server/checks/CheckDescription.java  |     2 +-
 .../checks/ComponentsInstallationCheck.java     |     3 -
 .../server/checks/ConfigurationMergeCheck.java  |     2 +-
 .../checks/DatabaseConsistencyCheckHelper.java  |    29 +-
 .../HardcodedStackVersionPropertiesCheck.java   |    57 +-
 .../checks/HostsMasterMaintenanceCheck.java     |     2 +-
 .../checks/HostsRepositoryVersionCheck.java     |     4 +-
 .../server/checks/InstallPackagesCheck.java     |    16 +-
 .../server/checks/PreviousUpgradeCompleted.java |     7 +-
 .../server/checks/RangerAuditDbCheck.java       |     2 +-
 .../server/checks/RangerPasswordCheck.java      |     8 +-
 .../server/checks/RangerSSLConfigCheck.java     |     3 +-
 .../checks/ServiceCheckValidityCheck.java       |    11 +-
 .../server/checks/ServicePresenceCheck.java     |     2 +-
 .../ambari/server/checks/ServicesUpCheck.java   |     3 +-
 .../ambari/server/checks/UpgradeCheck.java      |     2 +-
 .../ambari/server/checks/UpgradeCheckGroup.java |     2 +-
 .../server/checks/UpgradeCheckRegistry.java     |     6 +-
 .../server/checks/VersionMismatchCheck.java     |     2 +-
 .../YarnTimelineServerStatePreservingCheck.java |     8 +-
 .../server/cleanup/ClasspathScannerUtils.java   |     2 +-
 .../ambari/server/cleanup/CleanupDriver.java    |    15 +-
 .../ambari/server/cleanup/CleanupService.java   |    19 +-
 .../server/cleanup/CleanupServiceImpl.java      |    33 +-
 .../server/cleanup/TimeBasedCleanupPolicy.java  |     5 +-
 .../ComponentSSLConfiguration.java              |     2 +-
 .../server/configuration/Configuration.java     |   113 +-
 .../AbstractRootServiceResponseFactory.java     |     2 +-
 .../controller/ActionExecutionContext.java      |    63 +-
 .../ambari/server/controller/ActionRequest.java |    21 +-
 .../server/controller/ActionRequestSwagger.java |    31 +
 .../server/controller/ActionResponse.java       |    22 +-
 .../controller/ActiveWidgetLayoutRequest.java   |    66 +
 .../controller/ActiveWidgetLayoutResponse.java  |   142 +
 .../server/controller/AlertCurrentRequest.java  |     2 +-
 .../controller/AlertDefinitionResponse.java     |     2 +-
 .../server/controller/AlertHistoryRequest.java  |     2 +-
 .../server/controller/AlertNoticeRequest.java   |     2 +-
 .../controller/AmbariActionExecutionHelper.java |   119 +-
 .../AmbariCustomCommandExecutionHelper.java     |   445 +-
 .../server/controller/AmbariHandlerList.java    |     4 +-
 .../controller/AmbariManagementController.java  |    16 +-
 .../AmbariManagementControllerImpl.java         |   705 +-
 .../ambari/server/controller/AmbariServer.java  |     6 +-
 .../server/controller/AmbariSessionManager.java |     2 +-
 .../ambari/server/controller/ApiModel.java      |    28 +
 .../server/controller/AuthToLocalBuilder.java   |    10 +-
 .../server/controller/BlueprintSwagger.java     |    91 +
 .../controller/ClusterArtifactRequest.java      |    46 +
 .../controller/ClusterArtifactResponse.java     |    49 +
 .../server/controller/ClusterRequest.java       |   113 +-
 .../server/controller/ClusterResponse.java      |   106 +-
 .../ClusterServiceArtifactRequest.java          |    46 +
 .../ClusterServiceArtifactResponse.java         |    52 +
 .../controller/ComponentDependencyResponse.java |    64 +
 .../server/controller/ConfigGroupRequest.java   |     2 +-
 .../server/controller/ConfigGroupResponse.java  |    12 +-
 .../server/controller/ConfigurationRequest.java |     2 +-
 .../controller/ConfigurationResponse.java       |     2 +-
 .../server/controller/ControllerModule.java     |     2 +-
 .../server/controller/ControllerRequest.java    |     2 +-
 .../server/controller/ControllerResponse.java   |     2 +-
 .../controller/DeleteIdentityHandler.java       |   283 +
 .../server/controller/ExecuteActionRequest.java |     2 +-
 .../server/controller/ExecuteCommandJson.java   |     6 +-
 .../server/controller/ExtensionLinkRequest.java |     2 +-
 .../controller/ExtensionLinkResponse.java       |   139 +-
 .../server/controller/ExtensionRequest.java     |     2 +-
 .../server/controller/ExtensionResponse.java    |     2 +-
 .../controller/ExtensionVersionRequest.java     |     2 +-
 .../controller/ExtensionVersionResponse.java    |     2 +-
 .../controller/GroupPrivilegeResponse.java      |    61 +
 .../ambari/server/controller/GroupRequest.java  |     7 +-
 .../ambari/server/controller/GroupResponse.java |     9 +-
 .../HostComponentProcessResponse.java           |     2 +-
 .../ambari/server/controller/HostRequest.java   |    74 +-
 .../ambari/server/controller/HostResponse.java  |   289 +-
 .../ambari/server/controller/HostsMap.java      |     2 +-
 .../server/controller/KerberosHelper.java       |     3 +
 .../server/controller/KerberosHelperImpl.java   |   170 +-
 .../server/controller/LdapSyncRequest.java      |     2 +-
 .../controller/MaintenanceStateHelper.java      |     2 +-
 .../ambari/server/controller/MemberRequest.java |     6 +-
 .../server/controller/MemberResponse.java       |     8 +-
 .../controller/OperatingSystemRequest.java      |     2 +-
 .../controller/OperatingSystemResponse.java     |     2 +-
 .../OrderedRequestStageContainer.java           |    62 +
 .../server/controller/PrivilegeResponse.java    |   175 +
 .../server/controller/QuickLinksResponse.java   |    56 +
 .../server/controller/RepositoryRequest.java    |     2 +-
 .../server/controller/RepositoryResponse.java   |    14 +-
 .../server/controller/RequestPostRequest.java   |    96 +
 .../server/controller/RequestPostResponse.java  |    43 +
 .../server/controller/RequestPutRequest.java    |    33 +
 .../server/controller/RequestRequest.java       |     8 +-
 .../server/controller/RequestResponse.java      |   100 +
 .../controller/RequestScheduleRequest.java      |     2 +-
 .../controller/RequestScheduleResponse.java     |     2 +-
 .../controller/RequestStatusResponse.java       |     2 +-
 .../controller/ResourceProviderFactory.java     |    10 +-
 .../controller/RootServiceComponentRequest.java |     2 +-
 .../RootServiceComponentResponse.java           |    58 +-
 .../RootServiceHostComponentRequest.java        |     2 +-
 .../RootServiceHostComponentResponse.java       |    72 +-
 .../server/controller/RootServiceRequest.java   |     2 +-
 .../server/controller/RootServiceResponse.java  |    24 +-
 .../controller/RootServiceResponseFactory.java  |    31 +-
 .../controller/ServiceComponentHostRequest.java |    21 +-
 .../ServiceComponentHostResponse.java           |    41 +-
 .../controller/ServiceComponentRequest.java     |     2 +-
 .../controller/ServiceComponentResponse.java    |    43 +-
 .../server/controller/ServiceRequest.java       |    52 +-
 .../controller/ServiceRequestSwagger.java       |    31 +
 .../server/controller/ServiceResponse.java      |    80 +-
 .../server/controller/SettingRequest.java       |    69 +
 .../server/controller/SettingResponse.java      |    90 +
 .../controller/StackArtifactResponse.java       |    52 +
 .../StackConfigurationDependencyRequest.java    |     2 +-
 .../StackConfigurationDependencyResponse.java   |    19 +-
 .../controller/StackConfigurationRequest.java   |     2 +-
 .../controller/StackConfigurationResponse.java  |    28 +-
 .../StackLevelConfigurationRequest.java         |     2 +-
 .../StackLevelConfigurationResponse.java        |     2 +-
 .../ambari/server/controller/StackRequest.java  |     2 +-
 .../ambari/server/controller/StackResponse.java |    14 +-
 .../StackServiceArtifactResponse.java           |    53 +
 .../StackServiceComponentRequest.java           |     2 +-
 .../StackServiceComponentResponse.java          |    29 +-
 .../server/controller/StackServiceRequest.java  |     2 +-
 .../server/controller/StackServiceResponse.java |    33 +-
 .../server/controller/StackVersionRequest.java  |     2 +-
 .../server/controller/StackVersionResponse.java |    61 +-
 .../ambari/server/controller/ThemeResponse.java |    56 +
 .../controller/UserAuthorizationResponse.java   |   153 +
 .../controller/UserPrivilegeResponse.java       |    61 +
 .../ambari/server/controller/UserRequest.java   |    19 +-
 .../ambari/server/controller/UserResponse.java  |    50 +-
 .../server/controller/ViewInstanceRequest.java  |   209 +
 .../server/controller/ViewInstanceResponse.java |   198 +
 .../controller/ViewPermissionResponse.java      |   122 +
 .../server/controller/ViewPrivilegeRequest.java |    79 +
 .../controller/ViewPrivilegeResponse.java       |    55 +
 .../ambari/server/controller/ViewResponse.java  |    82 +
 .../server/controller/ViewVersionResponse.java  |   234 +
 .../server/controller/WidgetResponse.java       |     2 +-
 .../AbstractAuthorizedResourceProvider.java     |    21 +
 .../AbstractControllerResourceProvider.java     |    31 +-
 .../internal/AbstractDRResourceProvider.java    |     2 +-
 .../internal/AbstractPropertyProvider.java      |     6 +-
 .../internal/AbstractProviderModule.java        |    64 +-
 .../internal/AbstractResourceProvider.java      |     2 +-
 .../internal/ActionResourceProvider.java        |     5 +-
 .../ActiveWidgetLayoutResourceProvider.java     |    61 +-
 .../internal/AlertHistoryResourceProvider.java  |     2 +-
 .../internal/AlertNoticeResourceProvider.java   |     2 +-
 .../internal/AlertResourceProvider.java         |     2 +-
 .../internal/AlertSummaryPropertyProvider.java  |     2 +-
 .../controller/internal/AppCookieManager.java   |    10 +-
 .../internal/ArtifactResourceProvider.java      |    33 +-
 .../AtlasServerHttpPropertyRequest.java         |     4 +-
 .../controller/internal/BaseClusterRequest.java |     2 +-
 .../controller/internal/BaseProvider.java       |    12 +-
 .../BlueprintConfigurationProcessor.java        |    93 +-
 .../internal/BlueprintResourceProvider.java     |     2 +-
 .../controller/internal/CalculatedStatus.java   |     2 +-
 .../internal/ClientConfigResourceProvider.java  |    25 +-
 .../internal/ClusterControllerImpl.java         |     6 +-
 .../internal/ClusterResourceProvider.java       |    96 +-
 .../ClusterStackVersionResourceProvider.java    |   586 +-
 .../internal/CompatibleRepositoryVersion.java   |     2 +-
 ...atibleRepositoryVersionResourceProvider.java |    21 +-
 .../internal/ComponentResourceProvider.java     |    82 +-
 .../internal/ConfigGroupResourceProvider.java   |    91 +-
 .../ConfigurationTopologyException.java         |     2 +-
 .../internal/DefaultProviderModule.java         |     2 +-
 .../DefaultResourcePredicateEvaluator.java      |     2 +-
 .../internal/DefaultTrimmingStrategy.java       |     2 +-
 .../DeleteSpacesAtTheEndTrimmingStrategy.java   |     2 +-
 .../internal/DeleteStatusMetaData.java          |     2 +-
 .../internal/DirectoriesTrimmingStrategy.java   |     2 +-
 .../internal/ExportBlueprintRequest.java        |     2 +-
 .../server/controller/internal/Extension.java   |     2 +-
 .../internal/ExtensionLinkResourceProvider.java |     2 +-
 .../internal/ExtensionResourceProvider.java     |     2 +-
 .../ExtensionVersionResourceProvider.java       |     2 +-
 .../internal/FeedResourceProvider.java          |     2 +-
 .../GroupPrivilegeResourceProvider.java         |    80 +-
 .../internal/GroupResourceProvider.java         |     6 +-
 .../HostComponentProcessResourceProvider.java   |     2 +-
 .../internal/HostComponentResourceProvider.java |    31 +-
 .../internal/HostResourceProvider.java          |   223 +-
 .../HostStackVersionResourceProvider.java       |    73 +-
 .../controller/internal/HostStatusHelper.java   |     9 +-
 .../internal/HttpPropertyProvider.java          |     2 +-
 .../internal/InstanceResourceProvider.java      |     2 +-
 .../internal/JobResourceProvider.java           |    14 +-
 .../internal/JsonHttpPropertyRequest.java       |     4 +-
 .../internal/LdapSyncEventResourceProvider.java |     2 +-
 .../internal/LoggingResourceProvider.java       |     2 +-
 .../internal/MemberResourceProvider.java        |     6 +-
 .../internal/ObservableResourceProvider.java    |     2 +-
 .../OperatingSystemResourceProvider.java        |     2 +-
 .../controller/internal/PageRequestImpl.java    |     2 +-
 .../controller/internal/PageResponseImpl.java   |     2 +-
 .../internal/PasswordTrimmingStrategy.java      |     2 +-
 .../internal/PermissionResourceProvider.java    |     2 +-
 .../PreUpgradeCheckResourceProvider.java        |    10 +-
 .../controller/internal/PropertyInfo.java       |     4 +-
 .../internal/PropertyPredicateVisitor.java      |     2 +-
 .../PropertyValueTrimmingStrategyDefiner.java   |     2 +-
 .../controller/internal/ProvisionAction.java    |     2 +-
 .../internal/ProvisionClusterRequest.java       |    11 +-
 .../internal/ReadOnlyResourceProvider.java      |    22 +-
 .../RecommendationResourceProvider.java         |     2 +-
 .../internal/RemoteClusterResourceProvider.java |     2 +-
 .../internal/RepositoryResourceProvider.java    |    15 +-
 .../RepositoryVersionResourceProvider.java      |    91 +-
 .../server/controller/internal/RequestImpl.java |     2 +-
 .../internal/RequestResourceFilter.java         |     5 +-
 .../internal/RequestResourceProvider.java       |    92 +-
 .../RequestScheduleResourceProvider.java        |     2 +-
 .../internal/RequestStageContainer.java         |     4 +-
 .../controller/internal/RequestStatusImpl.java  |     2 +-
 .../controller/internal/ResourceImpl.java       |     2 +-
 .../ResourceManagerHttpPropertyRequest.java     |     2 +-
 .../internal/ResourceProviderEvent.java         |     2 +-
 .../internal/ResourceProviderObserver.java      |     2 +-
 .../RootServiceComponentResourceProvider.java   |    65 +-
 ...ootServiceHostComponentResourceProvider.java |    74 +-
 .../internal/RootServiceResourceProvider.java   |    22 +-
 .../internal/ScaleClusterRequest.java           |    12 +-
 .../server/controller/internal/SchemaImpl.java  |     2 +-
 .../internal/ServiceResourceProvider.java       |   234 +-
 .../internal/SettingResourceProvider.java       |    64 +-
 .../internal/SimplifyingPredicateVisitor.java   |     2 +-
 .../controller/internal/SortRequestImpl.java    |     2 +-
 .../server/controller/internal/Stack.java       |     2 +-
 .../internal/StackAdvisorResourceProvider.java  |     2 +-
 .../internal/StackArtifactResourceProvider.java |     6 +-
 ...ConfigurationDependencyResourceProvider.java |     2 +-
 .../StackConfigurationResourceProvider.java     |     2 +-
 .../internal/StackDefinedPropertyProvider.java  |    20 +-
 .../StackDependencyResourceProvider.java        |     8 +-
 ...StackLevelConfigurationResourceProvider.java |     2 +-
 .../internal/StackResourceProvider.java         |     2 +-
 .../StackServiceComponentResourceProvider.java  |     2 +-
 .../internal/StackServiceResourceProvider.java  |     2 +-
 .../internal/StackVersionResourceProvider.java  |     2 +-
 .../internal/StageResourceProvider.java         |     2 +-
 .../internal/TargetClusterResourceProvider.java |     2 +-
 .../internal/TaskAttemptResourceProvider.java   |     8 +-
 .../internal/TaskResourceProvider.java          |     2 +-
 .../controller/internal/TemporalInfoImpl.java   |     2 +-
 .../controller/internal/TrimmingStrategy.java   |     2 +-
 .../controller/internal/URLStreamProvider.java  |    12 +-
 .../internal/UpgradeGroupResourceProvider.java  |     2 +-
 .../internal/UpgradeItemResourceProvider.java   |     2 +-
 .../internal/UpgradeResourceProvider.java       |  1095 +-
 .../controller/internal/UpgradeSummary.java     |     4 +-
 .../UpgradeSummaryResourceProvider.java         |     4 +-
 .../UserAuthorizationResourceProvider.java      |    64 +-
 .../internal/UserPrivilegeResourceProvider.java |    82 +-
 .../internal/UserResourceProvider.java          |     6 +-
 .../internal/ValidationResourceProvider.java    |     4 +-
 .../VersionDefinitionResourceProvider.java      |     4 +-
 .../internal/ViewInstanceResourceProvider.java  |     2 +-
 .../ViewPermissionResourceProvider.java         |    46 +-
 .../internal/ViewResourceProvider.java          |     2 +-
 .../internal/ViewURLResourceProvider.java       |     2 +-
 .../internal/ViewVersionResourceProvider.java   |    63 +-
 .../internal/WidgetLayoutResourceProvider.java  |     6 +-
 .../internal/WidgetResourceProvider.java        |     2 +-
 .../internal/WorkflowResourceProvider.java      |     8 +-
 .../ambari/server/controller/ivory/Cluster.java |     2 +-
 .../ambari/server/controller/ivory/Feed.java    |     2 +-
 .../server/controller/ivory/Instance.java       |     2 +-
 .../server/controller/ivory/IvoryService.java   |     2 +-
 .../controller/jdbc/ConnectionFactory.java      |     2 +-
 .../controller/jdbc/JDBCResourceProvider.java   |     2 +-
 .../JobHistoryPostgresConnectionFactory.java    |     2 +-
 .../controller/jdbc/SQLPredicateVisitor.java    |     2 +-
 .../server/controller/jmx/JMXHostProvider.java  |    13 +-
 .../server/controller/jmx/JMXMetricHolder.java  |     4 +-
 .../controller/jmx/JMXPropertyProvider.java     |    26 +-
 .../logging/HostComponentLoggingInfo.java       |     2 +-
 .../logging/LogFileDefinitionInfo.java          |     2 +-
 .../server/controller/logging/LogFileType.java  |     2 +-
 .../logging/LogLevelQueryResponse.java          |     2 +-
 .../controller/logging/LogLineResult.java       |     2 +-
 .../controller/logging/LogQueryResponse.java    |     2 +-
 .../logging/LogSearchDataRetrievalService.java  |     6 +-
 .../LoggingRequestHelperFactoryImpl.java        |     2 +-
 .../logging/LoggingRequestHelperImpl.java       |    17 +-
 .../logging/LoggingSearchPropertyProvider.java  |    18 +-
 .../controller/logging/NameValuePair.java       |     2 +-
 .../ambari/server/controller/logging/Utils.java |     2 +-
 .../controller/metrics/MetricHostProvider.java  |     2 +-
 .../metrics/MetricPropertyProviderFactory.java  |     2 +-
 .../metrics/MetricReportingAdapter.java         |     2 +-
 .../metrics/MetricsCollectorHAManager.java      |     2 +-
 .../metrics/MetricsDataTransferMethod.java      |     2 +-
 .../MetricsDataTransferMethodFactory.java       |     2 +-
 .../metrics/MetricsDownsamplingMethod.java      |     7 +-
 .../MetricsDownsamplingMethodFactory.java       |     2 +-
 .../metrics/MetricsPaddingMethod.java           |     2 +-
 .../metrics/MetricsPropertyProvider.java        |     2 +-
 .../metrics/MetricsPropertyProviderProxy.java   |     2 +-
 .../metrics/MetricsReportPropertyProvider.java  |     2 +-
 .../MetricsReportPropertyProviderProxy.java     |     2 +-
 .../metrics/MetricsServiceProvider.java         |     2 +-
 .../metrics/RestMetricsPropertyProvider.java    |     2 +-
 .../ThreadPoolEnabledPropertyProvider.java      |     2 +-
 .../GangliaComponentPropertyProvider.java       |     2 +-
 .../GangliaHostComponentPropertyProvider.java   |     2 +-
 .../ganglia/GangliaHostPropertyProvider.java    |     2 +-
 .../metrics/ganglia/GangliaMetric.java          |     5 +-
 .../ganglia/GangliaPropertyProvider.java        |     2 +-
 .../ganglia/GangliaReportPropertyProvider.java  |     2 +-
 .../timeline/AMSComponentPropertyProvider.java  |     2 +-
 .../AMSHostComponentPropertyProvider.java       |     2 +-
 .../timeline/AMSHostPropertyProvider.java       |     2 +-
 .../metrics/timeline/AMSPropertyProvider.java   |    13 +-
 .../timeline/AMSReportPropertyProvider.java     |     2 +-
 .../metrics/timeline/MetricsRequestHelper.java  |    22 +-
 .../cache/TimelineAppMetricCacheKey.java        |     2 +-
 .../timeline/cache/TimelineMetricCache.java     |    30 +-
 .../cache/TimelineMetricCacheEntryFactory.java  |    48 +-
 .../cache/TimelineMetricCacheProvider.java      |     2 +-
 .../cache/TimelineMetricsCacheSizeOfEngine.java |     8 +-
 .../cache/TimelineMetricsCacheValue.java        |     2 +-
 .../controller/predicate/AlwaysPredicate.java   |     5 +-
 .../controller/predicate/AndPredicate.java      |     2 +-
 .../controller/predicate/ArrayPredicate.java    |     2 +-
 .../controller/predicate/BasePredicate.java     |     2 +-
 .../predicate/CategoryIsEmptyPredicate.java     |     2 +-
 .../controller/predicate/CategoryPredicate.java |     2 +-
 .../predicate/ComparisonPredicate.java          |     2 +-
 .../controller/predicate/EqualsPredicate.java   |     2 +-
 .../controller/predicate/FilterPredicate.java   |     2 +-
 .../predicate/GreaterEqualsPredicate.java       |     2 +-
 .../controller/predicate/GreaterPredicate.java  |     2 +-
 .../predicate/LessEqualsPredicate.java          |     2 +-
 .../controller/predicate/LessPredicate.java     |     2 +-
 .../controller/predicate/NotPredicate.java      |     2 +-
 .../controller/predicate/OrPredicate.java       |     2 +-
 .../controller/predicate/PredicateVisitor.java  |     2 +-
 .../predicate/PredicateVisitorAcceptor.java     |     2 +-
 .../controller/predicate/PropertyPredicate.java |     2 +-
 .../controller/predicate/UnaryPredicate.java    |     2 +-
 .../controller/spi/ClusterController.java       |     2 +-
 .../spi/NoSuchParentResourceException.java      |     2 +-
 .../controller/spi/NoSuchResourceException.java |     2 +-
 .../server/controller/spi/PageRequest.java      |     2 +-
 .../server/controller/spi/PageResponse.java     |     2 +-
 .../ambari/server/controller/spi/Predicate.java |     2 +-
 .../server/controller/spi/PropertyProvider.java |     2 +-
 .../server/controller/spi/ProviderModule.java   |     2 +-
 .../ambari/server/controller/spi/Request.java   |     2 +-
 .../server/controller/spi/RequestStatus.java    |     2 +-
 .../controller/spi/RequestStatusMetaData.java   |     2 +-
 .../ambari/server/controller/spi/Resource.java  |     2 +-
 .../spi/ResourceAlreadyExistsException.java     |     2 +-
 .../spi/ResourcePredicateEvaluator.java         |     2 +-
 .../server/controller/spi/ResourceProvider.java |     2 +-
 .../ambari/server/controller/spi/Schema.java    |     2 +-
 .../server/controller/spi/SchemaFactory.java    |     2 +-
 .../server/controller/spi/SortRequest.java      |     2 +-
 .../controller/spi/SortRequestProperty.java     |     2 +-
 .../server/controller/spi/SystemException.java  |     2 +-
 .../server/controller/spi/TemporalInfo.java     |     2 +-
 .../spi/UnsupportedPropertyException.java       |     2 +-
 ...eredThreadPoolExecutorCompletionService.java |     2 +-
 .../utilities/ClusterControllerHelper.java      |     2 +-
 .../controller/utilities/DatabaseChecker.java   |     2 +-
 .../controller/utilities/KerberosChecker.java   |     2 +-
 .../utilities/KerberosIdentityCleaner.java      |   135 +
 .../controller/utilities/PredicateBuilder.java  |     2 +-
 .../controller/utilities/PredicateHelper.java   |     2 +-
 .../controller/utilities/PropertyHelper.java    |    12 +-
 .../utilities/ScalingThreadPoolExecutor.java    |     2 +-
 .../ServiceCalculatedStateFactory.java          |     4 +-
 .../controller/utilities/StreamProvider.java    |     2 +-
 .../state/DefaultServiceCalculatedState.java    |     7 +-
 .../state/FlumeServiceCalculatedState.java      |     4 +-
 .../state/HBaseServiceCalculatedState.java      |     6 +-
 .../state/HDFSServiceCalculatedState.java       |     6 +-
 .../state/HiveServiceCalculatedState.java       |     9 +-
 .../state/OozieServiceCalculatedState.java      |     7 +-
 .../utilities/state/ServiceCalculatedState.java |     2 +-
 .../state/YARNServiceCalculatedState.java       |     7 +-
 .../server/credentialapi/CredentialUtil.java    |     2 +-
 .../server/customactions/ActionDefinition.java  |     2 +-
 .../customactions/ActionDefinitionManager.java  |     8 +-
 .../customactions/ActionDefinitionSpec.java     |     2 +-
 .../customactions/ActionDefinitionXml.java      |     2 +-
 .../events/ActionFinalReportReceivedEvent.java  |     2 +-
 .../events/AggregateAlertRecalculateEvent.java  |     2 +-
 .../events/AlertDefinitionChangedEvent.java     |     2 +-
 .../events/AlertDefinitionDeleteEvent.java      |     2 +-
 .../events/AlertDefinitionDisabledEvent.java    |     2 +-
 .../AlertDefinitionRegistrationEvent.java       |     2 +-
 .../apache/ambari/server/events/AlertEvent.java |     2 +-
 .../events/AlertHashInvalidationEvent.java      |     2 +-
 .../server/events/AlertReceivedEvent.java       |     2 +-
 .../server/events/AlertStateChangeEvent.java    |     2 +-
 .../ambari/server/events/AmbariEvent.java       |     2 +-
 .../events/ClusterConfigChangedEvent.java       |     2 +-
 .../events/ClusterConfigFinishedEvent.java      |     2 +-
 .../ambari/server/events/ClusterEvent.java      |     2 +-
 .../HostComponentVersionAdvertisedEvent.java    |     2 +-
 .../apache/ambari/server/events/HostEvent.java  |     2 +-
 .../server/events/HostRegisteredEvent.java      |     2 +-
 .../ambari/server/events/HostsAddedEvent.java   |     2 +-
 .../ambari/server/events/HostsRemovedEvent.java |     2 +-
 .../ambari/server/events/InitialAlertEvent.java |     2 +-
 .../server/events/MaintenanceModeEvent.java     |     2 +-
 .../events/ServiceComponentInstalledEvent.java  |     2 +-
 .../ServiceComponentRecoveryChangedEvent.java   |     2 +-
 .../ServiceComponentUninstalledEvent.java       |     2 +-
 .../ambari/server/events/ServiceEvent.java      |     2 +-
 .../server/events/ServiceInstalledEvent.java    |     2 +-
 .../server/events/ServiceRemovedEvent.java      |     2 +-
 .../server/events/StackUpgradeFinishEvent.java  |     4 +-
 .../ambari/server/events/TaskCreateEvent.java   |     4 +-
 .../apache/ambari/server/events/TaskEvent.java  |     4 +-
 .../ambari/server/events/TaskUpdateEvent.java   |     4 +-
 .../EntityManagerCacheInvalidationEvent.java    |     2 +-
 .../ambari/server/events/jpa/JPAEvent.java      |     2 +-
 .../alerts/AlertAggregateListener.java          |     2 +-
 .../alerts/AlertDefinitionDisabledListener.java |     2 +-
 .../alerts/AlertHashInvalidationListener.java   |     4 +-
 .../listeners/alerts/AlertHostListener.java     |     2 +-
 .../alerts/AlertLifecycleListener.java          |     4 +-
 .../alerts/AlertMaintenanceModeListener.java    |     4 +-
 .../listeners/alerts/AlertReceivedListener.java |     2 +-
 .../AlertServiceComponentHostListener.java      |     4 +-
 .../alerts/AlertServiceStateListener.java       |     4 +-
 .../alerts/AlertStateChangedListener.java       |     4 +-
 .../listeners/tasks/TaskStatusListener.java     |     5 +-
 .../DistributeRepositoriesActionListener.java   |    21 +-
 .../upgrade/HostVersionOutOfSyncListener.java   |    99 +-
 .../upgrade/StackUpgradeFinishListener.java     |     2 +-
 .../listeners/upgrade/StackVersionListener.java |   162 +-
 .../events/publishers/AlertEventPublisher.java  |     2 +-
 .../events/publishers/AmbariEventPublisher.java |     2 +-
 .../events/publishers/JPAEventPublisher.java    |     2 +-
 .../events/publishers/TaskEventPublisher.java   |     2 +-
 .../publishers/VersionEventPublisher.java       |     2 +-
 .../ambari/server/hooks/AmbariEventFactory.java |     2 +-
 .../apache/ambari/server/hooks/HookContext.java |     2 +-
 .../ambari/server/hooks/HookContextFactory.java |     2 +-
 .../apache/ambari/server/hooks/HookService.java |     2 +-
 .../users/PostUserCreationHookContext.java      |     2 +-
 .../server/hooks/users/UserCreatedEvent.java    |     2 +-
 .../server/hooks/users/UserHookParams.java      |     2 +-
 .../server/hooks/users/UserHookService.java     |     2 +-
 .../server/logging/EclipseLinkLogger.java       |     2 +-
 .../metadata/AmbariServiceAlertDefinitions.java |     2 +-
 .../CachedRoleCommandOrderProvider.java         |     4 +-
 .../server/metadata/RoleCommandOrder.java       |    43 +-
 .../metadata/RoleCommandOrderProvider.java      |     2 +-
 .../ambari/server/metadata/RoleCommandPair.java |     2 +-
 .../server/metrics/system/MetricsService.java   |     2 +-
 .../server/metrics/system/MetricsSink.java      |     2 +-
 .../server/metrics/system/MetricsSource.java    |     4 +-
 .../server/metrics/system/SingleMetric.java     |     2 +-
 .../system/impl/AbstractMetricsSource.java      |     4 +-
 .../system/impl/AmbariMetricSinkImpl.java       |     6 +-
 .../system/impl/AmbariPerformanceMonitor.java   |     6 +-
 .../system/impl/DatabaseMetricsSource.java      |    10 +-
 .../metrics/system/impl/JvmMetricsSource.java   |    16 +-
 .../system/impl/MetricsConfiguration.java       |     4 +-
 .../metrics/system/impl/MetricsServiceImpl.java |     9 +-
 .../server/notifications/DispatchCallback.java  |     2 +-
 .../notifications/DispatchCredentials.java      |     2 +-
 .../server/notifications/DispatchFactory.java   |     2 +-
 .../server/notifications/DispatchRunnable.java  |     4 +-
 .../server/notifications/Notification.java      |     2 +-
 .../notifications/NotificationDispatcher.java   |     2 +-
 .../ambari/server/notifications/Recipient.java  |     2 +-
 .../TargetConfigurationResult.java              |     4 +-
 .../dispatchers/AlertScriptDispatcher.java      |    47 +-
 .../dispatchers/AmbariSNMPDispatcher.java       |     2 +-
 .../dispatchers/EmailDispatcher.java            |     2 +-
 .../dispatchers/SNMPDispatcher.java             |     2 +-
 .../orm/AmbariLocalSessionInterceptor.java      |     2 +-
 .../apache/ambari/server/orm/DBAccessor.java    |    41 +-
 .../ambari/server/orm/DBAccessorImpl.java       |   127 +-
 .../orm/EclipseLinkSessionCustomizer.java       |     2 +-
 .../ambari/server/orm/GuiceJpaInitializer.java  |     2 +-
 .../ambari/server/orm/PersistenceType.java      |     2 +-
 .../ambari/server/orm/TransactionalLocks.java   |     4 +-
 .../orm/cache/ConfigGroupHostMapping.java       |     2 +-
 .../orm/cache/ConfigGroupHostMappingImpl.java   |     2 +-
 .../server/orm/cache/HostConfigMapping.java     |     2 +-
 .../server/orm/cache/HostConfigMappingImpl.java |     2 +-
 .../server/orm/dao/AlertDefinitionDAO.java      |     4 +-
 .../ambari/server/orm/dao/AlertDispatchDAO.java |     2 +-
 .../server/orm/dao/AlertHostSummaryDTO.java     |     2 +-
 .../ambari/server/orm/dao/AlertSummaryDTO.java  |     2 +-
 .../apache/ambari/server/orm/dao/AlertsDAO.java |     2 +-
 .../ambari/server/orm/dao/ArtifactDAO.java      |     2 +-
 .../ambari/server/orm/dao/BlueprintDAO.java     |     2 +-
 .../ambari/server/orm/dao/ClusterDAO.java       |     4 +-
 .../server/orm/dao/ClusterServiceDAO.java       |     2 +-
 .../ambari/server/orm/dao/ClusterStateDAO.java  |     2 +-
 .../server/orm/dao/ClusterVersionDAO.java       |   233 -
 .../orm/dao/ConfigGroupConfigMappingDAO.java    |     2 +-
 .../ambari/server/orm/dao/ConfigGroupDAO.java   |     2 +-
 .../orm/dao/ConfigGroupHostMappingDAO.java      |     2 +-
 .../apache/ambari/server/orm/dao/CrudDAO.java   |     2 +-
 .../ambari/server/orm/dao/ExtensionDAO.java     |     2 +-
 .../ambari/server/orm/dao/ExtensionLinkDAO.java |     2 +-
 .../apache/ambari/server/orm/dao/GroupDAO.java  |     2 +-
 .../server/orm/dao/HostAlertSummaryDTO.java     |     2 +-
 .../orm/dao/HostComponentDesiredStateDAO.java   |     2 +-
 .../server/orm/dao/HostComponentStateDAO.java   |    33 +-
 .../server/orm/dao/HostConfigMappingDAO.java    |     2 +-
 .../apache/ambari/server/orm/dao/HostDAO.java   |     2 +-
 .../server/orm/dao/HostRoleCommandDAO.java      |     7 +-
 .../dao/HostRoleCommandStatusSummaryDTO.java    |     2 +-
 .../ambari/server/orm/dao/HostStateDAO.java     |     2 +-
 .../ambari/server/orm/dao/HostVersionDAO.java   |   189 +-
 .../server/orm/dao/KerberosDescriptorDAO.java   |    34 +-
 .../apache/ambari/server/orm/dao/MemberDAO.java |     2 +-
 .../ambari/server/orm/dao/PrivilegeDAO.java     |     2 +-
 .../server/orm/dao/RemoteAmbariClusterDAO.java  |     2 +-
 .../server/orm/dao/RepositoryVersionDAO.java    |    25 +-
 .../ambari/server/orm/dao/RequestDAO.java       |    21 +-
 .../orm/dao/RequestOperationLevelDAO.java       |     2 +-
 .../orm/dao/RequestScheduleBatchRequestDAO.java |     2 +-
 .../server/orm/dao/RequestScheduleDAO.java      |     2 +-
 .../ambari/server/orm/dao/ResourceDAO.java      |     2 +-
 .../ambari/server/orm/dao/ResourceTypeDAO.java  |     2 +-
 .../dao/ServiceComponentDesiredStateDAO.java    |    54 +-
 .../ambari/server/orm/dao/ServiceConfigDAO.java |    17 +-
 .../server/orm/dao/ServiceDesiredStateDAO.java  |     2 +-
 .../ambari/server/orm/dao/SettingDAO.java       |     2 +-
 .../apache/ambari/server/orm/dao/StackDAO.java  |    16 +-
 .../server/orm/dao/TopologyHostGroupDAO.java    |     2 +-
 .../server/orm/dao/TopologyHostRequestDAO.java  |     2 +-
 .../server/orm/dao/TopologyHostTaskDAO.java     |     6 +-
 .../orm/dao/TopologyLogicalRequestDAO.java      |     6 +-
 .../server/orm/dao/TopologyLogicalTaskDAO.java  |     6 +-
 .../server/orm/dao/TopologyRequestDAO.java      |     2 +-
 .../ambari/server/orm/dao/UpgradeDAO.java       |     2 +-
 .../apache/ambari/server/orm/dao/UserDAO.java   |     2 +-
 .../apache/ambari/server/orm/dao/ViewDAO.java   |     2 +-
 .../ambari/server/orm/dao/ViewInstanceDAO.java  |     2 +-
 .../ambari/server/orm/dao/ViewURLDAO.java       |     2 +-
 .../apache/ambari/server/orm/dao/WidgetDAO.java |     2 +-
 .../ambari/server/orm/dao/WidgetLayoutDAO.java  |     2 +-
 .../server/orm/entities/AlertCurrentEntity.java |     2 +-
 .../orm/entities/AlertDefinitionEntity.java     |     2 +-
 .../server/orm/entities/AlertGroupEntity.java   |     4 +-
 .../server/orm/entities/AlertHistoryEntity.java |     4 +-
 .../server/orm/entities/AlertNoticeEntity.java  |     2 +-
 .../server/orm/entities/AlertTargetEntity.java  |     4 +-
 .../server/orm/entities/ArtifactEntity.java     |     2 +-
 .../server/orm/entities/ArtifactEntityPK.java   |     2 +-
 .../orm/entities/BlueprintConfigEntity.java     |     2 +-
 .../orm/entities/BlueprintConfigEntityPK.java   |     2 +-
 .../server/orm/entities/BlueprintEntity.java    |     2 +-
 .../orm/entities/BlueprintSettingEntity.java    |     2 +-
 .../orm/entities/ClusterConfigEntity.java       |     2 +-
 .../server/orm/entities/ClusterEntity.java      |    25 +-
 .../orm/entities/ClusterServiceEntity.java      |     2 +-
 .../orm/entities/ClusterServiceEntityPK.java    |     2 +-
 .../server/orm/entities/ClusterStateEntity.java |     2 +-
 .../orm/entities/ClusterVersionEntity.java      |   217 -
 .../ConfigGroupConfigMappingEntity.java         |     2 +-
 .../ConfigGroupConfigMappingEntityPK.java       |     2 +-
 .../server/orm/entities/ConfigGroupEntity.java  |     2 +-
 .../entities/ConfigGroupHostMappingEntity.java  |     2 +-
 .../ConfigGroupHostMappingEntityPK.java         |     2 +-
 .../server/orm/entities/ExtensionEntity.java    |     2 +-
 .../orm/entities/ExtensionLinkEntity.java       |     2 +-
 .../ambari/server/orm/entities/GroupEntity.java |     2 +-
 .../HostComponentDesiredStateEntity.java        |    23 +-
 .../orm/entities/HostComponentStateEntity.java  |    24 +-
 .../ambari/server/orm/entities/HostEntity.java  |     2 +-
 .../ambari/server/orm/entities/HostEntity_.java |     4 +-
 .../orm/entities/HostGroupComponentEntity.java  |     2 +-
 .../entities/HostGroupComponentEntityPK.java    |     2 +-
 .../orm/entities/HostGroupConfigEntity.java     |     2 +-
 .../orm/entities/HostGroupConfigEntityPK.java   |     2 +-
 .../server/orm/entities/HostGroupEntity.java    |     2 +-
 .../server/orm/entities/HostGroupEntityPK.java  |     2 +-
 .../server/orm/entities/HostStateEntity.java    |     2 +-
 .../server/orm/entities/HostVersionEntity.java  |    78 +-
 .../orm/entities/LdapSyncEventEntity.java       |     2 +-
 .../server/orm/entities/LdapSyncSpecEntity.java |     2 +-
 .../server/orm/entities/MemberEntity.java       |     2 +-
 .../orm/entities/OperatingSystemEntity.java     |     2 +-
 .../server/orm/entities/PrincipalEntity.java    |     2 +-
 .../orm/entities/PrincipalTypeEntity.java       |    12 +-
 .../orm/entities/RemoteAmbariClusterEntity.java |     2 +-
 .../RemoteAmbariClusterServiceEntity.java       |     2 +-
 .../server/orm/entities/RepositoryEntity.java   |     2 +-
 .../orm/entities/RepositoryVersionEntity.java   |    89 +-
 .../RequestScheduleBatchRequestEntity.java      |     2 +-
 .../RequestScheduleBatchRequestEntityPK.java    |     2 +-
 .../orm/entities/RequestScheduleEntity.java     |     2 +-
 .../server/orm/entities/ResourceEntity.java     |     2 +-
 .../server/orm/entities/ResourceTypeEntity.java |     2 +-
 .../ServiceComponentDesiredStateEntity.java     |   135 +-
 .../entities/ServiceComponentHistoryEntity.java |   181 -
 .../entities/ServiceComponentVersionEntity.java |     2 +-
 .../orm/entities/ServiceConfigEntity.java       |    24 +-
 .../orm/entities/ServiceDesiredStateEntity.java |    87 +-
 .../entities/ServiceDesiredStateEntityPK.java   |     2 +-
 .../server/orm/entities/SettingEntity.java      |     2 +-
 .../orm/entities/TopologyHostGroupEntity.java   |     2 +-
 .../orm/entities/TopologyHostInfoEntity.java    |     2 +-
 .../orm/entities/TopologyHostRequestEntity.java |     2 +-
 .../orm/entities/TopologyHostTaskEntity.java    |     4 +-
 .../entities/TopologyLogicalRequestEntity.java  |     4 +-
 .../orm/entities/TopologyLogicalTaskEntity.java |     4 +-
 .../orm/entities/TopologyRequestEntity.java     |     2 +-
 .../server/orm/entities/UpgradeEntity.java      |   168 +-
 .../server/orm/entities/UpgradeGroupEntity.java |     2 +-
 .../orm/entities/UpgradeHistoryEntity.java      |   233 +
 .../server/orm/entities/UpgradeItemEntity.java  |     2 +-
 .../ambari/server/orm/entities/UserEntity.java  |     2 +-
 .../ambari/server/orm/entities/ViewEntity.java  |     2 +-
 .../server/orm/entities/ViewEntityEntity.java   |     2 +-
 .../orm/entities/ViewInstanceDataEntity.java    |     2 +-
 .../orm/entities/ViewInstanceDataEntityPK.java  |     2 +-
 .../server/orm/entities/ViewInstanceEntity.java |     2 +-
 .../entities/ViewInstancePropertyEntity.java    |     2 +-
 .../entities/ViewInstancePropertyEntityPK.java  |     2 +-
 .../orm/entities/ViewParameterEntity.java       |     2 +-
 .../orm/entities/ViewParameterEntityPK.java     |     2 +-
 .../server/orm/entities/ViewResourceEntity.java |     2 +-
 .../orm/entities/ViewResourceEntityPK.java      |     2 +-
 .../server/orm/entities/ViewURLEntity.java      |     2 +-
 .../server/orm/entities/WidgetEntity.java       |     2 +-
 .../server/orm/entities/WidgetLayoutEntity.java |     4 +-
 .../entities/WidgetLayoutUserWidgetEntity.java  |     4 +-
 .../WidgetLayoutUserWidgetEntityPK.java         |     4 +-
 .../ambari/server/orm/helpers/ScriptRunner.java |    10 +-
 .../server/orm/helpers/dbms/DbmsHelper.java     |    10 +
 .../orm/helpers/dbms/GenericDbmsHelper.java     |    16 +-
 .../server/orm/helpers/dbms/H2Helper.java       |    12 +-
 .../server/orm/models/HostComponentSummary.java |     2 +-
 .../ambari/server/proxy/ProxyService.java       |    11 +-
 .../server/resources/ResourceManager.java       |    13 +-
 .../server/resources/api/rest/GetResource.java  |    16 +-
 .../scheduler/AbstractLinearExecutionJob.java   |     8 +-
 .../ambari/server/scheduler/ExecutionJob.java   |     2 +-
 .../scheduler/ExecutionScheduleManager.java     |    18 +-
 .../server/scheduler/ExecutionScheduler.java    |     2 +-
 .../scheduler/ExecutionSchedulerImpl.java       |     8 +-
 .../server/security/CertificateManager.java     |     8 +-
 .../server/security/ClientSecurityType.java     |     2 +-
 .../security/InternalSSLSocketFactory.java      |   112 +
 .../InternalSSLSocketFactoryNonTrusting.java    |    49 +
 .../InternalSSLSocketFactoryTrusting.java       |    48 +
 .../ambari/server/security/SecurityFilter.java  |    14 +-
 .../ambari/server/security/SecurityHelper.java  |     2 +-
 .../server/security/SecurityHelperImpl.java     |     2 +-
 .../server/security/SignCertResponse.java       |     2 +-
 .../ambari/server/security/SignMessage.java     |     2 +-
 .../authorization/AmbariAuthentication.java     |     2 +-
 .../authorization/AmbariGrantedAuthority.java   |     2 +-
 .../AmbariLdapAuthoritiesPopulator.java         |     2 +-
 .../AmbariLdapBindAuthenticator.java            |     2 +-
 .../authorization/AmbariLocalUserProvider.java  |     2 +-
 .../AmbariPamAuthenticationProvider.java        |     4 +-
 .../authorization/AmbariUserAuthentication.java |     2 +-
 .../AmbariUserAuthorizationFilter.java          |     2 +-
 ...ateLdapUserFoundAuthenticationException.java |     2 +-
 .../security/authorization/GroupType.java       |     2 +-
 .../authorization/LdapServerProperties.java     |     2 +-
 .../PamAuthenticationException.java             |     2 +-
 .../server/security/authorization/User.java     |    12 +
 .../authorization/UserIdAuthentication.java     |     2 +-
 .../server/security/authorization/UserType.java |     2 +-
 .../InternalAuthenticationInterceptor.java      |     2 +-
 .../internal/InternalTokenStorage.java          |     2 +-
 .../RunWithInternalSecurityContext.java         |     2 +-
 .../jwt/JwtAuthenticationFilter.java            |     2 +-
 .../security/encryption/AESEncryptor.java       |    26 +-
 .../encryption/AbstractCredentialStore.java     |     4 +-
 .../security/encryption/CredentialProvider.java |     2 +-
 .../security/encryption/EncryptionResult.java   |     2 +-
 .../security/encryption/MasterKeyService.java   |     2 +-
 .../encryption/MasterKeyServiceImpl.java        |    18 +-
 .../server/security/ldap/LdapBatchDto.java      |     2 +-
 .../server/security/ldap/LdapGroupDto.java      |     2 +-
 .../server/security/ldap/LdapSyncDto.java       |     2 +-
 .../server/security/ldap/LdapUserDto.java       |     2 +-
 .../security/ldap/LdapUserGroupMemberDto.java   |     2 +-
 .../unsecured/rest/CertificateDownload.java     |    13 +-
 .../unsecured/rest/CertificateSign.java         |    12 +-
 .../security/unsecured/rest/ConnectionInfo.java |    13 +-
 .../server/serveraction/ServerAction.java       |     2 +-
 .../serveraction/ServerActionExecutor.java      |     3 +-
 .../kerberos/ADKerberosOperationHandler.java    |    45 +-
 .../AbstractPrepareKerberosServerAction.java    |    19 +-
 .../server/serveraction/kerberos/Component.java |    74 +
 .../kerberos/CreateKeytabFilesServerAction.java |     6 +-
 .../kerberos/DestroyPrincipalsServerAction.java |     2 +-
 .../kerberos/FinalizeKerberosServerAction.java  |    27 +-
 .../kerberos/IPAKerberosOperationHandler.java   |    26 +-
 .../KerberosKDCSSLConnectionException.java      |    45 +
 .../kerberos/KerberosOperationHandler.java      |     6 -
 .../kerberos/KerberosServerAction.java          |    27 +
 .../kerberos/MITKerberosOperationHandler.java   |     2 +-
 .../PrepareDisableKerberosServerAction.java     |     4 +-
 .../kerberos/TrustingSSLSocketFactory.java      |   101 -
 .../UpdateKerberosConfigsServerAction.java      |     5 +-
 .../upgrades/AbstractUpgradeServerAction.java   |    51 +-
 .../upgrades/AutoSkipFailedSummaryAction.java   |    12 +-
 .../upgrades/ComponentVersionCheckAction.java   |    26 +-
 .../serveraction/upgrades/ConfigureAction.java  |    36 +-
 .../upgrades/FinalizeUpgradeAction.java         |   589 +-
 .../FixCapacitySchedulerOrderingPolicy.java     |     2 +-
 .../upgrades/FixYarnWebServiceUrl.java          |     2 +-
 .../upgrades/HiveZKQuorumConfigAction.java      |     2 +-
 .../upgrades/KerberosKeytabsAction.java         |     2 +-
 .../upgrades/ManualStageAction.java             |     2 +-
 .../upgrades/RangerConfigCalculation.java       |     2 +-
 .../RangerKerberosConfigCalculation.java        |     4 +-
 .../upgrades/RangerKmsProxyConfig.java          |     2 +-
 .../upgrades/RangerWebAlertConfigAction.java    |     2 +-
 .../upgrades/UpdateDesiredStackAction.java      |   181 +-
 .../upgrades/ZooKeeperQuorumCalculator.java     |     2 +-
 .../users/CollectionPersisterService.java       |     2 +-
 .../CollectionPersisterServiceFactory.java      |     2 +-
 .../users/CsvFilePersisterService.java          |     2 +-
 .../users/PostUserCreationHookServerAction.java |     2 +-
 .../users/ShellCommandCallableFactory.java      |     2 +-
 .../users/ShellCommandUtilityCallable.java      |     2 +-
 .../users/ShellCommandUtilityWrapper.java       |     2 +-
 .../apache/ambari/server/stack/BaseModule.java  |     2 +-
 .../server/stack/CommonServiceDirectory.java    |    10 +-
 .../ambari/server/stack/ComponentModule.java    |     6 +-
 .../server/stack/ConfigurationDirectory.java    |     2 +-
 .../ambari/server/stack/ConfigurationInfo.java  |     2 +-
 .../server/stack/ConfigurationModule.java       |     2 +-
 .../ambari/server/stack/ExtensionDirectory.java |     4 +-
 .../ambari/server/stack/ExtensionHelper.java    |     2 +-
 .../ambari/server/stack/ExtensionModule.java    |     6 +-
 .../apache/ambari/server/stack/HostsType.java   |     2 +-
 .../ambari/server/stack/MasterHostResolver.java |    77 +-
 .../server/stack/ModuleFileUnmarshaller.java    |     6 +-
 .../apache/ambari/server/stack/ModuleState.java |     2 +-
 .../server/stack/NoSuchStackException.java      |     2 +-
 .../stack/QuickLinksConfigurationModule.java    |     2 +-
 .../apache/ambari/server/stack/RepoUtil.java    |     8 +-
 .../ambari/server/stack/ServiceDirectory.java   |     4 +-
 .../ambari/server/stack/ServiceModule.java      |    12 +-
 .../ambari/server/stack/StackContext.java       |    30 +-
 .../server/stack/StackDefinitionDirectory.java  |     2 +-
 .../server/stack/StackDefinitionModule.java     |     2 +-
 .../ambari/server/stack/StackDirectory.java     |     9 +-
 .../ambari/server/stack/StackManager.java       |    11 +-
 .../server/stack/StackManagerFactory.java       |     2 +-
 .../apache/ambari/server/stack/StackModule.java |    52 +-
 .../server/stack/StackServiceDirectory.java     |    11 +-
 .../apache/ambari/server/stack/ThemeModule.java |     2 +-
 .../stack/UpdateActiveRepoVersionOnStartup.java |    51 +-
 .../apache/ambari/server/stack/Validable.java   |     2 +-
 .../ambari/server/stageplanner/RoleGraph.java   |    53 +-
 .../server/stageplanner/RoleGraphFactory.java   |     2 +-
 .../server/stageplanner/RoleGraphNode.java      |     2 +-
 .../ambari/server/state/AgentVersion.java       |     2 +-
 .../org/apache/ambari/server/state/Alert.java   |     2 +-
 .../ambari/server/state/AlertFirmness.java      |     2 +-
 .../apache/ambari/server/state/AlertState.java  |     2 +-
 .../ambari/server/state/AutoDeployInfo.java     |     2 +-
 .../server/state/BulkCommandDefinition.java     |     2 +-
 .../ambari/server/state/ChangedConfigInfo.java  |     2 +-
 .../apache/ambari/server/state/CheckHelper.java |    39 +-
 .../state/ClientConfigFileDefinition.java       |    17 +-
 .../org/apache/ambari/server/state/Cluster.java |   189 +-
 .../server/state/ClusterHealthReport.java       |    45 +-
 .../apache/ambari/server/state/Clusters.java    |    11 +-
 .../server/state/CommandScriptDefinition.java   |     2 +-
 .../org/apache/ambari/server/state/Config.java  |     2 +-
 .../ambari/server/state/ConfigFactory.java      |    15 +-
 .../ambari/server/state/ConfigHelper.java       |   328 +-
 .../apache/ambari/server/state/ConfigImpl.java  |    27 +-
 .../ambari/server/state/ConfigMergeHelper.java  |     2 +-
 .../server/state/CredentialStoreInfo.java       |     2 +-
 .../server/state/CustomCommandDefinition.java   |     2 +-
 .../server/state/DependencyConditionInfo.java   |     2 +-
 .../ambari/server/state/DependencyInfo.java     |     2 +-
 .../apache/ambari/server/state/ExtensionId.java |     2 +-
 .../ambari/server/state/ExtensionInfo.java      |     2 +-
 .../org/apache/ambari/server/state/Host.java    |     2 +-
 .../server/state/HostComponentAdminState.java   |     2 +-
 .../apache/ambari/server/state/HostEvent.java   |     2 +-
 .../ambari/server/state/HostEventType.java      |     2 +-
 .../ambari/server/state/HostHealthStatus.java   |     2 +-
 .../apache/ambari/server/state/HostState.java   |     2 +-
 .../ambari/server/state/LogDefinition.java      |     2 +-
 .../ambari/server/state/MaintenanceState.java   |     2 +-
 .../ambari/server/state/NotificationState.java  |     2 +-
 .../server/state/OperatingSystemInfo.java       |     2 +-
 .../server/state/PropertyDependencyInfo.java    |     2 +-
 .../ambari/server/state/PropertyInfo.java       |     2 +-
 .../state/PropertyStackUpgradeBehavior.java     |     2 +-
 .../server/state/PropertyUpgradeBehavior.java   |     2 +-
 .../state/QuickLinksConfigurationInfo.java      |    10 +-
 .../ambari/server/state/RepositoryInfo.java     |    22 +-
 .../ambari/server/state/RepositoryType.java     |     2 +-
 .../server/state/RepositoryVersionState.java    |    85 +-
 .../org/apache/ambari/server/state/Service.java |    23 +-
 .../ambari/server/state/ServiceComponent.java   |    14 +-
 .../server/state/ServiceComponentFactory.java   |     5 +-
 .../server/state/ServiceComponentHost.java      |    40 +-
 .../server/state/ServiceComponentHostEvent.java |     2 +-
 .../state/ServiceComponentHostEventType.java    |     2 +-
 .../state/ServiceComponentHostFactory.java      |     2 +-
 .../server/state/ServiceComponentImpl.java      |    97 +-
 .../ambari/server/state/ServiceFactory.java     |    27 +-
 .../apache/ambari/server/state/ServiceImpl.java |   150 +-
 .../apache/ambari/server/state/ServiceInfo.java |    28 +-
 .../ambari/server/state/ServiceOsSpecific.java  |     2 +-
 .../server/state/ServicePropertyInfo.java       |     2 +-
 .../org/apache/ambari/server/state/StackId.java |     2 +-
 .../apache/ambari/server/state/StackInfo.java   |     6 +-
 .../org/apache/ambari/server/state/State.java   |     2 +-
 .../apache/ambari/server/state/ThemeInfo.java   |     2 +-
 .../ambari/server/state/UpgradeContext.java     |  1011 +-
 .../server/state/UpgradeContextFactory.java     |    17 +-
 .../ambari/server/state/UpgradeHelper.java      |   347 +-
 .../ambari/server/state/UpgradeState.java       |     2 +-
 .../server/state/ValueAttributesInfo.java       |    75 +-
 .../ambari/server/state/ValueEntryInfo.java     |     8 +-
 .../ambari/server/state/action/Action.java      |     2 +-
 .../state/action/ActionCompletedEvent.java      |     2 +-
 .../ambari/server/state/action/ActionEvent.java |     2 +-
 .../server/state/action/ActionEventType.java    |     2 +-
 .../server/state/action/ActionFailedEvent.java  |     2 +-
 .../ambari/server/state/action/ActionId.java    |     2 +-
 .../ambari/server/state/action/ActionImpl.java  |    25 +-
 .../server/state/action/ActionInitEvent.java    |     2 +-
 .../state/action/ActionProgressUpdateEvent.java |     2 +-
 .../ambari/server/state/action/ActionState.java |     2 +-
 .../ambari/server/state/action/ActionType.java  |     2 +-
 .../state/alert/AggregateDefinitionMapping.java |     2 +-
 .../server/state/alert/AggregateSource.java     |     2 +-
 .../server/state/alert/AlertDefinition.java     |     2 +-
 .../state/alert/AlertDefinitionFactory.java     |     2 +-
 .../server/state/alert/AlertDefinitionHash.java |    16 +-
 .../ambari/server/state/alert/AlertGroup.java   |     2 +-
 .../server/state/alert/AlertNotification.java   |     2 +-
 .../ambari/server/state/alert/AlertTarget.java  |     2 +-
 .../ambari/server/state/alert/AlertUri.java     |     4 +-
 .../ambari/server/state/alert/AmsSource.java    |     2 +-
 .../ambari/server/state/alert/MetricSource.java |     2 +-
 .../server/state/alert/ParameterizedSource.java |     2 +-
 .../server/state/alert/PercentSource.java       |     2 +-
 .../ambari/server/state/alert/PortSource.java   |     2 +-
 .../server/state/alert/RecoverySource.java      |     2 +-
 .../ambari/server/state/alert/Reporting.java    |     2 +-
 .../apache/ambari/server/state/alert/Scope.java |     2 +-
 .../ambari/server/state/alert/ScriptSource.java |     2 +-
 .../ambari/server/state/alert/ServerSource.java |     2 +-
 .../ambari/server/state/alert/Source.java       |     2 +-
 .../ambari/server/state/alert/SourceType.java   |     2 +-
 .../ambari/server/state/alert/TargetType.java   |     2 +-
 .../ambari/server/state/alert/WebSource.java    |     2 +-
 .../server/state/cluster/ClusterFactory.java    |     2 +-
 .../server/state/cluster/ClusterImpl.java       |  1047 +-
 .../server/state/cluster/ClustersImpl.java      |    91 +-
 .../server/state/configgroup/ConfigGroup.java   |     4 +-
 .../state/configgroup/ConfigGroupFactory.java   |     7 +-
 .../state/configgroup/ConfigGroupImpl.java      |    37 +-
 .../fsm/InvalidStateTransitionException.java    |     2 +-
 .../server/state/fsm/MultipleArcTransition.java |     2 +-
 .../server/state/fsm/SingleArcTransition.java   |     2 +-
 .../ambari/server/state/fsm/StateMachine.java   |     2 +-
 .../server/state/fsm/StateMachineFactory.java   |     2 +-
 .../server/state/fsm/event/AbstractEvent.java   |     2 +-
 .../ambari/server/state/fsm/event/Event.java    |     2 +-
 .../server/state/fsm/event/EventHandler.java    |     2 +-
 .../ambari/server/state/host/HostFactory.java   |     2 +-
 .../state/host/HostHealthyHeartbeatEvent.java   |     2 +-
 .../state/host/HostHeartbeatLostEvent.java      |     2 +-
 .../ambari/server/state/host/HostImpl.java      |    39 +-
 .../host/HostRegistrationRequestEvent.java      |     2 +-
 .../host/HostStatusUpdatesReceivedEvent.java    |     2 +-
 .../state/host/HostUnhealthyHeartbeatEvent.java |     2 +-
 .../kerberos/AbstractKerberosDescriptor.java    |    17 +-
 .../kerberos/KerberosComponentDescriptor.java   |    17 +-
 .../state/kerberos/KerberosDescriptor.java      |    43 +
 .../kerberos/KerberosIdentityDescriptor.java    |    32 +-
 .../kerberos/KerberosPrincipalDescriptor.java   |     2 +-
 .../kerberos/KerberosServiceDescriptor.java     |     8 +-
 .../kerberos/VariableReplacementHelper.java     |    23 +-
 .../server/state/quicklinksprofile/Filter.java  |     4 +-
 .../state/repository/AvailableService.java      |     2 +-
 .../repository/AvailableServiceReference.java   |     2 +-
 .../state/repository/AvailableVersion.java      |     2 +-
 .../state/repository/ManifestService.java       |     2 +-
 .../state/repository/ManifestServiceInfo.java   |     2 +-
 .../ambari/server/state/repository/Release.java |     2 +-
 .../state/repository/VersionDefinitionXml.java  |     2 +-
 .../server/state/repository/package-info.java   |     2 +-
 .../ambari/server/state/scheduler/Batch.java    |     2 +-
 .../server/state/scheduler/BatchRequest.java    |     2 +-
 .../server/state/scheduler/BatchRequestJob.java |     2 +-
 .../state/scheduler/BatchRequestResponse.java   |     2 +-
 .../server/state/scheduler/BatchSettings.java   |     2 +-
 .../state/scheduler/RequestExecution.java       |     2 +-
 .../scheduler/RequestExecutionFactory.java      |     2 +-
 .../state/scheduler/RequestExecutionImpl.java   |     2 +-
 .../ambari/server/state/scheduler/Schedule.java |     2 +-
 .../services/AlertNoticeDispatchService.java    |    88 +-
 .../services/AmbariServerAlertService.java      |     2 +-
 .../state/services/CachedAlertFlushService.java |     4 +-
 .../state/services/MetricsRetrievalService.java |     2 +-
 .../services/RetryUpgradeActionService.java     |    24 +-
 .../server/state/stack/ConfigUpgradePack.java   |     4 +-
 .../server/state/stack/ConfigurationXml.java    |     2 +-
 .../state/stack/ExtensionMetainfoXml.java       |     2 +-
 .../server/state/stack/JsonOsFamilyEntry.java   |     2 +-
 .../server/state/stack/JsonOsFamilyRoot.java    |     2 +-
 .../server/state/stack/LatestRepoCallable.java  |    49 +-
 .../ambari/server/state/stack/Metric.java       |     4 +-
 .../server/state/stack/MetricDefinition.java    |     2 +-
 .../ambari/server/state/stack/OsFamily.java     |    16 +-
 .../server/state/stack/RepositoryXml.java       |     8 +-
 .../server/state/stack/ServiceMetainfoXml.java  |     2 +-
 .../server/state/stack/StackMetainfoXml.java    |     2 +-
 .../state/stack/StackRoleCommandOrder.java      |     4 +-
 .../server/state/stack/TrimmingAdapter.java     |     4 +-
 .../ambari/server/state/stack/UpgradePack.java  |     4 +-
 .../ambari/server/state/stack/WidgetLayout.java |     2 +-
 .../server/state/stack/WidgetLayoutInfo.java    |     2 +-
 .../ambari/server/state/stack/package-info.java |     4 +-
 .../server/state/stack/upgrade/Batch.java       |     2 +-
 .../state/stack/upgrade/ClusterGrouping.java    |    13 +-
 .../state/stack/upgrade/ColocatedGrouping.java  |     4 +-
 .../server/state/stack/upgrade/Condition.java   |     2 +-
 .../upgrade/ConfigUpgradeChangeDefinition.java  |     6 +-
 .../stack/upgrade/ConfigurationCondition.java   |     2 +-
 .../state/stack/upgrade/ConfigureFunction.java  |     2 +-
 .../state/stack/upgrade/ConfigureTask.java      |     6 +-
 .../server/state/stack/upgrade/Direction.java   |    11 +-
 .../state/stack/upgrade/ExecuteHostType.java    |     2 +-
 .../server/state/stack/upgrade/ExecuteTask.java |     6 +-
 .../server/state/stack/upgrade/Grouping.java    |     4 +-
 .../state/stack/upgrade/HostOrderGrouping.java  |    19 +-
 .../state/stack/upgrade/HostOrderItem.java      |     4 +-
 .../server/state/stack/upgrade/ManualTask.java  |     2 +-
 .../state/stack/upgrade/ParallelScheduler.java  |     2 +-
 .../state/stack/upgrade/PropertyKeyState.java   |     2 +-
 .../stack/upgrade/RepositoryVersionHelper.java  |   130 +-
 .../state/stack/upgrade/RestartGrouping.java    |     4 +-
 .../server/state/stack/upgrade/RestartTask.java |     4 +-
 .../state/stack/upgrade/SecurityCondition.java  |     2 +-
 .../state/stack/upgrade/ServerActionTask.java   |     2 +-
 .../stack/upgrade/ServerSideActionTask.java     |     2 +-
 .../stack/upgrade/ServiceCheckGrouping.java     |     7 +-
 .../state/stack/upgrade/ServiceCheckTask.java   |     4 +-
 .../state/stack/upgrade/StageWrapper.java       |     4 +-
 .../stack/upgrade/StageWrapperBuilder.java      |     2 +-
 .../state/stack/upgrade/StartGrouping.java      |     4 +-
 .../server/state/stack/upgrade/StartTask.java   |     4 +-
 .../state/stack/upgrade/StopGrouping.java       |     4 +-
 .../server/state/stack/upgrade/StopTask.java    |     4 +-
 .../ambari/server/state/stack/upgrade/Task.java |     2 +-
 .../server/state/stack/upgrade/TaskWrapper.java |     2 +-
 .../state/stack/upgrade/TaskWrapperBuilder.java |     4 +-
 .../stack/upgrade/TransferCoercionType.java     |     2 +-
 .../state/stack/upgrade/TransferOperation.java  |     2 +-
 .../stack/upgrade/UpdateStackGrouping.java      |     2 +-
 .../state/stack/upgrade/UpgradeFunction.java    |     2 +-
 .../state/stack/upgrade/UpgradeScope.java       |    11 +-
 .../server/state/stack/upgrade/UpgradeType.java |     2 +-
 .../svccomphost/ServiceComponentHostImpl.java   |   223 +-
 .../ServiceComponentHostInstallEvent.java       |     2 +-
 .../ServiceComponentHostOpFailedEvent.java      |     2 +-
 .../ServiceComponentHostOpInProgressEvent.java  |     2 +-
 .../ServiceComponentHostOpRestartedEvent.java   |     2 +-
 .../ServiceComponentHostOpSucceededEvent.java   |     2 +-
 .../ServiceComponentHostStartEvent.java         |     2 +-
 .../ServiceComponentHostStartedEvent.java       |     2 +-
 .../ServiceComponentHostStopEvent.java          |     2 +-
 .../ServiceComponentHostStoppedEvent.java       |     2 +-
 .../ServiceComponentHostSummary.java            |   106 +-
 .../ServiceComponentHostUninstallEvent.java     |     2 +-
 .../ServiceComponentHostUpgradeEvent.java       |     2 +-
 .../ServiceComponentHostWipeoutEvent.java       |     2 +-
 .../server/state/theme/ConfigCondition.java     |    15 +-
 .../server/state/theme/ConfigPlacement.java     |    25 +-
 .../ambari/server/state/theme/Layout.java       |     5 +
 .../ambari/server/state/theme/Section.java      |    22 +-
 .../ambari/server/state/theme/Subsection.java   |    13 +-
 .../apache/ambari/server/state/theme/Tab.java   |    12 +-
 .../ambari/server/state/theme/TabLayout.java    |     8 +-
 .../apache/ambari/server/state/theme/Theme.java |     9 +-
 .../server/state/theme/ThemeConfiguration.java  |    10 +-
 .../apache/ambari/server/state/theme/Unit.java  |     7 +-
 .../ambari/server/state/theme/Widget.java       |    12 +-
 .../ambari/server/state/theme/WidgetEntry.java  |     9 +-
 .../ambari/server/topology/AmbariContext.java   |    61 +-
 .../ambari/server/topology/Blueprint.java       |     5 +-
 .../server/topology/BlueprintFactory.java       |     2 +-
 .../ambari/server/topology/BlueprintImpl.java   |    39 +-
 .../server/topology/BlueprintValidator.java     |     2 +-
 .../server/topology/BlueprintValidatorImpl.java |     4 +-
 .../ambari/server/topology/Cardinality.java     |     2 +-
 .../topology/ClusterConfigurationRequest.java   |     6 +-
 .../ambari/server/topology/ClusterTopology.java |     2 +-
 .../server/topology/ClusterTopologyImpl.java    |     2 +-
 .../ambari/server/topology/Component.java       |     2 +-
 .../ambari/server/topology/Configuration.java   |     2 +-
 .../server/topology/ConfigurationFactory.java   |     2 +-
 .../ambari/server/topology/Credential.java      |     2 +-
 .../ambari/server/topology/HostGroup.java       |     2 +-
 .../ambari/server/topology/HostGroupImpl.java   |     2 +-
 .../ambari/server/topology/HostGroupInfo.java   |     2 +-
 .../ambari/server/topology/HostRequest.java     |    14 +-
 .../topology/InvalidTopologyException.java      |     2 +-
 .../InvalidTopologyTemplateException.java       |     2 +-
 .../topology/KerberosDescriptorFactory.java     |     5 +-
 .../ambari/server/topology/LogicalRequest.java  |    35 +-
 .../server/topology/LogicalRequestFactory.java  |     2 +-
 .../topology/NoSuchBlueprintException.java      |     2 +-
 .../topology/NoSuchHostGroupException.java      |     2 +-
 .../ambari/server/topology/PersistedState.java  |     9 +-
 .../server/topology/PersistedStateImpl.java     |    20 +-
 .../topology/PersistedTopologyRequest.java      |     2 +-
 .../server/topology/RepositorySetting.java      |   116 +
 .../server/topology/SecurityConfiguration.java  |     2 +-
 .../topology/SecurityConfigurationFactory.java  |     2 +-
 .../apache/ambari/server/topology/Setting.java  |     4 +-
 .../ambari/server/topology/SettingFactory.java  |     2 +-
 .../ambari/server/topology/TopologyManager.java |    44 +-
 .../ambari/server/topology/TopologyRequest.java |     2 +-
 .../server/topology/TopologyRequestFactory.java |     2 +-
 .../topology/TopologyRequestFactoryImpl.java    |     2 +-
 .../server/topology/TopologyValidator.java      |     2 +-
 .../topology/tasks/ConfigureClusterTask.java    |     2 +-
 .../tasks/ConfigureClusterTaskFactory.java      |     2 +-
 .../server/topology/tasks/TopologyHostTask.java |     4 +-
 .../server/topology/tasks/TopologyTask.java     |     2 +-
 .../validators/ClusterConfigTypeValidator.java  |     2 +-
 .../RequiredConfigPropertiesValidator.java      |    13 +-
 .../server/upgrade/AbstractUpgradeCatalog.java  |    32 +-
 .../server/upgrade/FinalUpgradeCatalog.java     |    30 +-
 .../server/upgrade/SchemaUpgradeHelper.java     |    15 +-
 .../server/upgrade/StackUpgradeHelper.java      |   171 -
 .../ambari/server/upgrade/StackUpgradeUtil.java |   198 -
 .../server/upgrade/UpgradeCatalog200.java       |   611 -
 .../server/upgrade/UpgradeCatalog210.java       |  1761 -
 .../server/upgrade/UpgradeCatalog211.java       |   295 -
 .../server/upgrade/UpgradeCatalog212.java       |   419 -
 .../server/upgrade/UpgradeCatalog2121.java      |   194 -
 .../server/upgrade/UpgradeCatalog220.java       |  1409 -
 .../server/upgrade/UpgradeCatalog221.java       |   449 -
 .../server/upgrade/UpgradeCatalog222.java       |   751 -
 .../server/upgrade/UpgradeCatalog230.java       |   402 -
 .../server/upgrade/UpgradeCatalog240.java       |  3052 -
 .../server/upgrade/UpgradeCatalog2402.java      |   121 -
 .../server/upgrade/UpgradeCatalog242.java       |   272 -
 .../server/upgrade/UpgradeCatalog250.java       |  1337 -
 .../server/upgrade/UpgradeCatalog251.java       |    54 +-
 .../server/upgrade/UpgradeCatalog252.java       |    63 +-
 .../server/upgrade/UpgradeCatalog300.java       |    53 +-
 .../apache/ambari/server/utils/AmbariPath.java  |     2 +-
 .../ambari/server/utils/CommandUtils.java       |     2 +-
 .../apache/ambari/server/utils/DateUtils.java   |     2 +-
 .../server/utils/EventBusSynchronizer.java      |     2 +-
 .../apache/ambari/server/utils/HTTPUtils.java   |     5 +-
 .../apache/ambari/server/utils/HostAndPort.java |     4 +-
 .../ambari/server/utils/JaxbMapKeyList.java     |     2 +-
 .../server/utils/JaxbMapKeyListAdapter.java     |     2 +-
 .../ambari/server/utils/JaxbMapKeyMap.java      |     2 +-
 .../server/utils/JaxbMapKeyMapAdapter.java      |     2 +-
 .../ambari/server/utils/JaxbMapKeyVal.java      |     2 +-
 .../server/utils/JaxbMapKeyValAdapter.java      |     2 +-
 .../apache/ambari/server/utils/LoopBody.java    |     4 +-
 .../apache/ambari/server/utils/Parallel.java    |     2 +-
 .../ambari/server/utils/ParallelLoopResult.java |     2 +-
 .../ambari/server/utils/RequestUtils.java       |     2 +-
 .../ambari/server/utils/SecretReference.java    |     4 +-
 .../apache/ambari/server/utils/SetUtils.java    |     2 +-
 .../ambari/server/utils/ShellCommandUtil.java   |    31 +-
 .../apache/ambari/server/utils/StageUtils.java  |    70 +-
 .../ambari/server/utils/VersionUtils.java       |     2 +-
 .../apache/ambari/server/view/ClusterImpl.java  |     2 +-
 .../ambari/server/view/DefaultMasker.java       |     2 +-
 .../ambari/server/view/DirectoryWatcher.java    |     2 +-
 .../server/view/HttpImpersonatorImpl.java       |     4 +-
 .../server/view/IllegalClusterException.java    |     2 +-
 .../server/view/ImpersonatorSettingImpl.java    |     2 +-
 .../ambari/server/view/RemoteAmbariCluster.java |     2 +-
 .../view/RemoteAmbariClusterRegistry.java       |     2 +-
 .../RemoteAmbariConfigurationReadException.java |     2 +-
 .../server/view/RemoteAmbariStreamProvider.java |     2 +-
 .../server/view/ViewAmbariStreamProvider.java   |     4 +-
 .../ambari/server/view/ViewArchiveUtility.java  |     2 +-
 .../ambari/server/view/ViewClassLoader.java     |     2 +-
 .../ambari/server/view/ViewContextImpl.java     |     8 +-
 .../view/ViewDataMigrationContextImpl.java      |     8 +-
 .../server/view/ViewDataMigrationUtility.java   |     6 +-
 .../server/view/ViewDirectoryWatcher.java       |     8 +-
 .../view/ViewExternalSubResourceProvider.java   |     2 +-
 .../ambari/server/view/ViewExtractor.java       |    10 +-
 .../server/view/ViewInstanceHandlerList.java    |     2 +-
 .../ambari/server/view/ViewProviderModule.java  |     2 +-
 .../apache/ambari/server/view/ViewRegistry.java |    58 +-
 .../server/view/ViewSubResourceDefinition.java  |     2 +-
 .../server/view/ViewSubResourceProvider.java    |     2 +-
 .../ambari/server/view/ViewThrottleFilter.java  |     2 +-
 .../server/view/ViewURLStreamProvider.java      |    16 +-
 .../server/view/configuration/EntityConfig.java |     2 +-
 .../view/configuration/InstanceConfig.java      |     2 +-
 .../view/configuration/ParameterConfig.java     |     2 +-
 .../view/configuration/PermissionConfig.java    |     2 +-
 .../view/configuration/PersistenceConfig.java   |     2 +-
 .../view/configuration/PropertyConfig.java      |     2 +-
 .../view/configuration/ResourceConfig.java      |     2 +-
 .../server/view/configuration/ViewConfig.java   |     2 +-
 .../ambari/server/view/events/EventImpl.java    |     2 +-
 .../server/view/persistence/DataStoreImpl.java  |     2 +-
 .../view/persistence/DataStoreModule.java       |     4 +-
 .../view/persistence/SchemaManagerFactory.java  |     2 +-
 .../InstanceValidationResultImpl.java           |     2 +-
 .../view/validation/ValidationException.java    |     2 +-
 .../view/validation/ValidationResultImpl.java   |     2 +-
 ambari-server/src/main/python/ambari-server.py  |    28 +-
 .../src/main/python/ambari_server/dbCleanup.py  |    34 +-
 .../ambari_server/dbConfiguration_linux.py      |    61 +-
 .../python/ambari_server/serverConfiguration.py |     6 +
 .../main/python/ambari_server/serverSetup.py    |   105 +-
 .../main/python/ambari_server/serverUpgrade.py  |   162 +-
 .../main/python/ambari_server/setupActions.py   |     3 +-
 .../main/python/ambari_server/setupMpacks.py    |     4 +-
 .../main/python/ambari_server/setupSecurity.py  |     4 -
 .../src/main/python/ambari_server_main.py       |     2 +-
 ambari-server/src/main/python/upgradeHelper.py  |  2338 -
 .../main/resources/Ambari-DDL-Derby-CREATE.sql  |    57 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |    54 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |    72 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql    |    58 +-
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |    61 +-
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |    57 +-
 .../src/main/resources/META-INF/persistence.xml |     4 +-
 .../1.6.1.2.2.0/configuration/accumulo-env.xml  |     5 +
 .../package/scripts/accumulo_configuration.py   |     3 +
 .../1.6.1.2.2.0/package/scripts/params.py       |     5 +-
 .../package/templates/accumulo_jaas.conf.j2     |    29 +
 .../hadoop-metrics2-accumulo.properties.j2      |     2 -
 .../0.1.0/package/scripts/params.py             |     7 +-
 .../0.1.0/package/scripts/setup_infra_solr.py   |    17 +-
 .../AMBARI_INFRA/0.1.0/service_advisor.py       |   133 +
 .../0.1.0/configuration/ams-hbase-env.xml       |     4 +-
 .../0.1.0/package/scripts/params.py             |    10 +-
 .../hadoop-metrics2-hbase.properties.j2         |     2 -
 .../package/templates/hbase_master_jaas.conf.j2 |    10 +
 .../templates/hbase_regionserver_jaas.conf.j2   |    10 +
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py |     8 +-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |     5 +-
 .../configuration/application-properties.xml    |    10 +-
 .../ATLAS/0.7.0.3.0/configuration/atlas-env.xml |     6 +
 .../ATLAS/0.7.0.3.0/package/scripts/params.py   |     4 +-
 .../DRUID/0.9.2/configuration/druid-env.xml     |     2 +-
 .../DRUID/0.9.2/package/scripts/druid.py        |     7 +
 .../DRUID/0.9.2/package/scripts/params.py       |     1 +
 .../1.4.0.2.0/configuration/flume-log4j.xml     |    96 +
 .../FLUME/1.4.0.2.0/package/scripts/flume.py    |     4 +-
 .../templates/flume-metrics2.properties.j2      |     3 -
 .../HBASE/0.96.0.2.0/package/scripts/hbase.py   |    12 +-
 .../0.96.0.2.0/package/scripts/params_linux.py  |     3 +
 ...-metrics2-hbase.properties-GANGLIA-MASTER.j2 |     2 -
 ...doop-metrics2-hbase.properties-GANGLIA-RS.j2 |     2 -
 .../package/templates/hbase_master_jaas.conf.j2 |    10 +
 .../templates/hbase_regionserver_jaas.conf.j2   |    10 +
 .../HBASE/0.96.0.2.0/role_command_order.json    |     3 +-
 .../HBASE/2.0.0.3.0/configuration/hbase-env.xml |     4 +-
 .../package/templates/hbase_master_jaas.conf.j2 |    10 +
 .../templates/hbase_regionserver_jaas.conf.j2   |    10 +
 .../HBASE/2.0.0.3.0/role_command_order.json     |     2 +-
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml |     4 -
 .../HDFS/2.1.0.2.0/package/scripts/hdfs.py      |    17 +
 .../2.1.0.2.0/package/scripts/hdfs_namenode.py  |    14 +-
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  |     2 +-
 .../package/scripts/namenode_upgrade.py         |     2 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |     8 +-
 .../package/templates/hdfs_dn_jaas.conf.j2      |    27 +
 .../package/templates/hdfs_jn_jaas.conf.j2      |    27 +
 .../package/templates/hdfs_nn_jaas.conf.j2      |    27 +
 .../hadoop-metrics2.properties.xml              |     2 -
 .../common-services/HDFS/3.0.0.3.0/metainfo.xml |     4 -
 .../HDFS/3.0.0.3.0/package/scripts/hdfs.py      |    17 +
 .../3.0.0.3.0/package/scripts/hdfs_namenode.py  |    10 +-
 .../HDFS/3.0.0.3.0/package/scripts/namenode.py  |     2 +-
 .../3.0.0.3.0/package/scripts/params_linux.py   |     2 +
 .../HDFS/3.0.0.3.0/package/scripts/utils.py     |     2 +-
 .../package/templates/hdfs_dn_jaas.conf.j2      |    27 +
 .../package/templates/hdfs_jn_jaas.conf.j2      |    27 +
 .../package/templates/hdfs_nn_jaas.conf.j2      |    27 +
 .../HDFS/3.0.0.3.0/service_advisor.py           |    53 +
 .../HIVE/0.12.0.2.0/configuration/hive-site.xml |     2 +-
 .../HIVE/0.12.0.2.0/metainfo.xml                |    20 +-
 .../package/alerts/alert_hive_metastore.py      |    11 +-
 .../package/alerts/alert_llap_app_status.py     |    12 +-
 .../HIVE/0.12.0.2.0/package/scripts/hive.py     |     8 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |     7 +-
 .../hadoop-metrics2-hivemetastore.properties.j2 |     2 -
 .../hadoop-metrics2-hiveserver2.properties.j2   |     2 -
 .../templates/hadoop-metrics2-llapdaemon.j2     |     2 -
 .../hadoop-metrics2-llaptaskscheduler.j2        |     2 -
 .../2.1.0.3.0/configuration/parquet-logging.xml |   106 +
 .../configuration/ranger-hive-security.xml      |     9 +
 .../common-services/HIVE/2.1.0.3.0/metainfo.xml |     7 +
 .../HIVE/2.1.0.3.0/package/scripts/hive.py      |    40 +-
 .../2.1.0.3.0/package/scripts/params_linux.py   |     7 +-
 .../hadoop-metrics2-hivemetastore.properties.j2 |     2 -
 .../hadoop-metrics2-hiveserver2.properties.j2   |     2 -
 .../templates/hadoop-metrics2-llapdaemon.j2     |     2 -
 .../hadoop-metrics2-llaptaskscheduler.j2        |     2 -
 .../HIVE/2.1.0.3.0/service_advisor.py           |    19 +
 .../0.10.0.3.0/configuration/kafka-broker.xml   |    10 -
 .../KAFKA/0.10.0.3.0/kerberos.json              |     3 +
 .../common-services/KAFKA/0.10.0/kerberos.json  |     3 +
 .../KAFKA/0.8.1/configuration/kafka-broker.xml  |    10 -
 .../KAFKA/0.8.1/configuration/kafka-env.xml     |     4 +
 .../0.8.1/configuration/kafka_jaas_conf.xml     |    11 +
 .../0.8.1/package/templates/kafka_jaas.conf.j2  |    11 +
 .../common-services/KAFKA/0.9.0/kerberos.json   |     3 +
 .../package/templates/krb5JAASLogin.conf.j2     |     9 +-
 .../package/templates/krb5JAASLogin.conf.j2     |     9 +-
 .../LOGSEARCH/0.5.0/metainfo.xml                |    24 -
 .../LOGSEARCH/0.5.0/package/scripts/params.py   |     5 +-
 .../package/templates/global.config.json.j2     |     3 +-
 .../package/templates/input.config-nifi.json.j2 |    79 -
 .../properties/audit_logs-solrconfig.xml.j2     |     3 +-
 .../0.5.0/properties/logfeeder-log4j.xml.j2     |     2 +-
 .../0.5.0/properties/logsearch-log4j.xml.j2     |     2 +-
 .../properties/service_logs-solrconfig.xml.j2   |     3 +-
 .../LOGSEARCH/0.5.0/service_advisor.py          |   195 +
 .../package/alerts/alert_check_oozie_server.py  |     8 +-
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py    |     9 +-
 .../common-services/OOZIE/4.2.0.3.0/alerts.json |    45 +
 .../OOZIE/4.2.0.3.0/configuration/oozie-env.xml |   255 +
 .../4.2.0.3.0/configuration/oozie-log4j.xml     |   149 +
 .../4.2.0.3.0/configuration/oozie-site.xml      |   254 +
 .../OOZIE/4.2.0.3.0/kerberos.json               |    70 +
 .../OOZIE/4.2.0.3.0/metainfo.xml                |   203 +
 .../package/alerts/alert_check_oozie_server.py  |   244 +
 .../4.2.0.3.0/package/files/oozieSmoke2.sh      |    84 +
 .../files/prepareOozieHdfsDirectories.sh        |    42 +
 .../4.2.0.3.0/package/files/wrap_ooziedb.sh     |    31 +
 .../scripts/check_oozie_server_status.py        |    38 +
 .../OOZIE/4.2.0.3.0/package/scripts/oozie.py    |   511 +
 .../4.2.0.3.0/package/scripts/oozie_client.py   |    78 +
 .../4.2.0.3.0/package/scripts/oozie_server.py   |   163 +
 .../package/scripts/oozie_server_upgrade.py     |   237 +
 .../4.2.0.3.0/package/scripts/oozie_service.py  |   188 +
 .../OOZIE/4.2.0.3.0/package/scripts/params.py   |    39 +
 .../4.2.0.3.0/package/scripts/params_linux.py   |   374 +
 .../4.2.0.3.0/package/scripts/params_windows.py |    34 +
 .../4.2.0.3.0/package/scripts/service_check.py  |   140 +
 .../4.2.0.3.0/package/scripts/status_params.py  |    65 +
 .../package/templates/adminusers.txt.j2         |    28 +
 .../templates/input.config-oozie.json.j2        |    48 +
 .../package/templates/oozie-log4j.properties.j2 |    93 +
 .../4.2.0.3.0/package/templates/oozie.conf.j2   |    35 +
 .../package/templates/zkmigrator_jaas.conf.j2   |    26 +
 .../OOZIE/4.2.0.3.0/quicklinks/quicklinks.json  |    45 +
 .../OOZIE/4.2.0.3.0/role_command_order.json     |     9 +
 .../OOZIE/4.2.0.3.0/service_advisor.py          |   314 +
 .../OOZIE/4.2.0.3.0/themes/theme.json           |   116 +
 .../PXF/3.0.0/configuration/pxf-profiles.xml    |    25 +
 .../RANGER/0.4.0/package/scripts/params.py      |     5 +-
 .../0.4.0/package/scripts/ranger_admin.py       |    11 +-
 .../0.4.0/package/scripts/setup_ranger_xml.py   |    35 +-
 .../0.5.0/configuration/ranger-ugsync-site.xml  |     3 +
 .../RANGER/0.7.0.3.0/alerts.json                |    76 -
 .../0.7.0.3.0/configuration/admin-log4j.xml     |   132 -
 .../configuration/admin-properties.xml          |   163 -
 .../configuration/atlas-tagsync-ssl.xml         |    72 -
 .../configuration/ranger-admin-site.xml         |   785 -
 .../0.7.0.3.0/configuration/ranger-env.xml      |   513 -
 .../0.7.0.3.0/configuration/ranger-site.xml     |    30 -
 .../configuration/ranger-solr-configuration.xml |    59 -
 .../ranger-tagsync-policymgr-ssl.xml            |    72 -
 .../configuration/ranger-tagsync-site.xml       |   206 -
 .../configuration/ranger-ugsync-site.xml        |   574 -
 .../tagsync-application-properties.xml          |    62 -
 .../0.7.0.3.0/configuration/tagsync-log4j.xml   |    90 -
 .../0.7.0.3.0/configuration/usersync-log4j.xml  |    89 -
 .../configuration/usersync-properties.xml       |    32 -
 .../RANGER/0.7.0.3.0/kerberos.json              |   153 -
 .../RANGER/0.7.0.3.0/metainfo.xml               |   189 -
 .../alerts/alert_ranger_admin_passwd_check.py   |   195 -
 .../RANGER/0.7.0.3.0/package/scripts/params.py  |   448 -
 .../0.7.0.3.0/package/scripts/ranger_admin.py   |   217 -
 .../0.7.0.3.0/package/scripts/ranger_service.py |    69 -
 .../0.7.0.3.0/package/scripts/ranger_tagsync.py |   139 -
 .../package/scripts/ranger_usersync.py          |   124 -
 .../0.7.0.3.0/package/scripts/service_check.py  |    49 -
 .../0.7.0.3.0/package/scripts/setup_ranger.py   |   153 -
 .../package/scripts/setup_ranger_xml.py         |   853 -
 .../0.7.0.3.0/package/scripts/status_params.py  |    39 -
 .../RANGER/0.7.0.3.0/package/scripts/upgrade.py |    31 -
 .../templates/input.config-ranger.json.j2       |    79 -
 .../package/templates/ranger_admin_pam.j2       |    22 -
 .../package/templates/ranger_remote_pam.j2      |    22 -
 .../package/templates/ranger_solr_jaas_conf.j2  |    26 -
 .../properties/ranger-solrconfig.xml.j2         |  1874 -
 .../RANGER/0.7.0.3.0/quicklinks/quicklinks.json |    41 -
 .../RANGER/0.7.0.3.0/role_command_order.json    |     9 -
 .../RANGER/0.7.0.3.0/service_advisor.py         |   793 -
 .../0.7.0.3.0/themes/theme_version_1.json       |   722 -
 .../0.7.0.3.0/themes/theme_version_2.json       |  1470 -
 .../0.7.0.3.0/themes/theme_version_3.json       |   692 -
 .../0.7.0.3.0/themes/theme_version_5.json       |    48 -
 .../RANGER/1.0.0.3.0/alerts.json                |    76 +
 .../1.0.0.3.0/configuration/admin-log4j.xml     |   132 +
 .../configuration/admin-properties.xml          |   161 +
 .../configuration/atlas-tagsync-ssl.xml         |    72 +
 .../configuration/ranger-admin-site.xml         |   751 +
 .../1.0.0.3.0/configuration/ranger-env.xml      |   503 +
 .../configuration/ranger-solr-configuration.xml |    59 +
 .../ranger-tagsync-policymgr-ssl.xml            |    72 +
 .../configuration/ranger-tagsync-site.xml       |   201 +
 .../configuration/ranger-ugsync-site.xml        |   571 +
 .../tagsync-application-properties.xml          |    62 +
 .../1.0.0.3.0/configuration/tagsync-log4j.xml   |    90 +
 .../1.0.0.3.0/configuration/usersync-log4j.xml  |    89 +
 .../RANGER/1.0.0.3.0/kerberos.json              |   153 +
 .../RANGER/1.0.0.3.0/metainfo.xml               |   177 +
 .../alerts/alert_ranger_admin_passwd_check.py   |   195 +
 .../RANGER/1.0.0.3.0/package/scripts/params.py  |   449 +
 .../1.0.0.3.0/package/scripts/ranger_admin.py   |   210 +
 .../1.0.0.3.0/package/scripts/ranger_service.py |    69 +
 .../1.0.0.3.0/package/scripts/ranger_tagsync.py |   139 +
 .../package/scripts/ranger_usersync.py          |   120 +
 .../1.0.0.3.0/package/scripts/service_check.py  |    49 +
 .../package/scripts/setup_ranger_xml.py         |   853 +
 .../1.0.0.3.0/package/scripts/status_params.py  |    39 +
 .../RANGER/1.0.0.3.0/package/scripts/upgrade.py |    31 +
 .../templates/input.config-ranger.json.j2       |    79 +
 .../package/templates/ranger_admin_pam.j2       |    22 +
 .../package/templates/ranger_remote_pam.j2      |    22 +
 .../package/templates/ranger_solr_jaas_conf.j2  |    26 +
 .../properties/ranger-solrconfig.xml.j2         |  1874 +
 .../RANGER/1.0.0.3.0/quicklinks/quicklinks.json |    41 +
 .../RANGER/1.0.0.3.0/role_command_order.json    |     9 +
 .../RANGER/1.0.0.3.0/service_advisor.py         |   774 +
 .../1.0.0.3.0/themes/theme_version_1.json       |  1821 +
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py |     8 +
 .../0.5.0.2.3/package/scripts/kms_server.py     |    10 +-
 .../RANGER_KMS/0.5.0.3.0/alerts.json            |    32 -
 .../0.5.0.3.0/configuration/dbks-site.xml       |   206 -
 .../0.5.0.3.0/configuration/kms-env.xml         |   116 -
 .../0.5.0.3.0/configuration/kms-log4j.xml       |   120 -
 .../0.5.0.3.0/configuration/kms-properties.xml  |   166 -
 .../0.5.0.3.0/configuration/kms-site.xml        |   133 -
 .../configuration/ranger-kms-audit.xml          |   124 -
 .../configuration/ranger-kms-policymgr-ssl.xml  |    68 -
 .../configuration/ranger-kms-security.xml       |    64 -
 .../0.5.0.3.0/configuration/ranger-kms-site.xml |   104 -
 .../RANGER_KMS/0.5.0.3.0/kerberos.json          |    84 -
 .../RANGER_KMS/0.5.0.3.0/metainfo.xml           |   115 -
 .../RANGER_KMS/0.5.0.3.0/package/scripts/kms.py |   677 -
 .../0.5.0.3.0/package/scripts/kms_server.py     |   117 -
 .../0.5.0.3.0/package/scripts/kms_service.py    |    58 -
 .../0.5.0.3.0/package/scripts/params.py         |   331 -
 .../0.5.0.3.0/package/scripts/service_check.py  |    41 -
 .../0.5.0.3.0/package/scripts/status_params.py  |    36 -
 .../0.5.0.3.0/package/scripts/upgrade.py        |    30 -
 .../templates/input.config-ranger-kms.json.j2   |    48 -
 .../0.5.0.3.0/role_command_order.json           |     7 -
 .../RANGER_KMS/0.5.0.3.0/service_advisor.py     |   281 -
 .../0.5.0.3.0/themes/theme_version_1.json       |   303 -
 .../0.5.0.3.0/themes/theme_version_2.json       |   124 -
 .../RANGER_KMS/1.0.0.3.0/alerts.json            |    32 +
 .../1.0.0.3.0/configuration/dbks-site.xml       |   206 +
 .../1.0.0.3.0/configuration/kms-env.xml         |   115 +
 .../1.0.0.3.0/configuration/kms-log4j.xml       |   120 +
 .../1.0.0.3.0/configuration/kms-properties.xml  |   166 +
 .../1.0.0.3.0/configuration/kms-site.xml        |   133 +
 .../configuration/ranger-kms-audit.xml          |   118 +
 .../configuration/ranger-kms-policymgr-ssl.xml  |    68 +
 .../configuration/ranger-kms-security.xml       |    64 +
 .../1.0.0.3.0/configuration/ranger-kms-site.xml |   110 +
 .../RANGER_KMS/1.0.0.3.0/kerberos.json          |    84 +
 .../RANGER_KMS/1.0.0.3.0/metainfo.xml           |   111 +
 .../RANGER_KMS/1.0.0.3.0/package/scripts/kms.py |   675 +
 .../1.0.0.3.0/package/scripts/kms_server.py     |   117 +
 .../1.0.0.3.0/package/scripts/kms_service.py    |    58 +
 .../1.0.0.3.0/package/scripts/params.py         |   331 +
 .../1.0.0.3.0/package/scripts/service_check.py  |    41 +
 .../1.0.0.3.0/package/scripts/status_params.py  |    36 +
 .../1.0.0.3.0/package/scripts/upgrade.py        |    30 +
 .../templates/input.config-ranger-kms.json.j2   |    48 +
 .../1.0.0.3.0/role_command_order.json           |     7 +
 .../RANGER_KMS/1.0.0.3.0/service_advisor.py     |   358 +
 .../1.0.0.3.0/themes/theme_version_1.json       |   409 +
 .../scripts/alerts/alert_spark_thrift_port.py   |     5 +-
 .../scripts/alerts/alert_spark2_thrift_port.py  |     5 +-
 .../STORM/0.9.1/package/scripts/nimbus.py       |     8 +-
 .../STORM/0.9.1/package/scripts/params_linux.py |     2 -
 .../0.9.1/package/scripts/storm_yaml_utils.py   |     5 +-
 .../0.9.1/package/templates/config.yaml.j2      |     3 -
 .../templates/storm-metrics2.properties.j2      |     2 -
 .../0.9.1/package/templates/storm_jaas.conf.j2  |    10 +
 .../1.0.1.3.0/package/scripts/params_linux.py   |     2 -
 .../1.0.1.3.0/package/templates/config.yaml.j2  |     3 -
 .../templates/storm-metrics2.properties.j2      |     2 -
 .../STORM/1.1.0/configuration/storm-site.xml    |    36 +-
 .../common-services/STORM/1.1.0/kerberos.json   |     6 +-
 .../common-services/YARN/2.1.0.2.0/metainfo.xml |     1 +
 .../2.1.0.2.0/package/scripts/params_linux.py   |    32 +-
 .../package/scripts/resourcemanager.py          |     2 +-
 .../YARN/2.1.0.2.0/package/scripts/yarn.py      |    18 +-
 .../package/templates/mapred_jaas.conf.j2       |    28 +
 .../package/templates/yarn_ats_jaas.conf.j2     |    27 +
 .../package/templates/yarn_jaas.conf.j2         |    12 +-
 .../package/templates/yarn_nm_jaas.conf.j2      |    27 +
 .../configuration-mapred/mapred-env.xml         |     4 +-
 .../YARN/3.0.0.3.0/configuration/yarn-env.xml   |    15 +-
 .../YARN/3.0.0.3.0/kerberos.json                |     4 +-
 .../common-services/YARN/3.0.0.3.0/metainfo.xml |     1 +
 .../3.0.0.3.0/package/scripts/params_linux.py   |    32 +-
 .../package/scripts/resourcemanager.py          |     2 +-
 .../YARN/3.0.0.3.0/package/scripts/yarn.py      |    20 +-
 .../package/templates/mapred_jaas.conf.j2       |    28 +
 .../package/templates/yarn_ats_jaas.conf.j2     |    27 +
 .../package/templates/yarn_jaas.conf.j2         |    12 +-
 .../package/templates/yarn_nm_jaas.conf.j2      |    27 +
 .../YARN/3.0.0.3.0/service_advisor.py           |     4 +-
 .../0.6.0.2.5/configuration/zeppelin-config.xml |     7 +
 .../0.6.0.2.5/configuration/zeppelin-env.xml    |     5 +
 .../scripts/interpreter_json_template.py        |   361 +
 .../0.6.0.2.5/package/scripts/master.py         |    40 +-
 .../0.6.0.2.5/package/scripts/params.py         |    23 +
 .../ZEPPELIN/0.6.0.3.0/alerts.json              |    18 +
 .../0.6.0.3.0/configuration/zeppelin-config.xml |   189 +
 .../0.6.0.3.0/configuration/zeppelin-env.xml    |   185 +
 .../configuration/zeppelin-log4j-properties.xml |    37 +
 .../configuration/zeppelin-shiro-ini.xml        |    90 +
 .../ZEPPELIN/0.6.0.3.0/kerberos.json            |    53 +
 .../ZEPPELIN/0.6.0.3.0/metainfo.xml             |   111 +
 .../package/scripts/alert_check_zeppelin.py     |    47 +
 .../package/scripts/livy2_config_template.py    |   107 +
 .../0.6.0.3.0/package/scripts/master.py         |   448 +
 .../0.6.0.3.0/package/scripts/params.py         |   228 +
 .../0.6.0.3.0/package/scripts/service_check.py  |    39 +
 .../package/scripts/spark2_config_template.py   |    84 +
 .../0.6.0.3.0/package/scripts/status_params.py  |    29 +
 .../templates/input.config-zeppelin.json.j2     |    48 +
 .../0.6.0.3.0/quicklinks/quicklinks.json        |    35 +
 .../ZEPPELIN/0.6.0.3.0/role_command_order.json  |     7 +
 .../ZEPPELIN/0.6.0.3.0/service_advisor.py       |   167 +
 .../custom_actions/scripts/install_packages.py  |    94 +-
 .../custom_actions/scripts/ru_set_all.py        |    49 +-
 .../resources/host_scripts/alert_disk_space.py  |    24 +-
 .../host_scripts/alert_version_select.py        |    16 +-
 .../src/main/resources/key_properties.json      |    10 -
 .../src/main/resources/properties.json          |    40 +-
 .../HDP/2.0.6/configuration/cluster-env.xml     |    28 +-
 .../2.0.6/hooks/before-ANY/scripts/params.py    |     2 +
 .../before-ANY/scripts/shared_initialization.py |    30 +-
 .../hooks/before-INSTALL/scripts/params.py      |     2 +
 .../scripts/repo_initialization.py              |    22 +-
 .../2.0.6/hooks/before-START/scripts/params.py  |     4 +
 .../scripts/shared_initialization.py            |    22 +-
 .../templates/hadoop-metrics2.properties.j2     |     2 -
 .../HDP/2.0.6/properties/stack_features.json    |   848 +-
 .../HDP/2.0.6/properties/stack_tools.json       |    16 +-
 .../services/HIVE/configuration/hive-site.xml   |     2 +-
 .../YARN/configuration-mapred/mapred-env.xml    |     4 +-
 .../services/YARN/configuration/yarn-site.xml   |     8 +-
 .../stacks/HDP/2.2/services/stack_advisor.py    |    66 -
 .../services/HBASE/configuration/hbase-env.xml  |     4 +-
 .../services/HDFS/configuration/hadoop-env.xml  |     7 +
 .../services/YARN/configuration/yarn-env.xml    |    16 +-
 .../stacks/HDP/2.3/upgrades/config-upgrade.xml  |     8 -
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml |     6 -
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml     |     1 -
 .../services/HDFS/configuration/hadoop-env.xml  |     7 +
 .../stacks/HDP/2.4/upgrades/config-upgrade.xml  |     6 +-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml |     6 -
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml     |     1 -
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml  |    20 +-
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |    13 +-
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml     |     9 +-
 .../resources/stacks/HDP/2.6/repos/repoinfo.xml |    14 +
 .../services/ATLAS/configuration/atlas-env.xml  |     6 +
 .../hadoop-metrics2.properties.xml              |     2 -
 .../HIVE/configuration/parquet-logging.xml      |   106 +
 .../HIVE/configuration/ranger-hive-security.xml |    33 +
 .../HIVE/configuration/tez-interactive-site.xml |    12 +
 .../configuration/spark-thrift-sparkconf.xml    |    40 +
 .../services/SPARK2/configuration/livy2-env.xml |     4 +-
 .../configuration/spark2-thrift-sparkconf.xml   |    40 +
 .../services/STORM/configuration/storm-site.xml |    61 +
 .../stacks/HDP/2.6/services/STORM/metainfo.xml  |     6 +-
 .../YARN/configuration-mapred/mapred-site.xml   |     2 +-
 .../services/YARN/configuration/yarn-env.xml    |    15 +-
 .../services/YARN/configuration/yarn-site.xml   |    15 +-
 .../stacks/HDP/2.6/services/YARN/kerberos.json  |     4 +-
 .../HDP/2.6/services/ZEPPELIN/metainfo.xml      |     2 +-
 .../stacks/HDP/2.6/services/stack_advisor.py    |    57 +-
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |    47 +-
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |    43 +-
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml     |    35 +-
 .../HDP/3.0/configuration/cluster-env.xml       |    12 +
 .../3.0/hooks/after-INSTALL/scripts/params.py   |    14 +
 .../scripts/shared_initialization.py            |    17 +
 .../HDP/3.0/hooks/before-ANY/scripts/params.py  |     3 +
 .../before-ANY/scripts/shared_initialization.py |    31 +-
 .../3.0/hooks/before-INSTALL/scripts/params.py  |     2 +
 .../scripts/repo_initialization.py              |     8 +
 .../3.0/hooks/before-START/scripts/params.py    |     4 +
 .../scripts/shared_initialization.py            |    22 +-
 .../templates/hadoop-metrics2.properties.j2     |     2 -
 .../main/resources/stacks/HDP/3.0/metainfo.xml  |     2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |     7 +
 .../stacks/HDP/3.0/services/OOZIE/metainfo.xml  |    27 +
 .../stacks/HDP/3.0/services/RANGER/metainfo.xml |     4 +-
 .../HDP/3.0/services/RANGER_KMS/metainfo.xml    |     4 +-
 .../YARN/configuration-mapred/mapred-env.xml    |     4 +-
 .../HDP/3.0/services/ZEPPELIN/metainfo.xml      |    27 +
 .../PERF/1.0/configuration/cluster-env.xml      |    16 +-
 .../PERF/1.0/hooks/before-ANY/scripts/params.py |     3 +
 .../before-ANY/scripts/shared_initialization.py |    23 +-
 .../PERF/1.0/properties/stack_features.json     |    38 +-
 .../stacks/PERF/1.0/properties/stack_tools.json |    16 +-
 .../src/main/resources/stacks/stack_advisor.py  |   118 +-
 .../catalog/UpgradeCatalog_1.3_to_2.2.json      |   948 -
 .../catalog/UpgradeCatalog_2.0_to_2.2.2.json    |   408 -
 .../catalog/UpgradeCatalog_2.0_to_2.2.4.json    |   453 -
 .../catalog/UpgradeCatalog_2.0_to_2.2.json      |   275 -
 .../catalog/UpgradeCatalog_2.1_to_2.2.2.json    |   465 -
 .../catalog/UpgradeCatalog_2.1_to_2.2.4.json    |   499 -
 .../catalog/UpgradeCatalog_2.1_to_2.2.json      |   292 -
 .../catalog/UpgradeCatalog_2.1_to_2.3.json      |   440 -
 .../catalog/UpgradeCatalog_2.2_to_2.3.json      |  2234 -
 .../UpgradeCatalog_2.2_to_2.3_step2.json        |    81 -
 .../apache/ambari/server/H2DatabaseCleaner.java |     2 +-
 .../ambari/server/RandomPortJerseyTest.java     |     2 +-
 .../ambari/server/StateRecoveryManagerTest.java |    68 +-
 .../actionmanager/ActionManagerTestHelper.java  |     2 +-
 .../ExecutionCommandWrapperTest.java            |    11 +-
 .../actionmanager/HostRoleStatusTest.java       |     2 +-
 .../ambari/server/actionmanager/StageTest.java  |     2 +-
 .../actionmanager/TestActionDBAccessorImpl.java |     2 +-
 .../server/actionmanager/TestActionManager.java |     2 +-
 .../actionmanager/TestActionScheduler.java      |     2 +-
 .../TestActionSchedulerThreading.java           |    37 +-
 .../ambari/server/actionmanager/TestStage.java  |     2 +-
 .../ambari/server/agent/AgentHostInfoTest.java  |     2 +-
 .../ambari/server/agent/AgentResourceTest.java  |    10 +-
 .../server/agent/DummyHeartbeatConstants.java   |     1 +
 .../server/agent/HeartbeatProcessorTest.java    |   174 +-
 .../server/agent/HeartbeatTestHelper.java       |    18 +-
 .../server/agent/LocalAgentSimulator.java       |    13 +-
 .../ambari/server/agent/TestActionQueue.java    |     4 +-
 .../server/agent/TestHeartbeatHandler.java      |   122 +-
 .../server/agent/TestHeartbeatMonitor.java      |    45 +-
 .../alerts/AgentHeartbeatAlertRunnableTest.java |     2 +-
 .../alerts/AmbariPerformanceRunnableTest.java   |     2 +-
 .../ComponentVersionAlertRunnableTest.java      |    33 +-
 .../server/alerts/StaleAlertRunnableTest.java   |     2 +-
 .../org/apache/ambari/server/api/TestSuite.java |    12 +-
 .../server/api/UserNameOverrideFilterTest.java  |     2 +-
 .../server/api/handlers/CreateHandlerTest.java  |     2 +-
 .../server/api/handlers/DeleteHandlerTest.java  |     5 +-
 .../api/handlers/QueryCreateHandlerTest.java    |     2 +-
 .../server/api/handlers/ReadHandlerTest.java    |     2 +-
 .../server/api/handlers/UpdateHandlerTest.java  |     4 +-
 .../server/api/predicate/QueryLexerTest.java    |     2 +-
 .../server/api/predicate/QueryParserTest.java   |     2 +-
 .../predicate/operators/AndOperatorTest.java    |     4 +-
 .../predicate/operators/EqualsOperatorTest.java |     4 +-
 .../predicate/operators/FilterOperatorTest.java |     2 +-
 .../operators/GreaterEqualsOperatorTest.java    |     4 +-
 .../operators/GreaterOperatorTest.java          |     4 +-
 .../api/predicate/operators/InOperatorTest.java |     2 +-
 .../operators/IsEmptyOperatorTest.java          |     2 +-
 .../operators/LessEqualsOperatorTest.java       |     4 +-
 .../predicate/operators/LessOperatorTest.java   |     4 +-
 .../operators/NotEqualsOperatorTest.java        |     4 +-
 .../predicate/operators/NotOperatorTest.java    |     4 +-
 .../api/predicate/operators/OrOperatorTest.java |     4 +-
 .../ExtendedResourcePredicateVisitorTest.java   |     2 +-
 .../server/api/query/JpaSortBuilderTest.java    |     2 +-
 .../query/ProcessingPredicateVisitorTest.java   |     2 +-
 .../ambari/server/api/query/QueryImplTest.java  |     2 +-
 .../ambari/server/api/query/QueryInfoTest.java  |     2 +-
 .../query/SubResourcePredicateVisitorTest.java  |     2 +-
 .../render/ClusterBlueprintRendererTest.java    |     2 +-
 .../api/query/render/DefaultRendererTest.java   |     2 +-
 .../render/MetricsPaddingRendererTest.java      |     2 +-
 .../api/query/render/MinimalRendererTest.java   |     2 +-
 .../resources/BaseResourceDefinitionTest.java   |    29 +-
 .../BlueprintResourceDefinitionTest.java        |     2 +-
 .../ClusterResourceDefinitionTest.java          |     2 +-
 ...onentStackVersionResourceDefinitionTest.java |     2 +-
 .../resources/FeedResourceDefinitionTest.java   |     2 +-
 .../resources/HostResourceDefinitionTest.java   |     2 +-
 .../InstanceResourceDefinitionTest.java         |     2 +-
 .../LdapSyncEventResourceDefinitionTest.java    |     2 +-
 .../PermissionResourceDefinitionTest.java       |     2 +-
 .../PrivilegeResourceDefinitionTest.java        |     2 +-
 .../RepositoryResourceDefinitionTest.java       |     2 +-
 ...RepositoryVersionResourceDefinitionTest.java |     2 +-
 .../ResourceInstanceFactoryImplTest.java        |     2 +-
 .../ServiceResourceDefinitionTest.java          |     2 +-
 .../resources/SimpleResourceDefinitionTest.java |     4 +-
 .../StackConfigurationDefinitionTest.java       |     2 +-
 ...ckConfigurationDependencyDefinitionTest.java |     2 +-
 .../StackServiceResourceDefinitionTest.java     |     2 +-
 .../StackVersionResourceDefinitionTest.java     |     2 +-
 .../TargetClusterResourceDefinitionTest.java    |     2 +-
 .../UpgradeResourceDefinitionTest.java          |     4 +-
 .../resources/UserResourceDefinitionTest.java   |     2 +-
 .../ViewExternalSubResourceDefinitionTest.java  |     2 +-
 .../ViewInstanceResourceDefinitionTest.java     |     2 +-
 .../ViewPermissionResourceDefinitionTest.java   |     2 +-
 .../resources/ViewResourceDefinitionTest.java   |     2 +-
 .../ViewVersionResourceDefinitionTest.java      |     2 +-
 .../server/api/services/ActionServiceTest.java  |     2 +-
 .../services/ActiveWidgetLayoutServiceTest.java |    75 -
 .../server/api/services/AmbariMetaInfoTest.java |   269 +-
 .../server/api/services/BaseRequestTest.java    |     2 +-
 .../server/api/services/BaseServiceTest.java    |     2 +-
 .../api/services/BlueprintServiceTest.java      |     4 +-
 .../services/ClusterPrivilegeServiceTest.java   |     4 +-
 .../server/api/services/ClusterServiceTest.java |    30 +-
 .../ClusterStackVersionServiceTest.java         |     4 +-
 .../api/services/ComponentServiceTest.java      |     2 +-
 .../api/services/ConfigGroupServiceTest.java    |     2 +-
 .../api/services/ConfigurationServiceTest.java  |     2 +-
 .../server/api/services/DeleteRequestTest.java  |     2 +-
 .../api/services/DeleteResultMetaDataTest.java  |     2 +-
 .../api/services/ExtensionsServiceTest.java     |     2 +-
 .../server/api/services/FeedServiceTest.java    |     2 +-
 .../server/api/services/GetRequestTest.java     |     2 +-
 .../api/services/GroupPrivilegeServiceTest.java |   111 -
 .../server/api/services/GroupServiceTest.java   |     5 +-
 .../api/services/HostComponentServiceTest.java  |     2 +-
 .../server/api/services/HostServiceTest.java    |     4 +-
 .../services/HostStackVersionServiceTest.java   |     4 +-
 .../api/services/InstanceServiceTest.java       |     2 +-
 .../api/services/LdapSyncEventServiceTest.java  |     2 +-
 .../server/api/services/LoggingServiceTest.java |     2 +-
 .../server/api/services/MemberServiceTest.java  |   110 -
 .../api/services/NamedPropertySetTest.java      |     2 +-
 .../api/services/PermissionServiceTest.java     |     2 +-
 .../server/api/services/PersistServiceTest.java |     8 +-
 .../services/PersistenceManagerImplTest.java    |     4 +-
 .../server/api/services/PostRequestTest.java    |     2 +-
 .../services/PreUpgradeCheckServiceTest.java    |     4 +-
 .../api/services/PrivilegeServiceTest.java      |     2 +-
 .../server/api/services/PutRequestTest.java     |     2 +-
 .../api/services/QueryPostRequestTest.java      |     2 +-
 .../api/services/RecommendationServiceTest.java |     2 +-
 .../api/services/RepositoryServiceTest.java     |     4 +-
 .../server/api/services/RequestBodyTest.java    |     2 +-
 .../server/api/services/RequestFactoryTest.java |     2 +-
 .../api/services/RootServiceServiceTest.java    |    13 +-
 .../server/api/services/ServiceServiceTest.java |     2 +-
 .../server/api/services/SettingServiceTest.java |     4 +-
 .../server/api/services/StacksServiceTest.java  |     2 +-
 .../api/services/TargetClusterServiceTest.java  |     2 +-
 .../services/UpdatePersistenceManagerTest.java  |     2 +-
 .../api/services/UpgradeItemServiceTest.java    |     4 +-
 .../services/UserAuthorizationServiceTest.java  |   100 -
 .../api/services/UserPrivilegeServiceTest.java  |   124 -
 .../api/services/ValidationServiceTest.java     |     2 +-
 .../services/ViewDataMigrationServiceTest.java  |    81 -
 .../ViewExternalSubResourceServiceTest.java     |    50 -
 .../api/services/ViewPermissionServiceTest.java |   101 -
 .../services/ViewSubResourceServiceTest.java    |     3 +-
 .../parsers/BodyParseExceptionTest.java         |     2 +-
 .../parsers/JsonRequestBodyParserTest.java      |     2 +-
 .../serializers/JsonSerializerTest.java         |     2 +-
 .../stackadvisor/StackAdvisorExceptionTest.java |     2 +-
 .../stackadvisor/StackAdvisorHelperTest.java    |    65 +-
 .../StackAdvisorRequestTypeTest.java            |     2 +-
 .../stackadvisor/StackAdvisorRunnerTest.java    |    12 +-
 .../ConfigurationRecommendationCommandTest.java |     7 +-
 .../commands/StackAdvisorCommandTest.java       |    49 +-
 .../views/ViewDataMigrationServiceTest.java     |    81 +
 .../ViewExternalSubResourceServiceTest.java     |    50 +
 .../audit/AccessUnauthorizedAuditEventTest.java |     2 +-
 .../server/audit/LoginAuditEventTest.java       |     2 +-
 .../server/audit/LogoutAuditEventTest.java      |     2 +-
 .../audit/OperationStatusAuditEventTest.java    |     2 +-
 .../StartOperationRequestAuditEventTest.java    |     2 +-
 .../audit/request/AbstractBaseCreator.java      |     2 +-
 .../server/audit/request/AllGetCreator.java     |     2 +-
 .../audit/request/AllPostAndPutCreator.java     |     2 +-
 .../audit/request/DefaultEventCreatorTest.java  |     2 +-
 .../audit/request/PutHostComponentCreator.java  |     2 +-
 .../audit/request/RequestAuditLogModule.java    |     2 +-
 .../audit/request/RequestAuditLoggerTest.java   |     2 +-
 .../request/creator/HostEventCreatorTest.java   |     4 +-
 .../creator/UpgradeEventCreatorTest.java        |     4 +-
 .../server/bootstrap/BootStrapResourceTest.java |     8 +-
 .../ambari/server/bootstrap/BootStrapTest.java  |     8 +-
 .../checks/AutoStartDisabledCheckTest.java      |     2 +-
 ...ardcodedStackVersionPropertiesCheckTest.java |     4 +-
 .../checks/HiveMultipleMetastoreCheckTest.java  |     2 +-
 .../checks/HostsMasterMaintenanceCheckTest.java |     8 +-
 .../server/checks/InstallPackagesCheckTest.java |    26 +-
 ...duce2JobHistoryStatePreservingCheckTest.java |     7 -
 .../checks/PreviousUpgradeCompletedTest.java    |     8 +-
 .../server/checks/RangerPasswordCheckTest.java  |    15 +-
 .../checks/ServiceCheckValidityCheckTest.java   |    45 +-
 .../server/checks/ServicesUpCheckTest.java      |     5 +
 .../server/checks/UpgradeCheckOrderTest.java    |     2 +-
 .../server/checks/VersionMismatchCheckTest.java |     4 +-
 ...nTimelineServerStatePreservingCheckTest.java |    11 -
 .../server/cleanup/CleanupServiceImplTest.java  |    39 +-
 .../ComponentSSLConfigurationTest.java          |     2 +-
 .../configuration/RecoveryConfigHelperTest.java |    53 +-
 .../server/controller/ActionRequestTest.java    |     2 +-
 .../server/controller/ActionResponseTest.java   |     5 +-
 .../AmbariCustomCommandExecutionHelperTest.java |   136 +-
 .../controller/AmbariHandlerListTest.java       |     2 +-
 .../AmbariManagementControllerImplTest.java     |   231 +-
 .../AmbariManagementControllerTest.java         |  1732 +-
 .../server/controller/AmbariServerTest.java     |     2 +-
 .../controller/AmbariSessionManagerTest.java    |     4 +-
 .../BackgroundCustomCommandExecutionTest.java   |    26 +-
 .../server/controller/ClusterRequestTest.java   |    18 +-
 .../server/controller/ClusterResponseTest.java  |    16 +-
 .../server/controller/KerberosHelperTest.java   |   354 +-
 .../server/controller/LdapSyncRequestTest.java  |     2 +-
 .../controller/MaintenanceStateHelperTest.java  |     2 +-
 ...hYarnCapacitySchedulerReleaseConfigTest.java |    76 +-
 .../RootServiceResponseFactoryTest.java         |    11 +-
 .../ServiceConfigVersionResponseTest.java       |     2 +-
 .../controller/StackServiceResponseTest.java    |     2 +-
 .../AbstractControllerResourceProviderTest.java |    34 +-
 .../AbstractDRResourceProviderTest.java         |     2 +-
 .../AbstractJDBCResourceProviderTest.java       |     2 +-
 .../internal/AbstractPropertyProviderTest.java  |     2 +-
 .../internal/AbstractResourceProviderTest.java  |    41 +-
 .../internal/ActionResourceProviderTest.java    |     2 +-
 .../AlertDefinitionResourceProviderTest.java    |     2 +-
 .../AlertGroupResourceProviderTest.java         |     2 +-
 .../AlertHistoryResourceProviderTest.java       |     2 +-
 .../AlertNoticeResourceProviderTest.java        |     2 +-
 .../internal/AlertResourceProviderTest.java     |     2 +-
 .../AlertTargetResourceProviderTest.java        |     2 +-
 .../internal/AppCookieManagerTest.java          |     2 +-
 .../internal/ArtifactResourceProviderTest.java  |     2 +-
 .../AtlasServerHttpPropertyRequestTest.java     |     4 +-
 .../controller/internal/BaseProviderTest.java   |     2 +-
 .../BlueprintConfigurationProcessorTest.java    |    44 +-
 .../internal/BlueprintResourceProviderTest.java |     2 +-
 .../internal/CalculatedStatusTest.java          |     2 +-
 .../ClientConfigResourceProviderTest.java       |    30 +-
 .../internal/ClusterControllerImplTest.java     |     2 +-
 .../internal/ClusterResourceProviderTest.java   |    22 +-
 ...ClusterStackVersionResourceProviderTest.java |   480 +-
 ...leRepositoryVersionResourceProviderTest.java |     5 +-
 .../internal/ComponentResourceProviderTest.java |   110 +-
 .../ConfigGroupResourceProviderTest.java        |     7 +-
 .../ConfigurationResourceProviderTest.java      |     2 +-
 .../CredentialResourceProviderTest.java         |    10 +-
 .../internal/DeleteStatusMetaDataTest.java      |     4 +-
 .../internal/ExportBlueprintRequestTest.java    |     2 +-
 .../internal/ExtensionResourceProviderTest.java |     2 +-
 .../internal/FeedResourceProviderTest.java      |     2 +-
 .../GroupPrivilegeResourceProviderTest.java     |    13 +-
 ...ostComponentProcessResourceProviderTest.java |     2 +-
 .../HostComponentResourceProviderTest.java      |    47 +-
 .../internal/HostResourceProviderTest.java      |   112 +-
 .../HostStackVersionResourceProviderTest.java   |     5 +-
 .../internal/HttpPropertyProviderTest.java      |     2 +-
 .../internal/InstanceResourceProviderTest.java  |     2 +-
 .../internal/JMXHostProviderTest.java           |    34 +-
 .../LdapSyncEventResourceProviderTest.java      |     2 +-
 .../internal/MetricsServiceProviderTest.java    |     2 +-
 .../internal/PageRequestImplTest.java           |     2 +-
 .../internal/PageResponseImplTest.java          |     2 +-
 .../PermissionResourceProviderTest.java         |     2 +-
 .../PreUpgradeCheckResourceProviderTest.java    |    17 +-
 .../internal/PropertyPredicateVisitorTest.java  |     2 +-
 .../internal/ProvisionClusterRequestTest.java   |    21 +-
 .../QuickLinkArtifactResourceProviderTest.java  |     2 +-
 .../RecommendationResourceProviderTest.java     |     4 +-
 .../RemoteClusterResourceProviderTest.java      |     2 +-
 .../RepositoryResourceProviderTest.java         |     7 +-
 .../RepositoryVersionResourceProviderTest.java  |    76 +-
 .../controller/internal/RequestImplTest.java    |    33 +-
 .../internal/RequestOperationLevelTest.java     |     2 +-
 .../internal/RequestResourceProviderTest.java   |    11 +-
 .../RequestScheduleResourceProviderTest.java    |     2 +-
 .../internal/RequestStageContainerTest.java     |     2 +-
 .../internal/RequestStatusImplTest.java         |     2 +-
 .../controller/internal/ResourceImplTest.java   |     2 +-
 ...ootServiceComponentResourceProviderTest.java |    21 +-
 ...erviceHostComponentResourceProviderTest.java |    13 +-
 .../RootServiceResourceProviderTest.java        |     2 +-
 .../internal/ScaleClusterRequestTest.java       |    16 +-
 .../controller/internal/SchemaImplTest.java     |     2 +-
 .../internal/ServiceResourceProviderTest.java   |   121 +-
 .../internal/SettingResourceProviderTest.java   |     2 +-
 .../SimplifyingPredicateVisitorTest.java        |     2 +-
 .../StackAdvisorResourceProviderTest.java       |     2 +-
 .../StackArtifactResourceProviderTest.java      |     2 +-
 ...igurationDependencyResourceProviderTest.java |     2 +-
 .../StackConfigurationResourceProviderTest.java |     2 +-
 .../StackDefinedPropertyProviderTest.java       |    26 +-
 .../StackDependencyResourceProviderTest.java    |     2 +-
 ...kLevelConfigurationResourceProviderTest.java |     2 +-
 .../internal/StackResourceProviderTest.java     |     2 +-
 .../StackServiceResourceProviderTest.java       |     2 +-
 .../server/controller/internal/StackTest.java   |     2 +-
 .../StackUpgradeConfigurationMergeTest.java     |   256 +-
 .../internal/StageResourceProviderTest.java     |     4 +-
 .../TargetClusterResourceProviderTest.java      |     2 +-
 .../internal/TaskResourceProviderTest.java      |     2 +-
 .../internal/TestIvoryProviderModule.java       |     2 +-
 .../controller/internal/TestIvoryService.java   |     2 +-
 .../internal/URLStreamProviderTest.java         |     4 +-
 .../UpgradeResourceProviderHDP22Test.java       |   321 -
 .../internal/UpgradeResourceProviderTest.java   |   460 +-
 .../UpgradeSummaryResourceProviderTest.java     |    21 +-
 .../UserPrivilegeResourceProviderTest.java      |    13 +-
 .../internal/UserResourceProviderDBTest.java    |     2 +-
 .../ValidationResourceProviderTest.java         |     4 +-
 .../VersionDefinitionResourceProviderTest.java  |     2 +-
 .../ViewInstanceResourceProviderTest.java       |     2 +-
 .../ViewPermissionResourceProviderTest.java     |     2 +-
 .../internal/ViewURLResourceProviderTest.java   |     4 +-
 .../WidgetLayoutResourceProviderTest.java       |     2 +-
 .../internal/WidgetResourceProviderTest.java    |     2 +-
 .../server/controller/ivory/ClusterTest.java    |     2 +-
 .../server/controller/ivory/FeedTest.java       |     2 +-
 .../server/controller/ivory/InstanceTest.java   |     2 +-
 .../jdbc/TestJDBCResourceProvider.java          |     2 +-
 .../controller/jmx/TestStreamProvider.java      |     2 +-
 .../logging/LogLevelQueryResponseTest.java      |     2 +-
 .../controller/logging/LogLineResultTest.java   |     2 +-
 .../logging/LogQueryResponseTest.java           |     2 +-
 .../LogSearchDataRetrievalServiceTest.java      |     3 +-
 .../LoggingRequestHelperFactoryImplTest.java    |     2 +-
 .../logging/LoggingRequestHelperImplTest.java   |     2 +-
 .../LoggingSearchPropertyProviderTest.java      |    27 +-
 .../server/controller/logging/UtilsTest.java    |     2 +-
 .../metrics/JMXPropertyProviderTest.java        |    11 +-
 .../RestMetricsPropertyProviderTest.java        |    16 +-
 .../ThreadPoolEnabledPropertyProviderTest.java  |     2 +-
 .../metrics/ganglia/GangliaMetricTest.java      |     6 +-
 .../ganglia/GangliaPropertyProviderTest.java    |     2 +-
 .../GangliaReportPropertyProviderTest.java      |     2 +-
 .../metrics/ganglia/TestHttpUrlConnection.java  |     5 +-
 .../metrics/ganglia/TestStreamProvider.java     |     5 +-
 .../timeline/AMSPropertyProviderTest.java       |    38 +-
 .../timeline/AMSReportPropertyProviderTest.java |     2 +-
 .../timeline/MetricsPaddingMethodTest.java      |     2 +-
 .../timeline/MetricsRequestHelperTest.java      |     2 +-
 .../cache/TimelineMetricCacheSizingTest.java    |     2 +-
 .../timeline/cache/TimelineMetricCacheTest.java |     2 +-
 .../controller/predicate/AndPredicateTest.java  |     2 +-
 .../predicate/CategoryIsEmptyPredicateTest.java |     2 +-
 .../predicate/CategoryPredicateTest.java        |     2 +-
 .../predicate/EqualsPredicateTest.java          |     2 +-
 .../predicate/FilterPredicateTest.java          |     2 +-
 .../predicate/GreaterEqualsPredicateTest.java   |     2 +-
 .../predicate/GreaterPredicateTest.java         |     2 +-
 .../predicate/LessEqualsPredicateTest.java      |     2 +-
 .../controller/predicate/LessPredicateTest.java |     2 +-
 .../controller/predicate/NotPredicateTest.java  |     2 +-
 .../controller/predicate/OrPredicateTest.java   |     2 +-
 .../predicate/PredicateVisitorTest.java         |     2 +-
 .../server/controller/spi/ResourceTest.java     |     2 +-
 ...ThreadPoolExecutorCompletionServiceTest.java |     2 +-
 .../utilities/DatabaseCheckerTest.java          |     2 +-
 .../utilities/KerberosIdentityCleanerTest.java  |   204 +
 .../utilities/PredicateBuilderTest.java         |     2 +-
 .../utilities/PropertyHelperTest.java           |     8 +-
 .../DefaultServiceCalculatedStateTest.java      |     2 +-
 .../state/FlumeServiceCalculatedStateTest.java  |     2 +-
 .../GeneralServiceCalculatedStateTest.java      |    13 +-
 .../state/HBaseServiceCalculatedStateTest.java  |     2 +-
 .../state/HDFSServiceCalculatedStateTest.java   |     2 +-
 .../state/HiveServiceCalculatedStateTest.java   |     2 +-
 .../state/OozieServiceCalculatedStateTest.java  |     2 +-
 .../state/YarnServiceCalculatedStateTest.java   |     2 +-
 .../utilities/webserver/StartServer.java        |     2 +-
 .../credentialapi/CredentialUtilTest.java       |     5 +-
 .../ActionDefinitionManagerTest.java            |     2 +-
 .../apache/ambari/server/events/EventsTest.java |    21 +-
 .../ambari/server/events/MockEventListener.java |     2 +-
 .../listeners/tasks/TaskStatusListenerTest.java |     2 +-
 .../AlertMaintenanceModeListenerTest.java       |     6 +-
 .../HostVersionOutOfSyncListenerTest.java       |   134 +-
 .../upgrade/StackUpgradeFinishListenerTest.java |     4 +-
 .../upgrade/StackVersionListenerTest.java       |    51 +-
 .../publishers/VersionEventPublisherTest.java   |     4 +-
 .../server/hooks/users/UserHookServiceTest.java |     4 +-
 .../metadata/AgentAlertDefinitionsTest.java     |     2 +-
 .../server/metadata/RoleCommandOrderTest.java   |    66 +-
 .../ambari/server/metadata/RoleGraphTest.java   |    25 +-
 .../metric/system/impl/MetricsServiceTest.java  |     4 +-
 .../metric/system/impl/MetricsSourceTest.java   |     4 +-
 .../system/impl/TestAmbariMetricsSinkImpl.java  |     2 +-
 .../metric/system/impl/TestMetricsSource.java   |     4 +-
 .../notifications/DispatchFactoryTest.java      |     2 +-
 .../server/notifications/MockDispatcher.java    |     2 +-
 .../dispatchers/AlertScriptDispatcherTest.java  |    69 +-
 .../dispatchers/AmbariSNMPDispatcherTest.java   |     2 +-
 .../dispatchers/EmailDispatcherTest.java        |     2 +-
 .../dispatchers/SNMPDispatcherTest.java         |     2 +-
 .../ambari/server/orm/AlertDaoHelper.java       |     2 +-
 .../ambari/server/orm/DBAccessorImplTest.java   |    90 +
 .../server/orm/InMemoryDefaultTestModule.java   |     5 +-
 .../ambari/server/orm/JdbcPropertyTest.java     |     2 +-
 .../apache/ambari/server/orm/OrmTestHelper.java |    86 +-
 .../apache/ambari/server/orm/TestOrmImpl.java   |     2 +-
 .../server/orm/dao/AlertDefinitionDAOTest.java  |     2 +-
 .../server/orm/dao/AlertDispatchDAOTest.java    |     2 +-
 .../server/orm/dao/AlertsDAOCachedTest.java     |     2 +-
 .../ambari/server/orm/dao/AlertsDAOTest.java    |     2 +-
 .../ambari/server/orm/dao/BlueprintDAOTest.java |     2 +-
 .../server/orm/dao/ClusterVersionDAOTest.java   |   264 -
 .../server/orm/dao/ConfigGroupDAOTest.java      |     2 +-
 .../ambari/server/orm/dao/CrudDAOTest.java      |     2 +-
 .../ambari/server/orm/dao/GroupDAOTest.java     |     2 +-
 .../dao/HostComponentDesiredStateDAOTest.java   |     4 +-
 .../orm/dao/HostComponentStateDAOTest.java      |     4 +-
 .../orm/dao/HostConfigMappingDAOTest.java       |     2 +-
 .../server/orm/dao/HostRoleCommandDAOTest.java  |     2 +-
 .../server/orm/dao/HostVersionDAOTest.java      |    36 +-
 .../ambari/server/orm/dao/PrincipalDAOTest.java |     2 +-
 .../server/orm/dao/PrincipalTypeDAOTest.java    |     2 +-
 .../orm/dao/RepositoryVersionDAOTest.java       |    39 +-
 .../ambari/server/orm/dao/RequestDAOTest.java   |     2 +-
 .../server/orm/dao/RequestScheduleDAOTest.java  |     2 +-
 .../ambari/server/orm/dao/ResourceDAOTest.java  |     2 +-
 .../server/orm/dao/ResourceTypeDAOTest.java     |     2 +-
 .../server/orm/dao/ServiceConfigDAOTest.java    |    13 +-
 .../ambari/server/orm/dao/SettingDAOTest.java   |     2 +-
 .../ambari/server/orm/dao/StageDAOTest.java     |     2 +-
 .../orm/dao/TopologyLogicalRequestDAOTest.java  |     2 +-
 .../server/orm/dao/TopologyRequestDAOTest.java  |     2 +-
 .../ambari/server/orm/dao/UpgradeDAOTest.java   |    28 +-
 .../ambari/server/orm/dao/UserDAOTest.java      |     2 +-
 .../server/orm/dao/ViewInstanceDAOTest.java     |     2 +-
 .../ambari/server/orm/dao/WidgetDAOTest.java    |     2 +-
 .../server/orm/dao/WidgetLayoutDAOTest.java     |     2 +-
 .../apache/ambari/server/orm/db/DDLTests.java   |     2 +-
 .../orm/entities/AlertCurrentEntityTest.java    |     2 +-
 .../orm/entities/AlertDefinitionEntityTest.java |     2 +-
 .../orm/entities/AlertHistoryEntityTest.java    |     2 +-
 .../entities/BlueprintConfigEntityPKTest.java   |     2 +-
 .../orm/entities/BlueprintConfigEntityTest.java |     2 +-
 .../orm/entities/BlueprintEntityTest.java       |     2 +-
 .../entities/BlueprintSettingEntityTest.java    |     2 +-
 .../server/orm/entities/HostEntityTest.java     |     4 +-
 .../entities/HostGroupComponentEntityTest.java  |     2 +-
 .../entities/HostGroupConfigEntityPKTest.java   |     2 +-
 .../orm/entities/HostGroupConfigEntityTest.java |     2 +-
 .../orm/entities/HostGroupEntityTest.java       |     2 +-
 .../orm/entities/HostRoleCommandEntityTest.java |     2 +-
 .../orm/entities/LdapSyncEventEntityTest.java   |     2 +-
 .../orm/entities/LdapSyncSpecEntityTest.java    |     2 +-
 .../orm/entities/PrincipalEntityTest.java       |     2 +-
 .../orm/entities/PrincipalTypeEntityTest.java   |     2 +-
 .../server/orm/entities/ResourceEntityTest.java |     2 +-
 .../orm/entities/ResourceTypeEntityTest.java    |     2 +-
 .../orm/entities/ServiceConfigEntityTest.java   |     2 +-
 .../server/orm/entities/SettingEntityTest.java  |     2 +-
 .../server/orm/entities/StageEntityTest.java    |     2 +-
 .../orm/entities/ViewEntityEntityTest.java      |     2 +-
 .../server/orm/entities/ViewEntityTest.java     |     2 +-
 .../orm/entities/ViewInstanceEntityTest.java    |     2 +-
 .../ambari/server/proxy/ProxyServiceTest.java   |     2 +-
 .../ambari/server/resources/TestResources.java  |     2 +-
 .../sample/checks/SampleServiceCheck.java       |     4 -
 .../scheduler/ExecutionScheduleManagerTest.java |     2 +-
 .../scheduler/ExecutionSchedulerTest.java       |     2 +-
 .../server/security/CertGenerationTest.java     |     8 +-
 .../server/security/SecurityFilterTest.java     |     2 +-
 .../server/security/SecurityHelperImplTest.java |     2 +-
 .../server/security/SslExecutionTest.java       |     8 +-
 .../authorization/AmbariAuthenticationTest.java |     2 +-
 ...mbariLdapAuthenticationProviderBaseTest.java |     2 +-
 ...uthenticationProviderForDNWithSpaceTest.java |     2 +-
 ...henticationProviderForDuplicateUserTest.java |     2 +-
 .../AmbariLdapAuthenticationProviderTest.java   |     2 +-
 .../AmbariLocalUserProviderTest.java            |     2 +-
 .../AmbariPamAuthenticationProviderTest.java    |     3 +-
 .../AmbariUserAuthenticationFilterTest.java     |     4 +-
 .../AuthorizationHelperInitializer.java         |     2 +-
 .../authorization/AuthorizationHelperTest.java  |     2 +-
 .../authorization/AuthorizationTestModule.java  |     2 +-
 ...thorizationTestModuleForLdapDNWithSpace.java |     2 +-
 .../authorization/LdapServerPropertiesTest.java |     2 +-
 .../TestAmbariLdapAuthoritiesPopulator.java     |     2 +-
 .../security/encryption/AESEncryptorTest.java   |     2 +-
 .../encryption/CredentialProviderTest.java      |     2 +-
 .../encryption/CredentialStoreTest.java         |     2 +-
 .../encryption/MasterKeyServiceTest.java        |     8 +-
 .../ldap/AmbariLdapDataPopulatorTest.java       |     2 +-
 .../ADKerberosOperationHandlerTest.java         |    96 +-
 .../serveraction/kerberos/KDCTypeTest.java      |     4 +-
 .../UpdateKerberosConfigsServerActionTest.java  |     5 +-
 .../AutoSkipFailedSummaryActionTest.java        |    26 +-
 .../ComponentVersionCheckActionTest.java        |   256 +-
 .../upgrades/ConfigureActionTest.java           |   701 +-
 .../FixCapacitySchedulerOrderingPolicyTest.java |     2 +-
 .../upgrades/FixLzoCodecPathTest.java           |     2 +-
 .../upgrades/FixOozieAdminUsersTest.java        |     2 +-
 .../upgrades/FixYarnWebServiceUrlTest.java      |     2 +-
 .../HBaseEnvMaxDirectMemorySizeActionTest.java  |     2 +-
 .../upgrades/HiveEnvClasspathActionTest.java    |     2 +-
 .../upgrades/HiveZKQuorumConfigActionTest.java  |     2 +-
 .../upgrades/KerberosKeytabsActionTest.java     |     2 +-
 .../upgrades/OozieConfigCalculationTest.java    |     2 +-
 .../upgrades/RangerConfigCalculationTest.java   |     2 +-
 .../RangerKerberosConfigCalculationTest.java    |     2 +-
 .../upgrades/RangerKmsProxyConfigTest.java      |     4 +-
 .../RangerWebAlertConfigActionTest.java         |     4 +-
 .../upgrades/UpgradeActionTest.java             |   755 +-
 .../UpgradeUserKerberosDescriptorTest.java      |     2 +-
 .../CsvFilePersisterServiceFunctionalTest.java  |     4 +-
 .../PostUserCreationHookServerActionTest.java   |     4 +-
 .../server/stack/ComponentModuleTest.java       |    27 +-
 .../QuickLinksConfigurationModuleTest.java      |     2 +-
 .../ambari/server/stack/RepoUtilTest.java       |     2 +-
 .../ambari/server/stack/ServiceModuleTest.java  |    33 +-
 .../stack/StackManagerCommonServicesTest.java   |     2 +-
 .../server/stack/StackManagerExtensionTest.java |     2 +-
 .../server/stack/StackManagerMiscTest.java      |     2 +-
 .../ambari/server/stack/StackManagerMock.java   |     2 +-
 .../ambari/server/stack/StackManagerTest.java   |     2 +-
 .../ambari/server/stack/StackModuleTest.java    |     2 +-
 .../ambari/server/stack/ThemeModuleTest.java    |     4 +-
 .../UpdateActiveRepoVersionOnStartupTest.java   |    83 +-
 .../server/stageplanner/TestStagePlanner.java   |   257 +-
 .../apache/ambari/server/state/AlertTest.java   |     2 +-
 .../ambari/server/state/CheckHelperTest.java    |    43 +-
 .../ambari/server/state/ConfigGroupTest.java    |    11 +-
 .../ambari/server/state/ConfigHelperTest.java   |    41 +-
 .../server/state/ConfigMergeHelperTest.java     |     2 +-
 .../ambari/server/state/DesiredConfigTest.java  |     2 +-
 .../ambari/server/state/PropertyInfoTest.java   |     4 +-
 .../server/state/RequestExecutionTest.java      |     2 +-
 .../server/state/ServiceComponentTest.java      |   286 +-
 .../ambari/server/state/ServiceInfoTest.java    |     2 +-
 .../server/state/ServicePropertiesTest.java     |     4 +-
 .../server/state/ServicePropertyInfoTest.java   |     2 +-
 .../apache/ambari/server/state/ServiceTest.java |    78 +-
 .../ambari/server/state/UpgradeHelperTest.java  |   727 +-
 .../ambari/server/state/action/JobTest.java     |     2 +-
 .../alerts/AggregateAlertListenerTest.java      |     2 +-
 .../alerts/AlertDefinitionEqualityTest.java     |     2 +-
 .../state/alerts/AlertDefinitionHashTest.java   |     6 +-
 .../state/alerts/AlertEventPublisherTest.java   |    16 +-
 .../state/alerts/AlertReceivedListenerTest.java |     2 +-
 .../alerts/AlertStateChangedEventTest.java      |     2 +-
 .../state/alerts/InitialAlertEventTest.java     |    18 +-
 .../state/cluster/AlertDataManagerTest.java     |     2 +-
 .../state/cluster/ClusterDeadlockTest.java      |    17 +-
 .../cluster/ClusterEffectiveVersionTest.java    |   305 -
 .../server/state/cluster/ClusterImplTest.java   |    31 +-
 .../server/state/cluster/ClusterTest.java       |   855 +-
 .../state/cluster/ClustersDeadlockTest.java     |    18 +-
 .../server/state/cluster/ClustersImplTest.java  |     4 +-
 .../server/state/cluster/ClustersTest.java      |   117 +-
 .../ConcurrentServiceConfigVersionTest.java     |    17 +-
 ...omponentHostConcurrentWriteDeadlockTest.java |    22 +-
 .../ambari/server/state/host/HostImplTest.java  |     4 +-
 .../ambari/server/state/host/HostTest.java      |    14 +-
 .../state/kerberos/KerberosDescriptorTest.java  |     9 +
 .../kerberos/VariableReplacementHelperTest.java |   130 +-
 .../state/repository/VersionDefinitionTest.java |     2 +-
 .../AlertNoticeDispatchServiceTest.java         |    25 +-
 .../services/CachedAlertFlushServiceTest.java   |     2 +-
 .../services/MetricsRetrievalServiceTest.java   |     2 +-
 .../services/RetryUpgradeActionServiceTest.java |    19 +-
 .../state/stack/ConfigUpgradePackTest.java      |     2 +-
 .../state/stack/ConfigUpgradeValidityTest.java  |     2 +-
 .../ambari/server/state/stack/OSFamilyTest.java |     2 +-
 .../state/stack/UpgradePackParsingTest.java     |     2 +-
 .../server/state/stack/UpgradePackTest.java     |     2 +-
 .../upgrade/RepositoryVersionHelperTest.java    |    29 +-
 .../stack/upgrade/StageWrapperBuilderTest.java  |    32 +-
 .../svccomphost/ServiceComponentHostTest.java   |    71 +-
 .../server/testing/DBInconsistencyTests.java    |     4 +-
 .../server/testing/DeadlockWarningThread.java   |     2 +-
 .../server/testing/DeadlockedThreadsTest.java   |     4 +-
 .../server/topology/AmbariContextTest.java      |     2 +-
 .../server/topology/BlueprintFactoryTest.java   |     2 +-
 .../server/topology/BlueprintImplTest.java      |     2 +-
 .../topology/BlueprintValidatorImplTest.java    |     2 +-
 .../ClusterConfigurationRequestTest.java        |    62 +-
 .../ClusterDeployWithStartOnlyTest.java         |     7 +-
 ...InstallWithoutStartOnComponentLevelTest.java |     7 +-
 .../ClusterInstallWithoutStartTest.java         |     9 +-
 .../topology/ClusterTopologyImplTest.java       |     4 +-
 .../topology/ConfigurationFactoryTest.java      |     2 +-
 .../server/topology/ConfigurationTest.java      |     2 +-
 .../topology/ConfigureClusterTaskTest.java      |     4 +-
 .../server/topology/HostGroupInfoTest.java      |     2 +-
 .../server/topology/LogicalRequestTest.java     |    84 +-
 .../topology/RequiredPasswordValidatorTest.java |     2 +-
 .../SecurityConfigurationFactoryTest.java       |     2 +-
 .../server/topology/SettingFactoryTest.java     |     2 +-
 .../ambari/server/topology/SettingTest.java     |    20 +-
 .../server/topology/TopologyManagerTest.java    |    11 +-
 .../RequiredConfigPropertiesValidatorTest.java  |    35 +-
 .../upgrade/AbstractUpgradeCatalogTest.java     |     8 +-
 .../server/upgrade/StackUpgradeUtilTest.java    |   145 -
 .../server/upgrade/UpgradeCatalog200Test.java   |   923 -
 .../server/upgrade/UpgradeCatalog210Test.java   |  1349 -
 .../server/upgrade/UpgradeCatalog211Test.java   |   445 -
 .../server/upgrade/UpgradeCatalog2121Test.java  |   161 -
 .../server/upgrade/UpgradeCatalog212Test.java   |   687 -
 .../server/upgrade/UpgradeCatalog220Test.java   |  1633 -
 .../server/upgrade/UpgradeCatalog221Test.java   |   614 -
 .../server/upgrade/UpgradeCatalog222Test.java   |  1126 -
 .../server/upgrade/UpgradeCatalog230Test.java   |   317 -
 .../server/upgrade/UpgradeCatalog240Test.java   |  2654 -
 .../server/upgrade/UpgradeCatalog242Test.java   |   450 -
 .../server/upgrade/UpgradeCatalog250Test.java   |  2129 -
 .../server/upgrade/UpgradeCatalog251Test.java   |    14 +-
 .../server/upgrade/UpgradeCatalog300Test.java   |    85 +-
 .../server/upgrade/UpgradeCatalogHelper.java    |    37 +-
 .../server/upgrade/UpgradeCatalogTest.java      |    13 +-
 .../ambari/server/upgrade/UpgradeTest.java      |     2 +-
 .../utils/CollectionPresentationUtils.java      |     2 +-
 .../ambari/server/utils/RequestUtilsTest.java   |     2 +-
 .../ambari/server/utils/SetUtilsTest.java       |     2 +-
 .../ambari/server/utils/StageUtilsTest.java     |   126 +-
 .../utils/SynchronousThreadPoolExecutor.java    |     2 +-
 .../ambari/server/utils/TestDateUtils.java      |     2 +-
 .../ambari/server/utils/TestHTTPUtils.java      |     2 +-
 .../ambari/server/utils/TestJsonUtils.java      |     2 +-
 .../ambari/server/utils/TestParallel.java       |     2 +-
 .../server/utils/TestShellCommandUtil.java      |     2 +-
 .../ambari/server/utils/TestVersionUtils.java   |     2 +-
 .../ambari/server/view/ClusterImplTest.java     |     4 +-
 .../ambari/server/view/DefaultMaskerTest.java   |     2 +-
 .../server/view/HttpImpersonatorImplTest.java   |     2 +-
 .../server/view/RemoteAmbariClusterTest.java    |     2 +-
 .../view/ViewAmbariStreamProviderTest.java      |     4 +-
 .../server/view/ViewArchiveUtilityTest.java     |     4 +-
 .../ambari/server/view/ViewClassLoaderTest.java |     2 +-
 .../ambari/server/view/ViewContextImplTest.java |     2 +-
 .../view/ViewDataMigrationContextImplTest.java  |     2 +-
 .../view/ViewDataMigrationUtilityTest.java      |     2 +-
 .../server/view/ViewDirectoryWatcherTest.java   |     2 +-
 .../ambari/server/view/ViewExtractorTest.java   |     2 +-
 .../ambari/server/view/ViewRegistryTest.java    |    13 +-
 .../view/ViewSubResourceDefinitionTest.java     |     2 +-
 .../view/ViewSubResourceProviderTest.java       |     2 +-
 .../server/view/ViewThrottleFilterTest.java     |     2 +-
 .../server/view/ViewURLStreamProviderTest.java  |     2 +-
 .../view/configuration/EntityConfigTest.java    |     2 +-
 .../view/configuration/InstanceConfigTest.java  |     2 +-
 .../view/configuration/ParameterConfigTest.java |     2 +-
 .../configuration/PermissionConfigTest.java     |     2 +-
 .../configuration/PersistenceConfigTest.java    |     2 +-
 .../view/configuration/PropertyConfigTest.java  |     2 +-
 .../view/configuration/ResourceConfigTest.java  |     2 +-
 .../view/configuration/ViewConfigTest.java      |     2 +-
 .../server/view/events/EventImplTest.java       |     2 +-
 .../view/persistence/DataStoreImplTest.java     |     4 +-
 .../InstanceValidationResultImplTest.java       |     4 +-
 .../validation/ValidationResultImplTest.java    |     4 +-
 .../src/test/python/TestAmbariServer.py         |   261 +-
 .../src/test/python/TestServerUpgrade.py        |    35 +-
 .../src/test/python/TestUpgradeHelper.py        |  1028 -
 ambari-server/src/test/python/TestVersion.py    |    12 +
 .../LOGSEARCH/test_service_advisor.py           |   164 +
 .../common-services/configs/hawq_default.json   |     6 +-
 .../custom_actions/TestInstallPackages.py       |   252 +-
 .../configs/install_packages_config.json        |    19 +-
 .../install_packages_repository_file.json       |   112 +
 .../python/custom_actions/test_ru_set_all.py    |   124 +-
 .../python/host_scripts/TestAlertDiskSpace.py   |    16 +-
 .../python/stacks/2.0.6/FLUME/test_flume.py     |    10 +-
 .../stacks/2.0.6/HBASE/test_hbase_master.py     |    11 +-
 .../python/stacks/2.0.6/HDFS/test_datanode.py   |    10 +
 .../stacks/2.0.6/HDFS/test_journalnode.py       |    11 +-
 .../python/stacks/2.0.6/HDFS/test_namenode.py   |    24 +-
 .../python/stacks/2.0.6/HDFS/test_nfsgateway.py |    10 +
 .../python/stacks/2.0.6/HDFS/test_snamenode.py  |    12 +-
 .../test/python/stacks/2.0.6/HDFS/test_zkfc.py  |    17 +-
 .../2.0.6/HIVE/test_hive_service_check.py       |    14 +-
 .../stacks/2.0.6/YARN/test_historyserver.py     |    12 +-
 .../stacks/2.0.6/YARN/test_mapreduce2_client.py |    10 +
 .../stacks/2.0.6/YARN/test_nodemanager.py       |    10 +
 .../stacks/2.0.6/YARN/test_resourcemanager.py   |    10 +
 .../stacks/2.0.6/YARN/test_yarn_client.py       |    10 +
 .../stacks/2.0.6/common/test_stack_advisor.py   |   155 +-
 .../configs/ha_bootstrap_standby_node.json      |     2 +-
 ...ha_bootstrap_standby_node_initial_start.json |     2 +-
 ...dby_node_initial_start_dfs_nameservices.json |     2 +-
 .../stacks/2.0.6/configs/hbase_with_phx.json    |    12 +
 .../stacks/2.0.6/configs/repository_file.json   |  1275 +
 .../hooks/before-INSTALL/test_before_install.py |    30 +
 .../stacks/2.1/STORM/test_storm_nimbus.py       |    60 +-
 .../stacks/2.1/configs/default-storm-start.json |    14 +
 .../test/python/stacks/2.1/configs/default.json |    13 +
 .../stacks/2.1/configs/secured-storm-start.json |    13 +
 .../test/python/stacks/2.1/configs/secured.json |    15 +-
 .../stacks/2.2/RANGER/test_ranger_admin.py      |     8 +
 .../stacks/2.3/common/test_stack_advisor.py     |   123 -
 .../stacks/2.4/AMBARI_INFRA/test_infra_solr.py  |     3 +
 .../stacks/2.5/RANGER/test_ranger_admin.py      |    10 +
 .../stacks/2.5/RANGER_KMS/test_kms_server.py    |    10 +
 .../stacks/2.5/common/test_stack_advisor.py     |     2 +-
 .../2.5/configs/ranger-admin-default.json       |   990 +-
 .../2.5/configs/ranger-admin-secured.json       |  1108 +-
 .../stacks/2.5/configs/ranger-kms-default.json  |  1158 +-
 .../stacks/2.5/configs/ranger-kms-secured.json  |  1320 +-
 .../test/python/stacks/2.6/DRUID/test_druid.py  |    23 +-
 .../stacks/2.6/RANGER/test_ranger_admin.py      |    10 +
 .../stacks/2.6/common/test_stack_advisor.py     |   123 +-
 .../test/python/stacks/2.6/configs/default.json |     6 +-
 .../2.6/configs/ranger-admin-default.json       |   953 +-
 .../2.6/configs/ranger-admin-secured.json       |  1066 +-
 .../src/test/python/stacks/utils/RMFTestCase.py |    20 +-
 .../stacks/HDP/2.0.6.1/role_command_order.json  |   101 +-
 .../upgrades/upgrade_execute_task_test.xml      |    42 +
 .../upgrades/upgrade_nonrolling_new_stack.xml   |     2 +-
 ambari-serviceadvisor/pom.xml                   |   124 +
 .../ambari/serviceadvisor/ServiceAdvisor.java   |   147 +
 .../ServiceAdvisorCommandType.java              |    63 +
 ambari-utility/checkstyle.xml                   |    38 +
 ambari-utility/pom.xml                          |   145 +
 .../src/main/java/category/AlertTest.java       |    27 +
 .../main/java/category/AmbariUpgradeTest.java   |    27 +
 .../src/main/java/category/BlueprintTest.java   |    27 +
 .../src/main/java/category/FastTest.java        |    27 +
 .../src/main/java/category/KerberosTest.java    |    27 +
 .../src/main/java/category/MetricsTest.java     |    27 +
 .../src/main/java/category/SlowTest.java        |    27 +
 .../main/java/category/StackUpgradeTest.java    |    27 +
 .../apache/ambari/annotations/ApiIgnore.java    |    29 +
 ...AvoidTransactionalOnPrivateMethodsCheck.java |    55 +
 .../UndocumentedRestApiOperationCheck.java      |    76 +
 .../ambari/swagger/AmbariSwaggerReader.java     |   222 +
 .../src/main/resources/checkstyle_packages.xml  |    15 +
 ...dTransactionalOnPrivateMethodsCheckTest.java |    49 +
 .../UndocumentedRestApiOperationCheckTest.java  |    53 +
 .../ambari/swagger/AmbariSwaggerReaderTest.java |   182 +
 .../src/test/resources/log4j.properties         |    19 +
 .../checkstyle/InputRestApiOperation.java       |   138 +
 .../InputTransactionalOnPrivateMethods.java     |    46 +
 ambari-views/examples/weather-view/pom.xml      |     2 +-
 ambari-web/api-docs/css/api-explorer.css        |  2423 +
 ambari-web/api-docs/css/index.css               | 17430 +++++
 ambari-web/api-docs/css/print.css               |  1167 +
 ambari-web/api-docs/css/reset.css               |   125 +
 ambari-web/api-docs/css/screen.css              |     9 +
 ambari-web/api-docs/css/standalone.css          |   293 +
 ambari-web/api-docs/css/typography.css          |    26 +
 .../api-docs/fonts/droid-sans-v6-latin-700.eot  |   Bin 0 -> 22922 bytes
 .../api-docs/fonts/droid-sans-v6-latin-700.svg  |   411 +
 .../api-docs/fonts/droid-sans-v6-latin-700.ttf  |   Bin 0 -> 40513 bytes
 .../api-docs/fonts/droid-sans-v6-latin-700.woff |   Bin 0 -> 25992 bytes
 .../fonts/droid-sans-v6-latin-700.woff2         |   Bin 0 -> 11480 bytes
 .../fonts/droid-sans-v6-latin-regular.eot       |   Bin 0 -> 22008 bytes
 .../fonts/droid-sans-v6-latin-regular.svg       |   403 +
 .../fonts/droid-sans-v6-latin-regular.ttf       |   Bin 0 -> 39069 bytes
 .../fonts/droid-sans-v6-latin-regular.woff      |   Bin 0 -> 24868 bytes
 .../fonts/droid-sans-v6-latin-regular.woff2     |   Bin 0 -> 11304 bytes
 ambari-web/api-docs/images/Swagger_explorer.png |   Bin 0 -> 108087 bytes
 .../api-docs/images/Swagger_explorer_min.png    |   Bin 0 -> 46646 bytes
 ambari-web/api-docs/images/explorer_icons.png   |   Bin 0 -> 5763 bytes
 ambari-web/api-docs/images/favicon-16x16.png    |   Bin 0 -> 645 bytes
 ambari-web/api-docs/images/favicon-32x32.png    |   Bin 0 -> 1654 bytes
 ambari-web/api-docs/images/favicon.ico          |   Bin 0 -> 5430 bytes
 .../api-docs/images/json_editor_integration.png |   Bin 0 -> 63019 bytes
 ambari-web/api-docs/images/logo_small.png       |   Bin 0 -> 770 bytes
 ambari-web/api-docs/images/pet_store_api.png    |   Bin 0 -> 824 bytes
 ambari-web/api-docs/images/senodio.png          |   Bin 0 -> 22838 bytes
 ambari-web/api-docs/images/throbber.gif         |   Bin 0 -> 9257 bytes
 ambari-web/api-docs/images/wordnik_api.png      |   Bin 0 -> 980 bytes
 ambari-web/api-docs/index.html                  |   241 +
 ambari-web/api-docs/lib/backbone-min.js         |    15 +
 ambari-web/api-docs/lib/bootstrap.min.js        |     6 +
 ambari-web/api-docs/lib/handlebars-2.0.0.js     |    28 +
 ambari-web/api-docs/lib/highlight.7.3.pack.js   |     1 +
 ambari-web/api-docs/lib/jquery-1.8.0.min.js     |     2 +
 ambari-web/api-docs/lib/jquery.ba-bbq.min.js    |    18 +
 ambari-web/api-docs/lib/jquery.slideto.min.js   |     1 +
 ambari-web/api-docs/lib/jquery.wiggle.min.js    |     8 +
 ambari-web/api-docs/lib/jsoneditor.js           |  7287 +++
 ambari-web/api-docs/lib/marked.js               |  1272 +
 ambari-web/api-docs/lib/swagger-oauth.js        |   286 +
 ambari-web/api-docs/lib/underscore-min.js       |     6 +
 ambari-web/api-docs/lib/underscore-min.map      |     1 +
 ambari-web/api-docs/o2c.html                    |    20 +
 ambari-web/api-docs/swagger-ui.js               | 22644 +++++++
 ambari-web/api-docs/swagger-ui.min.js           |    12 +
 ambari-web/app/app.js                           |     8 +-
 .../assets/data/stack_versions/upgrades.json    |    17 +-
 ambari-web/app/config.js                        |     9 +-
 .../controllers/global/cluster_controller.js    |     2 +-
 .../global/user_settings_controller.js          |     3 +
 .../global/wizard_watcher_controller.js         |     6 +-
 ambari-web/app/controllers/installer.js         |     8 +-
 .../progress_popup_controller.js                |     2 +-
 .../main/admin/stack_and_upgrade_controller.js  |    51 +-
 .../manage_alert_notifications_controller.js    |    35 +-
 .../app/controllers/main/host/add_controller.js |     3 -
 .../main/host/bulk_operations_controller.js     |    32 +-
 ambari-web/app/controllers/main/host/details.js |    85 +-
 ambari-web/app/controllers/main/service/item.js |     6 +-
 .../main/service/reassign/step3_controller.js   |     1 +
 .../app/controllers/main/views_controller.js    |     4 +-
 ambari-web/app/controllers/wizard.js            |     9 +-
 .../app/controllers/wizard/step7_controller.js  |     3 +
 .../app/controllers/wizard/step8_controller.js  |   183 +-
 ambari-web/app/data/controller_route.js         |     2 +-
 ambari-web/app/mappers/hosts_mapper.js          |     2 +-
 .../app/mappers/repository_version_mapper.js    |     2 +-
 .../app/mappers/stack_upgrade_history_mapper.js |    10 +-
 ambari-web/app/messages.js                      |    63 +-
 .../mixins/common/configs/enhanced_configs.js   |     3 +-
 .../app/mixins/common/widgets/widget_mixin.js   |     3 +-
 .../models/stack_version/repository_version.js  |     2 +-
 .../stack_version/stack_upgrade_history.js      |     4 +-
 ambari-web/app/models/view_instance.js          |     6 +-
 ambari-web/app/routes/add_host_routes.js        |    38 +-
 ambari-web/app/routes/add_service_routes.js     |     2 +-
 ambari-web/app/routes/main.js                   |     2 +-
 ambari-web/app/styles/alerts.less               |    66 +-
 ambari-web/app/styles/application.less          |   125 +-
 ambari-web/app/styles/bootstrap_overrides.less  |    65 +-
 ambari-web/app/styles/common.less               |     1 +
 ambari-web/app/styles/config_history_flow.less  |     7 +-
 ambari-web/app/styles/dashboard.less            |   116 +-
 .../app/styles/enhanced_service_dashboard.less  |    79 +-
 .../app/styles/theme/bootstrap-ambari.css       |    34 +-
 ambari-web/app/templates/common/progress.hbs    |     4 +
 .../templates/common/widget/gauge_widget.hbs    |    33 +-
 .../templates/common/widget/graph_widget.hbs    |    44 +-
 .../templates/common/widget/number_widget.hbs   |    33 +-
 .../templates/common/widget/template_widget.hbs |    35 +-
 ambari-web/app/templates/main.hbs               |     2 +-
 .../app/templates/main/admin/kerberos.hbs       |    34 +-
 .../admin/stack_upgrade/upgrade_history.hbs     |    14 +-
 .../main/alerts/create_alert_notification.hbs   |    14 +
 ambari-web/app/templates/main/dashboard.hbs     |     2 +-
 .../main/dashboard/widgets/cluster_metrics.hbs  |    25 +-
 .../main/dashboard/widgets/hbase_links.hbs      |    15 +-
 .../main/dashboard/widgets/hdfs_links.hbs       |    17 +-
 .../main/dashboard/widgets/pie_chart.hbs        |    21 +-
 .../main/dashboard/widgets/simple_text.hbs      |    21 +-
 .../templates/main/dashboard/widgets/uptime.hbs |    16 +-
 .../main/dashboard/widgets/yarn_links.hbs       |    18 +-
 .../main/host/delete_hosts_result_popup.hbs     |     8 +-
 .../main/service/all_services_actions.hbs       |     6 +-
 .../app/templates/main/service/info/summary.hbs |    91 +-
 .../main/service/info/summary/base.hbs          |    13 +-
 .../service/info/summary/client_components.hbs  |    10 +-
 .../service/info/summary/master_components.hbs  |    26 +-
 .../service/info/summary/slave_components.hbs   |    12 +-
 ambari-web/app/templates/main/service/item.hbs  |    40 +-
 .../app/templates/main/service/menu_item.hbs    |    11 +-
 .../templates/main/service/services/hbase.hbs   |   128 +-
 .../templates/main/service/services/hdfs.hbs    |   270 +-
 .../templates/main/service/services/hive.hbs    |    13 +-
 .../templates/main/service/services/ranger.hbs  |    59 +-
 .../templates/main/service/services/storm.hbs   |   118 +-
 .../templates/main/service/services/yarn.hbs    |   194 +-
 .../app/templates/main/side-menu-item.hbs       |     6 +-
 ambari-web/app/templates/wizard/step4.hbs       |    16 +-
 ambari-web/app/templates/wizard/step6.hbs       |     2 +-
 ambari-web/app/templates/wizard/step8.hbs       |     2 +-
 ambari-web/app/utils/ajax/ajax.js               |    12 +-
 ambari-web/app/utils/array_utils.js             |     6 +-
 ambari-web/app/utils/config.js                  |     2 +-
 ambari-web/app/utils/db.js                      |    14 +-
 ambari-web/app/utils/validator.js               |     8 +
 ambari-web/app/views/common/chart/pie.js        |    10 +-
 .../configs/service_config_container_view.js    |     2 +-
 .../app/views/common/quick_view_link_view.js    |    14 +-
 .../views/common/widget/gauge_widget_view.js    |    14 +-
 ambari-web/app/views/loading.js                 |     2 +-
 ambari-web/app/views/main/admin.js              |    14 +-
 .../views/main/admin/kerberos/disable_view.js   |     3 +-
 .../main/admin/stack_upgrade/services_view.js   |     2 +-
 .../admin/stack_upgrade/upgrade_history_view.js |    42 +-
 .../stack_upgrade/upgrade_version_box_view.js   |    14 +-
 .../upgrade_version_column_view.js              |     2 +-
 .../admin/stack_upgrade/upgrade_wizard_view.js  |     2 +-
 .../main/admin/stack_upgrade/versions_view.js   |     2 +-
 .../main/alerts/definition_details_view.js      |     2 +-
 ambari-web/app/views/main/dashboard/widgets.js  |     2 +-
 .../dashboard/widgets/cluster_metrics_widget.js |     3 -
 .../main/dashboard/widgets/pie_chart_widget.js  |    23 +-
 ambari-web/app/views/main/host.js               |     8 +-
 ambari-web/app/views/main/menu.js               |    28 +-
 .../app/views/main/service/info/summary.js      |    24 +
 ambari-web/app/views/main/service/item.js       |     2 +-
 ambari-web/app/views/main/service/menu.js       |     4 -
 ambari-web/app/views/main/service/service.js    |    13 +-
 .../app/views/main/service/services/hbase.js    |     2 +-
 .../app/views/main/service/services/hdfs.js     |    19 +-
 .../app/views/main/service/services/yarn.js     |     3 +-
 ambari-web/app/views/wizard/step4_view.js       |     7 +-
 ambari-web/brunch-config.js                     |     3 +-
 ambari-web/pom.xml                              |    66 +-
 ambari-web/test/app_test.js                     |    10 +-
 .../global/wizard_watcher_controller_test.js    |     3 +-
 .../admin/stack_and_upgrade_controller_test.js  |    72 +-
 ...anage_alert_notifications_controller_test.js |    38 +-
 .../main/host/add_controller_test.js            |    19 -
 .../test/controllers/main/host/details_test.js  |    64 +-
 .../controllers/main/views_controller_test.js   |    14 +-
 .../test/controllers/wizard/step8_test.js       |    82 +-
 ambari-web/test/controllers/wizard_test.js      |     4 -
 .../stack_upgrade_history_mapper_test.js        |    32 +-
 .../test/mixins/common/widget_mixin_test.js     |     2 +
 ambari-web/test/models/view_instance_test.js    |     6 +-
 ambari-web/test/utils/config_test.js            |     2 +-
 .../common/widget/gauge_widget_view_test.js     |     2 +-
 .../admin/stack_upgrade/services_view_test.js   |     1 +
 .../stack_upgrade/upgrade_history_view_test.js  |    83 +-
 .../upgrade_version_box_view_test.js            |    43 +-
 .../stack_upgrade/upgrade_wizard_view_test.js   |     2 +-
 .../admin/stack_upgrade/version_view_test.js    |     6 +-
 .../main/alerts/definition_details_view_test.js |     2 +-
 .../test/views/main/dashboard/widgets_test.js   |     4 +-
 ambari-web/test/views/main/host_test.js         |     4 +-
 ambari-web/test/views/main/service/menu_test.js |    12 -
 .../vendor/scripts/theme/bootstrap-ambari.js    |    20 +-
 .../stacks/HDF/2.0/services/KAFKA/kerberos.json |     3 +
 .../src/main/assemblies/odpi-ambari-mpack.xml   |     2 +-
 .../stacks/ODPi/2.0/services/stack_advisor.py   |     2 +-
 .../addon/components/directory-viewer.js        |   324 +-
 .../hdfs-directory-viewer/addon/styles/app.css  |   190 +
 .../templates/components/directory-viewer.hbs   |   145 +
 .../addon/utils/viewer-config.js                |     4 +
 .../ui/hdfs-directory-viewer/bower.json         |     1 -
 .../resources/ui/hdfs-directory-viewer/index.js |     3 -
 .../ui/hdfs-directory-viewer/package.json       |     5 +-
 .../view/filebrowser/DownloadService.java       |    13 +-
 contrib/views/hawq/pom.xml                      |     2 +-
 contrib/views/hive-next/pom.xml                 |     4 +-
 .../ambari/view/hive2/actor/DeathWatch.java     |     5 +-
 .../view/hive2/client/NonPersistentCursor.java  |     4 +-
 .../hive2/resources/uploads/UploadService.java  |     4 +-
 .../src/main/resources/ui/hive-web/Brocfile.js  |     1 +
 .../ui/hive-web/vendor/browser-pollyfills.js    |   213 +
 contrib/views/hive20/pom.xml                    |     4 +-
 .../ambari/view/hive20/actor/DeathWatch.java    |     7 +-
 .../view/hive20/client/NonPersistentCursor.java |     4 +-
 .../main/resources/ui/app/models/worksheet.js   |     1 +
 .../resources/ui/app/routes/queries/query.js    |    15 +-
 .../ui/app/routes/queries/query/results.js      |     6 +-
 .../src/main/resources/ui/app/styles/app.scss   |     1 +
 .../templates/components/query-result-table.hbs |    92 +-
 .../ui/app/templates/queries/query.hbs          |    10 +-
 .../ui/app/templates/queries/query/log.hbs      |    12 +-
 .../ui/app/templates/queries/query/results.hbs  |     9 +-
 .../src/main/resources/ui/ember-cli-build.js    |     1 +
 .../resources/ui/vendor/browser-pollyfills.js   |   213 +
 contrib/views/pig/pom.xml                       |     2 +-
 contrib/views/pom.xml                           |     1 -
 contrib/views/slider/docs/index.md              |   164 -
 contrib/views/slider/gzip-content.cmd           |    17 -
 contrib/views/slider/gzip-content.ps1           |    81 -
 contrib/views/slider/pom.xml                    |   463 -
 .../apache/ambari/view/slider/AlertField.java   |    62 -
 .../apache/ambari/view/slider/AlertState.java   |    40 -
 .../ambari/view/slider/MetricsHolder.java       |    44 -
 .../apache/ambari/view/slider/SliderApp.java    |   198 -
 .../ambari/view/slider/SliderAppComponent.java  |    62 -
 .../ambari/view/slider/SliderAppType.java       |   107 -
 .../view/slider/SliderAppTypeComponent.java     |   103 -
 .../slider/SliderAppTypesResourceProvider.java  |    94 -
 .../ambari/view/slider/SliderAppsAlerts.java    |   127 -
 .../view/slider/SliderAppsConfiguration.java    |    52 -
 .../view/slider/SliderAppsResourceProvider.java |   124 -
 .../view/slider/SliderAppsViewController.java   |   112 -
 .../slider/SliderAppsViewControllerImpl.java    |  1510 -
 .../apache/ambari/view/slider/TemporalInfo.java |    48 -
 .../apache/ambari/view/slider/ViewStatus.java   |    72 -
 .../view/slider/clients/AmbariClient.java       |    58 -
 .../view/slider/clients/AmbariCluster.java      |    52 -
 .../view/slider/clients/AmbariClusterInfo.java  |    40 -
 .../slider/clients/AmbariHostComponent.java     |    49 -
 .../view/slider/clients/AmbariHostInfo.java     |    32 -
 .../view/slider/clients/AmbariService.java      |    36 -
 .../view/slider/clients/AmbariServiceInfo.java  |    51 -
 .../slider/rest/SliderAppTypesResource.java     |    54 -
 .../view/slider/rest/SliderAppsResource.java    |   163 -
 .../view/slider/rest/ViewStatusResource.java    |    40 -
 .../slider/rest/client/AmbariHttpClient.java    |   233 -
 .../view/slider/rest/client/BaseHttpClient.java |   157 -
 .../slider/rest/client/JMXMetricHolder.java     |    50 -
 .../ambari/view/slider/rest/client/Metric.java  |   158 -
 .../slider/rest/client/SliderAppJmxHelper.java  |   205 -
 .../rest/client/SliderAppMasterClient.java      |   324 -
 .../rest/client/SliderAppMetricsHelper.java     |   159 -
 .../view/slider/rest/client/TimelineMetric.java |   172 -
 .../slider/rest/client/TimelineMetrics.java     |   101 -
 .../rest/client/URLStreamProviderBasicAuth.java |   105 -
 .../slider/src/main/resources/slider.properties |    19 -
 .../slider/src/main/resources/ui/.gitignore     |    31 -
 .../views/slider/src/main/resources/ui/LICENSE  |    21 -
 .../slider/src/main/resources/ui/README.md      |   122 -
 .../src/main/resources/ui/app/assets/404.html   |   175 -
 .../app/assets/apple-touch-icon-precomposed.png |   Bin 1226 -> 0 bytes
 .../resources/ui/app/assets/crossdomain.xml     |    31 -
 .../resources/ui/app/assets/data/apps/apps.json |  1320 -
 .../ui/app/assets/data/apptypes/all_fields.json |   642 -
 .../ui/app/assets/data/metrics/metric.json      |   946 -
 .../ui/app/assets/data/metrics/metric2.json     |  3838 --
 .../ui/app/assets/data/metrics/metric3.json     |  1856 -
 .../ui/app/assets/data/metrics/metric4.json     |   968 -
 .../ui/app/assets/data/resource/empty_json.json |     1 -
 .../data/resource/slider-properties-2.json      |     9 -
 .../assets/data/resource/slider-properties.json |   148 -
 .../app/assets/data/resource/status_false.json  |     8 -
 .../app/assets/data/resource/status_true.json   |     5 -
 .../main/resources/ui/app/assets/favicon.ico    |   Bin 766 -> 0 bytes
 .../ui/app/assets/font/fontawesome-webfont.eot  |   Bin 37405 -> 0 bytes
 .../ui/app/assets/font/fontawesome-webfont.svg  |   399 -
 .../ui/app/assets/font/fontawesome-webfont.ttf  |   Bin 79076 -> 0 bytes
 .../ui/app/assets/font/fontawesome-webfont.woff |   Bin 43572 -> 0 bytes
 .../resources/ui/app/assets/images/.gitkeep     |     0
 .../ui-bg_flat_0_aaaaaa_40x100.png              |   Bin 180 -> 0 bytes
 .../ui-bg_glass_55_fbf9ee_1x400.png             |   Bin 120 -> 0 bytes
 .../ui-bg_glass_65_ffffff_1x400.png             |   Bin 105 -> 0 bytes
 .../ui-bg_glass_75_dadada_1x400.png             |   Bin 111 -> 0 bytes
 .../ui-bg_glass_75_e6e6e6_1x400.png             |   Bin 110 -> 0 bytes
 .../ui-bg_glass_75_ffffff_1x400.png             |   Bin 107 -> 0 bytes
 .../ui-bg_highlight-soft_75_cccccc_1x100.png    |   Bin 101 -> 0 bytes
 .../ui-bg_inset-soft_95_fef1ec_1x100.png        |   Bin 123 -> 0 bytes
 .../ui-icons_222222_256x240.png                 |   Bin 4369 -> 0 bytes
 .../ui-icons_2e83ff_256x240.png                 |   Bin 4369 -> 0 bytes
 .../ui-icons_454545_256x240.png                 |   Bin 4369 -> 0 bytes
 .../ui-icons_888888_256x240.png                 |   Bin 4369 -> 0 bytes
 .../ui-icons_cd0a0a_256x240.png                 |   Bin 4369 -> 0 bytes
 .../ui-icons_f6cf3b_256x240.png                 |   Bin 8884 -> 0 bytes
 .../src/main/resources/ui/app/assets/index.html |    46 -
 .../ui/app/assets/javascripts/ember-qunit.js    |   266 -
 .../ui/app/assets/javascripts/jquery.mockjax.js |   692 -
 .../assets/javascripts/modernizr-2.6.2.min.js   |     4 -
 .../ui/app/assets/javascripts/qunit.js          |  2495 -
 .../ui/app/assets/javascripts/sinon-1.13.0.js   |  5830 --
 .../app/assets/javascripts/sinon-qunit-1.0.0.js |    62 -
 .../ui/app/assets/javascripts/tests.js          |    29 -
 .../ui/app/assets/stylesheets/qunit.css         |   237 -
 .../src/main/resources/ui/app/assets/tests.html |    46 -
 .../main/resources/ui/app/components/.gitkeep   |     0
 .../ui/app/components/configSection.js          |   164 -
 .../src/main/resources/ui/app/config/app.js     |    27 -
 .../src/main/resources/ui/app/config/env.js     |    33 -
 .../src/main/resources/ui/app/config/router.js  |    35 -
 .../src/main/resources/ui/app/config/store.js   |    23 -
 .../main/resources/ui/app/controllers/.gitkeep  |     0
 .../app/controllers/application_controller.js   |    27 -
 .../createAppWizard/step1_controller.js         |   251 -
 .../createAppWizard/step2_controller.js         |   136 -
 .../createAppWizard/step3_controller.js         |   250 -
 .../createAppWizard/step4_controller.js         |   176 -
 .../controllers/create_app_wizard_controller.js |   122 -
 .../slider_app/summary_controller.js            |    27 -
 .../ui/app/controllers/slider_app_controller.js |   472 -
 .../app/controllers/slider_apps_controller.js   |    35 -
 .../ui/app/controllers/slider_controller.js     |   138 -
 .../ui/app/controllers/tooltip_controller.js    |    19 -
 .../src/main/resources/ui/app/helpers/.gitkeep  |     0
 .../src/main/resources/ui/app/helpers/ajax.js   |   388 -
 .../src/main/resources/ui/app/helpers/helper.js |   169 -
 .../resources/ui/app/helpers/string_utils.js    |   163 -
 .../src/main/resources/ui/app/initialize.js     |   171 -
 .../ui/app/mappers/application_type.js          |   162 -
 .../src/main/resources/ui/app/mappers/mapper.js |    56 -
 .../ui/app/mappers/slider_apps_mapper.js        |   292 -
 .../ui/app/mixins/ajax_error_handler.js         |    82 -
 .../resources/ui/app/mixins/run_periodically.js |   109 -
 .../main/resources/ui/app/mixins/with_panels.js |    53 -
 .../src/main/resources/ui/app/models/.gitkeep   |     0
 .../resources/ui/app/models/config_property.js  |    47 -
 .../src/main/resources/ui/app/models/host.js    |    33 -
 .../main/resources/ui/app/models/slider_app.js  |   207 -
 .../resources/ui/app/models/slider_app_alert.js |   149 -
 .../ui/app/models/slider_app_component.js       |    65 -
 .../resources/ui/app/models/slider_app_type.js  |    64 -
 .../ui/app/models/slider_app_type_component.js  |    63 -
 .../resources/ui/app/models/slider_config.js    |    45 -
 .../ui/app/models/slider_quick_link.js          |    33 -
 .../resources/ui/app/models/typed_property.js   |    38 -
 .../ui/app/routes/create_app_wizard.js          |    54 -
 .../src/main/resources/ui/app/routes/main.js    |    75 -
 .../src/main/resources/ui/app/styles/app.less   |   303 -
 .../resources/ui/app/styles/application.less    |    23 -
 .../resources/ui/app/styles/application.styl    |    18 -
 .../resources/ui/app/styles/apps-table.less     |   320 -
 .../main/resources/ui/app/styles/common.less    |   109 -
 .../resources/ui/app/styles/old-bootstrap.less  |   164 -
 .../main/resources/ui/app/styles/wizard.less    |   232 -
 .../resources/ui/app/templates/application.hbs  |    56 -
 .../ui/app/templates/common/ajax_error.hbs      |    24 -
 .../ui/app/templates/common/app_tooltip.hbs     |    24 -
 .../resources/ui/app/templates/common/chart.hbs |    26 -
 .../ui/app/templates/common/config.hbs          |    37 -
 .../ui/app/templates/components/.gitkeep        |     0
 .../app/templates/components/configSection.hbs  |    78 -
 .../ui/app/templates/createAppWizard.hbs        |    43 -
 .../ui/app/templates/createAppWizard/step1.hbs  |   192 -
 .../ui/app/templates/createAppWizard/step2.hbs  |    62 -
 .../ui/app/templates/createAppWizard/step3.hbs  |    37 -
 .../ui/app/templates/createAppWizard/step4.hbs  |    41 -
 .../main/resources/ui/app/templates/index.hbs   |    21 -
 .../resources/ui/app/templates/slider_app.hbs   |    70 -
 .../ui/app/templates/slider_app/configs.hbs     |    40 -
 .../slider_app/destroy/destroy_popup.hbs        |    20 -
 .../slider_app/destroy/destroy_popup_footer.hbs |    28 -
 .../ui/app/templates/slider_app/flex_popup.hbs  |    40 -
 .../ui/app/templates/slider_app/summary.hbs     |   135 -
 .../resources/ui/app/templates/slider_apps.hbs  |    87 -
 .../ui/app/templates/slider_title_tooltip.hbs   |    27 -
 .../ui/app/templates/unavailable_apps.hbs       |    22 -
 .../src/main/resources/ui/app/translations.js   |   169 -
 .../src/main/resources/ui/app/views/.gitkeep    |     0
 .../resources/ui/app/views/application_view.js  |    70 -
 .../resources/ui/app/views/common/chart_view.js |   914 -
 .../ui/app/views/common/config_set_view.js      |    57 -
 .../ui/app/views/common/filter_view.js          |   370 -
 .../resources/ui/app/views/common/sort_view.js  |   206 -
 .../resources/ui/app/views/common/table_view.js |   418 -
 .../ui/app/views/createAppWizard/step1_view.js  |    47 -
 .../ui/app/views/createAppWizard/step2_view.js  |    33 -
 .../ui/app/views/createAppWizard/step3_view.js  |    25 -
 .../ui/app/views/createAppWizard/step4_view.js  |    24 -
 .../ui/app/views/create_app_wizard_view.js      |    80 -
 .../ui/app/views/slider_app/configs_view.js     |    57 -
 .../slider_app/destroy_modal_footer_view.js     |    41 -
 .../app/views/slider_app/destroy_popup_view.js  |    37 -
 .../views/slider_app/metrics/app_metric_view.js |    77 -
 .../views/slider_app/metrics/metric2_view.js    |    63 -
 .../views/slider_app/metrics/metric3_view.js    |    61 -
 .../views/slider_app/metrics/metric4_view.js    |    54 -
 .../app/views/slider_app/metrics/metric_view.js |    70 -
 .../ui/app/views/slider_app/summary_view.js     |   141 -
 .../resources/ui/app/views/slider_app_view.js   |    30 -
 .../resources/ui/app/views/slider_apps_view.js  |   175 -
 .../slider/src/main/resources/ui/config.js      |   123 -
 .../main/resources/ui/envs/development/env.js   |    21 -
 .../main/resources/ui/envs/production/env.js    |    21 -
 .../arraycontroller/arraycontroller.js.hbs      |    23 -
 .../generators/arraycontroller/generator.json   |    10 -
 .../ui/generators/component/component.hbs.hbs   |    19 -
 .../ui/generators/component/component.js.hbs    |    23 -
 .../ui/generators/component/generator.json      |    14 -
 .../ui/generators/controller/controller.js.hbs  |    23 -
 .../ui/generators/controller/generator.json     |    10 -
 .../ui/generators/helper/generator.json         |    10 -
 .../ui/generators/helper/helper.js.hbs          |    24 -
 .../ui/generators/model/generator.json          |    10 -
 .../resources/ui/generators/model/model.js.hbs  |    24 -
 .../ui/generators/route/generator.json          |    10 -
 .../resources/ui/generators/route/route.js.hbs  |    25 -
 .../ui/generators/template/generator.json       |    10 -
 .../ui/generators/template/template.hbs.hbs     |    19 -
 .../resources/ui/generators/view/generator.json |    10 -
 .../resources/ui/generators/view/view.js.hbs    |    23 -
 .../slider/src/main/resources/ui/karma.conf.js  |    94 -
 .../slider/src/main/resources/ui/package.json   |    37 -
 .../slider/src/main/resources/ui/runner.js      |   136 -
 .../views/slider/src/main/resources/ui/setup.js |    78 -
 .../slider/src/main/resources/ui/test/index.md  |    28 -
 .../ui/test/integration/pages/index_test.js     |   127 -
 .../integration/pages/slider_errors_test.js     |    63 -
 .../processes/create_new_app_test.js            |   358 -
 .../createAppWizard/step1_controller_test.js    |   431 -
 .../createAppWizard/step2_controller_test.js    |   403 -
 .../createAppWizard/step3_controller_test.js    |   421 -
 .../createAppWizard/step4_controller_test.js    |   440 -
 .../create_app_wizard_controller_test.js        |   201 -
 .../slider_app/summary_controller_test.js       |    36 -
 .../controllers/slider_app_controller_test.js   |   607 -
 .../controllers/slider_apps_controller_test.js  |    58 -
 .../unit/controllers/slider_controller_test.js  |   140 -
 .../unit/mappers/slider_apps_mapper_test.js     |    85 -
 .../unit/models/slider_app_component_test.js    |    51 -
 .../ui/test/unit/models/slider_app_test.js      |    95 -
 .../test/unit/views/common/table_view_test.js   |    35 -
 .../unit/views/slider_app/summary_view_test.js  |    68 -
 .../ui/vendor/scripts/common/bootstrap.js       |  1951 -
 .../ui/vendor/scripts/common/bs-basic.min.js    |     1 -
 .../ui/vendor/scripts/common/bs-button.min.js   |     1 -
 .../ui/vendor/scripts/common/bs-core.min.js     |     1 -
 .../ui/vendor/scripts/common/bs-modal.min.js    |     1 -
 .../ui/vendor/scripts/common/bs-nav.min.js      |     1 -
 .../ui/vendor/scripts/common/bs-popover.min.js  |     1 -
 .../vendor/scripts/common/console-polyfill.js   |    13 -
 .../ui/vendor/scripts/common/cubism.v1.js       |  1085 -
 .../resources/ui/vendor/scripts/common/d3.v2.js |  7033 ---
 .../vendor/scripts/common/ember-i18n-1.4.1.js   |   199 -
 .../ui/vendor/scripts/common/handlebars.js      |  2746 -
 .../ui/vendor/scripts/common/jquery.js          |  8829 ---
 .../ui/vendor/scripts/common/jquery.timeago.js  |   214 -
 .../ui/vendor/scripts/common/jquery.ui.core.js  |   334 -
 .../ui/vendor/scripts/common/jquery.ui.mouse.js |   175 -
 .../vendor/scripts/common/jquery.ui.sortable.js |  1088 -
 .../vendor/scripts/common/jquery.ui.widget.js   |   276 -
 .../ui/vendor/scripts/common/moment.min.js      |     7 -
 .../ui/vendor/scripts/common/rickshaw.js        |  2659 -
 .../resources/ui/vendor/scripts/common/tv4.js   |  1605 -
 .../ui/vendor/scripts/development/ember-data.js | 10620 ----
 .../ui/vendor/scripts/development/ember.js      | 43235 -------------
 .../ui/vendor/scripts/production/ember-data.js  | 10626 ----
 .../ui/vendor/scripts/production/ember.js       | 41620 ------------
 .../resources/ui/vendor/styles/bootstrap.css    |  5785 --
 .../main/resources/ui/vendor/styles/cubism.css  |    82 -
 .../ui/vendor/styles/font-awesome-ie7.css       |  1203 -
 .../resources/ui/vendor/styles/font-awesome.css |  1479 -
 .../jquery-ui-1.8.16.custom.css                 |  1320 -
 .../resources/ui/vendor/styles/rickshaw.css     |   307 -
 .../src/main/resources/view.log4j.properties    |    27 -
 .../views/slider/src/main/resources/view.xml    |    82 -
 .../ambari/view/slider/SliderClientTest.java    |    31 -
 .../rest/client/SliderAppMasterClientTest.java  |   177 -
 contrib/views/tez/pom.xml                       |     3 +-
 contrib/views/wfmanager/pom.xml                 |     1 +
 .../ui/app/components/flow-designer.js          |    27 +
 .../resources/ui/app/components/hdfs-browser.js |     8 +-
 .../ui/app/components/search-create-new-bar.js  |    12 +-
 .../ui/app/domain/actionjob_hanlder.js          |     3 +
 .../ui/app/domain/workflow-xml-generator.js     |     3 +
 .../ui/app/services/workspace-manager.js        |     5 +
 .../src/main/resources/ui/app/styles/app.less   |     5 +-
 .../app/templates/components/flow-designer.hbs  |     9 +-
 .../app/templates/components/hdfs-browser.hbs   |    16 +-
 .../components/search-create-new-bar.hbs        |     4 +
 .../app/templates/components/spark-action.hbs   |     7 +-
 .../main/resources/ui/app/utils/constants.js    |     3 +-
 .../main/resources/ui/app/utils/hdfsviewer.js   |     3 +
 .../wfmanager/src/main/resources/ui/bower.json  |     5 +-
 .../addon/components/directory-viewer.js        |   325 +-
 .../hdfs-directory-viewer/addon/styles/app.css  |   190 +
 .../templates/components/directory-viewer.hbs   |   146 +
 .../addon/utils/viewer-config.js                |     3 +
 .../hdfs-directory-viewer/bower.json            |     1 -
 .../hdfs-directory-viewer/index.js              |     3 -
 .../hdfs-directory-viewer/package.json          |     5 +-
 .../src/main/resources/ui/package.json          |     3 +-
 .../wfmanager/src/main/resources/ui/yarn.lock   |    68 +-
 .../config-utils/diff_stack_properties.py       |   154 +
 docs/pom.xml                                    |    38 +-
 docs/src/site/apt/index.apt                     |     2 +-
 docs/src/site/apt/whats-new.apt                 |     4 +-
 docs/src/site/site.xml                          |     4 +
 pom.xml                                         |    18 +-
 utility/pom.xml                                 |   101 -
 utility/src/main/java/category/AlertTest.java   |    27 -
 .../main/java/category/AmbariUpgradeTest.java   |    27 -
 .../src/main/java/category/BlueprintTest.java   |    27 -
 utility/src/main/java/category/FastTest.java    |    27 -
 .../src/main/java/category/KerberosTest.java    |    27 -
 utility/src/main/java/category/MetricsTest.java |    27 -
 utility/src/main/java/category/SlowTest.java    |    27 -
 .../main/java/category/StackUpgradeTest.java    |    27 -
 ...AvoidTransactionalOnPrivateMethodsCheck.java |    55 -
 .../src/main/resources/checkstyle_packages.xml  |    15 -
 ...dTransactionalOnPrivateMethodsCheckTest.java |    49 -
 .../InputTransactionalOnPrivateMethods.java     |    46 -
 3523 files changed, 196021 insertions(+), 267619 deletions(-)
----------------------------------------------------------------------



[48/52] [abbrv] ambari git commit: Revert "AMBARI-21077: Refactor API endpoint to have a single entry point for an API version (jluniya)"

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
index 4a63ff0..936b857 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
@@ -34,13 +34,13 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 
 /**
  * Service responsible for request resource requests.
  */
+@Path("/requests/")
 public class RequestService extends BaseService {
   /**
    * Parent cluster name.
@@ -48,8 +48,7 @@ public class RequestService extends BaseService {
   private String m_clusterName;
 
 
-  public RequestService(ApiVersion apiVersion) {
-    super(apiVersion);
+  public RequestService() {
   }
   
   /**
@@ -57,8 +56,7 @@ public class RequestService extends BaseService {
    *
    * @param clusterName cluster id
    */
-  public RequestService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public RequestService(String clusterName) {
     m_clusterName = clusterName;
   }
 
@@ -104,7 +102,7 @@ public class RequestService extends BaseService {
    */
   @Path("{requestId}/stages")
   public StageService getStageHandler(@PathParam("requestId") String requestId) {
-    return new StageService(m_apiVersion, m_clusterName, requestId);
+    return new StageService(m_clusterName, requestId);
   }
 
   /**
@@ -112,7 +110,7 @@ public class RequestService extends BaseService {
    */
   @Path("{requestId}/tasks")
   public TaskService getTaskHandler(@PathParam("requestId") String requestId) {
-    return new TaskService(m_apiVersion, m_clusterName, requestId, null);
+    return new TaskService(m_clusterName, requestId, null);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/RoleAuthorizationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RoleAuthorizationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RoleAuthorizationService.java
index 8f6985c..f7365a1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RoleAuthorizationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RoleAuthorizationService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -40,14 +39,15 @@ import org.apache.ambari.server.controller.spi.Resource;
  * The result sets returned by this service are either the full set of available authorizations or
  * those related to a particular permission.
  */
+@Path("/authorizations/")
 public class RoleAuthorizationService extends BaseService {
   private String permissionId;
 
   /**
    * Constructs a new RoleAuthorizationService that is not linked to any role (or permission)
    */
-  public RoleAuthorizationService(ApiVersion apiVersion) {
-    this(apiVersion, null);
+  public RoleAuthorizationService() {
+    this(null);
   }
 
   /**
@@ -55,8 +55,7 @@ public class RoleAuthorizationService extends BaseService {
    *
    * @param permissionId the permission id of a permission (or role)
    */
-  public RoleAuthorizationService(ApiVersion apiVersion, String permissionId) {
-    super(apiVersion);
+  public RoleAuthorizationService(String permissionId) {
     this.permissionId = permissionId;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
index 96ca167..ce9240c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
@@ -32,15 +32,11 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
+@Path("/services/")
 public class RootServiceService extends BaseService {
-
-  public RootServiceService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
+  
   @GET
   @Produces("text/plain")
   public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceConfigVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceConfigVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceConfigVersionService.java
index 6a76cf8..43eabdc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceConfigVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceConfigVersionService.java
@@ -29,7 +29,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 public class ServiceConfigVersionService extends BaseService {
@@ -38,8 +37,7 @@ public class ServiceConfigVersionService extends BaseService {
    */
   private String m_clusterName;
 
-  public ServiceConfigVersionService(ApiVersion apiVersion, String m_clusterName) {
-    super(apiVersion);
+  public ServiceConfigVersionService(String m_clusterName) {
     this.m_clusterName = m_clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
index adbd31d..52871f2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
@@ -34,7 +34,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -51,8 +50,7 @@ public class ServiceService extends BaseService {
    *
    * @param clusterName cluster id
    */
-  public ServiceService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public ServiceService(String clusterName) {
     m_clusterName = clusterName;
   }
 
@@ -189,7 +187,7 @@ public class ServiceService extends BaseService {
   @Path("{serviceName}/components")
   public ComponentService getComponentHandler(@PathParam("serviceName") String serviceName) {
 
-    return new ComponentService(m_apiVersion, m_clusterName, serviceName);
+    return new ComponentService(m_clusterName, serviceName);
   }
 
   /**
@@ -198,7 +196,7 @@ public class ServiceService extends BaseService {
   @Path("{serviceName}/alerts")
   public AlertService getAlertHandler(
       @PathParam("serviceName") String serviceName) {
-    return new AlertService(m_apiVersion, m_clusterName, serviceName, null);
+    return new AlertService(m_clusterName, serviceName, null);
   }
 
   /**
@@ -381,7 +379,7 @@ public class ServiceService extends BaseService {
       @Context javax.ws.rs.core.Request request,
       @PathParam("serviceName") String serviceName) {
 
-    return new AlertHistoryService(m_apiVersion, m_clusterName, serviceName, null);
+    return new AlertHistoryService(m_clusterName, serviceName, null);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java
index 57bce21..e186be2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java
@@ -33,19 +33,19 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * Service responsible for setting resource requests.
  */
+@Path("/settings/")
 public class SettingService extends BaseService {
 
   /**
    * Construct a SettingService.
    */
-  public SettingService(ApiVersion apiVersion) {
-    super(apiVersion);
+  public SettingService() {
+
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
index 990bdd0..86bacf1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
@@ -32,18 +32,14 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * Service for stacks management.
  */
+@Path("/stacks/")
 public class StacksService extends BaseService {
 
-  public StacksService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   @GET
   @Produces("text/plain")
   public Response getStacks(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
@@ -349,33 +345,7 @@ public class StacksService extends BaseService {
     final Map<Resource.Type, String> stackProperties = new HashMap<>();
     stackProperties.put(Resource.Type.Stack, stackName);
     stackProperties.put(Resource.Type.StackVersion, stackVersion);
-    return new OperatingSystemService(m_apiVersion, stackProperties);
-  }
-
-  /**
-   * Returns host-layout recommendations for list of hosts and services.
-   *
-   * @param stackName stack name
-   * @param stackVersion stack version
-   * @return recommendations for host-layout
-   */
-  @Path("{stackName}/versions/{stackVersion}/recommendations")
-  public RecommendationService getRecommendationHandler(@PathParam("stackName") String stackName,
-          @PathParam("stackVersion") String stackVersion) {
-    return new RecommendationService(m_apiVersion, stackName, stackVersion);
-  }
-
-  /**
-   * Returns validation of host-layout.
-   *
-   * @param stackName stack name
-   * @param stackVersion stack version
-   * @return validation items if any
-   */
-  @Path("{stackName}/versions/{stackVersion}/validations")
-  public ValidationService getValidationHandler(@PathParam("stackName") String stackName,
-          @PathParam("stackVersion") String stackVersion) {
-    return new ValidationService(m_apiVersion, stackName, stackVersion);
+    return new OperatingSystemService(stackProperties);
   }
 
   /**
@@ -390,7 +360,7 @@ public class StacksService extends BaseService {
     final Map<Resource.Type, String> stackProperties = new HashMap<>();
     stackProperties.put(Resource.Type.Stack, stackName);
     stackProperties.put(Resource.Type.StackVersion, stackVersion);
-    return new RepositoryVersionService(m_apiVersion, stackProperties);
+    return new RepositoryVersionService(stackProperties);
   }
 
   /**
@@ -407,7 +377,7 @@ public class StacksService extends BaseService {
     final Map<Resource.Type, String> stackProperties = new HashMap<>();
     stackProperties.put(Resource.Type.Stack, stackName);
     stackProperties.put(Resource.Type.StackVersion, stackVersion);
-    return new CompatibleRepositoryVersionService(m_apiVersion, stackProperties);
+    return new CompatibleRepositoryVersionService(stackProperties);
   }
 
   ResourceInstance createStackServiceComponentResource(

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/StageService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/StageService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/StageService.java
index 428f8ae..6dc9010 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/StageService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/StageService.java
@@ -34,7 +34,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 
@@ -61,8 +60,7 @@ public class StageService extends BaseService {
    * @param clusterName  cluster id
    * @param requestId    request id
    */
-  public StageService(ApiVersion apiVersion, String clusterName, String requestId) {
-    super(apiVersion);
+  public StageService(String clusterName, String requestId) {
     m_clusterName = clusterName;
     m_requestId = requestId;
   }
@@ -112,7 +110,7 @@ public class StageService extends BaseService {
    */
   @Path("{stageId}/tasks")
   public TaskService getTaskHandler(@PathParam("stageId") String stageId) {
-    return new TaskService(m_apiVersion, m_clusterName, m_requestId, stageId);
+    return new TaskService(m_clusterName, m_requestId, stageId);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java
index abbd715..d022d73 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java
@@ -33,18 +33,14 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * DR target cluster service.
  */
+@Path("/targets/")
 public class TargetClusterService extends BaseService {
 
-  public TargetClusterService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Handles: GET /targets/{targetName}
    * Get a specific target.

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java
index 9a5d9be..af7f378 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -52,8 +51,7 @@ public class TaskAttemptService extends BaseService {
    * @param jobId
    *          job id
    */
-  public TaskAttemptService(ApiVersion apiVersion, String clusterName, String workflowId, String jobId) {
-    super(apiVersion);
+  public TaskAttemptService(String clusterName, String workflowId, String jobId) {
     this.clusterName = clusterName;
     this.workflowId = workflowId;
     this.jobId = jobId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java
index 8a9749e..acc4eef 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -59,8 +58,7 @@ public class TaskService extends BaseService {
    * @param requestId    request id
    * @param stageId      stage id
    */
-  public TaskService(ApiVersion apiVersion, String clusterName, String requestId, String stageId) {
-    super(apiVersion);
+  public TaskService(String clusterName, String requestId, String stageId) {
     m_clusterName = clusterName;
     m_requestId = requestId;
     m_stageId = stageId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeGroupService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeGroupService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeGroupService.java
index 4bd77bf..a3866be 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeGroupService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeGroupService.java
@@ -30,7 +30,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -41,8 +40,7 @@ public class UpgradeGroupService extends BaseService {
   private String m_clusterName = null;
   private String m_upgradeId = null;
 
-  UpgradeGroupService(ApiVersion apiVersion, String clusterName, String upgradeId) {
-    super(apiVersion);
+  UpgradeGroupService(String clusterName, String upgradeId) {
     m_clusterName = clusterName;
     m_upgradeId = upgradeId;
   }
@@ -70,7 +68,7 @@ public class UpgradeGroupService extends BaseService {
   public UpgradeItemService getUpgradeItemService(
       @Context HttpHeaders headers,
       @PathParam("upgradeGroupId") Long groupId) {
-    return new UpgradeItemService(m_apiVersion, m_clusterName, m_upgradeId, groupId.toString());
+    return new UpgradeItemService(m_clusterName, m_upgradeId, groupId.toString());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeItemService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeItemService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeItemService.java
index 61c545a..6d6c5e3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeItemService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeItemService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -43,8 +42,7 @@ public class UpgradeItemService extends BaseService {
   private String m_upgradeId = null;
   private String m_upgradeGroupId = null;
 
-  UpgradeItemService(ApiVersion apiVersion, String clusterName, String upgradeId, String upgradeGroupId) {
-    super(apiVersion);
+  UpgradeItemService(String clusterName, String upgradeId, String upgradeGroupId) {
     m_clusterName = clusterName;
     m_upgradeId = upgradeId;
     m_upgradeGroupId = upgradeGroupId;
@@ -96,7 +94,7 @@ public class UpgradeItemService extends BaseService {
       @Context HttpHeaders headers,
       @Context UriInfo ui,
       @PathParam("upgradeItemId") Long id) {
-    return new TaskService(m_apiVersion, m_clusterName, m_upgradeId, id.toString());
+    return new TaskService(m_clusterName, m_upgradeId, id.toString());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeService.java
index bb90d8a..dc54a0b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeService.java
@@ -32,7 +32,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -47,8 +46,7 @@ public class UpgradeService extends BaseService {
    *
    * @param clusterName the cluster name (not {@code null}).
    */
-  UpgradeService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  UpgradeService(String clusterName) {
     m_clusterName = clusterName;
   }
 
@@ -92,7 +90,7 @@ public class UpgradeService extends BaseService {
    */
   @Path("{upgradeId}/upgrade_groups")
   public UpgradeGroupService getUpgradeGroupHandler(@PathParam("upgradeId") String upgradeId) {
-    return new UpgradeGroupService(m_apiVersion, m_clusterName, upgradeId);
+    return new UpgradeGroupService(m_clusterName, upgradeId);
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeSummaryService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeSummaryService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeSummaryService.java
index 7e6c964..36d0074 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeSummaryService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeSummaryService.java
@@ -30,7 +30,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 
@@ -46,8 +45,7 @@ public class UpgradeSummaryService extends BaseService {
    *
    * @param clusterName the cluster name (not {@code null}).
    */
-  UpgradeSummaryService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  UpgradeSummaryService(String clusterName) {
     m_clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java
index 910777c..26d9c1d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.commons.lang.StringUtils;
 
@@ -54,8 +53,7 @@ public class UserAuthorizationService extends BaseService {
    *
    * @param username the username of the user to link thi UserAuthorizationService to
    */
-  public UserAuthorizationService(ApiVersion apiVersion, String username) {
-    super(apiVersion);
+  public UserAuthorizationService(String username) {
     this.username = username;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java
index 30a791f..7df806d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.server.api.services;
 
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -28,7 +27,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.commons.lang.StringUtils;
 /**
@@ -38,8 +36,7 @@ public class UserPrivilegeService extends PrivilegeService {
 
   private final String userName;
 
-  public UserPrivilegeService(ApiVersion apiVersion, String userName) {
-    super(apiVersion);
+  public UserPrivilegeService(String userName) {
     this.userName = userName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
index 9c7c9bc..31f3a8c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
@@ -32,18 +32,14 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * Service responsible for user requests.
  */
+@Path("/users/")
 public class UserService extends BaseService {
 
-  public UserService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Gets all users.
    * Handles: GET /users requests.
@@ -139,7 +135,7 @@ public class UserService extends BaseService {
   public PrivilegeService getPrivilegeService(@Context javax.ws.rs.core.Request request,
                                               @PathParam ("userName") String userName) {
 
-    return new UserPrivilegeService(m_apiVersion, userName);
+    return new UserPrivilegeService(userName);
   }
 
   /**
@@ -149,7 +145,7 @@ public class UserService extends BaseService {
   public ActiveWidgetLayoutService getWidgetLayoutService(@Context javax.ws.rs.core.Request request,
                                                     @PathParam ("userName") String userName) {
 
-    return new ActiveWidgetLayoutService(m_apiVersion, userName);
+    return new ActiveWidgetLayoutService(userName);
   }
 
   /**
@@ -162,7 +158,7 @@ public class UserService extends BaseService {
   @Path("{userName}/authorizations")
   public UserAuthorizationService getUserAuthorizations(
       @Context javax.ws.rs.core.Request request, @PathParam("userName") String username) {
-    return new UserAuthorizationService(m_apiVersion, username);
+    return new UserAuthorizationService(username);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/V1Service.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/V1Service.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/V1Service.java
deleted file mode 100644
index 9f8839c..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/V1Service.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.api.services;
-
-import javax.ws.rs.Path;
-
-/**
- * Entry point for v1 API version
- */
-@Path("/{apiVersion : v1}")
-public class V1Service extends AbstractVersionService {
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/V2Service.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/V2Service.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/V2Service.java
deleted file mode 100644
index b6ba06d..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/V2Service.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.api.services;
-
-import javax.ws.rs.Path;
-
-/**
- * Entry point for v2 API version
- */
-@Path("/{apiVersion : v2}")
-public class V2Service extends AbstractVersionService {
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ValidationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ValidationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ValidationService.java
index 3bfdbc0..b5b4a42 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ValidationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ValidationService.java
@@ -22,6 +22,8 @@ import java.util.HashMap;
 import java.util.Map;
 
 import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
@@ -30,50 +32,31 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
  * Service responsible for validation of host-layout and configurations.
  */
+@Path("/stacks/{stackName}/versions/{stackVersion}/validations")
 public class ValidationService extends BaseService {
 
   /**
-   * Stack name.
-   */
-  private String m_stackName;
-
-  /**
-   * Stack version.
-   */
-  private String m_stackVersion;
-
-  /**
-   * Constructor.
-   *
-   * @param apiVersion API version
-   * @param stackName Stack name
-   * @param stackVersion Stack version
-   */
-  public ValidationService(final ApiVersion apiVersion, String stackName, String stackVersion) {
-    super(apiVersion);
-    this.m_stackName = stackName;
-    this.m_stackVersion = stackVersion;
-  }
-
-  /**
    * Returns validation of host-layout.
    * 
    * @param body http body
    * @param headers http headers
    * @param ui uri info
+   * @param stackName stack name
+   * @param stackVersion stack version
    * @return validation items if any
    */
   @POST
   @Produces(MediaType.TEXT_PLAIN)
-  public Response getValidation(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+  public Response getValidation(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+      @PathParam("stackName") String stackName, @PathParam("stackVersion") String stackVersion) {
+
     return handleRequest(headers, body, ui, Request.Type.POST,
-        createValidationResource(m_stackName, m_stackVersion));
+        createValidationResource(stackName, stackVersion));
   }
 
   ResourceInstance createValidationResource(String stackName, String stackVersion) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/VersionDefinitionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/VersionDefinitionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/VersionDefinitionService.java
index 0573278..af1eb07 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/VersionDefinitionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/VersionDefinitionService.java
@@ -35,19 +35,15 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.internal.VersionDefinitionResourceProvider;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.commons.codec.binary.Base64;
 
 import com.google.gson.JsonObject;
 
+@Path("/version_definitions/")
 public class VersionDefinitionService extends BaseService {
 
-  public VersionDefinitionService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   @GET
   @Produces(MediaType.TEXT_PLAIN)
   public Response getServices(@Context HttpHeaders headers, @Context UriInfo ui) {
@@ -76,7 +72,7 @@ public class VersionDefinitionService extends BaseService {
   public OperatingSystemService getOperatingSystemsHandler(@PathParam("versionNumber") String versionNumber) {
     final Map<Resource.Type, String> mapIds = new HashMap<>();
     mapIds.put(Resource.Type.VersionDefinition, versionNumber);
-    return new OperatingSystemService(m_apiVersion, mapIds);
+    return new OperatingSystemService(mapIds);
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java
index 8303edf..2a9aa64 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java
@@ -23,7 +23,6 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 import org.apache.ambari.server.view.ViewDataMigrationUtility;
 import org.apache.ambari.server.view.ViewRegistry;
@@ -72,8 +71,7 @@ public class ViewDataMigrationService extends BaseService {
    * @param viewVersion    the current view version
    * @param instanceName   the current view instance name
    */
-  public ViewDataMigrationService(ApiVersion apiVersion, String viewName, String viewVersion, String instanceName) {
-    super(apiVersion);
+  public ViewDataMigrationService(String viewName, String viewVersion, String instanceName) {
     this.viewName = viewName;
     this.viewVersion = viewVersion;
     this.instanceName = instanceName;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
index b301fd7..515d4ac 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
@@ -32,7 +32,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.entities.ViewEntity;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
@@ -70,8 +69,7 @@ public class ViewExternalSubResourceService  extends BaseService {
 
   // ----- Constructors ------------------------------------------------------
 
-  public ViewExternalSubResourceService(ApiVersion apiVersion, Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
-    super(apiVersion);
+  public ViewExternalSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
     ViewEntity viewEntity = viewInstanceDefinition.getViewEntity();
 
     this.type         = type;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
index 2a3731e..b10738d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
@@ -35,7 +35,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 import org.apache.ambari.server.security.authorization.AuthorizationException;
@@ -68,8 +67,7 @@ public class ViewInstanceService extends BaseService {
    * @param viewName  the view id
    * @param version   the version
    */
-  public ViewInstanceService(ApiVersion apiVersion, String viewName, String version) {
-    super(apiVersion);
+  public ViewInstanceService(String viewName, String version) {
     this.viewName = viewName;
     this.version = version;
 
@@ -240,13 +238,13 @@ public class ViewInstanceService extends BaseService {
 
     hasPermission(Request.Type.valueOf(request.getMethod()), instanceName);
 
-    return new ViewPrivilegeService(m_apiVersion, viewName, version, instanceName);
+    return new ViewPrivilegeService(viewName, version, instanceName);
   }
 
   @Path("{instanceName}/migrate")
   public ViewDataMigrationService migrateData(@Context javax.ws.rs.core.Request request,
                                               @PathParam ("instanceName") String instanceName) {
-    return new ViewDataMigrationService(m_apiVersion, viewName, version, instanceName);
+    return new ViewDataMigrationService(viewName, version, instanceName);
   }
   // ----- helper methods ----------------------------------------------------
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPermissionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPermissionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPermissionService.java
index 04bbdcc..86bfa14 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPermissionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPermissionService.java
@@ -34,7 +34,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 
@@ -62,8 +61,7 @@ public class ViewPermissionService extends BaseService {
    * @param viewName  the view id
    * @param version   the version
    */
-  public ViewPermissionService(ApiVersion apiVersion, String viewName, String version) {
-    super(apiVersion);
+  public ViewPermissionService(String viewName, String version) {
     this.viewName = viewName;
     this.version  = version;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java
index 8e64388..34dd4c2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java
@@ -22,7 +22,6 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -34,8 +33,7 @@ public class ViewPrivilegeService extends PrivilegeService {
   private final String viewVersion;
   private final String instanceName;
 
-  public ViewPrivilegeService(ApiVersion apiVersion, String viewName, String viewVersion, String instanceName) {
-    super(apiVersion);
+  public ViewPrivilegeService(String viewName, String viewVersion, String instanceName) {
     this.viewName = viewName;
     this.viewVersion = viewVersion;
     this.instanceName = instanceName;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
index 8e16fa6..17a9f34 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
@@ -33,19 +33,15 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 
 /**
  * Service responsible for view resource requests.
  */
+@Path("/views/")
 public class ViewService extends BaseService {
 
-  public ViewService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Handles: GET /views/{viewID}
    * Get a specific view.
@@ -146,7 +142,7 @@ public class ViewService extends BaseService {
    */
   @Path("{viewName}/versions")
   public ViewVersionService getInstanceHandler(@PathParam("viewName") String viewName) {
-    return new ViewVersionService(m_apiVersion, viewName);
+    return new ViewVersionService(viewName);
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewSubResourceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewSubResourceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewSubResourceService.java
index 2532a28..6e00d10 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewSubResourceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewSubResourceService.java
@@ -26,7 +26,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.entities.ViewEntity;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
@@ -62,8 +61,7 @@ public class ViewSubResourceService extends BaseService implements ViewResourceH
   /**
    * Construct a view sub-resource service.
    */
-  public ViewSubResourceService(ApiVersion apiVersion, Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
-    super(apiVersion);
+  public ViewSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
     ViewEntity viewEntity = viewInstanceDefinition.getViewEntity();
 
     this.type         = type;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java
index 8eaf496..fa0be7d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.security.authorization.AuthorizationException;
 
@@ -43,12 +42,9 @@ import com.google.common.base.Optional;
 /**
  * Service responsible for view resource requests.
  */
+@Path("/view/urls")
 public class ViewUrlsService extends BaseService {
 
-  public ViewUrlsService(ApiVersion apiVersion) {
-    super(apiVersion);
-  }
-
   /**
    * Get the list of all registered view URLs
    * @param headers

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
index 72b1d6e..c10bf00 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
@@ -34,7 +34,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 
@@ -56,8 +55,7 @@ public class ViewVersionService extends BaseService {
    *
    * @param viewName  the view name
    */
-  public ViewVersionService(ApiVersion apiVersion, String viewName) {
-    super(apiVersion);
+  public ViewVersionService(String viewName) {
     this.viewName = viewName;
   }
 
@@ -166,7 +164,7 @@ public class ViewVersionService extends BaseService {
   @Path("{version}/instances")
   public ViewInstanceService getInstanceHandler(@PathParam("version") String version) {
 
-    return new ViewInstanceService(m_apiVersion, viewName, version);
+    return new ViewInstanceService(viewName, version);
   }
 
   /**
@@ -179,7 +177,7 @@ public class ViewVersionService extends BaseService {
   @Path("{version}/permissions")
   public ViewPermissionService getPermissionHandler(@PathParam("version") String version) {
 
-    return new ViewPermissionService(m_apiVersion, viewName, version);
+    return new ViewPermissionService(viewName, version);
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java
index cccab69..4886165 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -43,8 +42,7 @@ public class WidgetLayoutService extends BaseService {
   
   private final String clusterName;
 
-  public  WidgetLayoutService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public  WidgetLayoutService(String clusterName) {
     this.clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
index 1e7777b..e0fe801 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
@@ -33,7 +33,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -43,8 +42,7 @@ public class WidgetService extends BaseService {
 
   private final String clusterName;
 
-  public WidgetService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public WidgetService(String clusterName) {
     this.clusterName = clusterName;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java
index 31faf96..abffedd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java
@@ -31,7 +31,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -46,8 +45,7 @@ public class WorkflowService extends BaseService {
    * @param clusterName
    *          cluster id
    */
-  public WorkflowService(ApiVersion apiVersion, String clusterName) {
-    super(apiVersion);
+  public WorkflowService(String clusterName) {
     this.clusterName = clusterName;
   }
 
@@ -92,7 +90,7 @@ public class WorkflowService extends BaseService {
    */
   @Path("{workflowId}/jobs")
   public JobService getJobHandler(@PathParam("workflowId") String workflowId) {
-    return new JobService(m_apiVersion, clusterName, workflowId);
+    return new JobService(clusterName, workflowId);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java
index 7ff2112..05e7598 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java
@@ -31,7 +31,6 @@ import org.apache.ambari.server.api.services.stackadvisor.commands.Configuration
 import org.apache.ambari.server.api.services.stackadvisor.commands.StackAdvisorCommand;
 import org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse;
 import org.apache.ambari.server.api.services.stackadvisor.validations.ValidationResponse;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.configuration.Configuration;
 
 import com.google.inject.Inject;
@@ -83,10 +82,10 @@ public class StackAdvisorHelper {
       StackAdvisorRequestType requestType) throws StackAdvisorException {
     StackAdvisorCommand<ValidationResponse> command;
     if (requestType == StackAdvisorRequestType.HOST_GROUPS) {
-      command = new ComponentLayoutValidationCommand(ApiVersion.Default, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
+      command = new ComponentLayoutValidationCommand(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
           requestId, saRunner, metaInfo);
     } else if (requestType == StackAdvisorRequestType.CONFIGURATIONS) {
-      command = new ConfigurationValidationCommand(ApiVersion.Default, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
+      command = new ConfigurationValidationCommand(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
           requestId, saRunner, metaInfo);
     } else {
       throw new StackAdvisorRequestException(String.format("Unsupported request type, type=%s",
@@ -118,13 +117,13 @@ public class StackAdvisorHelper {
       StackAdvisorRequestType requestType) throws StackAdvisorException {
     StackAdvisorCommand<RecommendationResponse> command;
     if (requestType == StackAdvisorRequestType.HOST_GROUPS) {
-      command = new ComponentLayoutRecommendationCommand(ApiVersion.Default, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
+      command = new ComponentLayoutRecommendationCommand(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
           requestId, saRunner, metaInfo);
     } else if (requestType == StackAdvisorRequestType.CONFIGURATIONS) {
-      command = new ConfigurationRecommendationCommand(ApiVersion.Default, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
+      command = new ConfigurationRecommendationCommand(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
           requestId, saRunner, metaInfo);
     } else if (requestType == StackAdvisorRequestType.CONFIGURATION_DEPENDENCIES) {
-      command = new ConfigurationDependenciesRecommendationCommand(ApiVersion.Default, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
+      command = new ConfigurationDependenciesRecommendationCommand(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript,
           requestId, saRunner, metaInfo);
     } else {
       throw new StackAdvisorRequestException(String.format("Unsupported request type, type=%s",

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutRecommendationCommand.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutRecommendationCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutRecommendationCommand.java
index 35f7e0d..87725dc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutRecommendationCommand.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutRecommendationCommand.java
@@ -25,7 +25,6 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorException;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
 import org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * {@link StackAdvisorCommand} implementation for component-layout
@@ -34,13 +33,13 @@ import org.apache.ambari.server.api.util.ApiVersion;
 public class ComponentLayoutRecommendationCommand extends
     StackAdvisorCommand<RecommendationResponse> {
 
-  public ComponentLayoutRecommendationCommand(ApiVersion apiVersion, File recommendationsDir,
+  public ComponentLayoutRecommendationCommand(File recommendationsDir,
                                               String recommendationsArtifactsLifetime,
                                               String stackAdvisorScript,
                                               int requestId,
                                               StackAdvisorRunner saRunner,
                                               AmbariMetaInfo metaInfo) {
-    super(apiVersion, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
+    super(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutValidationCommand.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutValidationCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutValidationCommand.java
index b93cd81..310046f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutValidationCommand.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ComponentLayoutValidationCommand.java
@@ -25,16 +25,15 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorException;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
 import org.apache.ambari.server.api.services.stackadvisor.validations.ValidationResponse;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * {@link StackAdvisorCommand} implementation for component-layout validation.
  */
 public class ComponentLayoutValidationCommand extends StackAdvisorCommand<ValidationResponse> {
 
-  public ComponentLayoutValidationCommand(ApiVersion apiVersion, File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript,
+  public ComponentLayoutValidationCommand(File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript,
                                           int requestId, StackAdvisorRunner saRunner, AmbariMetaInfo metaInfo) {
-    super(apiVersion, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
+    super(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationDependenciesRecommendationCommand.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationDependenciesRecommendationCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationDependenciesRecommendationCommand.java
index b765689..6a2adfa 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationDependenciesRecommendationCommand.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationDependenciesRecommendationCommand.java
@@ -32,7 +32,6 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorException;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
 import org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * {@link StackAdvisorCommand} implementation for
@@ -41,9 +40,9 @@ import org.apache.ambari.server.api.util.ApiVersion;
 public class ConfigurationDependenciesRecommendationCommand extends
     StackAdvisorCommand<RecommendationResponse> {
 
-  public ConfigurationDependenciesRecommendationCommand(ApiVersion apiVersion, File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript, int requestId,
+  public ConfigurationDependenciesRecommendationCommand(File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript, int requestId,
                                                         StackAdvisorRunner saRunner, AmbariMetaInfo metaInfo) {
-    super(apiVersion, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
+    super(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommand.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommand.java
index 70b14fd..6eaf19e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommand.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommand.java
@@ -32,7 +32,6 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorException;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
 import org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * {@link org.apache.ambari.server.api.services.stackadvisor.commands.StackAdvisorCommand} implementation for
@@ -41,9 +40,9 @@ import org.apache.ambari.server.api.util.ApiVersion;
 public class ConfigurationRecommendationCommand extends
     StackAdvisorCommand<RecommendationResponse> {
 
-  public ConfigurationRecommendationCommand(ApiVersion apiVersion, File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript, int requestId,
+  public ConfigurationRecommendationCommand(File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript, int requestId,
                                             StackAdvisorRunner saRunner, AmbariMetaInfo metaInfo) {
-    super(apiVersion, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
+    super(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationValidationCommand.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationValidationCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationValidationCommand.java
index a5717b9..60132a1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationValidationCommand.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationValidationCommand.java
@@ -25,16 +25,15 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorException;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
 import org.apache.ambari.server.api.services.stackadvisor.validations.ValidationResponse;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * {@link StackAdvisorCommand} implementation for configuration validation.
  */
 public class ConfigurationValidationCommand extends StackAdvisorCommand<ValidationResponse> {
 
-  public ConfigurationValidationCommand(ApiVersion apiVersion, File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript,
+  public ConfigurationValidationCommand(File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript,
                                         int requestId, StackAdvisorRunner saRunner, AmbariMetaInfo metaInfo) {
-    super(apiVersion, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
+    super(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
index 85fc13f..74a2cf2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
@@ -45,7 +45,6 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorException;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorResponse;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.state.ServiceInfo;
 import org.apache.ambari.server.utils.DateUtils;
@@ -110,9 +109,8 @@ public abstract class StackAdvisorCommand<T extends StackAdvisorResponse> extend
   private final AmbariMetaInfo metaInfo;
 
   @SuppressWarnings("unchecked")
-  public StackAdvisorCommand(ApiVersion apiVersion, File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript, int requestId,
+  public StackAdvisorCommand(File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript, int requestId,
       StackAdvisorRunner saRunner, AmbariMetaInfo metaInfo) {
-    super(apiVersion);
     this.type = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass())
         .getActualTypeArguments()[0];
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/api/util/ApiVersion.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/util/ApiVersion.java b/ambari-server/src/main/java/org/apache/ambari/server/api/util/ApiVersion.java
deleted file mode 100644
index f66f32e..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/util/ApiVersion.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.api.util;
-
-import java.util.EnumSet;
-
-public enum ApiVersion {
-  v1,
-  v2;
-
-  public static ApiVersion Default = v1;
-  public static EnumSet<ApiVersion> all = EnumSet.allOf(ApiVersion.class);
-  public static EnumSet<ApiVersion> v1Only = EnumSet.of(v1);
-  public static EnumSet<ApiVersion> v2Only = EnumSet.of(v2);
-  public static EnumSet<ApiVersion> v2Plus = EnumSet.complementOf(v1Only);
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
index ab4c256..d4e45a8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
@@ -31,7 +31,6 @@ import org.apache.ambari.server.actionmanager.ActionManager;
 import org.apache.ambari.server.agent.ExecutionCommand;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.api.services.LoggingService;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.internal.DeleteStatusMetaData;
 import org.apache.ambari.server.controller.internal.RequestStageContainer;
 import org.apache.ambari.server.controller.logging.LoggingSearchPropertyProvider;
@@ -899,12 +898,11 @@ public interface AmbariManagementController {
   /**
    * Gets the LoggingService instance from the dependency injection framework.
    *
-   * @param apiVersion API version
    * @param clusterName the cluster name associated with this LoggingService instance
    *
    * @return an instance of LoggingService associated with the specified cluster.
    */
-  LoggingService getLoggingService(ApiVersion apiVersion, String clusterName);
+  LoggingService getLoggingService(String clusterName);
 
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 471e924..eed45dd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -90,7 +90,6 @@ import org.apache.ambari.server.agent.ExecutionCommand;
 import org.apache.ambari.server.agent.ExecutionCommand.KeyNames;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.api.services.LoggingService;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.configuration.Configuration.DatabaseType;
 import org.apache.ambari.server.controller.internal.DeleteStatusMetaData;
@@ -5267,20 +5266,14 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
     return injector.getInstance(MetricPropertyProviderFactory.class);
   }
 
-  /**
-   * {@inheritDoc}
-   */
   @Override
   public LoggingSearchPropertyProvider getLoggingSearchPropertyProvider() {
     return injector.getInstance(LoggingSearchPropertyProvider.class);
   }
 
-  /**
-   * {@inheritDoc}
-   */
   @Override
-  public LoggingService getLoggingService(ApiVersion apiVersion, String clusterName) {
-    LoggingService loggingService = new LoggingService(apiVersion, clusterName);
+  public LoggingService getLoggingService(String clusterName) {
+    LoggingService loggingService = new LoggingService(clusterName);
     injector.injectMembers(loggingService);
     return loggingService;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/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 f334c98..2f799b7 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
@@ -169,10 +169,7 @@ import com.sun.jersey.spi.container.servlet.ServletContainer;
 
 @Singleton
 public class AmbariServer {
-  public static final String VIEWS_V1_URL_PATTERN = "/api/v1/views/*";
-  public static final String VIEWS_V2_URL_PATTERN = "/api/v2/views/*";
-  public static final String USERS_V1_URL_PATTERN = "/api/v1/users/*";
-  public static final String USERS_V2_URL_PATTERN = "/api/v2/users/*";
+  public static final String VIEWS_URL_PATTERN = "/api/v1/views/*";
   private static Logger LOG = LoggerFactory.getLogger(AmbariServer.class);
 
   /**
@@ -394,25 +391,18 @@ public class AmbariServer {
 
       // The security header filter - conditionally adds security-related headers to the HTTP response for Ambari Views
       // requests.
-      root.addFilter(new FilterHolder(injector.getInstance(AmbariViewsSecurityHeaderFilter.class)),
-              VIEWS_V1_URL_PATTERN,
-          DISPATCHER_TYPES);
-      root.addFilter(new FilterHolder(injector.getInstance(AmbariViewsSecurityHeaderFilter.class)), VIEWS_V2_URL_PATTERN,
+      root.addFilter(new FilterHolder(injector.getInstance(AmbariViewsSecurityHeaderFilter.class)), VIEWS_URL_PATTERN,
           DISPATCHER_TYPES);
 
       // since views share the REST API threadpool, a misbehaving view could
       // consume all of the available threads and effectively cause a loss of
       // service for Ambari
       root.addFilter(new FilterHolder(injector.getInstance(ViewThrottleFilter.class)),
-              VIEWS_V1_URL_PATTERN, DISPATCHER_TYPES);
-      root.addFilter(new FilterHolder(injector.getInstance(ViewThrottleFilter.class)),
-          VIEWS_V2_URL_PATTERN, DISPATCHER_TYPES);
+        VIEWS_URL_PATTERN, DISPATCHER_TYPES);
 
       // adds MDC info for views logging
       root.addFilter(new FilterHolder(injector.getInstance(AmbariViewsMDCLoggingFilter.class)),
-              VIEWS_V1_URL_PATTERN, DISPATCHER_TYPES);
-      root.addFilter(new FilterHolder(injector.getInstance(AmbariViewsMDCLoggingFilter.class)),
-          VIEWS_V2_URL_PATTERN, DISPATCHER_TYPES);
+        VIEWS_URL_PATTERN, DISPATCHER_TYPES);
 
       // session-per-request strategy for api
       root.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/api/*", DISPATCHER_TYPES);
@@ -422,8 +412,7 @@ public class AmbariServer {
       root.addEventListener(new RequestContextListener());
 
       root.addFilter(new FilterHolder(springSecurityFilter), "/api/*", DISPATCHER_TYPES);
-      root.addFilter(new FilterHolder(new UserNameOverrideFilter()), USERS_V1_URL_PATTERN, DISPATCHER_TYPES);
-      root.addFilter(new FilterHolder(new UserNameOverrideFilter()), USERS_V2_URL_PATTERN, DISPATCHER_TYPES);
+      root.addFilter(new FilterHolder(new UserNameOverrideFilter()), "/api/v1/users/*", DISPATCHER_TYPES);
 
       // session-per-request strategy for agents
       agentroot.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/agent/*", DISPATCHER_TYPES);
@@ -460,7 +449,7 @@ public class AmbariServer {
           "org.apache.ambari.server.api");
 
       sh.setInitParameter("com.sun.jersey.api.json.POJOMappingFeature", "true");
-      root.addServlet(sh, "/api/*");
+      root.addServlet(sh, "/api/v1/*");
       sh.setInitOrder(2);
 
       SecurityContextHolder.setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL);

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index bea2884..0125d54 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -52,7 +52,6 @@ import org.apache.ambari.server.api.resources.ViewExternalSubResourceDefinition;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.api.services.ViewExternalSubResourceService;
 import org.apache.ambari.server.api.services.ViewSubResourceService;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.configuration.ComponentSSLConfiguration;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariServer;
@@ -1340,7 +1339,7 @@ public class ViewRegistry {
     ViewContext viewInstanceContext = new ViewContextImpl(viewInstanceDefinition, this);
 
     ViewExternalSubResourceService externalSubResourceService =
-        new ViewExternalSubResourceService(ApiVersion.Default, viewDefinition.getExternalResourceType(), viewInstanceDefinition);
+        new ViewExternalSubResourceService(viewDefinition.getExternalResourceType(), viewInstanceDefinition);
 
     viewInstanceDefinition.addService(ResourceConfig.EXTERNAL_RESOURCE_PLURAL_NAME, externalSubResourceService);
 
@@ -1350,7 +1349,7 @@ public class ViewRegistry {
       Resource.Type type = resourceDefinition.getType();
       ResourceConfig resourceConfig = resourceDefinition.getResourceConfiguration();
 
-      ViewResourceHandler viewResourceService = new ViewSubResourceService(ApiVersion.Default, type, viewInstanceDefinition);
+      ViewResourceHandler viewResourceService = new ViewSubResourceService(type, viewInstanceDefinition);
 
       ClassLoader cl = viewDefinition.getClassLoader();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java
index 4f81c95..b5fb6f8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ServiceService.
@@ -77,7 +76,6 @@ public class ActionServiceTest extends BaseServiceTest {
     private String m_actionName;
 
     private TestActionDefinitionService(String actionName) {
-      super(ApiVersion.Default);
       m_actionName = actionName;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java
index f111afd..adae956 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java
@@ -25,7 +25,6 @@ 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.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.entities.WidgetLayoutEntity;
 import org.junit.Test;
@@ -47,7 +46,7 @@ public class ActiveWidgetLayoutServiceTest {
 
   private class TestActiveWidgetLayoutService extends ActiveWidgetLayoutService {
     public TestActiveWidgetLayoutService(String username) {
-      super(ApiVersion.Default, username);
+      super(username);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java
index e69055a..165dd6c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for BlueprintService.
@@ -79,7 +78,6 @@ public class BlueprintServiceTest extends BaseServiceTest {
     private String m_blueprintId;
 
     private TestBlueprintService(String blueprintId) {
-      super(ApiVersion.Default);
       m_blueprintId = blueprintId;
     }
 


[21/52] [abbrv] ambari git commit: AMBARI-21399 Create property descriptions for internal Log Feeder configs (mgergely)

Posted by jl...@apache.org.
AMBARI-21399 Create property descriptions for internal Log Feeder configs (mgergely)

Change-Id: I51bf4322184da06084c1b2af35fedd6ee19ab36e


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 5c9bdbfeff7b5b78adf4d840fbd93c504f129830
Parents: 8d9fd45
Author: Miklos Gergely <mg...@hortonworks.com>
Authored: Thu Jul 6 11:08:48 2017 +0200
Committer: Miklos Gergely <mg...@hortonworks.com>
Committed: Thu Jul 6 11:08:48 2017 +0200

----------------------------------------------------------------------
 .../logsearch/config/api/LogSearchConfig.java   |  7 +-
 .../config/api/LogSearchConfigFactory.java      |  8 +-
 .../config/api/LogSearchConfigClass1.java       |  6 +-
 .../config/api/LogSearchConfigClass2.java       |  6 +-
 .../config/api/LogSearchConfigFactoryTest.java  |  6 +-
 .../config/zookeeper/LogSearchConfigZK.java     | 25 ++-----
 .../org/apache/ambari/logfeeder/LogFeeder.java  | 34 ++-------
 .../ambari/logfeeder/common/ConfigHandler.java  | 52 ++++++-------
 .../logfeeder/common/LogFeederException.java    | 31 ++++++++
 .../logfeeder/common/LogfeederException.java    | 31 --------
 .../apache/ambari/logfeeder/filter/Filter.java  |  6 +-
 .../ambari/logfeeder/filter/FilterGrok.java     | 10 +--
 .../ambari/logfeeder/filter/FilterJSON.java     |  6 +-
 .../ambari/logfeeder/filter/FilterKeyValue.java |  6 +-
 .../logfeeder/input/AbstractInputFile.java      |  3 +-
 .../apache/ambari/logfeeder/input/Input.java    | 72 +++++++++++++++---
 .../logfeeder/input/InputConfigUploader.java    | 18 ++++-
 .../ambari/logfeeder/input/InputManager.java    | 45 +++++++-----
 .../ambari/logfeeder/input/InputSimulate.java   | 74 +++++++++++++++++--
 .../loglevelfilter/LogLevelFilterHandler.java   | 28 ++++++-
 .../logfeeder/metrics/LogFeederAMSClient.java   | 43 ++++++++++-
 .../logfeeder/metrics/MetricsManager.java       | 25 +------
 .../ambari/logfeeder/output/OutputHDFSFile.java | 10 +--
 .../ambari/logfeeder/output/OutputS3File.java   |  2 +-
 .../ambari/logfeeder/output/OutputSolr.java     | 28 ++++++-
 .../apache/ambari/logfeeder/util/FileUtil.java  | 15 ----
 .../logfeeder/util/LogFeederHDFSUtil.java       | 77 ++++++++++++++++++++
 .../ambari/logfeeder/util/LogFeederUtil.java    | 41 +++++++++--
 .../logfeeder/util/LogfeederHDFSUtil.java       | 77 --------------------
 .../apache/ambari/logfeeder/util/SSLUtil.java   |  9 +++
 .../ambari/logfeeder/filter/FilterJSONTest.java |  8 +-
 .../logfeeder/input/InputManagerTest.java       | 26 -------
 .../logfeeder/metrics/MetricsManagerTest.java   |  2 -
 .../src/test/resources/logfeeder.properties     |  1 -
 .../configurer/LogSearchConfigConfigurer.java   |  2 +-
 35 files changed, 500 insertions(+), 340 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfig.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfig.java b/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfig.java
index ad1f5d4..6c5cefd 100644
--- a/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfig.java
+++ b/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfig.java
@@ -43,9 +43,10 @@ public interface LogSearchConfig extends Closeable {
    * 
    * @param component The component which will use the configuration.
    * @param properties The properties of that component.
+   * @param clusterName The name of the cluster, only need to be specified in LOGFEEDER mode (null for SERVER mode).
    * @throws Exception
    */
-  void init(Component component, Map<String, String> properties) throws Exception;
+  void init(Component component, Map<String, String> properties, String clusterName) throws Exception;
 
   /**
    * Returns all the service names with input configurations of a cluster. Will be used only in SERVER mode.
@@ -134,7 +135,9 @@ public interface LogSearchConfig extends Closeable {
    * 
    * @param inputConfigMonitor The input config monitor to call in case of an input config change.
    * @param logLevelFilterMonitor The log level filter monitor to call in case of a log level filter change.
+   * @param clusterName The name of the cluster, only need to be specified in LOGFEEDER mode (null for SERVER mode).
    * @throws Exception
    */
-  void monitorInputConfigChanges(InputConfigMonitor inputConfigMonitor, LogLevelFilterMonitor logLevelFilterMonitor) throws Exception;
+  void monitorInputConfigChanges(InputConfigMonitor inputConfigMonitor, LogLevelFilterMonitor logLevelFilterMonitor,
+      String clusterName) throws Exception;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactory.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactory.java b/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactory.java
index 947e7e7..77b48eb 100644
--- a/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactory.java
+++ b/ambari-logsearch/ambari-logsearch-config-api/src/main/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactory.java
@@ -37,12 +37,13 @@ public class LogSearchConfigFactory {
    * @param component The component of the Log Search Service to create the configuration for (SERVER/LOGFEEDER).
    * @param properties The properties of the component for which the configuration is created. If the properties contain the
    *                  "logsearch.config.class" entry than the class defined there would be used instead of the default class.
+   * @param clusterName The name of the cluster, only need to be specified in LOGFEEDER mode (null for SERVER mode).
    * @param defaultClass The default configuration class to use if not specified otherwise.
    * @return The Log Search Configuration instance.
    * @throws Exception Throws exception if the defined class does not implement LogSearchConfig, or doesn't have an empty
    *                   constructor, or throws an exception in it's init method.
    */
-  public static LogSearchConfig createLogSearchConfig(Component component, Map<String, String> properties,
+  public static LogSearchConfig createLogSearchConfig(Component component, Map<String, String> properties, String clusterName,
       Class<? extends LogSearchConfig> defaultClass) throws Exception {
     try {
       LogSearchConfig logSearchConfig = null;
@@ -52,13 +53,14 @@ public class LogSearchConfigFactory {
         if (LogSearchConfig.class.isAssignableFrom(clazz)) {
           logSearchConfig = (LogSearchConfig) clazz.newInstance();
         } else {
-          throw new IllegalArgumentException("Class " + configClassName + " does not implement the interface " + LogSearchConfig.class.getName());
+          throw new IllegalArgumentException("Class " + configClassName + " does not implement the interface " +
+              LogSearchConfig.class.getName());
         }
       } else {
         logSearchConfig = defaultClass.newInstance();
       }
       
-      logSearchConfig.init(component, properties);
+      logSearchConfig.init(component, properties, clusterName);
       return logSearchConfig;
     } catch (Exception e) {
       LOG.error("Could not initialize logsearch config.", e);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass1.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass1.java b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass1.java
index 7309382..28844d5 100644
--- a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass1.java
+++ b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass1.java
@@ -30,7 +30,7 @@ import org.apache.ambari.logsearch.config.api.model.inputconfig.InputConfig;
 
 public class LogSearchConfigClass1 implements LogSearchConfig {
   @Override
-  public void init(Component component, Map<String, String> properties) {}
+  public void init(Component component, Map<String, String> properties, String clusterName) {}
 
   @Override
   public boolean inputConfigExists(String clusterName, String serviceName) throws Exception {
@@ -44,8 +44,8 @@ public class LogSearchConfigClass1 implements LogSearchConfig {
   public void setInputConfig(String clusterName, String serviceName, String inputConfig) throws Exception {}
 
   @Override
-  public void monitorInputConfigChanges(InputConfigMonitor inputConfigMonitor, LogLevelFilterMonitor logLevelFilterMonitor)
-      throws Exception {}
+  public void monitorInputConfigChanges(InputConfigMonitor inputConfigMonitor, LogLevelFilterMonitor logLevelFilterMonitor,
+      String clusterName) throws Exception {}
 
   @Override
   public List<String> getServices(String clusterName) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass2.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass2.java b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass2.java
index f83eeef..5934fa6 100644
--- a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass2.java
+++ b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigClass2.java
@@ -30,7 +30,7 @@ import org.apache.ambari.logsearch.config.api.model.inputconfig.InputConfig;
 
 public class LogSearchConfigClass2 implements LogSearchConfig {
   @Override
-  public void init(Component component, Map<String, String> properties) {}
+  public void init(Component component, Map<String, String> properties, String clusterName) {}
 
   @Override
   public boolean inputConfigExists(String clusterName, String serviceName) throws Exception {
@@ -44,8 +44,8 @@ public class LogSearchConfigClass2 implements LogSearchConfig {
   public void setInputConfig(String clusterName, String serviceName, String inputConfig) throws Exception {}
 
   @Override
-  public void monitorInputConfigChanges(InputConfigMonitor inputConfigMonitor, LogLevelFilterMonitor logLevelFilterMonitor)
-      throws Exception {}
+  public void monitorInputConfigChanges(InputConfigMonitor inputConfigMonitor, LogLevelFilterMonitor logLevelFilterMonitor,
+      String clusterName) throws Exception {}
 
   @Override
   public List<String> getServices(String clusterName) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java
index 425694f..f990c5c 100644
--- a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java
+++ b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java
@@ -33,7 +33,7 @@ public class LogSearchConfigFactoryTest {
   @Test
   public void testDefaultConfig() throws Exception {
     LogSearchConfig config = LogSearchConfigFactory.createLogSearchConfig(Component.SERVER,
-        Collections.<String, String> emptyMap(), LogSearchConfigClass1.class);
+        Collections.<String, String> emptyMap(), null, LogSearchConfigClass1.class);
     
     Assert.assertSame(config.getClass(), LogSearchConfigClass1.class);
   }
@@ -43,7 +43,7 @@ public class LogSearchConfigFactoryTest {
     Map<String, String> logsearchConfClassMap = new HashMap<>();
     logsearchConfClassMap.put("logsearch.config.class", "org.apache.ambari.logsearch.config.api.LogSearchConfigClass2");
     LogSearchConfig config = LogSearchConfigFactory.createLogSearchConfig(Component.SERVER,
-      logsearchConfClassMap, LogSearchConfigClass1.class);
+      logsearchConfClassMap, null, LogSearchConfigClass1.class);
     
     Assert.assertSame(config.getClass(), LogSearchConfigClass2.class);
   }
@@ -53,6 +53,6 @@ public class LogSearchConfigFactoryTest {
     Map<String, String> logsearchConfClassMap = new HashMap<>();
     logsearchConfClassMap.put("logsearch.config.class", "org.apache.ambari.logsearch.config.api.NonLogSearchConfigClass");
     LogSearchConfigFactory.createLogSearchConfig(Component.SERVER,
-      logsearchConfClassMap, LogSearchConfigClass1.class);
+      logsearchConfClassMap, null, LogSearchConfigClass1.class);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
index 827101c..6d36203 100644
--- a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
+++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/LogSearchConfigZK.java
@@ -72,14 +72,6 @@ public class LogSearchConfigZK implements LogSearchConfig {
   private static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS";
 
   @LogSearchPropertyDescription(
-    name = "cluster.name",
-    description = "Cluster name for Log Feeder. (added into zk path of the shipper configs)",
-    examples = {"cl1"},
-    sources = {"logfeeder.properties"}
-  )
-  private static final String CLUSTER_NAME_PROPERTY = "cluster.name";
-
-  @LogSearchPropertyDescription(
     name = "logsearch.config.zk_connect_string",
     description = "ZooKeeper connection string.",
     examples = {"localhost1:2181,localhost2:2181/znode"},
@@ -111,7 +103,7 @@ public class LogSearchConfigZK implements LogSearchConfig {
   private Gson gson;
 
   @Override
-  public void init(Component component, Map<String, String> properties) throws Exception {
+  public void init(Component component, Map<String, String> properties, String clusterName) throws Exception {
     this.properties = properties;
     
     LOG.info("Connecting to ZooKeeper at " + properties.get(ZK_CONNECT_STRING_PROPERTY));
@@ -136,8 +128,7 @@ public class LogSearchConfigZK implements LogSearchConfig {
         LOG.info("Root node is not present yet, going to sleep for " + WAIT_FOR_ROOT_SLEEP_SECONDS + " seconds");
         Thread.sleep(WAIT_FOR_ROOT_SLEEP_SECONDS * 1000);
       }
-
-      cache = new TreeCache(client, String.format("%s/%s", root, properties.get(CLUSTER_NAME_PROPERTY)));
+      cache = new TreeCache(client, String.format("%s/%s", root, clusterName));
     }
     
     gson = new GsonBuilder().setDateFormat(DATE_FORMAT).create();
@@ -169,7 +160,7 @@ public class LogSearchConfigZK implements LogSearchConfig {
 
   @Override
   public void monitorInputConfigChanges(final InputConfigMonitor inputConfigMonitor,
-      final LogLevelFilterMonitor logLevelFilterMonitor) throws Exception {
+      final LogLevelFilterMonitor logLevelFilterMonitor, final String clusterName) throws Exception {
     final JsonParser parser = new JsonParser();
     final JsonArray globalConfigNode = new JsonArray();
     for (String globalConfigJsonString : inputConfigMonitor.getGlobalConfigJsons()) {
@@ -177,6 +168,8 @@ public class LogSearchConfigZK implements LogSearchConfig {
       globalConfigNode.add(globalConfigJson.getAsJsonObject().get("global"));
     }
     
+    createGlobalConfigNode(globalConfigNode, clusterName);
+    
     TreeCacheListener listener = new TreeCacheListener() {
       private final Set<Type> nodeEvents = ImmutableSet.of(Type.NODE_ADDED, Type.NODE_UPDATED, Type.NODE_REMOVED);
       
@@ -189,7 +182,7 @@ public class LogSearchConfigZK implements LogSearchConfig {
         String nodeData = new String(event.getData().getData());
         Type eventType = event.getType();
         
-        String configPathStab = String.format("%s/%s/", root, properties.get(CLUSTER_NAME_PROPERTY));
+        String configPathStab = String.format("%s/%s/", root, clusterName);
         
         if (event.getData().getPath().startsWith(configPathStab + "input/")) {
           handleInputConfigChange(eventType, nodeName, nodeData);
@@ -271,12 +264,10 @@ public class LogSearchConfigZK implements LogSearchConfig {
     };
     cache.getListenable().addListener(listener);
     cache.start();
-
-    createGlobalConfigNode(globalConfigNode);
   }
 
-  private void createGlobalConfigNode(JsonArray globalConfigNode) {
-    String globalConfigNodePath = String.format("%s/%s/global", root, properties.get(CLUSTER_NAME_PROPERTY));
+  private void createGlobalConfigNode(JsonArray globalConfigNode, String clusterName) {
+    String globalConfigNodePath = String.format("%s/%s/global", root, clusterName);
     String data = InputConfigGson.gson.toJson(globalConfigNode);
     
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/LogFeeder.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/LogFeeder.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/LogFeeder.java
index e7b6edc..59c2a22 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/LogFeeder.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/LogFeeder.java
@@ -33,7 +33,6 @@ import org.apache.ambari.logsearch.config.api.LogSearchConfig.Component;
 import org.apache.ambari.logsearch.config.zookeeper.LogSearchConfigZK;
 import org.apache.commons.io.FileUtils;
 import org.apache.ambari.logfeeder.input.InputConfigUploader;
-import org.apache.ambari.logfeeder.input.InputManager;
 import org.apache.ambari.logfeeder.loglevelfilter.LogLevelFilterHandler;
 import org.apache.ambari.logfeeder.metrics.MetricData;
 import org.apache.ambari.logfeeder.metrics.MetricsManager;
@@ -57,11 +56,9 @@ public class LogFeeder {
   private ConfigHandler configHandler = new ConfigHandler();
   private LogSearchConfig config;
   
-  private InputManager inputManager = new InputManager();
   private MetricsManager metricsManager = new MetricsManager();
 
   private long lastCheckPointCleanedMS = 0;
-  private boolean isLogfeederCompleted = false;
   private Thread statLoggerThread = null;
 
   private LogFeeder(LogFeederCommandLine cli) {
@@ -72,7 +69,6 @@ public class LogFeeder {
     try {
       init();
       monitor();
-      waitOnAllDaemonThreads();
     } catch (Throwable t) {
       LOG.fatal("Caught exception in main.", t);
       System.exit(1);
@@ -85,11 +81,11 @@ public class LogFeeder {
     configHandler.init();
     SSLUtil.ensureStorePasswords();
     
-    config = LogSearchConfigFactory.createLogSearchConfig(Component.LOGFEEDER,
-        Maps.fromProperties(LogFeederUtil.getProperties()), LogSearchConfigZK.class);
+    config = LogSearchConfigFactory.createLogSearchConfig(Component.LOGFEEDER, Maps.fromProperties(LogFeederUtil.getProperties()),
+        LogFeederUtil.getClusterName(), LogSearchConfigZK.class);
     LogLevelFilterHandler.init(config);
     InputConfigUploader.load(config);
-    config.monitorInputConfigChanges(configHandler, new LogLevelFilterHandler());
+    config.monitorInputConfigChanges(configHandler, new LogLevelFilterHandler(), LogFeederUtil.getClusterName());
     
     metricsManager.init();
     
@@ -117,8 +113,8 @@ public class LogFeeder {
   }
 
   private void monitor() throws Exception {
-    JVMShutdownHook logfeederJVMHook = new JVMShutdownHook();
-    ShutdownHookManager.get().addShutdownHook(logfeederJVMHook, LOGFEEDER_SHUTDOWN_HOOK_PRIORITY);
+    JVMShutdownHook logFeederJVMHook = new JVMShutdownHook();
+    ShutdownHookManager.get().addShutdownHook(logFeederJVMHook, LOGFEEDER_SHUTDOWN_HOOK_PRIORITY);
     
     statLoggerThread = new Thread("statLogger") {
 
@@ -140,10 +136,6 @@ public class LogFeeder {
             lastCheckPointCleanedMS = System.currentTimeMillis();
             configHandler.cleanCheckPointFiles();
           }
-
-          if (isLogfeederCompleted) {
-            break;
-          }
         }
       }
 
@@ -163,20 +155,6 @@ public class LogFeeder {
     }
   }
 
-  private void waitOnAllDaemonThreads() {
-    if ("true".equals(LogFeederUtil.getStringProperty("foreground"))) {
-      inputManager.waitOnAllInputs();
-      isLogfeederCompleted = true;
-      if (statLoggerThread != null) {
-        try {
-          statLoggerThread.join();
-        } catch (InterruptedException e) {
-          e.printStackTrace();
-        }
-      }
-    }
-  }
-
   public void test() {
     try {
       LogManager.shutdown();
@@ -203,7 +181,7 @@ public class LogFeeder {
     
     if (cli.isMonitor()) {
       try {
-        LogFeederUtil.loadProperties("logfeeder.properties");
+        LogFeederUtil.loadProperties();
       } catch (Throwable t) {
         LOG.warn("Could not load logfeeder properites");
         System.exit(1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/ConfigHandler.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/ConfigHandler.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/ConfigHandler.java
index 25669d9..5bf074c 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/ConfigHandler.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/ConfigHandler.java
@@ -41,15 +41,14 @@ import org.apache.ambari.logfeeder.metrics.MetricData;
 import org.apache.ambari.logfeeder.output.Output;
 import org.apache.ambari.logfeeder.output.OutputManager;
 import org.apache.ambari.logfeeder.util.AliasUtil;
-import org.apache.ambari.logfeeder.util.FileUtil;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
-import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.BooleanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ambari.logfeeder.util.AliasUtil.AliasType;
 import org.apache.ambari.logsearch.config.api.InputConfigMonitor;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.FilterDescriptor;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.FilterGrokDescriptor;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.InputConfig;
@@ -62,9 +61,30 @@ import org.apache.log4j.Logger;
 
 import com.google.gson.reflect.TypeToken;
 
+import static org.apache.ambari.logfeeder.util.LogFeederUtil.LOGFEEDER_PROPERTIES_FILE;
+
 public class ConfigHandler implements InputConfigMonitor {
   private static final Logger LOG = Logger.getLogger(ConfigHandler.class);
 
+  @LogSearchPropertyDescription(
+    name = "logfeeder.config.files",
+    description = "Comma separated list of the config files containing global / output configurations.",
+    examples = {"global.json,output.json", "/etc/ambari-logsearch-logfeeder/conf/global.json"},
+    defaultValue = "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String CONFIG_FILES_PROPERTY = "logfeeder.config.files";
+
+  private static final int DEFAULT_SIMULATE_INPUT_NUMBER = 0;
+  @LogSearchPropertyDescription(
+    name = "logfeeder.simulate.input_number",
+    description = "The number of the simulator instances to run with. O means no simulation.",
+    examples = {"10"},
+    defaultValue = DEFAULT_SIMULATE_INPUT_NUMBER + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String SIMULATE_INPUT_NUMBER_PROPERTY = "logfeeder.simulate.input_number";
+
   private final OutputManager outputManager = new OutputManager();
   private final InputManager inputManager = new InputManager();
 
@@ -108,24 +128,10 @@ public class ConfigHandler implements InputConfigMonitor {
   private List<String> getConfigFiles() {
     List<String> configFiles = new ArrayList<>();
     
-    String logfeederConfigFilesProperty = LogFeederUtil.getStringProperty("logfeeder.config.files");
-    LOG.info("logfeeder.config.files=" + logfeederConfigFilesProperty);
-    if (logfeederConfigFilesProperty != null) {
-      configFiles.addAll(Arrays.asList(logfeederConfigFilesProperty.split(",")));
-    }
-
-    String inputConfigDir = LogFeederUtil.getStringProperty("input_config_dir");
-    if (StringUtils.isNotEmpty(inputConfigDir)) {
-      File configDirFile = new File(inputConfigDir);
-      List<File> inputConfigFiles = FileUtil.getAllFileFromDir(configDirFile, "json", false);
-      for (File inputConfigFile : inputConfigFiles) {
-        configFiles.add(inputConfigFile.getAbsolutePath());
-      }
-    }
-    
-    if (CollectionUtils.isEmpty(configFiles)) {
-      String configFileProperty = LogFeederUtil.getStringProperty("config.file", "config.json");
-      configFiles.addAll(Arrays.asList(configFileProperty.split(",")));
+    String logFeederConfigFilesProperty = LogFeederUtil.getStringProperty(CONFIG_FILES_PROPERTY);
+    LOG.info("logfeeder.config.files=" + logFeederConfigFilesProperty);
+    if (logFeederConfigFilesProperty != null) {
+      configFiles.addAll(Arrays.asList(logFeederConfigFilesProperty.split(",")));
     }
     
     return configFiles;
@@ -225,7 +231,7 @@ public class ConfigHandler implements InputConfigMonitor {
   }
   
   private void simulateIfNeeded() throws Exception {
-    int simulatedInputNumber = LogFeederUtil.getIntProperty("logfeeder.simulate.input_number", 0);
+    int simulatedInputNumber = LogFeederUtil.getIntProperty(SIMULATE_INPUT_NUMBER_PROPERTY, DEFAULT_SIMULATE_INPUT_NUMBER);
     if (simulatedInputNumber == 0)
       return;
     
@@ -434,10 +440,6 @@ public class ConfigHandler implements InputConfigMonitor {
     outputManager.addMetricsContainers(metricsList);
   }
 
-  public void waitOnAllInputs() {
-    inputManager.waitOnAllInputs();
-  }
-
   public void close() {
     inputManager.close();
     outputManager.close();

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogFeederException.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogFeederException.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogFeederException.java
new file mode 100644
index 0000000..3653475
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogFeederException.java
@@ -0,0 +1,31 @@
+/*
+ * 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.logfeeder.common;
+
+public class LogFeederException extends Exception {
+
+  public LogFeederException(String message, Throwable throwable) {
+    super(message, throwable);
+  }
+
+  public LogFeederException(String message) {
+    super(message);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogfeederException.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogfeederException.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogfeederException.java
deleted file mode 100644
index 8a07602..0000000
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogfeederException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.logfeeder.common;
-
-public class LogfeederException extends Exception {
-
-  public LogfeederException(String message, Throwable throwable) {
-    super(message, throwable);
-  }
-
-  public LogfeederException(String message) {
-    super(message);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/Filter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/Filter.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/Filter.java
index fd02497..8e8834b 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/Filter.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/Filter.java
@@ -25,7 +25,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ambari.logfeeder.common.ConfigItem;
-import org.apache.ambari.logfeeder.common.LogfeederException;
+import org.apache.ambari.logfeeder.common.LogFeederException;
 import org.apache.ambari.logfeeder.input.Input;
 import org.apache.ambari.logfeeder.input.InputMarker;
 import org.apache.ambari.logfeeder.mapper.Mapper;
@@ -116,7 +116,7 @@ public abstract class Filter extends ConfigItem {
   /**
    * Deriving classes should implement this at the minimum
    */
-  public void apply(String inputStr, InputMarker inputMarker) throws LogfeederException  {
+  public void apply(String inputStr, InputMarker inputMarker) throws LogFeederException  {
     // TODO: There is no transformation for string types.
     if (nextFilter != null) {
       nextFilter.apply(inputStr, inputMarker);
@@ -125,7 +125,7 @@ public abstract class Filter extends ConfigItem {
     }
   }
 
-  public void apply(Map<String, Object> jsonObj, InputMarker inputMarker) throws LogfeederException {
+  public void apply(Map<String, Object> jsonObj, InputMarker inputMarker) throws LogFeederException {
     for (String fieldName : postFieldValueMappers.keySet()) {
       Object value = jsonObj.get(fieldName);
       if (value != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterGrok.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterGrok.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterGrok.java
index 50247e2..fc7a565 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterGrok.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterGrok.java
@@ -34,7 +34,7 @@ import java.util.regex.Pattern;
 import oi.thekraken.grok.api.Grok;
 import oi.thekraken.grok.api.exception.GrokException;
 
-import org.apache.ambari.logfeeder.common.LogfeederException;
+import org.apache.ambari.logfeeder.common.LogFeederException;
 import org.apache.ambari.logfeeder.input.InputMarker;
 import org.apache.ambari.logfeeder.metrics.MetricData;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
@@ -160,7 +160,7 @@ public class FilterGrok extends Filter {
   }
 
   @Override
-  public void apply(String inputStr, InputMarker inputMarker) throws LogfeederException {
+  public void apply(String inputStr, InputMarker inputMarker) throws LogFeederException {
     if (grokMessage == null) {
       return;
     }
@@ -195,7 +195,7 @@ public class FilterGrok extends Filter {
   }
 
   @Override
-  public void apply(Map<String, Object> jsonObj, InputMarker inputMarker) throws LogfeederException {
+  public void apply(Map<String, Object> jsonObj, InputMarker inputMarker) throws LogFeederException {
     if (sourceField != null) {
       savedInputMarker = inputMarker;
       applyMessage((String) jsonObj.get(sourceField), jsonObj, null);
@@ -205,7 +205,7 @@ public class FilterGrok extends Filter {
     }
   }
 
-  private void applyMessage(String inputStr, Map<String, Object> jsonObj, String multilineJsonStr) throws LogfeederException {
+  private void applyMessage(String inputStr, Map<String, Object> jsonObj, String multilineJsonStr) throws LogFeederException {
     String jsonStr = grokMessage.capture(inputStr);
 
     boolean parseError = false;
@@ -260,7 +260,7 @@ public class FilterGrok extends Filter {
       Map<String, Object> jsonObj = Collections.synchronizedMap(new HashMap<String, Object>());
       try {
         applyMessage(strBuff.toString(), jsonObj, currMultilineJsonStr);
-      } catch (LogfeederException e) {
+      } catch (LogFeederException e) {
         LOG.error(e.getLocalizedMessage(), e.getCause());
       }
       strBuff = null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterJSON.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterJSON.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterJSON.java
index cfccdeb..1a2da0c 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterJSON.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterJSON.java
@@ -21,7 +21,7 @@ package org.apache.ambari.logfeeder.filter;
 import java.util.Map;
 
 import org.apache.ambari.logfeeder.common.LogFeederConstants;
-import org.apache.ambari.logfeeder.common.LogfeederException;
+import org.apache.ambari.logfeeder.common.LogFeederException;
 import org.apache.ambari.logfeeder.input.InputMarker;
 import org.apache.ambari.logfeeder.util.DateUtil;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
@@ -29,13 +29,13 @@ import org.apache.ambari.logfeeder.util.LogFeederUtil;
 public class FilterJSON extends Filter {
   
   @Override
-  public void apply(String inputStr, InputMarker inputMarker) throws LogfeederException {
+  public void apply(String inputStr, InputMarker inputMarker) throws LogFeederException {
     Map<String, Object> jsonMap = null;
     try {
       jsonMap = LogFeederUtil.toJSONObject(inputStr);
     } catch (Exception e) {
       LOG.error(e.getLocalizedMessage());
-      throw new LogfeederException("Json parsing failed for inputstr = " + inputStr ,e.getCause());
+      throw new LogFeederException("Json parsing failed for inputstr = " + inputStr ,e.getCause());
     }
     Double lineNumberD = (Double) jsonMap.get("line_number");
     if (lineNumberD != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
index f2a4186..670b1c3 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
@@ -24,7 +24,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.regex.Pattern;
 
-import org.apache.ambari.logfeeder.common.LogfeederException;
+import org.apache.ambari.logfeeder.common.LogFeederException;
 import org.apache.ambari.logfeeder.input.InputMarker;
 import org.apache.ambari.logfeeder.metrics.MetricData;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
@@ -58,12 +58,12 @@ public class FilterKeyValue extends Filter {
   }
 
   @Override
-  public void apply(String inputStr, InputMarker inputMarker) throws LogfeederException {
+  public void apply(String inputStr, InputMarker inputMarker) throws LogFeederException {
     apply(LogFeederUtil.toJSONObject(inputStr), inputMarker);
   }
 
   @Override
-  public void apply(Map<String, Object> jsonObj, InputMarker inputMarker) throws LogfeederException {
+  public void apply(Map<String, Object> jsonObj, InputMarker inputMarker) throws LogFeederException {
     if (sourceField == null) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java
index 2359256..9535260 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/AbstractInputFile.java
@@ -68,7 +68,8 @@ public abstract class AbstractInputFile extends Input {
   public void init() throws Exception {
     LOG.info("init() called");
     
-    checkPointExtension = LogFeederUtil.getStringProperty("logfeeder.checkpoint.extension", InputManager.DEFAULT_CHECKPOINT_EXTENSION);
+    checkPointExtension = LogFeederUtil.getStringProperty(InputManager.CHECKPOINT_EXTENSION_PROPERTY,
+        InputManager.DEFAULT_CHECKPOINT_EXTENSION);
 
     // Let's close the file and set it to true after we start monitoring it
     setClosed(true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java
index 49151e7..8050263 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/Input.java
@@ -26,12 +26,13 @@ import java.util.Map;
 
 import org.apache.ambari.logfeeder.input.cache.LRUCache;
 import org.apache.ambari.logfeeder.common.ConfigItem;
-import org.apache.ambari.logfeeder.common.LogfeederException;
+import org.apache.ambari.logfeeder.common.LogFeederException;
 import org.apache.ambari.logfeeder.filter.Filter;
 import org.apache.ambari.logfeeder.metrics.MetricData;
 import org.apache.ambari.logfeeder.output.Output;
 import org.apache.ambari.logfeeder.output.OutputManager;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.Conditions;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.Fields;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.FilterDescriptor;
@@ -39,15 +40,62 @@ import org.apache.ambari.logsearch.config.api.model.inputconfig.InputDescriptor;
 import org.apache.commons.lang.BooleanUtils;
 import org.apache.log4j.Priority;
 
+import static org.apache.ambari.logfeeder.util.LogFeederUtil.LOGFEEDER_PROPERTIES_FILE;
+
 public abstract class Input extends ConfigItem implements Runnable {
-  private static final boolean DEFAULT_TAIL = true;
-  private static final boolean DEFAULT_USE_EVENT_MD5 = false;
-  private static final boolean DEFAULT_GEN_EVENT_MD5 = true;
   private static final boolean DEFAULT_CACHE_ENABLED = false;
-  private static final boolean DEFAULT_CACHE_DEDUP_LAST = false;
+  @LogSearchPropertyDescription(
+      name = "logfeeder.cache.enabled",
+      description = "Enables the usage of a cache to avoid duplications.",
+      examples = {"true"},
+      defaultValue = DEFAULT_CACHE_ENABLED + "",
+      sources = {LOGFEEDER_PROPERTIES_FILE}
+    )
+  private static final String CACHE_ENABLED_PROPERTY = "logfeeder.cache.enabled";
+
+  private static final String DEFAULT_CACHE_KEY_FIELD = "log_message";
+  @LogSearchPropertyDescription(
+    name = "logfeeder.cache.key.field",
+    description = "The field which's value should be cached and should be checked for repteitions.",
+    examples = {"some_field_prone_to_repeating_value"},
+    defaultValue = DEFAULT_CACHE_KEY_FIELD,
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String CACHE_KEY_FIELD_PROPERTY = "logfeeder.cache.key.field";
+
   private static final int DEFAULT_CACHE_SIZE = 100;
+  @LogSearchPropertyDescription(
+    name = "logfeeder.cache.size",
+    description = "The number of log entries to cache in order to avoid duplications.",
+    examples = {"50"},
+    defaultValue = DEFAULT_CACHE_SIZE + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String CACHE_SIZE_PROPERTY = "logfeeder.cache.size";
+  
+  private static final boolean DEFAULT_CACHE_LAST_DEDUP_ENABLED = false;
+  @LogSearchPropertyDescription(
+    name = "logfeeder.cache.last.dedup.enabled",
+    description = "Enable filtering directly repeating log entries irrelevant of the time spent between them.",
+    examples = {"true"},
+    defaultValue = DEFAULT_CACHE_LAST_DEDUP_ENABLED + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String CACHE_LAST_DEDUP_ENABLED_PROPERTY = "logfeeder.cache.last.dedup.enabled";
+
   private static final long DEFAULT_CACHE_DEDUP_INTERVAL = 1000;
-  private static final String DEFAULT_CACHE_KEY_FIELD = "log_message";
+  @LogSearchPropertyDescription(
+    name = "logfeeder.cache.dedup.interval",
+    description = "Maximum number of milliseconds between two identical messages to be filtered out.",
+    examples = {"500"},
+    defaultValue = DEFAULT_CACHE_DEDUP_INTERVAL + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String CACHE_DEDUP_INTERVAL_PROPERTY = "logfeeder.cache.dedup.interval";
+  
+  private static final boolean DEFAULT_TAIL = true;
+  private static final boolean DEFAULT_USE_EVENT_MD5 = false;
+  private static final boolean DEFAULT_GEN_EVENT_MD5 = true;
 
   protected InputDescriptor inputDescriptor;
   
@@ -183,7 +231,7 @@ public abstract class Input extends ConfigItem implements Runnable {
     if (firstFilter != null) {
       try {
         firstFilter.apply(line, marker);
-      } catch (LogfeederException e) {
+      } catch (LogFeederException e) {
         LOG.error(e.getLocalizedMessage(), e);
       }
     } else {
@@ -246,25 +294,25 @@ public abstract class Input extends ConfigItem implements Runnable {
   private void initCache() {
     boolean cacheEnabled = inputDescriptor.isCacheEnabled() != null
       ? inputDescriptor.isCacheEnabled()
-      : LogFeederUtil.getBooleanProperty("logfeeder.cache.enabled", DEFAULT_CACHE_ENABLED);
+      : LogFeederUtil.getBooleanProperty(CACHE_ENABLED_PROPERTY, DEFAULT_CACHE_ENABLED);
     if (cacheEnabled) {
       String cacheKeyField = inputDescriptor.getCacheKeyField() != null
         ? inputDescriptor.getCacheKeyField()
-        : LogFeederUtil.getStringProperty("logfeeder.cache.key.field", DEFAULT_CACHE_KEY_FIELD);
+        : LogFeederUtil.getStringProperty(CACHE_KEY_FIELD_PROPERTY, DEFAULT_CACHE_KEY_FIELD);
 
       setCacheKeyField(cacheKeyField);
 
       boolean cacheLastDedupEnabled = inputDescriptor.getCacheLastDedupEnabled() != null
         ? inputDescriptor.getCacheLastDedupEnabled()
-        : LogFeederUtil.getBooleanProperty("logfeeder.cache.last.dedup.enabled", DEFAULT_CACHE_DEDUP_LAST);
+        : LogFeederUtil.getBooleanProperty(CACHE_LAST_DEDUP_ENABLED_PROPERTY, DEFAULT_CACHE_LAST_DEDUP_ENABLED);
 
       int cacheSize = inputDescriptor.getCacheSize() != null
         ? inputDescriptor.getCacheSize()
-        : LogFeederUtil.getIntProperty("logfeeder.cache.size", DEFAULT_CACHE_SIZE);
+        : LogFeederUtil.getIntProperty(CACHE_SIZE_PROPERTY, DEFAULT_CACHE_SIZE);
 
       long cacheDedupInterval = inputDescriptor.getCacheDedupInterval() != null
         ? inputDescriptor.getCacheDedupInterval()
-        : Long.parseLong(LogFeederUtil.getStringProperty("logfeeder.cache.dedup.interval", String.valueOf(DEFAULT_CACHE_DEDUP_INTERVAL)));
+        : Long.parseLong(LogFeederUtil.getStringProperty(CACHE_DEDUP_INTERVAL_PROPERTY, String.valueOf(DEFAULT_CACHE_DEDUP_INTERVAL)));
 
       setCache(new LRUCache(cacheSize, filePath, cacheDedupInterval, cacheLastDedupEnabled));
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputConfigUploader.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputConfigUploader.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputConfigUploader.java
index 8aec690..09fc3f5 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputConfigUploader.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputConfigUploader.java
@@ -28,14 +28,25 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.ambari.logsearch.config.api.LogSearchConfig;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
 import org.apache.log4j.Logger;
 
 import com.google.common.io.Files;
 
+import static org.apache.ambari.logfeeder.util.LogFeederUtil.LOGFEEDER_PROPERTIES_FILE;
+
 public class InputConfigUploader extends Thread {
   protected static final Logger LOG = Logger.getLogger(InputConfigUploader.class);
 
+  @LogSearchPropertyDescription(
+    name = "logfeeder.config.dir",
+    description = "The directory where shipper configuration files are looked for.",
+    examples = {"/etc/ambari-logsearch-logfeeder/conf"},
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String CONFIG_DIR_PROPERTY = "logfeeder.config.dir";
+
   private static final long SLEEP_BETWEEN_CHECK = 2000;
 
   private final File configDir;
@@ -48,7 +59,6 @@ public class InputConfigUploader extends Thread {
   private final Set<String> filesHandled = new HashSet<>();
   private final Pattern serviceNamePattern = Pattern.compile("input.config-(.+).json");
   private final LogSearchConfig config;
-  private final String clusterName = LogFeederUtil.getStringProperty("cluster.name");
   
   public static void load(LogSearchConfig config) {
     new InputConfigUploader(config).start();
@@ -58,7 +68,7 @@ public class InputConfigUploader extends Thread {
     super("Input Config Loader");
     setDaemon(true);
     
-    this.configDir = new File(LogFeederUtil.getStringProperty("logfeeder.config.dir"));
+    this.configDir = new File(LogFeederUtil.getStringProperty(CONFIG_DIR_PROPERTY));
     this.config = config;
   }
   
@@ -74,8 +84,8 @@ public class InputConfigUploader extends Thread {
             String serviceName = m.group(1);
             String inputConfig = Files.toString(inputConfigFile, Charset.defaultCharset());
             
-            if (!config.inputConfigExists(clusterName, serviceName)) {
-              config.createInputConfig(clusterName, serviceName, inputConfig);
+            if (!config.inputConfigExists(LogFeederUtil.getClusterName(), serviceName)) {
+              config.createInputConfig(LogFeederUtil.getClusterName(), serviceName, inputConfig);
             }
             filesHandled.add(inputConfigFile.getAbsolutePath());
           } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java
index 01a11ec..091015a 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputManager.java
@@ -36,16 +36,36 @@ import java.util.UUID;
 import org.apache.ambari.logfeeder.metrics.MetricData;
 import org.apache.ambari.logfeeder.util.FileUtil;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.commons.io.filefilter.WildcardFileFilter;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.Logger;
 import org.apache.solr.common.util.Base64;
 
+import static org.apache.ambari.logfeeder.util.LogFeederUtil.LOGFEEDER_PROPERTIES_FILE;
+
 public class InputManager {
   private static final Logger LOG = Logger.getLogger(InputManager.class);
 
-  private static final String CHECKPOINT_SUBFOLDER_NAME = "logfeeder_checkpoints";
   public static final String DEFAULT_CHECKPOINT_EXTENSION = ".cp";
+  @LogSearchPropertyDescription(
+    name = "logfeeder.checkpoint.extension",
+    description = "The extension used for checkpoint files.",
+    examples = {"ckp"},
+    defaultValue = DEFAULT_CHECKPOINT_EXTENSION,
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  public static final String CHECKPOINT_EXTENSION_PROPERTY = "logfeeder.checkpoint.extension";
+  
+  @LogSearchPropertyDescription(
+    name = "logfeeder.checkpoint.folder",
+    description = "The folder wher checkpoint files are stored.",
+    examples = {"/etc/ambari-logsearch-logfeeder/conf/checkpoints"},
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String CHECKPOINT_FOLDER_PROPERTY = "logfeeder.checkpoint.folder";
+
+  private static final String CHECKPOINT_SUBFOLDER_NAME = "logfeeder_checkpoints";
   
   private Map<String, List<Input>> inputs = new HashMap<>();
   private Set<Input> notReadyList = new HashSet<Input>();
@@ -118,32 +138,21 @@ public class InputManager {
   }
   
   private void initCheckPointSettings() {
-    checkPointExtension = LogFeederUtil.getStringProperty("logfeeder.checkpoint.extension", DEFAULT_CHECKPOINT_EXTENSION);
+    checkPointExtension = LogFeederUtil.getStringProperty(CHECKPOINT_EXTENSION_PROPERTY, DEFAULT_CHECKPOINT_EXTENSION);
     LOG.info("Determining valid checkpoint folder");
     boolean isCheckPointFolderValid = false;
     // We need to keep track of the files we are reading.
-    String checkPointFolder = LogFeederUtil.getStringProperty("logfeeder.checkpoint.folder");
+    String checkPointFolder = LogFeederUtil.getStringProperty(CHECKPOINT_FOLDER_PROPERTY);
     if (!StringUtils.isEmpty(checkPointFolder)) {
       checkPointFolderFile = new File(checkPointFolder);
       isCheckPointFolderValid = verifyCheckPointFolder(checkPointFolderFile);
     }
-    if (!isCheckPointFolderValid) {
-      // Let's try home folder
-      String userHome = LogFeederUtil.getStringProperty("user.home");
-      if (userHome != null) {
-        checkPointFolderFile = new File(userHome, CHECKPOINT_SUBFOLDER_NAME);
-        LOG.info("Checking if home folder can be used for checkpoints. Folder=" + checkPointFolderFile);
-        isCheckPointFolderValid = verifyCheckPointFolder(checkPointFolderFile);
-      }
-    }
+    
     if (!isCheckPointFolderValid) {
       // Let's use tmp folder
-      String tmpFolder = LogFeederUtil.getStringProperty("java.io.tmpdir");
-      if (tmpFolder == null) {
-        tmpFolder = "/tmp";
-      }
+      String tmpFolder = LogFeederUtil.getLogFeederTempDir();
       checkPointFolderFile = new File(tmpFolder, CHECKPOINT_SUBFOLDER_NAME);
-      LOG.info("Checking if tmps folder can be used for checkpoints. Folder=" + checkPointFolderFile);
+      LOG.info("Checking if tmp folder can be used for checkpoints. Folder=" + checkPointFolderFile);
       isCheckPointFolderValid = verifyCheckPointFolder(checkPointFolderFile);
       if (isCheckPointFolderValid) {
         LOG.warn("Using tmp folder " + checkPointFolderFile + " to store check points. This is not recommended." +
@@ -153,6 +162,8 @@ public class InputManager {
     
     if (isCheckPointFolderValid) {
       LOG.info("Using folder " + checkPointFolderFile + " for storing checkpoints");
+    } else {
+      throw new IllegalStateException("Could not determine the checkpoint folder.");
     }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputSimulate.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputSimulate.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputSimulate.java
index 5e7bdb3..f1002ae 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputSimulate.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/InputSimulate.java
@@ -34,6 +34,7 @@ import org.apache.ambari.logfeeder.filter.Filter;
 import org.apache.ambari.logfeeder.filter.FilterJSON;
 import org.apache.ambari.logfeeder.output.Output;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.ambari.logsearch.config.api.model.inputconfig.InputDescriptor;
 import org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl.FilterJsonDescriptorImpl;
 import org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl.InputDescriptorImpl;
@@ -42,9 +43,70 @@ import org.apache.solr.common.util.Base64;
 
 import com.google.common.base.Joiner;
 
+import static org.apache.ambari.logfeeder.util.LogFeederUtil.LOGFEEDER_PROPERTIES_FILE;
+
 public class InputSimulate extends Input {
   private static final String LOG_TEXT_PATTERN = "{ logtime=\"%d\", level=\"%s\", log_message=\"%s\", host=\"%s\"}";
   
+  private static final String DEFAULT_LOG_LEVEL = "WARN";
+  @LogSearchPropertyDescription(
+    name = "logfeeder.simulate.log_level",
+    description = "The log level to create the simulated log entries with.",
+    examples = {"INFO"},
+    defaultValue = DEFAULT_LOG_LEVEL,
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String LOG_LEVEL_PROPERTY = "logfeeder.simulate.log_level";
+  
+  private static final int DEFAULT_NUMBER_OF_WORDS = 1000;
+  @LogSearchPropertyDescription(
+    name = "logfeeder.simulate.number_of_words",
+    description = "The size of the set of words that may be used to create the simulated log entries with.",
+    examples = {"100"},
+    defaultValue = DEFAULT_NUMBER_OF_WORDS + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String NUMBER_OF_WORDS_PROPERTY = "logfeeder.simulate.number_of_words";
+  
+  private static final int DEFAULT_MIN_LOG_WORDS = 5;
+  @LogSearchPropertyDescription(
+    name = "logfeeder.simulate.min_log_words",
+    description = "The minimum number of words in a simulated log entry.",
+    examples = {"3"},
+    defaultValue = DEFAULT_MIN_LOG_WORDS + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String MIN_LOG_WORDS_PROPERTY = "logfeeder.simulate.min_log_words";
+  
+  private static final int DEFAULT_MAX_LOG_WORDS = 5;
+  @LogSearchPropertyDescription(
+    name = "logfeeder.simulate.max_log_words",
+    description = "The maximum number of words in a simulated log entry.",
+    examples = {"8"},
+    defaultValue = DEFAULT_MAX_LOG_WORDS + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String MAX_LOG_WORDS_PROPERTY = "logfeeder.simulate.max_log_words";
+  
+  private static final int DEFAULT_SLEEP_MILLISECONDS = 10000;
+  @LogSearchPropertyDescription(
+    name = "logfeeder.simulate.sleep_milliseconds",
+    description = "The milliseconds to sleep between creating two simulated log entries.",
+    examples = {"5000"},
+    defaultValue = DEFAULT_SLEEP_MILLISECONDS + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String SLEEP_MILLISECONDS_PROPERTY = "logfeeder.simulate.sleep_milliseconds";
+  
+  @LogSearchPropertyDescription(
+    name = "logfeeder.simulate.log_ids",
+    description = "The comma separated list of log ids for which to create the simulated log entries.",
+    examples = {"ambari_server,zookeeper,infra_solr,logsearch_app"},
+    defaultValue = "The log ids of the installed services in the cluster",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String LOG_IDS_PROPERTY = "logfeeder.simulate.log_ids";
+  
   private static final Map<String, String> typeToFilePath = new HashMap<>();
   private static final List<String> inputTypes = new ArrayList<>();
   public static void loadTypeToFilePath(List<InputDescriptor> inputList) {
@@ -75,11 +137,11 @@ public class InputSimulate extends Input {
   
   public InputSimulate() throws Exception {
     this.types = getSimulatedLogTypes();
-    this.level = LogFeederUtil.getStringProperty("logfeeder.simulate.log_level", "WARN");
-    this.numberOfWords = LogFeederUtil.getIntProperty("logfeeder.simulate.number_of_words", 1000, 50, 1000000);
-    this.minLogWords = LogFeederUtil.getIntProperty("logfeeder.simulate.min_log_words", 5, 1, 10);
-    this.maxLogWords = LogFeederUtil.getIntProperty("logfeeder.simulate.max_log_words", 10, 10, 20);
-    this.sleepMillis = LogFeederUtil.getIntProperty("logfeeder.simulate.sleep_milliseconds", 10000);
+    this.level = LogFeederUtil.getStringProperty(LOG_LEVEL_PROPERTY, DEFAULT_LOG_LEVEL);
+    this.numberOfWords = LogFeederUtil.getIntProperty(NUMBER_OF_WORDS_PROPERTY, DEFAULT_NUMBER_OF_WORDS, 50, 1000000);
+    this.minLogWords = LogFeederUtil.getIntProperty(MIN_LOG_WORDS_PROPERTY, DEFAULT_MIN_LOG_WORDS, 1, 10);
+    this.maxLogWords = LogFeederUtil.getIntProperty(MAX_LOG_WORDS_PROPERTY, DEFAULT_MAX_LOG_WORDS, 10, 20);
+    this.sleepMillis = LogFeederUtil.getIntProperty(SLEEP_MILLISECONDS_PROPERTY, DEFAULT_SLEEP_MILLISECONDS);
     this.host = "#" + hostNumber.incrementAndGet() + "-" + LogFeederUtil.hostName;
     
     Filter filter = new FilterJSON();
@@ -89,7 +151,7 @@ public class InputSimulate extends Input {
   }
   
   private List<String> getSimulatedLogTypes() {
-    String logsToSimulate = LogFeederUtil.getStringProperty("logfeeder.simulate.log_ids");
+    String logsToSimulate = LogFeederUtil.getStringProperty(LOG_IDS_PROPERTY);
     return (logsToSimulate == null) ?
       inputTypes :
       Arrays.asList(logsToSimulate.split(","));

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/loglevelfilter/LogLevelFilterHandler.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/loglevelfilter/LogLevelFilterHandler.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/loglevelfilter/LogLevelFilterHandler.java
index 8a4d953..79bf5ea 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/loglevelfilter/LogLevelFilterHandler.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/loglevelfilter/LogLevelFilterHandler.java
@@ -32,14 +32,35 @@ import org.apache.ambari.logfeeder.common.LogFeederConstants;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
 import org.apache.ambari.logsearch.config.api.LogLevelFilterMonitor;
 import org.apache.ambari.logsearch.config.api.LogSearchConfig;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.ambari.logsearch.config.api.model.loglevelfilter.LogLevelFilter;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 
+import static org.apache.ambari.logfeeder.util.LogFeederUtil.LOGFEEDER_PROPERTIES_FILE;
+
 public class LogLevelFilterHandler implements LogLevelFilterMonitor {
   private static final Logger LOG = Logger.getLogger(LogLevelFilterHandler.class);
   
+  private static final boolean DEFAULT_LOG_FILTER_ENABLE = false;
+  @LogSearchPropertyDescription(
+    name = "logfeeder.log.filter.enable",
+    description = "Enables the filtering of the log entries by log level filters.",
+    examples = {"true"},
+    defaultValue = DEFAULT_LOG_FILTER_ENABLE + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String LOG_FILTER_ENABLE_PROPERTY = "logfeeder.log.filter.enable";
+
+  @LogSearchPropertyDescription(
+    name = "logfeeder.include.default.level",
+    description = "Comma separtaed list of the default log levels to be enabled by the filtering.",
+    examples = {"FATAL,ERROR,WARN"},
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String INCLUDE_DEFAULT_LEVEL_PROPERTY = "logfeeder.include.default.level";
+
   private static final String TIMEZONE = "GMT";
   private static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS";
   
@@ -52,15 +73,14 @@ public class LogLevelFilterHandler implements LogLevelFilterMonitor {
   };
   
   private static LogSearchConfig config;
-  private static String clusterName = LogFeederUtil.getStringProperty("cluster.name");
   private static boolean filterEnabled;
   private static List<String> defaultLogLevels;
   private static Map<String, LogLevelFilter> filters = new HashMap<>();
 
   public static void init(LogSearchConfig config_) {
     config = config_;
-    filterEnabled = LogFeederUtil.getBooleanProperty("logfeeder.log.filter.enable", false);
-    defaultLogLevels = Arrays.asList(LogFeederUtil.getStringProperty("logfeeder.include.default.level").split(","));
+    filterEnabled = LogFeederUtil.getBooleanProperty(LOG_FILTER_ENABLE_PROPERTY, DEFAULT_LOG_FILTER_ENABLE);
+    defaultLogLevels = Arrays.asList(LogFeederUtil.getStringProperty(INCLUDE_DEFAULT_LEVEL_PROPERTY).split(","));
     TimeZone.setDefault(TimeZone.getTimeZone(TIMEZONE));
   }
 
@@ -100,7 +120,7 @@ public class LogLevelFilterHandler implements LogLevelFilterMonitor {
     defaultFilter.setDefaultLevels(defaultLogLevels);
 
     try {
-      config.createLogLevelFilter(clusterName, logId, defaultFilter);
+      config.createLogLevelFilter(LogFeederUtil.getClusterName(), logId, defaultFilter);
       filters.put(logId, defaultFilter);
     } catch (Exception e) {
       LOG.warn("Could not persist the default filter for log " + logId, e);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
index 39526a5..fdad9a6 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
@@ -21,6 +21,7 @@ package org.apache.ambari.logfeeder.metrics;
 
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
 import org.apache.ambari.logfeeder.util.SSLUtil;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink;
 import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics;
@@ -28,6 +29,8 @@ import org.apache.log4j.Logger;
 
 import com.google.common.base.Splitter;
 
+import static org.apache.ambari.logfeeder.util.LogFeederUtil.LOGFEEDER_PROPERTIES_FILE;
+
 import java.util.Collection;
 import java.util.List;
 
@@ -35,21 +38,53 @@ import java.util.List;
 public class LogFeederAMSClient extends AbstractTimelineMetricsSink {
   private static final Logger LOG = Logger.getLogger(LogFeederAMSClient.class);
 
+  @LogSearchPropertyDescription(
+    name = "logfeeder.metrics.collector.hosts",
+    description = "Comma separtaed list of metric collector hosts.",
+    examples = {"c6401.ambari.apache.org"},
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String METRICS_COLLECTOR_HOSTS_PROPERTY = "logfeeder.metrics.collector.hosts";
+
+  @LogSearchPropertyDescription(
+    name = "logfeeder.metrics.collector.protocol",
+    description = "The protocol used by metric collectors.",
+    examples = {"http", "https"},
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String METRICS_COLLECTOR_PROTOCOL_PROPERTY = "logfeeder.metrics.collector.protocol";
+
+  @LogSearchPropertyDescription(
+    name = "logfeeder.metrics.collector.port",
+    description = "The port used by metric collectors.",
+    examples = {"6188"},
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String METRICS_COLLECTOR_PORT_PROPERTY = "logfeeder.metrics.collector.port";
+
+  @LogSearchPropertyDescription(
+    name = "logfeeder.metrics.collector.path",
+    description = "The path used by metric collectors.",
+    examples = {"/ws/v1/timeline/metrics"},
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String METRICS_COLLECTOR_PATH_PROPERTY = "logfeeder.metrics.collector.path";
+
   private final List<String> collectorHosts;
   private final String collectorProtocol;
   private final String collectorPort;
   private final String collectorPath;
 
   public LogFeederAMSClient() {
-    String collectorHostsString = LogFeederUtil.getStringProperty("logfeeder.metrics.collector.hosts");
+    String collectorHostsString = LogFeederUtil.getStringProperty(METRICS_COLLECTOR_HOSTS_PROPERTY);
     if (!StringUtils.isBlank(collectorHostsString)) {
       collectorHostsString = collectorHostsString.trim();
       LOG.info("AMS collector Hosts=" + collectorHostsString);
       
       collectorHosts = Splitter.on(",").splitToList(collectorHostsString);
-      collectorProtocol = LogFeederUtil.getStringProperty("logfeeder.metrics.collector.protocol");
-      collectorPort = LogFeederUtil.getStringProperty("logfeeder.metrics.collector.port");
-      collectorPath = LogFeederUtil.getStringProperty("logfeeder.metrics.collector.path");
+      collectorProtocol = LogFeederUtil.getStringProperty(METRICS_COLLECTOR_PROTOCOL_PROPERTY);
+      collectorPort = LogFeederUtil.getStringProperty(METRICS_COLLECTOR_PORT_PROPERTY);
+      collectorPath = LogFeederUtil.getStringProperty(METRICS_COLLECTOR_PATH_PROPERTY);
     } else {
       collectorHosts = null;
       collectorProtocol = null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
index 942c0b4..1094852 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
@@ -19,7 +19,6 @@
 
 package org.apache.ambari.logfeeder.metrics;
 
-import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -34,7 +33,6 @@ public class MetricsManager {
   private static final Logger LOG = Logger.getLogger(MetricsManager.class);
 
   private boolean isMetricsEnabled = false;
-  private String nodeHostName = null;
   private String appId = "logfeeder";
 
   private long lastPublishTimeMS = 0; // Let's do the first publish immediately
@@ -50,8 +48,7 @@ public class MetricsManager {
     amsClient = new LogFeederAMSClient();
 
     if (amsClient.getCollectorUri(null) != null) {
-      findNodeHostName();
-      if (nodeHostName == null) {
+      if (LogFeederUtil.hostName == null) {
         isMetricsEnabled = false;
         LOG.error("Failed getting hostname for node. Disabling publishing LogFeeder metrics");
       } else {
@@ -63,24 +60,6 @@ public class MetricsManager {
     }
   }
 
-  private void findNodeHostName() {
-    nodeHostName = LogFeederUtil.getStringProperty("node.hostname");
-    if (nodeHostName == null) {
-      try {
-        nodeHostName = InetAddress.getLocalHost().getHostName();
-      } catch (Throwable e) {
-        LOG.warn("Error getting hostname using InetAddress.getLocalHost().getHostName()", e);
-      }
-    }
-    if (nodeHostName == null) {
-      try {
-        nodeHostName = InetAddress.getLocalHost().getCanonicalHostName();
-      } catch (Throwable e) {
-        LOG.warn("Error getting hostname using InetAddress.getLocalHost().getCanonicalHostName()", e);
-      }
-    }
-  }
-
   public boolean isMetricsEnabled() {
     return isMetricsEnabled;
   }
@@ -117,7 +96,7 @@ public class MetricsManager {
         LOG.debug("Creating new metric obbject for " + metric.metricsName);
         timelineMetric = new TimelineMetric();
         timelineMetric.setMetricName(metric.metricsName);
-        timelineMetric.setHostName(nodeHostName);
+        timelineMetric.setHostName(LogFeederUtil.hostName);
         timelineMetric.setAppId(appId);
         timelineMetric.setStartTime(currMS);
         timelineMetric.setType("Long");

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputHDFSFile.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputHDFSFile.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputHDFSFile.java
index 8f4b0b1..2b47a00 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputHDFSFile.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputHDFSFile.java
@@ -25,7 +25,7 @@ import org.apache.ambari.logfeeder.output.spool.LogSpoolerContext;
 import org.apache.ambari.logfeeder.output.spool.RolloverCondition;
 import org.apache.ambari.logfeeder.output.spool.RolloverHandler;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
-import org.apache.ambari.logfeeder.util.LogfeederHDFSUtil;
+import org.apache.ambari.logfeeder.util.LogFeederHDFSUtil;
 import org.apache.ambari.logfeeder.util.PlaceholderUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.hadoop.fs.FileSystem;
@@ -87,7 +87,7 @@ public class OutputHDFSFile extends Output implements RolloverHandler, RolloverC
     HashMap<String, String> contextParam = buildContextParam();
     hdfsOutDir = PlaceholderUtil.replaceVariables(hdfsOutDir, contextParam);
     LOG.info("hdfs Output dir=" + hdfsOutDir);
-    String localFileDir = LogFeederUtil.getLogfeederTempDir() + "hdfs/service/";
+    String localFileDir = LogFeederUtil.getLogFeederTempDir() + "hdfs/service/";
     logSpooler = new LogSpooler(localFileDir, filenamePrefix, this, this);
     this.startHDFSCopyThread();
   }
@@ -124,13 +124,13 @@ public class OutputHDFSFile extends Output implements RolloverHandler, RolloverC
             Iterator<File> localFileIterator = localReadyFiles.iterator();
             while (localFileIterator.hasNext()) {
               File localFile = localFileIterator.next();
-              fileSystem = LogfeederHDFSUtil.buildFileSystem(hdfsHost, hdfsPort);
+              fileSystem = LogFeederHDFSUtil.buildFileSystem(hdfsHost, hdfsPort);
               if (fileSystem != null && localFile.exists()) {
                 String destFilePath = hdfsOutDir + "/" + localFile.getName();
                 String localPath = localFile.getAbsolutePath();
                 boolean overWrite = true;
                 boolean delSrc = true;
-                boolean isCopied = LogfeederHDFSUtil.copyFromLocal(localFile.getAbsolutePath(), destFilePath, fileSystem,
+                boolean isCopied = LogFeederHDFSUtil.copyFromLocal(localFile.getAbsolutePath(), destFilePath, fileSystem,
                     overWrite, delSrc);
                 if (isCopied) {
                   LOG.debug("File copy to hdfs hdfspath :" + destFilePath + " and deleted local file :" + localPath);
@@ -179,7 +179,7 @@ public class OutputHDFSFile extends Output implements RolloverHandler, RolloverC
         LOG.error(" Current thread : '" + Thread.currentThread().getName() +
             "' does not have permission to interrupt the Thread: '" + hdfsCopyThread.getName() + "'");
       }
-      LogfeederHDFSUtil.closeFileSystem(fileSystem);
+      LogFeederHDFSUtil.closeFileSystem(fileSystem);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java
index 076d12d..9f41a15 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java
@@ -205,7 +205,7 @@ public class OutputS3File extends Output implements RolloverCondition, RolloverH
 
   @VisibleForTesting
   protected LogSpooler createSpooler(String filePath) {
-    String spoolDirectory = LogFeederUtil.getLogfeederTempDir() + "/s3/service";
+    String spoolDirectory = LogFeederUtil.getLogFeederTempDir() + "/s3/service";
     LOG.info(String.format("Creating spooler with spoolDirectory=%s, filePath=%s", spoolDirectory, filePath));
     return new LogSpooler(spoolDirectory, new File(filePath).getName()+"-", this, this,
         s3OutputConfiguration.getRolloverTimeThresholdSecs());

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
index d37a3bb..162a7f8 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
@@ -36,6 +36,7 @@ import java.util.concurrent.TimeUnit;
 import org.apache.ambari.logfeeder.input.InputMarker;
 import org.apache.ambari.logfeeder.util.DateUtil;
 import org.apache.ambari.logfeeder.util.LogFeederUtil;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
@@ -51,9 +52,32 @@ import org.apache.solr.client.solrj.response.UpdateResponse;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrInputDocument;
 
+import static org.apache.ambari.logfeeder.util.LogFeederUtil.LOGFEEDER_PROPERTIES_FILE;
+
 public class OutputSolr extends Output {
+
+  private static final String DEFAULT_SOLR_JAAS_FILE = "/etc/security/keytabs/logsearch_solr.service.keytab";
+  @LogSearchPropertyDescription(
+    name = "logfeeder.solr.jaas.file",
+    description = "The jaas file used for solr.",
+    examples = {"/etc/ambari-logsearch-logfeeder/conf/logfeeder_jaas.conf"},
+    defaultValue = DEFAULT_SOLR_JAAS_FILE,
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String SOLR_JAAS_FILE_PROPERTY = "logfeeder.solr.jaas.file";
+
   private static final Logger LOG = Logger.getLogger(OutputSolr.class);
 
+  private static final boolean DEFAULT_SOLR_KERBEROS_ENABLE = false;
+  @LogSearchPropertyDescription(
+    name = "logfeeder.solr.kerberos.enable",
+    description = "Enables using kerberos for accessing solr.",
+    examples = {"true"},
+    defaultValue = DEFAULT_SOLR_KERBEROS_ENABLE + "",
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String SOLR_KERBEROS_ENABLE_PROPERTY = "logfeeder.solr.kerberos.enable";
+
   private static final int DEFAULT_MAX_BUFFER_SIZE = 5000;
   private static final int DEFAULT_MAX_INTERVAL_MS = 3000;
   private static final int DEFAULT_NUMBER_OF_SHARDS = 1;
@@ -127,8 +151,8 @@ public class OutputSolr extends Output {
 
 
   private void setupSecurity() {
-    String jaasFile = LogFeederUtil.getStringProperty("logfeeder.solr.jaas.file", "/etc/security/keytabs/logsearch_solr.service.keytab");
-    boolean securityEnabled = LogFeederUtil.getBooleanProperty("logfeeder.solr.kerberos.enable", false);
+    String jaasFile = LogFeederUtil.getStringProperty(SOLR_JAAS_FILE_PROPERTY, DEFAULT_SOLR_JAAS_FILE);
+    boolean securityEnabled = LogFeederUtil.getBooleanProperty(SOLR_KERBEROS_ENABLE_PROPERTY, DEFAULT_SOLR_KERBEROS_ENABLE);
     if (securityEnabled) {
       System.setProperty("java.security.auth.login.config", jaasFile);
       HttpClientUtil.setConfigurer(new Krb5HttpClientConfigurer());

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/FileUtil.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/FileUtil.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/FileUtil.java
index 90d1df6..8ade992 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/FileUtil.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/FileUtil.java
@@ -27,11 +27,8 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.nio.file.StandardCopyOption;
 import java.nio.file.attribute.BasicFileAttributes;
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
 
-import org.apache.commons.io.FileUtils;
 import org.apache.log4j.Logger;
 import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.type.TypeReference;
@@ -42,18 +39,6 @@ public class FileUtil {
   private FileUtil() {
     throw new UnsupportedOperationException();
   }
-  
-  public static List<File> getAllFileFromDir(File directory, String extension, boolean checkInSubDir) {
-    if (!directory.exists()) {
-      LOG.error(directory.getAbsolutePath() + " is not exists ");
-    } else if (!directory.isDirectory()) {
-      LOG.error(directory.getAbsolutePath() + " is not Directory ");
-    } else {
-      return (List<File>) FileUtils.listFiles(directory, new String[]{extension}, checkInSubDir);
-    }
-    return new ArrayList<File>();
-  }
-
 
   public static Object getFileKey(File file) {
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogFeederHDFSUtil.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogFeederHDFSUtil.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogFeederHDFSUtil.java
new file mode 100644
index 0000000..4248ae1
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogFeederHDFSUtil.java
@@ -0,0 +1,77 @@
+/*
+ * 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.logfeeder.util;
+
+import java.io.IOException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.log4j.Logger;
+
+public class LogFeederHDFSUtil {
+  private static final Logger LOG = Logger.getLogger(LogFeederHDFSUtil.class);
+
+  private LogFeederHDFSUtil() {
+    throw new UnsupportedOperationException();
+  }
+  
+  public static boolean copyFromLocal(String sourceFilepath, String destFilePath, FileSystem fileSystem, boolean overwrite,
+      boolean delSrc) {
+    Path src = new Path(sourceFilepath);
+    Path dst = new Path(destFilePath);
+    boolean isCopied = false;
+    try {
+      LOG.info("copying localfile := " + sourceFilepath + " to hdfsPath := " + destFilePath);
+      fileSystem.copyFromLocalFile(delSrc, overwrite, src, dst);
+      isCopied = true;
+    } catch (Exception e) {
+      LOG.error("Error copying local file :" + sourceFilepath + " to hdfs location : " + destFilePath, e);
+    }
+    return isCopied;
+  }
+
+  public static FileSystem buildFileSystem(String hdfsHost, String hdfsPort) {
+    try {
+      Configuration configuration = buildHdfsConfiguration(hdfsHost, hdfsPort);
+      FileSystem fs = FileSystem.get(configuration);
+      return fs;
+    } catch (Exception e) {
+      LOG.error("Exception is buildFileSystem :", e);
+    }
+    return null;
+  }
+
+  private static Configuration buildHdfsConfiguration(String hdfsHost, String hdfsPort) {
+    String url = "hdfs://" + hdfsHost + ":" + hdfsPort + "/";
+    Configuration configuration = new Configuration();
+    configuration.set("fs.default.name", url);
+    return configuration;
+  }
+
+  public static void closeFileSystem(FileSystem fileSystem) {
+    if (fileSystem != null) {
+      try {
+        fileSystem.close();
+      } catch (IOException e) {
+        LOG.error(e.getLocalizedMessage(), e.getCause());
+      }
+    }
+  }
+}
\ No newline at end of file


[50/52] [abbrv] ambari git commit: Merge remote-tracking branch 'origin/trunk' into branch-feature-AMBARI-14714

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/conf/unix/ambari.properties
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/assemblies/server.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
index d4e45a8,f0f13e1..ef72399
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
@@@ -939,24 -911,9 +931,28 @@@ public interface AmbariManagementContro
     */
    QuickLinkVisibilityController getQuicklinkVisibilityController();
  
+   ConfigGroupResponse getConfigGroupUpdateResults(ConfigGroupRequest configGroupRequest);
+ 
+   void saveConfigGroupUpdate(ConfigGroupRequest configGroupRequest, ConfigGroupResponse configGroupResponse);
+ 
 +  /**
 +   * Fetch the packlet info for a given mpack.
 +   *
 +   * @param mpackId
 +   * @return List of packlets
 +   */
 +  ArrayList<Packlet> getPacklets(Long mpackId);
 +
 +  /**
 +   * Get the software registries identified by the given request objects.
 +   *
 +   * @param requests  the request objects which identify the software registries to be returned
 +   *
 +   * @return a set of software registry responses
 +   *
 +   * @throws AmbariException thrown if the resource cannot be read
 +   */
 +  Set<RegistryResponse> getRegistries(Set<RegistryRequest> requests)
 +    throws AmbariException;
  }
  

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index eed45dd,5639dc1..7b2c2ae
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@@ -503,77 -501,8 +508,66 @@@ public class AmbariManagementController
      }
      // Create cluster widgets and layouts
      initializeWidgetsAndLayouts(c, null);
- 
-     if (null != versionEntity) {
-       ClusterVersionDAO clusterVersionDAO = injector.getInstance(ClusterVersionDAO.class);
- 
-       ClusterVersionEntity clusterVersion = clusterVersionDAO.findByClusterAndStackAndVersion(request.getClusterName(), stackId,
-           request.getRepositoryVersion());
- 
-       if (null == clusterVersion) {
-         c.createClusterVersion(stackId, versionEntity.getVersion(), getAuthName(), RepositoryVersionState.INIT);
-       }
-     }
    }
  
 +  /**
 +   * {@inheritDoc}
 +   */
 +  @Override
 +  public RegistryResponse addRegistry(RegistryRequest request) {
 +    Registry registry = registryManager.addRegistry(
 +      request.getRegistryName(), request.getRegistryType(), request.getRegistryUri());
 +    return new RegistryResponse(registry);
 +  }
 +
 +  /**
 +   * {@inheritDoc}
 +   */
 +  @Override
 +  public Set<RegistryResponse> getRegistries(Set<RegistryRequest> requests)
 +    throws AmbariException {
 +    Set<RegistryResponse> responses = new HashSet<>();
 +    for (RegistryRequest request : requests) {
 +      responses.addAll(getRegistries(request));
 +    }
 +    return responses;
 +  }
 +
 +  private Set<RegistryResponse> getRegistries(RegistryRequest request)
 +    throws AmbariException {
 +    Set<RegistryResponse> responses;
 +
 +    Long registryId = request.getRegistryId();
 +
 +    if (registryId != null) {
 +      Registry registry = registryManager.getRegistry(registryId);
 +      responses = Collections.singleton(new RegistryResponse(registry));
 +    } else {
 +      Collection<Registry> registries = registryManager.getRegistries().values();
 +      responses = new HashSet<>();
 +      for (Registry registry: registries) {
 +        responses.add(new RegistryResponse(registry));
 +      }
 +    }
 +    return responses;
 +  }
 +
 +  /**
 +   * {@inheritDoc}
 +   */
 +  @Override
 +  public MpackResponse registerMpack(MpackRequest request)
 +    throws IOException, AuthorizationException, ResourceAlreadyExistsException{
 +    MpackResponse mpackResponse = ambariMetaInfo.registerMpack(request);
 +    updateStacks();
 +    return mpackResponse;
 +  }
 +
 +  @Override
 +  public ArrayList<Packlet> getPacklets(Long mpackId) {
 +    return ambariMetaInfo.getPacklets(mpackId);
 +  }
 +
    @Override
    public synchronized void createHostComponents(Set<ServiceComponentHostRequest> requests)
        throws AmbariException, AuthorizationException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
index dd7434a,07c7d3e..87c4972
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
@@@ -30,13 -31,12 +31,18 @@@ import org.apache.ambari.server.state.C
  import org.apache.ambari.server.state.Config;
  import org.apache.ambari.server.state.SecurityType;
  import org.apache.commons.lang.StringUtils;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
  
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
 +
 +import com.google.inject.Inject;
 +import com.google.inject.Injector;
 +
+ import com.google.inject.Inject;
+ import com.google.inject.Injector;
+ 
  /**
   * The {@link UpgradeCatalog251} upgrades Ambari from 2.5.0 to 2.5.1.
   */

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
----------------------------------------------------------------------
diff --cc ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
index c58cedd,eadc678..bd7dc20
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
@@@ -95,11 -90,8 +93,10 @@@ import org.apache.ambari.server.state.C
  import org.apache.ambari.server.state.DesiredConfig;
  import org.apache.ambari.server.state.Host;
  import org.apache.ambari.server.state.MaintenanceState;
 +import org.apache.ambari.server.state.Mpack;
 +import org.apache.ambari.server.state.Packlet;
  import org.apache.ambari.server.state.PropertyInfo;
  import org.apache.ambari.server.state.RepositoryInfo;
- import org.apache.ambari.server.state.RepositoryVersionState;
  import org.apache.ambari.server.state.SecurityType;
  import org.apache.ambari.server.state.Service;
  import org.apache.ambari.server.state.ServiceComponent;
@@@ -109,7 -101,7 +106,8 @@@ import org.apache.ambari.server.state.S
  import org.apache.ambari.server.state.StackId;
  import org.apache.ambari.server.state.StackInfo;
  import org.apache.ambari.server.state.State;
+ import org.apache.ambari.server.state.stack.OsFamily;
 +
  import org.easymock.Capture;
  import org.easymock.EasyMock;
  import org.junit.Before;
@@@ -2399,50 -2392,8 +2398,50 @@@ public class AmbariManagementController
      controller.createCluster(cr);
  
      // verification
-     verify(injector, clusters, ambariMetaInfo, stackInfo, cluster, repoVersionDAO, repoVersion, clusterVersionDAO);
+     verify(injector, clusters, ambariMetaInfo, stackInfo, cluster, repoVersionDAO, repoVersion);
    }
  
 +  @Test
 +  public void testRegisterMpacks() throws Exception{
 +    MpackRequest mpackRequest = createNiceMock(MpackRequest.class);
 +    Mpack mpack = new Mpack();
 +    mpack.setMpackId((long)100);
 +    mpack.setPacklets(new ArrayList<Packlet>());
 +    mpack.setPrerequisites(new HashMap<String, String>());
 +    mpack.setRegistryId(new Long(100));
 +    mpack.setVersion("3.0");
 +    mpack.setMpackUri("abc.tar.gz");
 +    mpack.setDescription("Test mpack");
 +    mpack.setName("testMpack");
 +    MpackResponse mpackResponse = new MpackResponse(mpack);
 +    Injector injector = createNiceMock(Injector.class);
 +    expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null).atLeastOnce();
 +    expect(ambariMetaInfo.registerMpack(mpackRequest)).andReturn(mpackResponse);
 +    replay(ambariMetaInfo,injector);
 +    AmbariManagementController controller = new AmbariManagementControllerImpl(null, clusters, injector);
 +    setAmbariMetaInfo(ambariMetaInfo, controller);
 +    Assert.assertEquals(mpackResponse,controller.registerMpack(mpackRequest));
 +  }
 +
 +  @Test
 +  public void testGetPacklets() throws Exception {
 +    Long mpackId = new Long(100);
 +    ArrayList<Packlet> packletArrayList = new ArrayList<>();
 +    Packlet samplePacklet = new Packlet();
 +    Injector injector = createNiceMock(Injector.class);
 +    samplePacklet.setType("service");
 +    samplePacklet.setVersion("3.0.0");
 +    samplePacklet.setName("NIFI");
 +    samplePacklet.setSourceDir("/abc/nifi.tar.gz");
 +    packletArrayList.add(samplePacklet);
 +    expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null).atLeastOnce();
 +    expect(ambariMetaInfo.getPacklets(mpackId)).andReturn(packletArrayList).atLeastOnce();
 +    replay(ambariMetaInfo,injector);
 +    AmbariManagementController controller = new AmbariManagementControllerImpl(null, clusters, injector);
 +    setAmbariMetaInfo(ambariMetaInfo, controller);
 +
 +    Assert.assertEquals(packletArrayList,controller.getPacklets(mpackId));
 +
 +  }
  
  }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f491f7b3/ambari-server/src/test/java/org/apache/ambari/server/metric/system/impl/TestAmbariMetricsSinkImpl.java
----------------------------------------------------------------------


[45/52] [abbrv] ambari git commit: AMBARI-21210 ADDENDUM Add ability to Log Search to test a log entry if it is parseable (mgergely)

Posted by jl...@apache.org.
AMBARI-21210 ADDENDUM Add ability to Log Search to test a log entry if it is parseable (mgergely)

Change-Id: Icb847dc5cc9b6f63eb02cffe8046c78be0e585dc


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: c0882898deed4b6f0ecbd6f12cd935dc6b75cfdf
Parents: 3c9f125
Author: Miklos Gergely <mg...@hortonworks.com>
Authored: Mon Jul 10 14:45:41 2017 +0200
Committer: Miklos Gergely <mg...@hortonworks.com>
Committed: Mon Jul 10 14:45:41 2017 +0200

----------------------------------------------------------------------
 .../org/apache/ambari/logfeeder/common/LogEntryParseTester.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c0882898/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogEntryParseTester.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogEntryParseTester.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogEntryParseTester.java
index 97bc3a2..5356159 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogEntryParseTester.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogEntryParseTester.java
@@ -76,7 +76,7 @@ public class LogEntryParseTester {
     ConfigHandler configHandler = new ConfigHandler();
     Input input = configHandler.getTestInput(inputConfig, logId);
     final Map<String, Object> result = new HashMap<>();
-    input.init();
+    input.getFirstFilter().init();
     input.addOutput(new Output() {
       @Override
       public void write(String block, InputMarker inputMarker) throws Exception {


[10/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/atlas-tagsync-ssl.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/atlas-tagsync-ssl.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/atlas-tagsync-ssl.xml
new file mode 100644
index 0000000..d43c010
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/atlas-tagsync-ssl.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>xasecure.policymgr.clientssl.keystore</name>
+    <value>/etc/security/serverKeys/atlas-tagsync-keystore.jks</value>
+    <description>Java Keystore files</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.keystore.password</name>
+    <value>myKeyFilePassword</value>
+    <property-type>PASSWORD</property-type>
+    <description>password for keystore</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.truststore</name>
+    <value>/etc/security/serverKeys/atlas-tagsync-mytruststore.jks</value>
+    <description>java truststore file</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.truststore.password</name>
+    <value>changeit</value>
+    <property-type>PASSWORD</property-type>
+    <description>java truststore password</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.keystore.credential.file</name>
+    <value>jceks://file{{atlas_tagsync_credential_file}}</value>
+    <description>java keystore credential file</description>
+    <on-ambari-upgrade add="false" />
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.truststore.credential.file</name>
+    <value>jceks://file{{atlas_tagsync_credential_file}}</value>
+    <description>java truststore credential file</description>
+    <on-ambari-upgrade add="false" />
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-admin-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-admin-site.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-admin-site.xml
new file mode 100644
index 0000000..e2b6c24
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-admin-site.xml
@@ -0,0 +1,751 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<configuration supports_final="true">
+  <property>
+    <name>ranger.service.host</name>
+    <value>{{ranger_host}}</value>
+    <description>Host where ranger service to be installed</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.http.enabled</name>
+    <value>true</value>
+    <display-name>HTTP enabled</display-name>
+    <description>Enable HTTP</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>boolean</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.http.port</name>
+    <value>6080</value>
+    <description>HTTP port</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.https.port</name>
+    <value>6182</value>
+    <description>HTTPS port (if SSL is enabled)</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.ssl.enabled</name>
+    <value>false</value>
+    <description>true/false, set to true if using SSL</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>boolean</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.clientAuth</name>
+    <value>want</value>
+    <description>Needs to be set to want for two way SSL</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.keystore.keyalias</name>
+    <value>rangeradmin</value>
+    <description>Alias for Ranger Admin key in keystore</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.keystore.pass</name>
+    <value>xasecure</value>
+    <property-type>PASSWORD</property-type>
+    <description>Password for keystore</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.https.attrib.keystore.file</name>
+    <value>/etc/security/serverKeys/ranger-admin-keystore.jks</value>
+    <description>Ranger admin keystore (specify full path)</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.externalurl</name>
+    <value>{{ranger_external_url}}</value>
+    <display-name>External URL</display-name>
+    <description>URL to be used by clients to access ranger admin</description>
+    <value-attributes>
+      <visible>false</visible>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.jpa.jdbc.driver</name>
+    <value>com.mysql.jdbc.Driver</value>
+    <display-name>Driver class name for a JDBC Ranger database</display-name>
+    <description>JDBC driver class name. Example: For MySQL / MariaDB: com.mysql.jdbc.Driver, For Oracle: oracle.jdbc.OracleDriver</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>admin-properties</type>
+        <name>DB_FLAVOR</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.jpa.jdbc.url</name>
+    <value>jdbc:mysql://localhost</value>
+    <display-name>JDBC connect string for a Ranger database</display-name>
+    <description>JDBC connect string</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>admin-properties</type>
+        <name>DB_FLAVOR</name>
+      </property>
+      <property>
+        <type>admin-properties</type>
+        <name>db_host</name>
+      </property>
+      <property>
+        <type>admin-properties</type>
+        <name>db_name</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.jpa.jdbc.user</name>
+    <value>{{ranger_db_user}}</value>
+    <description>JDBC user</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.jpa.jdbc.password</name>
+    <value>_</value>
+    <property-type>PASSWORD</property-type>
+    <description>JDBC password</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.jpa.jdbc.credential.alias</name>
+    <value>rangeradmin</value>
+    <description>Alias name for storing JDBC password</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.credential.provider.path</name>
+    <value>/etc/ranger/admin/rangeradmin.jceks</value>
+    <description>File for credential store, provide full file path</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.audit.source.type</name>
+    <value>solr</value>
+    <description>db or solr, based on the audit destination used</description>
+    <depends-on>
+      <property>
+        <type>ranger-env</type>
+        <name>xasecure.audit.destination.solr</name>
+      </property>
+      <property>
+        <type>ranger-env</type>
+        <name>xasecure.audit.destination.db</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.audit.solr.urls</name>
+    <value/>
+    <description>Solr url for audit. Example: http://solr_host:6083/solr/ranger_audits</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.authentication.method</name>
+    <value>UNIX</value>
+    <display-name>Authentication method</display-name>
+    <description>Ranger admin Authentication - UNIX/PAM/LDAP/AD/NONE</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>ranger-ugsync-site</type>
+        <name>ranger.usersync.source.impl.class</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.url</name>
+    <display-name>​LDAP URL</display-name>
+    <value>{{ranger_ug_ldap_url}}</value>
+    <description>LDAP Server URL, only used if Authentication method is LDAP</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.user.dnpattern</name>
+    <value>uid={0},ou=users,dc=xasecure,dc=net</value>
+    <description>LDAP user DN, only used if Authentication method is LDAP</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.group.searchbase</name>
+    <display-name>Group Search Base</display-name>
+    <value>{{ranger_ug_ldap_group_searchbase}}</value>
+    <description>LDAP group searchbase, only used if Authentication method is LDAP</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.group.searchfilter</name>
+    <display-name>Group Search Filter</display-name>
+    <value>{{ranger_ug_ldap_group_searchfilter}}</value>
+    <description>LDAP group search filter, only used if Authentication method is LDAP</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.group.roleattribute</name>
+    <value>cn</value>
+    <description>LDAP group role attribute, only used if Authentication method is LDAP</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.base.dn</name>
+    <value>dc=example,dc=com</value>
+    <description>The Distinguished Name (DN) of the starting point for directory server searches.</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.bind.dn</name>
+    <display-name>Bind User</display-name>
+    <value>{{ranger_ug_ldap_bind_dn}}</value>
+    <description>Full distinguished name (DN), including common name (CN), of an LDAP user account that has privileges to search for users. </description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.bind.password</name>
+    <display-name>​Bind User Password</display-name>
+    <value></value>
+    <property-type>PASSWORD</property-type>
+    <description>Password for the account that can search for users</description>
+    <value-attributes>
+      <type>password</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.referral</name>
+    <value>ignore</value>
+    <description>Set to follow if multiple LDAP servers are configured to return continuation references for results. Set to ignore (default) if no referrals should be followed. Possible values are follow|throw|ignore</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.ad.domain</name>
+    <display-name>Domain Name (Only for AD)</display-name>
+    <value/>
+    <description>AD domain, only used if Authentication method is AD</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.ad.url</name>
+    <value>{{ranger_ug_ldap_url}}</value>
+    <description>AD URL, only used if Authentication method is AD</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.ad.base.dn</name>
+    <value>dc=example,dc=com</value>
+    <description>The Distinguished Name (DN) of the starting point for directory server searches.</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.ad.bind.dn</name>
+    <value>{{ranger_ug_ldap_bind_dn}}</value>
+    <description>Full distinguished name (DN), including common name (CN), of an LDAP user account that has privileges to search for users.</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.ad.bind.password</name>
+    <value></value>
+    <property-type>PASSWORD</property-type>
+    <description>Password for the account that can search for users</description>
+    <value-attributes>
+      <type>password</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.ad.referral</name>
+    <value>ignore</value>
+    <description>Set to follow if multiple LDAP servers are configured to return continuation references for results. Set to ignore (default) if no referrals should be followed. Possible values are follow|throw|ignore</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.unixauth.remote.login.enabled</name>
+    <value>true</value>
+    <display-name>Allow remote Login</display-name>
+    <description>Remote login enabled? - only used if Authentication method is UNIX</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.unixauth.service.hostname</name>
+    <value>{{ugsync_host}}</value>
+    <description>Host where unix authentication service is running - only used if Authentication method is UNIX</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.unixauth.service.port</name>
+    <value>5151</value>
+    <description>Port for unix authentication service - only used if Authentication method is UNIX</description>
+    <value-attributes>
+      <type>int</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.jpa.jdbc.dialect</name>
+    <value>{{jdbc_dialect}}</value>
+    <description>JDBC dialect used for policy DB</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.audit.solr.username</name>
+    <value>ranger_solr</value>
+    <description>Solr username</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.audit.solr.password</name>
+    <value>NONE</value>
+    <property-type>PASSWORD</property-type>
+    <description>Solr password</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.sso.providerurl</name>
+    <value/>
+    <display-name>SSO provider url</display-name>
+    <description>Example: https://KNOX_HOST:KNOX_PORT/gateway/TOPOLOGY_NAME/knoxsso/api/v1/websso</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>gateway-site</type>
+        <name>gateway.port</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.sso.publicKey</name>
+    <value/>
+    <display-name>SSO public key</display-name>
+    <description>Public key for SSO cookie verification</description>
+    <value-attributes>
+      <type>multiLine</type>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.sso.enabled</name>
+    <value>false</value>
+    <display-name>Enable Ranger SSO</display-name>
+    <description/>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>boolean</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.sso.browser.useragent</name>
+    <value>Mozilla,chrome</value>
+    <display-name>SSO browser useragent</display-name>
+    <description>Comma seperated browser agent</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.binddn.credential.alias</name>
+    <value>ranger.ldap.bind.password</value>
+    <description></description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.ldap.ad.binddn.credential.alias</name>
+    <value>ranger.ldap.ad.bind.password</value>
+    <description></description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.admin.kerberos.token.valid.seconds</name>
+    <value>30</value>
+    <description/>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.admin.kerberos.cookie.domain</name>
+    <value>{{ranger_host}}</value>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.admin.kerberos.cookie.path</name>
+    <value>/</value>
+    <description/>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.spnego.kerberos.principal</name>
+    <value>*</value>
+    <description/>
+    <property-type>KERBEROS_PRINCIPAL</property-type>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.spnego.kerberos.keytab</name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.admin.kerberos.principal</name>
+    <value/>
+    <description/>
+    <property-type>KERBEROS_PRINCIPAL</property-type>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.admin.kerberos.keytab</name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.lookup.kerberos.principal</name>
+    <value/>
+    <description/>
+    <property-type>KERBEROS_PRINCIPAL</property-type>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.lookup.kerberos.keytab</name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.truststore.file</name>
+    <value>/etc/ranger/admin/conf/ranger-admin-keystore.jks</value>
+    <display-name>ranger.truststore.file</display-name>
+    <description>Ranger trust-store file-path</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.truststore.password</name>
+    <value>changeit</value>
+    <property-type>PASSWORD</property-type>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <display-name>ranger.truststore.password</display-name>
+    <description>Ranger trust-store password</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.audit.solr.zookeepers</name>
+    <value>NONE</value>
+    <description>Solr Zookeeper string</description>
+    <depends-on>
+      <property>
+        <type>infra-solr-env</type>
+        <name>infra_solr_znode</name>
+      </property>
+      <property>
+        <type>ranger-env</type>
+        <name>is_solrCloud_enabled</name>
+      </property>
+      <property>
+        <type>ranger-env</type>
+        <name>is_external_solrCloud_enabled</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.ldap.ad.user.searchfilter</name>
+    <value>(sAMAccountName={0})</value>
+    <description>Search filter used for Bind Authentication</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.ldap.user.searchfilter</name>
+    <display-name>User Search Filter</display-name>
+    <value>(uid={0})</value>
+    <description>Search filter used for Bind Authentication</description>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.kms.service.user.hdfs</name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>hadoop-env</type>
+        <name>hdfs_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.kms.service.user.hive</name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>hive-env</type>
+        <name>hive_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.plugins.hdfs.serviceuser</name>
+    <value>hdfs</value>
+    <depends-on>
+      <property>
+        <type>hadoop-env</type>
+        <name>hdfs_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.plugins.hive.serviceuser</name>
+    <value>hive</value>
+    <depends-on>
+      <property>
+        <type>hive-env</type>
+        <name>hive_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.plugins.hbase.serviceuser</name>
+    <value>hbase</value>
+    <depends-on>
+      <property>
+        <type>hbase-env</type>
+        <name>hbase_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.plugins.yarn.serviceuser</name>
+    <value>yarn</value>
+    <depends-on>
+      <property>
+        <type>yarn-env</type>
+        <name>yarn_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.plugins.knox.serviceuser</name>
+    <value>knox</value>
+    <depends-on>
+      <property>
+        <type>knox-env</type>
+        <name>knox_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.plugins.storm.serviceuser</name>
+    <value>storm</value>
+    <depends-on>
+      <property>
+        <type>storm-env</type>
+        <name>storm_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.plugins.kafka.serviceuser</name>
+    <value>kafka</value>
+    <depends-on>
+      <property>
+        <type>kafka-env</type>
+        <name>kafka_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.plugins.atlas.serviceuser</name>
+    <value>atlas</value>
+    <depends-on>
+      <property>
+        <type>atlas-env</type>
+        <name>metadata_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.plugins.kms.serviceuser</name>
+    <value>kms</value>
+    <depends-on>
+      <property>
+        <type>kms-env</type>
+        <name>kms_user</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.is.solr.kerberised</name>
+    <value>{{ranger_is_solr_kerberised}}</value>
+    <value-attributes>
+      <visible>false</visible>
+    </value-attributes>
+    <description/>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.truststore.alias</name>
+    <value>trustStoreAlias</value>
+    <description></description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.service.https.attrib.keystore.credential.alias</name>
+    <value>keyStoreCredentialAlias</value>
+    <description></description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-env.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-env.xml
new file mode 100644
index 0000000..ff44901
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-env.xml
@@ -0,0 +1,503 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_final="true" supports_adding_forbidden="true">
+  <property>
+    <name>ranger_user</name>
+    <value>ranger</value>
+    <property-type>USER</property-type>
+    <display-name>Ranger User</display-name>
+    <description>Ranger username</description>
+    <value-attributes>
+      <type>user</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_group</name>
+    <value>ranger</value>
+    <property-type>GROUP</property-type>
+    <display-name>Ranger Group</display-name>
+    <description>Ranger group</description>
+    <value-attributes>
+      <type>user</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_admin_log_dir</name>
+    <value>/var/log/ranger/admin</value>
+    <description/>
+    <value-attributes>
+      <type>directory</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_usersync_log_dir</name>
+    <value>/var/log/ranger/usersync</value>
+    <description/>
+    <value-attributes>
+      <type>directory</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_admin_username</name>
+    <value>amb_ranger_admin</value>
+    <property-type>TEXT</property-type>
+    <display-name>Ranger Admin username for Ambari</display-name>
+    <description>This is the ambari user created for creating repositories and policies in Ranger Admin for each plugin</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_admin_password</name>
+    <value/>
+    <property-type>PASSWORD</property-type>
+    <display-name>Ranger Admin user's password for Ambari</display-name>
+    <description>This is the ambari user password created for creating repositories and policies in Ranger Admin for each plugin</description>
+    <value-attributes>
+      <type>password</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>admin_username</name>
+    <value>admin</value>
+    <description>This is the username for default admin user that is used for creating ambari user in Ranger Admin</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>admin_password</name>
+    <value>admin</value>
+    <property-type>PASSWORD</property-type>
+    <description>This is the password for default admin user that is used for creating ambari user in Ranger Admin</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_pid_dir</name>
+    <value>/var/run/ranger</value>
+    <description/>
+    <value-attributes>
+      <type>directory</type>
+      <overridable>false</overridable>
+      <editable-only-at-install>true</editable-only-at-install>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger-hdfs-plugin-enabled</name>
+    <value>No</value>
+    <display-name>HDFS Ranger Plugin</display-name>
+    <description>Enable HDFS Ranger plugin</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>Yes</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>No</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger-hive-plugin-enabled</name>
+    <value>No</value>
+    <display-name>Hive Ranger Plugin</display-name>
+    <description>Enable Hive Ranger plugin</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>Yes</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>No</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger-hbase-plugin-enabled</name>
+    <value>No</value>
+    <display-name>Hbase Ranger Plugin</display-name>
+    <description>Enable HBase Ranger plugin</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>Yes</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>No</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger-storm-plugin-enabled</name>
+    <value>No</value>
+    <display-name>Storm Ranger Plugin</display-name>
+    <description>Enable Storm Ranger plugin</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>Yes</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>No</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger-knox-plugin-enabled</name>
+    <value>No</value>
+    <display-name>Knox Ranger Plugin</display-name>
+    <description>Enable Knox Ranger plugin</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>Yes</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>No</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xml_configurations_supported</name>
+    <value>true</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>create_db_dbuser</name>
+    <value>true</value>
+    <display-name>Setup Database and Database User</display-name>
+    <description>If set to Yes, Ambari will create and setup Ranger Database and Database User. This will require to specify Database Admin user and password</description>
+    <value-attributes>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_privelege_user_jdbc_url</name>
+    <display-name>JDBC connect string for root user</display-name>
+    <description>JDBC connect string - auto populated based on other values. This is to be used by root user</description>
+    <value>jdbc:mysql://localhost</value>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>admin-properties</type>
+        <name>DB_FLAVOR</name>
+      </property>
+      <property>
+        <type>admin-properties</type>
+        <name>db_host</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger-yarn-plugin-enabled</name>
+    <value>No</value>
+    <display-name>YARN Ranger Plugin</display-name>
+    <description>Enable YARN Ranger plugin</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>Yes</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>No</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger-kafka-plugin-enabled</name>
+    <value>No</value>
+    <display-name>Kafka Ranger Plugin</display-name>
+    <description>Enable Kafka Ranger plugin</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>Yes</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>No</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.solr</name>
+    <value>true</value>
+    <display-name>Audit to Solr</display-name>
+    <description>Enable Audit to Solr for all ranger supported services. This property is overridable at service level</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>is_solrCloud_enabled</name>
+    <display-name>SolrCloud</display-name>
+    <description>SolrCloud uses zookeeper for distributed search and indexing</description>
+    <value>false</value>
+    <value-attributes>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.hdfs</name>
+    <value>true</value>
+    <display-name>Audit to HDFS</display-name>
+    <description>Enable Audit to HDFS for all ranger supported services. This property is overridable at service level</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>xasecure.audit.destination.hdfs.dir</name>
+    <value>hdfs://localhost:8020</value>
+    <display-name>Destination HDFS Directory</display-name>
+    <description>HDFS folder to write audit to, make sure all service user has required permissions. This property is overridable at service level</description>
+    <depends-on>
+      <property>
+        <type>core-site</type>
+        <name>fs.defaultFS</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_solr_config_set</name>
+    <value>ranger_audits</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_solr_collection_name</name>
+    <value>ranger_audits</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_solr_shards</name>
+    <value>1</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_solr_replication_factor</name>
+    <value>1</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger-atlas-plugin-enabled</name>
+    <value>No</value>
+    <display-name>Atlas Ranger Plugin</display-name>
+    <description>Enable Atlas Ranger plugin</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>Yes</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>No</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>is_external_solrCloud_enabled</name>
+    <display-name>External SolrCloud</display-name>
+    <value>false</value>
+    <description>Using Externally managed solr cloud ?</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>is_external_solrCloud_kerberos</name>
+    <display-name>External SolrCloud kerberos</display-name>
+    <value>false</value>
+    <description>Is Externally managed solr cloud kerberos ?</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger-nifi-plugin-enabled</name>
+    <value>No</value>
+    <display-name>NIFI Ranger Plugin</display-name>
+    <description>Enable NIFI Ranger plugin</description>
+    <value-attributes>
+      <overridable>false</overridable>
+      <type>value-list</type>
+      <entries>
+        <entry>
+          <value>Yes</value>
+          <label>ON</label>
+        </entry>
+        <entry>
+          <value>No</value>
+          <label>OFF</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-solr-configuration.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-solr-configuration.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-solr-configuration.xml
new file mode 100644
index 0000000..550ce0d
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-solr-configuration.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>ranger_audit_max_retention_days</name>
+    <display-name>Max Retention Days</display-name>
+    <description>Days to retain audit logs in Solr</description>
+    <value>90</value>
+    <value-attributes>
+      <type>int</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger_audit_logs_merge_factor</name>
+    <display-name>Merge Factor</display-name>
+    <description>
+      The mergeFactor value tells Lucene how many segments of equal size to build before merging them into a
+      single segment. High value merge factor (e.g. 25) improves indexing speed, but slows down searching. Low value
+      (e.g. 5) improves searching, but slows down indexing.
+    </description>
+    <value>5</value>
+    <value-attributes>
+      <type>int</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>content</name>
+    <display-name>solr-config template</display-name>
+    <description>the jinja template for solrconfig.xml file used for ranger audit logs</description>
+    <value/>
+    <property-type>VALUE_FROM_PROPERTY_FILE</property-type>
+    <value-attributes>
+      <property-file-name>ranger-solrconfig.xml.j2</property-file-name>
+      <property-file-type>xml</property-file-type>
+    </value-attributes>
+    <on-ambari-upgrade add="false" />
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-tagsync-policymgr-ssl.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-tagsync-policymgr-ssl.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-tagsync-policymgr-ssl.xml
new file mode 100644
index 0000000..a4c9441
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-tagsync-policymgr-ssl.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>xasecure.policymgr.clientssl.keystore</name>
+    <value>/etc/security/serverKeys/ranger-tagsync-keystore.jks</value>
+    <description>Java Keystore files</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.keystore.password</name>
+    <value>myKeyFilePassword</value>
+    <property-type>PASSWORD</property-type>
+    <description>password for keystore</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.truststore</name>
+    <value>/etc/security/serverKeys/ranger-tagsync-mytruststore.jks</value>
+    <description>java truststore file</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.truststore.password</name>
+    <value>changeit</value>
+    <property-type>PASSWORD</property-type>
+    <description>java truststore password</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.keystore.credential.file</name>
+    <value>jceks://file{{ranger_tagsync_credential_file}}</value>
+    <description>java keystore credential file</description>
+    <on-ambari-upgrade add="false" />
+  </property>
+
+  <property>
+    <name>xasecure.policymgr.clientssl.truststore.credential.file</name>
+    <value>jceks://file{{ranger_tagsync_credential_file}}</value>
+    <description>java truststore credential file</description>
+    <on-ambari-upgrade add="false" />
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-tagsync-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-tagsync-site.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-tagsync-site.xml
new file mode 100644
index 0000000..2eab439
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-tagsync-site.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_final="true">
+  <property>
+    <name>ranger.tagsync.logdir</name>
+    <value>/var/log/ranger/tagsync</value>
+    <description>Ranger Log dir</description>
+    <value-attributes>
+      <type>directory</type>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.dest.ranger.endpoint</name>
+    <value>{{ranger_external_url}}</value>
+    <description>Ranger TagAdmin REST URL</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.source.atlas</name>
+    <display-name>Enable Atlas Tag Source</display-name>
+    <value>false</value>
+    <description/>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>application-properties</type>
+        <name>atlas.server.bind.address</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.source.atlasrest</name>
+    <display-name>Enable AtlasRest Tag Source</display-name>
+    <value>false</value>
+    <description/>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.source.file</name>
+    <display-name>Enable File Tag Source</display-name>
+    <value>false</value>
+    <description/>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.source.file.check.interval.millis</name>
+    <display-name>File Source: File update polling interval</display-name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.source.atlasrest.download.interval.millis</name>
+    <display-name>AtlasREST Source: Atlas source download interval</display-name>
+    <value>60000</value>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>ranger.tagsync.source.file.filename</name>
+    <display-name>File Source: Filename</display-name>
+    <value/>
+    <description>File Source Filename</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.source.atlasrest.endpoint</name>
+    <display-name>AtlasREST Source: Atlas endpoint</display-name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+    <depends-on>
+      <property>
+        <type>application-properties</type>
+        <name>atlas.server.http.port</name>
+      </property>
+      <property>
+        <type>application-properties</type>
+        <name>atlas.server.https.port</name>
+      </property>
+      <property>
+        <type>application-properties</type>
+        <name>atlas.enableTLS</name>
+      </property>
+    </depends-on>
+  </property>
+  <property>
+    <name>ranger.tagsync.kerberos.principal</name>
+    <value/>
+    <description/>
+    <property-type>KERBEROS_PRINCIPAL</property-type>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.kerberos.keytab</name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.dest.ranger.username</name>
+    <value>rangertagsync</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.source.atlasrest.username</name>
+    <value>admin</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.atlas.default.cluster.name</name>
+    <value>{{cluster_name}}</value>
+    <description>Capture cluster name</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.keystore.filename</name>
+    <value>/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks</value>
+    <description>Keystore file</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.source.atlasrest.keystore.filename</name>
+    <value>/usr/hdp/current/ranger-tagsync/conf/atlasuser.jceks</value>
+    <description>Tagsync atlasrest keystore file</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.dest.ranger.ssl.config.filename</name>
+    <value>{{stack_root}}/current/ranger-tagsync/conf/ranger-policymgr-ssl.xml</value>
+    <description>Keystore and truststore information used for tagsync, required if tagsync -&gt; ranger admin communication is SSL enabled</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.tagsync.source.atlasrest.ssl.config.filename</name>
+    <value>{{stack_root}}/current/ranger-tagsync/conf/atlas-tagsync-ssl.xml</value>
+    <description>Keystore and truststore information used for tagsync, required if tagsync to atlas communication is SSL enabled</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-ugsync-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-ugsync-site.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-ugsync-site.xml
new file mode 100644
index 0000000..80babd6
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-ugsync-site.xml
@@ -0,0 +1,571 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<configuration supports_final="true">
+  <property>
+    <name>ranger.usersync.port</name>
+    <value>5151</value>
+    <description>Port for unix authentication service, run within usersync</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ssl</name>
+    <value>true</value>
+    <description>SSL enabled? (ranger admin -&gt; usersync communication)</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.keystore.password</name>
+    <value>UnIx529p</value>
+    <property-type>PASSWORD</property-type>
+    <description>Keystore password</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.truststore.password</name>
+    <value>changeit</value>
+    <property-type>PASSWORD</property-type>
+    <description>Truststore password</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.passwordvalidator.path</name>
+    <value>./native/credValidator.uexe</value>
+    <description>Native program for password validation</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.enabled</name>
+    <display-name>Enable User Sync</display-name>
+    <value>true</value>
+    <description>Should users and groups be synchronized to Ranger Database? Required to setup Ranger policies</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.sink.impl.class</name>
+    <value>org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder</value>
+    <description>Class to be used as sink (to sync users into ranger admin)</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.policymanager.baseURL</name>
+    <value>{{ranger_external_url}}</value>
+    <description>URL to be used by clients to access ranger admin, use FQDN</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.policymanager.maxrecordsperapicall</name>
+    <value>1000</value>
+    <description>How many records to be returned per API call</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.policymanager.mockrun</name>
+    <value>false</value>
+    <description>Is user sync doing mock run?</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.unix.minUserId</name>
+    <display-name>Minimum User ID</display-name>
+    <value>500</value>
+    <description>Only sync users above this user id (applicable for UNIX)</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.unix.group.file</name>
+    <display-name>Group File</display-name>
+    <value>/etc/group</value>
+    <description>Location of the groups file on the linux server</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.unix.password.file</name>
+    <display-name>Password File</display-name>
+    <value>/etc/passwd</value>
+    <description>Location of the password file on the linux server</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.sleeptimeinmillisbetweensynccycle</name>
+    <value>60000</value>
+    <description>Sleeptime interval in milliseconds, if &lt; 6000 then default to 1 min</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.source.impl.class</name>
+    <value>org.apache.ranger.unixusersync.process.UnixUserGroupBuilder</value>
+    <display-name>Sync Source</display-name>
+    <description>For Ldap: org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder, For Unix: org.apache.ranger.unixusersync.process.UnixUserGroupBuilder, org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder</description>
+    <value-attributes>
+      <type>value-list</type>
+      <empty-value-valid>true</empty-value-valid>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>org.apache.ranger.unixusersync.process.UnixUserGroupBuilder</value>
+          <label>UNIX</label>
+        </entry>
+        <entry>
+          <value>org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder</value>
+          <label>FILE</label>
+        </entry>
+        <entry>
+          <value>org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder</value>
+          <label>LDAP/AD</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.filesource.file</name>
+    <display-name>File Name</display-name>
+    <value>/tmp/usergroup.txt</value>
+    <description>Path to the file with the users and groups information. Example: /tmp/usergroup.json or /tmp/usergroup.csv or /tmp/usergroup.txt</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.filesource.text.delimiter</name>
+    <display-name>Delimiter</display-name>
+    <value>,</value>
+    <description>Delimiter used in file, if File based user sync is used</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.url</name>
+    <display-name>LDAP/AD URL</display-name>
+    <value/>
+    <description>LDAP server URL. Example: value = ldap://localhost:389 or ldaps//localhost:636</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.binddn</name>
+    <display-name>​Bind User</display-name>
+    <value/>
+    <description>Full distinguished name (DN), including common name (CN), of an LDAP user account that has privileges to search for users. This user is used for searching the users. This could be read-only LDAP user. Example: cn=admin,dc=example,dc=com</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.ldapbindpassword</name>
+    <display-name>Bind User Password</display-name>
+    <value/>
+    <property-type>PASSWORD</property-type>
+    <description>Password for the LDAP bind user used for searching users.</description>
+    <value-attributes>
+      <type>password</type>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.bindalias</name>
+    <value>testldapalias</value>
+    <description>Set as ranger.usersync.ldap.bindalias (string as is)</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>ranger.usersync.ldap.searchBase</name>
+    <value>dc=hadoop,dc=apache,dc=org</value>
+    <description>"# search base for users and groups
+# sample value would be dc=hadoop,dc=apache,dc=org
+# From Ranger Release 0.6.0 multiple Ous can be configured with ; (semicolon) separated"</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.user.searchbase</name>
+    <display-name>User Search Base</display-name>
+    <value/>
+    <description>"# search base for users
+# sample value would be ou=users,dc=hadoop,dc=apache,dc=org
+# overrides value specified in ranger.usersync.ldap.searchBase
+# From Ranger Release 0.6.0 multiple Ous can be configured with ; (semicolon) separated eg: cn=users,dc=example,dc=com;ou=example1,ou=example2"</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.user.searchscope</name>
+    <display-name>User Search Scope</display-name>
+    <value>sub</value>
+    <description>"# search scope for the users, only base, one and sub are supported values
+# please customize the value to suit your deployment
+# default value: sub"</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.user.objectclass</name>
+    <display-name>User Object Class​</display-name>
+    <value>person</value>
+    <description>LDAP User Object Class. Example: person or user</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.user.searchfilter</name>
+    <display-name>​User Search Filter</display-name>
+    <value/>
+    <description>"optional additional filter constraining the users selected for syncing
+# a sample value would be (dept=eng)
+# please customize the value to suit your deployment
+# default value is empty"</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.user.nameattribute</name>
+    <display-name>Username Attribute</display-name>
+    <value/>
+    <description>LDAP user name attribute. Example: sAMAccountName in AD, uid or cn in OpenLDAP</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.referral</name>
+    <value>ignore</value>
+    <description>Set to follow if multiple LDAP servers are configured to return continuation references for results. Set to ignore (default) if no referrals should be followed</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.user.groupnameattribute</name>
+    <display-name>User Group Name Attribute</display-name>
+    <value>memberof, ismemberof</value>
+    <description>LDAP user group name attribute. Generally it is the same as username attribute. Example: sAMAccountName in AD, uid or cn in OpenLDAP</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.username.caseconversion</name>
+    <value>none</value>
+    <description>User name case conversion</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.groupname.caseconversion</name>
+    <value>none</value>
+    <description>Group name case conversion</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.logdir</name>
+    <value>{{usersync_log_dir}}</value>
+    <description>User sync log directory</description>
+    <value-attributes>
+      <visible>false</visible>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.group.usermapsyncenabled</name>
+    <value>true</value>
+    <display-name>Group User Map Sync</display-name>
+    <description>Sync specific groups for users?</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.group.searchbase</name>
+    <display-name>Group Search Base</display-name>
+    <value/>
+    <description>"# search base for groups
+# sample value would be ou=groups,dc=hadoop,dc=apache,dc=org
+# overrides value specified in ranger.usersync.ldap.searchBase,  ranger.usersync.ldap.user.searchbase
+# if a value is not specified, takes the value of  ranger.usersync.ldap.searchBase
+# if  ranger.usersync.ldap.searchBase is also not specified, takes the value of ranger.usersync.ldap.user.searchbase"
+# From Ranger Release 0.6.0 multiple Ous can be configured with ; (semicolon) separated eg: ou=groups,DC=example,DC=com;ou=group1,ou=group2"
+</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.group.searchscope</name>
+    <value/>
+    <description>"# search scope for the groups, only base, one and sub are supported values
+# please customize the value to suit your deployment
+# default value: sub"</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.group.objectclass</name>
+    <display-name>Group Object Class</display-name>
+    <value/>
+    <description>LDAP Group object class. Example: group</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>ranger.usersync.group.searchfilter</name>
+    <value/>
+    <display-name>Group Search Filter</display-name>
+    <description>"# optional additional filter constraining the groups selected for syncing
+# a sample value would be (dept=eng)
+# please customize the value to suit your deployment
+# default value is empty"</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.group.nameattribute</name>
+    <display-name>Group Name Attribute</display-name>
+    <value/>
+    <description>LDAP group name attribute. Example: cn</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.group.memberattributename</name>
+    <display-name>Group Member Attribute</display-name>
+    <value/>
+    <description>LDAP group member attribute name. Example: member</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.pagedresultsenabled</name>
+    <value>true</value>
+    <description>Results can be paged?</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.pagedresultssize</name>
+    <value>500</value>
+    <description>Page size</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.kerberos.principal</name>
+    <value/>
+    <description/>
+    <property-type>KERBEROS_PRINCIPAL</property-type>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.kerberos.keytab</name>
+    <value/>
+    <description/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.policymgr.username</name>
+    <value>rangerusersync</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.policymgr.alias</name>
+    <value>ranger.usersync.policymgr.password</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.group.search.first.enabled</name>
+    <display-name>Enable Group Search First</display-name>
+    <value>false</value>
+    <description/>
+    <value-attributes>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.user.searchenabled</name>
+    <display-name>Enable User Search</display-name>
+    <value>false</value>
+    <description/>
+    <value-attributes>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.deltasync</name>
+    <display-name>Incremental Sync</display-name>
+    <value>true</value>
+    <description>Enable Incremental Sync</description>
+    <value-attributes>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.group.searchenabled</name>
+    <display-name>Enable Group Sync</display-name>
+    <value>false</value>
+    <description>"# do we want to do ldapsearch to find groups instead of relying on user entry attributes
+    # valid values: true, false
+    # any value other than true would be treated as false
+    # default value: false"</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+      <type>value-list</type>
+      <overridable>false</overridable>
+      <entries>
+        <entry>
+          <value>true</value>
+          <label>Yes</label>
+        </entry>
+        <entry>
+          <value>false</value>
+          <label>No</label>
+        </entry>
+      </entries>
+      <selection-cardinality>1</selection-cardinality>
+    </value-attributes>
+    <depends-on>
+      <property>
+        <type>ranger-ugsync-site</type>
+        <name>ranger.usersync.ldap.deltasync</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.keystore.file</name>
+    <value>/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks</value>
+    <description>Keystore file used for usersync</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.truststore.file</name>
+    <value>/usr/hdp/current/ranger-usersync/conf/mytruststore.jks</value>
+    <description>Truststore used for usersync, required if usersync -&gt; ranger admin communication is SSL enabled</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.ldap.bindkeystore</name>
+    <value/>
+    <description>Set same value as ranger.usersync.keystore.file property i.e default value /usr/hdp/current/ranger-usersync/conf/ugsync.jceks</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.credstore.filename</name>
+    <value>/usr/hdp/current/ranger-usersync/conf/ugsync.jceks</value>
+    <description>Credential store file name for user sync, specify full path</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ranger.usersync.policymgr.keystore</name>
+    <value>/usr/hdp/current/ranger-usersync/conf/ugsync.jceks</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/tagsync-application-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/tagsync-application-properties.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/tagsync-application-properties.xml
new file mode 100644
index 0000000..f616324
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/tagsync-application-properties.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration>
+  <property>
+    <name>atlas.kafka.entities.group.id</name>
+    <display-name>Atlas Source: Kafka consumer group</display-name>
+    <value>ranger_entities_consumer</value>
+    <description/>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>atlas.kafka.bootstrap.servers</name>
+    <display-name>Atlas Source: Kafka endpoint</display-name>
+    <value>localhost:6667</value>
+    <description/>
+    <depends-on>
+      <property>
+        <type>kafka-broker</type>
+        <name>port</name>
+      </property>
+    </depends-on>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>atlas.kafka.zookeeper.connect</name>
+    <display-name>Atlas Source: Zookeeper endpoint</display-name>
+    <value>localhost:2181</value>
+    <description/>
+    <depends-on>
+      <property>
+        <type>zoo.cfg</type>
+        <name>clientPort</name>
+      </property>
+    </depends-on>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/tagsync-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/tagsync-log4j.xml b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/tagsync-log4j.xml
new file mode 100644
index 0000000..bd2e109
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/tagsync-log4j.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_adding_forbidden="false">
+  <property>
+    <name>ranger_tagsync_log_maxfilesize</name>
+    <value>256</value>
+   <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>Ranger tagsync Log: backup file size</display-name>
+    <value-attributes>
+      <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+   </property>
+    <property>
+     <name>ranger_tagsync_log_number_of_backup_files</name>
+     <value>20</value>
+     <description>The number of backup files</description>
+     <display-name>Ranger tagsync Log: # of backup files</display-name>
+     <value-attributes>
+      <type>int</type>
+      <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>content</name>
+    <display-name>tagsync-log4j template</display-name>
+    <description>tagsync-log4j.properties</description>
+    <value>
+#
+# 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.
+#
+
+
+log4j.rootLogger = info,logFile
+
+# logFile
+log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.logFile.file=${logdir}/tagsync.log
+log4j.appender.logFile.datePattern='.'yyyy-MM-dd
+log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
+log4j.appender.logFile.MaxFileSize = {{ranger_tagsync_log_maxfilesize}}MB
+log4j.appender.logFile.MaxBackupIndex = {{ranger_tagsync_log_number_of_backup_files}}
+log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n
+
+# console
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Target=System.out
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n
+    </value>
+    <value-attributes>
+      <type>content</type>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>


[02/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/metainfo.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/metainfo.xml
new file mode 100644
index 0000000..d328d89
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/metainfo.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>RANGER_KMS</name>
+      <displayName>Ranger KMS</displayName>
+      <comment>Key Management Server</comment>
+      <version>1.0.0.3.0</version>
+      <components>
+
+        <component>
+          <name>RANGER_KMS_SERVER</name>
+          <displayName>Ranger KMS Server</displayName>
+          <category>MASTER</category>
+          <cardinality>1+</cardinality>
+          <versionAdvertised>true</versionAdvertised>
+          <commandScript>
+            <script>scripts/kms_server.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <logs>
+            <log>
+              <logId>ranger_kms</logId>
+              <primary>true</primary>
+            </log>
+          </logs>
+          <dependencies>
+            <dependency>
+              <name>HDFS/HDFS_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+        </component>
+      </components>
+
+
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>redhat7,amazon2015,redhat6,suse11,suse12</osFamily>
+          <packages>
+            <package>
+              <name>ranger_${stack_version}-kms</name>
+            </package>
+          </packages>
+        </osSpecific>
+        <osSpecific>
+          <osFamily>debian7,ubuntu12,ubuntu14,ubuntu16</osFamily>
+          <packages>
+            <package>
+              <name>ranger-${stack_version}-kms</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <configuration-dependencies>
+        <config-type>kms-properties</config-type>
+        <config-type>kms-site</config-type>
+        <config-type>kms-log4j</config-type>
+        <config-type>dbks-site</config-type>
+        <config-type>ranger-kms-site</config-type>
+        <config-type>ranger-kms-audit</config-type>
+        <config-type>ranger-kms-policymgr-ssl</config-type>
+        <config-type>ranger-kms-security</config-type>
+      </configuration-dependencies>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <requiredServices>
+        <service>RANGER</service>
+        <service>HDFS</service>
+      </requiredServices>
+
+      <themes>
+        <theme>
+          <fileName>theme_version_1.json</fileName>
+          <default>true</default>
+        </theme>
+      </themes>
+
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms.py
new file mode 100755
index 0000000..6e4a171
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms.py
@@ -0,0 +1,675 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+import sys
+import fileinput
+import os
+import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
+import urllib2, base64, httplib
+from StringIO import StringIO as BytesIO
+from datetime import datetime
+from resource_management.core.resources.system import File, Directory, Execute
+from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.libraries.resources.modify_properties_file import ModifyPropertiesFile
+from resource_management.core.source import DownloadSource, InlineTemplate
+from resource_management.core.exceptions import Fail
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.ranger_functions import Rangeradmin
+from resource_management.libraries.functions.ranger_functions_v2 import RangeradminV2
+from resource_management.libraries.functions.decorator import safe_retry
+from resource_management.core.utils import PasswordString
+from resource_management.core.shell import as_sudo
+import re
+import time
+import socket
+
+def password_validation(password, key):
+  import params
+  if password.strip() == "":
+    raise Fail("Blank password is not allowed for {0} property. Please enter valid password.".format(key))
+  if re.search("[\\\`'\"]",password):
+    raise Fail("{0} password contains one of the unsupported special characters like \" ' \ `".format(key))
+  else:
+    Logger.info("Password validated")
+
+def setup_kms_db(stack_version=None):
+  import params
+
+  if params.has_ranger_admin:
+
+    kms_home = params.kms_home
+    version = params.version
+    if stack_version is not None:
+      kms_home = format("{stack_root}/{stack_version}/ranger-kms")
+      version = stack_version
+
+    password_validation(params.kms_master_key_password, 'KMS master key')
+
+    copy_jdbc_connector(stack_version=version)
+
+    env_dict = {'RANGER_KMS_HOME':kms_home, 'JAVA_HOME': params.java_home}
+    if params.db_flavor.lower() == 'sqla':
+      env_dict = {'RANGER_KMS_HOME':kms_home, 'JAVA_HOME': params.java_home, 'LD_LIBRARY_PATH':params.ld_library_path}
+
+    dba_setup = format('ambari-python-wrap {kms_home}/dba_script.py -q')
+    db_setup = format('ambari-python-wrap {kms_home}/db_setup.py')
+
+    if params.create_db_user:
+      Logger.info('Setting up Ranger KMS DB and DB User')
+      Execute(dba_setup, environment=env_dict, logoutput=True, user=params.kms_user, tries=5, try_sleep=10)
+    else:
+      Logger.info('Separate DBA property not set. Assuming Ranger KMS DB and DB User exists!')
+    Execute(db_setup, environment=env_dict, logoutput=True, user=params.kms_user, tries=5, try_sleep=10)
+
+def setup_java_patch():
+  import params
+
+  if params.has_ranger_admin:
+
+    kms_home = params.kms_home
+    setup_java_patch = format('ambari-python-wrap {kms_home}/db_setup.py -javapatch')
+
+    env_dict = {'RANGER_KMS_HOME':kms_home, 'JAVA_HOME': params.java_home}
+    if params.db_flavor.lower() == 'sqla':
+      env_dict = {'RANGER_KMS_HOME':kms_home, 'JAVA_HOME': params.java_home, 'LD_LIBRARY_PATH':params.ld_library_path}
+
+    Execute(setup_java_patch, environment=env_dict, logoutput=True, user=params.kms_user, tries=5, try_sleep=10)
+
+    kms_lib_path = format('{kms_home}/ews/webapp/lib/')
+    files = os.listdir(kms_lib_path)
+    hadoop_jar_files = []
+
+    for x in files:
+      if x.startswith('hadoop-common') and x.endswith('.jar'):
+        hadoop_jar_files.append(x)
+
+    if len(hadoop_jar_files) != 0:
+      for f in hadoop_jar_files:
+        Execute((format('{java_home}/bin/jar'),'-uf', format('{kms_home}/ews/webapp/lib/{f}'), format('{kms_home}/ews/webapp/META-INF/services/org.apache.hadoop.crypto.key.KeyProviderFactory')),
+          user=params.kms_user)
+
+        File(format('{kms_home}/ews/webapp/lib/{f}'), owner=params.kms_user, group=params.kms_group)
+
+def do_keystore_setup(cred_provider_path, credential_alias, credential_password):
+  import params
+
+  if cred_provider_path is not None:
+    java_bin = format('{java_home}/bin/java')
+    file_path = format('jceks://file{cred_provider_path}')
+    cmd = (java_bin, '-cp', params.cred_lib_path, 'org.apache.ranger.credentialapi.buildks', 'create', credential_alias, '-value', PasswordString(credential_password), '-provider', file_path)
+    Execute(cmd,
+            environment={'JAVA_HOME': params.java_home},
+            logoutput=True,
+            sudo=True,
+    )
+
+    File(cred_provider_path,
+      owner = params.kms_user,
+      group = params.kms_group,
+      mode = 0640
+    )
+
+def kms(upgrade_type=None):
+  import params
+
+  if params.has_ranger_admin:
+
+    Directory(params.kms_conf_dir,
+      owner = params.kms_user,
+      group = params.kms_group,
+      create_parents = True
+    )
+
+    Directory("/etc/security/serverKeys",
+      create_parents = True,
+      cd_access = "a"
+    )
+
+    Directory("/etc/ranger/kms",
+      create_parents = True,
+      cd_access = "a"
+    )
+
+    copy_jdbc_connector()
+
+    File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
+      content = DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),
+      mode = 0644,
+    )
+
+    cp = format("{check_db_connection_jar}")
+    if params.db_flavor.lower() == 'sqla':
+      cp = cp + os.pathsep + format("{kms_home}/ews/webapp/lib/sajdbc4.jar")
+    else:
+      path_to_jdbc = format("{kms_home}/ews/webapp/lib/{jdbc_jar_name}")
+      if not os.path.isfile(path_to_jdbc):
+        path_to_jdbc = format("{kms_home}/ews/webapp/lib/") + \
+                       params.default_connectors_map[params.db_flavor.lower()] if params.db_flavor.lower() in params.default_connectors_map else None
+        if not os.path.isfile(path_to_jdbc):
+          path_to_jdbc = format("{kms_home}/ews/webapp/lib/") + "*"
+          error_message = "Error! Sorry, but we can't find jdbc driver with default name " + params.default_connectors_map[params.db_flavor] + \
+                " in ranger kms lib dir. So, db connection check can fail. Please run 'ambari-server setup --jdbc-db={db_name} --jdbc-driver={path_to_jdbc} on server host.'"
+          Logger.error(error_message)
+
+      cp = cp + os.pathsep + path_to_jdbc
+
+    db_connection_check_command = format(
+      "{java_home}/bin/java -cp {cp} org.apache.ambari.server.DBConnectionVerification '{ranger_kms_jdbc_connection_url}' {db_user} {db_password!p} {ranger_kms_jdbc_driver}")
+
+    env_dict = {}
+    if params.db_flavor.lower() == 'sqla':
+      env_dict = {'LD_LIBRARY_PATH':params.ld_library_path}
+
+    Execute(db_connection_check_command, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', tries=5, try_sleep=10, environment=env_dict)
+
+    if params.xa_audit_db_is_enabled and params.driver_source is not None and not params.driver_source.endswith("/None"):
+      if params.xa_previous_jdbc_jar and os.path.isfile(params.xa_previous_jdbc_jar):
+        File(params.xa_previous_jdbc_jar, action='delete')
+
+      File(params.downloaded_connector_path,
+        content = DownloadSource(params.driver_source),
+        mode = 0644
+      )
+
+      Execute(('cp', '--remove-destination', params.downloaded_connector_path, params.driver_target),
+          path=["/bin", "/usr/bin/"],
+          sudo=True)
+
+      File(params.driver_target, mode=0644)
+
+    Directory(os.path.join(params.kms_home, 'ews', 'webapp', 'WEB-INF', 'classes', 'lib'),
+        mode=0755,
+        owner=params.kms_user,
+        group=params.kms_group
+      )
+
+    Execute(('cp',format('{kms_home}/ranger-kms-initd'),'/etc/init.d/ranger-kms'),
+    not_if=format('ls /etc/init.d/ranger-kms'),
+    only_if=format('ls {kms_home}/ranger-kms-initd'),
+    sudo=True)
+
+    File('/etc/init.d/ranger-kms',
+      mode = 0755
+    )
+
+    Directory(format('{kms_home}/'),
+              owner = params.kms_user,
+              group = params.kms_group,
+              recursive_ownership = True,
+    )
+
+    Directory(params.ranger_kms_pid_dir,
+      mode=0755,
+      owner = params.kms_user,
+      group = params.user_group,
+      cd_access = "a",
+      create_parents=True
+    )
+
+    if params.stack_supports_pid:
+      File(format('{kms_conf_dir}/ranger-kms-env-piddir.sh'),
+        content = format("export RANGER_KMS_PID_DIR_PATH={ranger_kms_pid_dir}\nexport KMS_USER={kms_user}"),
+        owner = params.kms_user,
+        group = params.kms_group,
+        mode=0755
+      )
+
+    Directory(params.kms_log_dir,
+      owner = params.kms_user,
+      group = params.kms_group,
+      cd_access = 'a',
+      create_parents=True,
+      mode=0755
+    )
+
+    File(format('{kms_conf_dir}/ranger-kms-env-logdir.sh'),
+      content = format("export RANGER_KMS_LOG_DIR={kms_log_dir}"),
+      owner = params.kms_user,
+      group = params.kms_group,
+      mode=0755
+    )
+
+    Execute(('ln','-sf', format('{kms_home}/ranger-kms'),'/usr/bin/ranger-kms'),
+      not_if=format('ls /usr/bin/ranger-kms'),
+      only_if=format('ls {kms_home}/ranger-kms'),
+      sudo=True)
+
+    File('/usr/bin/ranger-kms', mode = 0755)
+
+    Execute(('ln','-sf', format('{kms_home}/ranger-kms'),'/usr/bin/ranger-kms-services.sh'),
+      not_if=format('ls /usr/bin/ranger-kms-services.sh'),
+      only_if=format('ls {kms_home}/ranger-kms'),
+      sudo=True)
+
+    File('/usr/bin/ranger-kms-services.sh', mode = 0755)
+
+    Execute(('ln','-sf', format('{kms_home}/ranger-kms-initd'),format('{kms_home}/ranger-kms-services.sh')),
+      not_if=format('ls {kms_home}/ranger-kms-services.sh'),
+      only_if=format('ls {kms_home}/ranger-kms-initd'),
+      sudo=True)
+
+    File(format('{kms_home}/ranger-kms-services.sh'), mode = 0755)
+
+    Directory(params.kms_log_dir,
+      owner = params.kms_user,
+      group = params.kms_group,
+      mode = 0775
+    )
+
+    do_keystore_setup(params.credential_provider_path, params.jdbc_alias, params.db_password)
+    do_keystore_setup(params.credential_provider_path, params.masterkey_alias, params.kms_master_key_password)
+    if params.stack_support_kms_hsm and params.enable_kms_hsm:
+      do_keystore_setup(params.credential_provider_path, params.hms_partition_alias, unicode(params.hms_partition_passwd))
+    if params.stack_supports_ranger_kms_ssl and params.ranger_kms_ssl_enabled:
+      do_keystore_setup(params.ranger_kms_cred_ssl_path, params.ranger_kms_ssl_keystore_alias, params.ranger_kms_ssl_passwd)
+
+    # remove plain-text password from xml configs
+    dbks_site_copy = {}
+    dbks_site_copy.update(params.config['configurations']['dbks-site'])
+
+    for prop in params.dbks_site_password_properties:
+      if prop in dbks_site_copy:
+        dbks_site_copy[prop] = "_"
+
+    XmlConfig("dbks-site.xml",
+      conf_dir=params.kms_conf_dir,
+      configurations=dbks_site_copy,
+      configuration_attributes=params.config['configuration_attributes']['dbks-site'],
+      owner=params.kms_user,
+      group=params.kms_group,
+      mode=0644
+    )
+
+    ranger_kms_site_copy = {}
+    ranger_kms_site_copy.update(params.config['configurations']['ranger-kms-site'])
+    if params.stack_supports_ranger_kms_ssl:
+      # remove plain-text password from xml configs
+      for prop in params.ranger_kms_site_password_properties:
+        if prop in ranger_kms_site_copy:
+          ranger_kms_site_copy[prop] = "_"
+
+    XmlConfig("ranger-kms-site.xml",
+      conf_dir=params.kms_conf_dir,
+      configurations=ranger_kms_site_copy,
+      configuration_attributes=params.config['configuration_attributes']['ranger-kms-site'],
+      owner=params.kms_user,
+      group=params.kms_group,
+      mode=0644
+    )
+
+    XmlConfig("kms-site.xml",
+      conf_dir=params.kms_conf_dir,
+      configurations=params.config['configurations']['kms-site'],
+      configuration_attributes=params.config['configuration_attributes']['kms-site'],
+      owner=params.kms_user,
+      group=params.kms_group,
+      mode=0644
+    )
+
+    File(os.path.join(params.kms_conf_dir, "kms-log4j.properties"),
+      owner=params.kms_user,
+      group=params.kms_group,
+      content=InlineTemplate(params.kms_log4j),
+      mode=0644
+    )
+    if params.security_enabled:
+      # core-site.xml linking required by setup for HDFS encryption
+      XmlConfig("core-site.xml",
+        conf_dir=params.kms_conf_dir,
+        configurations=params.config['configurations']['core-site'],
+        configuration_attributes=params.config['configuration_attributes']['core-site'],
+        owner=params.kms_user,
+        group=params.kms_group,
+        mode=0644
+      )
+    else:
+      File(format('{kms_conf_dir}/core-site.xml'), action="delete")
+
+def copy_jdbc_connector(stack_version=None):
+  import params
+
+  if params.jdbc_jar_name is None and params.driver_curl_source.endswith("/None"):
+    error_message = "Error! Sorry, but we can't find jdbc driver related to {0} database to download from {1}. \
+    Please run 'ambari-server setup --jdbc-db={db_name} --jdbc-driver={path_to_jdbc} on server host.'".format(params.db_flavor, params.jdk_location)
+    Logger.error(error_message)
+
+  if params.driver_curl_source and not params.driver_curl_source.endswith("/None"):
+    if params.previous_jdbc_jar and os.path.isfile(params.previous_jdbc_jar):
+      File(params.previous_jdbc_jar, action='delete')
+
+  kms_home = params.kms_home
+  if stack_version is not None:
+    kms_home = format("{stack_root}/{stack_version}/ranger-kms")
+
+  driver_curl_target = format("{kms_home}/ews/webapp/lib/{jdbc_jar_name}")
+
+  File(params.downloaded_custom_connector,
+    content = DownloadSource(params.driver_curl_source),
+    mode = 0644
+  )
+
+  Directory(os.path.join(kms_home, 'ews', 'lib'),
+    mode=0755
+  )
+
+  if params.db_flavor.lower() == 'sqla':
+    Execute(('tar', '-xvf', params.downloaded_custom_connector, '-C', params.tmp_dir), sudo = True)
+
+    Execute(('cp', '--remove-destination', params.jar_path_in_archive, os.path.join(kms_home, 'ews', 'webapp', 'lib')),
+      path=["/bin", "/usr/bin/"],
+      sudo=True)
+
+    Directory(params.jdbc_libs_dir,
+      cd_access="a",
+      create_parents=True)
+
+    Execute(as_sudo(['yes', '|', 'cp', params.libs_path_in_archive, params.jdbc_libs_dir], auto_escape=False),
+      path=["/bin", "/usr/bin/"])
+
+    File(os.path.join(kms_home, 'ews', 'webapp', 'lib', 'sajdbc4.jar'), mode=0644)
+  else:
+    Execute(('cp', '--remove-destination', params.downloaded_custom_connector, os.path.join(kms_home, 'ews', 'webapp', 'lib')),
+      path=["/bin", "/usr/bin/"],
+      sudo=True)
+
+    File(os.path.join(kms_home, 'ews', 'webapp', 'lib', params.jdbc_jar_name), mode=0644)
+
+  ModifyPropertiesFile(format("{kms_home}/install.properties"),
+    properties = params.config['configurations']['kms-properties'],
+    owner = params.kms_user
+  )
+
+  if params.db_flavor.lower() == 'sqla':
+    ModifyPropertiesFile(format("{kms_home}/install.properties"),
+      properties = {'SQL_CONNECTOR_JAR': format('{kms_home}/ews/webapp/lib/sajdbc4.jar')},
+      owner = params.kms_user,
+    )
+  else:
+    ModifyPropertiesFile(format("{kms_home}/install.properties"),
+      properties = {'SQL_CONNECTOR_JAR': format('{driver_curl_target}')},
+      owner = params.kms_user,
+    )
+
+def enable_kms_plugin():
+
+  import params
+
+  if params.has_ranger_admin:
+
+    ranger_flag = False
+
+    if params.stack_supports_ranger_kerberos and params.security_enabled:
+      if not is_empty(params.rangerkms_principal) and params.rangerkms_principal != '':
+        ranger_flag = check_ranger_service_support_kerberos(params.kms_user, params.rangerkms_keytab, params.rangerkms_principal)
+      else:
+        ranger_flag = check_ranger_service_support_kerberos(params.kms_user, params.spengo_keytab, params.spnego_principal)
+    else:
+      ranger_flag = check_ranger_service()
+
+    if not ranger_flag:
+      Logger.error('Error in Get/Create service for Ranger Kms.')
+
+    current_datetime = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
+
+    File(format('{kms_conf_dir}/ranger-security.xml'),
+      owner = params.kms_user,
+      group = params.kms_group,
+      mode = 0644,
+      content = format('<ranger>\n<enabled>{current_datetime}</enabled>\n</ranger>')
+    )
+
+    Directory([os.path.join('/etc', 'ranger', params.repo_name), os.path.join('/etc', 'ranger', params.repo_name, 'policycache')],
+      owner = params.kms_user,
+      group = params.kms_group,
+      mode=0775,
+      create_parents = True
+    )
+
+    File(os.path.join('/etc', 'ranger', params.repo_name, 'policycache',format('kms_{repo_name}.json')),
+      owner = params.kms_user,
+      group = params.kms_group,
+      mode = 0644
+    )
+
+    # remove plain-text password from xml configs
+    plugin_audit_properties_copy = {}
+    plugin_audit_properties_copy.update(params.config['configurations']['ranger-kms-audit'])
+
+    if params.plugin_audit_password_property in plugin_audit_properties_copy:
+      plugin_audit_properties_copy[params.plugin_audit_password_property] = "crypted"
+
+    XmlConfig("ranger-kms-audit.xml",
+      conf_dir=params.kms_conf_dir,
+      configurations=plugin_audit_properties_copy,
+      configuration_attributes=params.config['configuration_attributes']['ranger-kms-audit'],
+      owner=params.kms_user,
+      group=params.kms_group,
+      mode=0744)
+
+    XmlConfig("ranger-kms-security.xml",
+      conf_dir=params.kms_conf_dir,
+      configurations=params.config['configurations']['ranger-kms-security'],
+      configuration_attributes=params.config['configuration_attributes']['ranger-kms-security'],
+      owner=params.kms_user,
+      group=params.kms_group,
+      mode=0744)
+
+    # remove plain-text password from xml configs
+    ranger_kms_policymgr_ssl_copy = {}
+    ranger_kms_policymgr_ssl_copy.update(params.config['configurations']['ranger-kms-policymgr-ssl'])
+
+    for prop in params.kms_plugin_password_properties:
+      if prop in ranger_kms_policymgr_ssl_copy:
+        ranger_kms_policymgr_ssl_copy[prop] = "crypted"
+
+    XmlConfig("ranger-policymgr-ssl.xml",
+      conf_dir=params.kms_conf_dir,
+      configurations=ranger_kms_policymgr_ssl_copy,
+      configuration_attributes=params.config['configuration_attributes']['ranger-kms-policymgr-ssl'],
+      owner=params.kms_user,
+      group=params.kms_group,
+      mode=0744)
+
+    if params.xa_audit_db_is_enabled:
+      cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'auditDBCred', '-v', PasswordString(params.xa_audit_db_password), '-c', '1')
+      Execute(cred_setup, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
+
+    cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'sslKeyStore', '-v', PasswordString(params.ssl_keystore_password), '-c', '1')
+    Execute(cred_setup, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
+
+    cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'sslTrustStore', '-v', PasswordString(params.ssl_truststore_password), '-c', '1')
+    Execute(cred_setup, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
+
+    File(params.credential_file,
+      owner = params.kms_user,
+      group = params.kms_group,
+      mode = 0640
+      )
+
+    # create ranger kms audit directory
+    if params.xa_audit_hdfs_is_enabled and params.has_namenode and params.has_hdfs_client_on_node:
+      params.HdfsResource("/ranger/audit",
+                        type="directory",
+                        action="create_on_execute",
+                        owner=params.hdfs_user,
+                        group=params.hdfs_user,
+                        mode=0755,
+                        recursive_chmod=True
+      )
+      params.HdfsResource("/ranger/audit/kms",
+                        type="directory",
+                        action="create_on_execute",
+                        owner=params.kms_user,
+                        group=params.kms_group,
+                        mode=0750,
+                        recursive_chmod=True
+      )
+      params.HdfsResource(None, action="execute")
+
+    if params.xa_audit_hdfs_is_enabled and len(params.namenode_host) > 1:
+      Logger.info('Audit to Hdfs enabled in NameNode HA environment, creating hdfs-site.xml')
+      XmlConfig("hdfs-site.xml",
+        conf_dir=params.kms_conf_dir,
+        configurations=params.config['configurations']['hdfs-site'],
+        configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
+        owner=params.kms_user,
+        group=params.kms_group,
+        mode=0644
+      )
+    else:
+      File(format('{kms_conf_dir}/hdfs-site.xml'), action="delete")
+
+def setup_kms_jce():
+  import params
+
+  if params.jce_name is not None:
+    Directory(params.jce_source_dir,
+      create_parents = True
+    )
+
+    jce_target = format('{jce_source_dir}/{jce_name}')
+
+    File(jce_target,
+      content = DownloadSource(format('{jdk_location}/{jce_name}')),
+      mode = 0644,
+    )
+
+    File([format("{java_home}/jre/lib/security/local_policy.jar"), format("{java_home}/jre/lib/security/US_export_policy.jar")],
+      action = "delete",
+    )
+
+    unzip_cmd = ("unzip", "-o", "-j", "-q", jce_target, "-d", format("{java_home}/jre/lib/security"))
+
+    Execute(unzip_cmd,
+      only_if = format("test -e {java_home}/jre/lib/security && test -f {jce_target}"),
+      path = ['/bin/','/usr/bin'],
+      sudo = True
+    )
+  else:
+    Logger.warning("Required jce policy zip is not available, need to setup manually")
+
+def check_ranger_service():
+  import params
+
+  policymgr_mgr_url = params.policymgr_mgr_url
+  if policymgr_mgr_url.endswith('/'):
+    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
+  ranger_adm_obj = Rangeradmin(url=policymgr_mgr_url)
+  ambari_username_password_for_ranger = format("{ambari_ranger_admin}:{ambari_ranger_password}")
+  response_code = ranger_adm_obj.check_ranger_login_urllib2(policymgr_mgr_url)
+
+  if response_code is not None and response_code == 200:
+    user_resp_code = ranger_adm_obj.create_ambari_admin_user(params.ambari_ranger_admin, params.ambari_ranger_password, params.admin_uname_password)
+    if user_resp_code is not None and user_resp_code == 200:
+      get_repo_flag = get_repo(policymgr_mgr_url, params.repo_name, ambari_username_password_for_ranger)
+      if not get_repo_flag:
+        return create_repo(policymgr_mgr_url, json.dumps(params.kms_ranger_plugin_repo), ambari_username_password_for_ranger)
+      else:
+        return True
+    else:
+      return False
+  else:
+    Logger.error('Ranger service is not reachable')
+    return False
+
+@safe_retry(times=5, sleep_time=8, backoff_factor=1.5, err_class=Fail, return_on_fail=False)
+def create_repo(url, data, usernamepassword):
+  try:
+    base_url = url + '/service/public/v2/api/service'
+    base64string = base64.encodestring('{0}'.format(usernamepassword)).replace('\n', '')
+    headers = {
+      'Accept': 'application/json',
+      "Content-Type": "application/json"
+    }
+    request = urllib2.Request(base_url, data, headers)
+    request.add_header("Authorization", "Basic {0}".format(base64string))
+    result = urllib2.urlopen(request, timeout=20)
+    response_code = result.getcode()
+    response = json.loads(json.JSONEncoder().encode(result.read()))
+    if response_code == 200:
+      Logger.info('Repository created Successfully')
+      return True
+    else:
+      Logger.info('Repository not created')
+      return False
+  except urllib2.URLError, e:
+    if isinstance(e, urllib2.HTTPError):
+      raise Fail("Error creating service. Http status code - {0}. \n {1}".format(e.code, e.read()))
+    else:
+      raise Fail("Error creating service. Reason - {0}.".format(e.reason))
+  except socket.timeout as e:
+    raise Fail("Error creating service. Reason - {0}".format(e))
+
+@safe_retry(times=5, sleep_time=8, backoff_factor=1.5, err_class=Fail, return_on_fail=False)
+def get_repo(url, name, usernamepassword):
+  try:
+    base_url = url + '/service/public/v2/api/service?serviceName=' + name + '&serviceType=kms&isEnabled=true'
+    request = urllib2.Request(base_url)
+    base64string = base64.encodestring(usernamepassword).replace('\n', '')
+    request.add_header("Content-Type", "application/json")
+    request.add_header("Accept", "application/json")
+    request.add_header("Authorization", "Basic {0}".format(base64string))
+    result = urllib2.urlopen(request, timeout=20)
+    response_code = result.getcode()
+    response = json.loads(result.read())
+    if response_code == 200 and len(response) > 0:
+      for repo in response:
+        if repo.get('name').lower() == name.lower() and repo.has_key('name'):
+          Logger.info('KMS repository exist')
+          return True
+        else:
+          Logger.info('KMS repository doesnot exist')
+          return False
+    else:
+      Logger.info('KMS repository doesnot exist')
+      return False
+  except urllib2.URLError, e:
+    if isinstance(e, urllib2.HTTPError):
+      raise Fail("Error getting {0} service. Http status code - {1}. \n {2}".format(name, e.code, e.read()))
+    else:
+      raise Fail("Error getting {0} service. Reason - {1}.".format(name, e.reason))
+  except socket.timeout as e:
+    raise Fail("Error creating service. Reason - {0}".format(e))
+
+def check_ranger_service_support_kerberos(user, keytab, principal):
+  import params
+
+  policymgr_mgr_url = params.policymgr_mgr_url
+  if policymgr_mgr_url.endswith('/'):
+    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
+  ranger_adm_obj = RangeradminV2(url=policymgr_mgr_url)
+  response_code = ranger_adm_obj.check_ranger_login_curl(user, keytab, principal, policymgr_mgr_url, True)
+
+  if response_code is not None and response_code[0] == 200:
+    get_repo_name_response = ranger_adm_obj.get_repository_by_name_curl(user, keytab, principal, params.repo_name, 'kms', 'true', is_keyadmin = True)
+    if get_repo_name_response is not None:
+      Logger.info('KMS repository {0} exist'.format(get_repo_name_response['name']))
+      return True
+    else:
+      create_repo_response = ranger_adm_obj.create_repository_curl(user, keytab, principal, params.repo_name, json.dumps(params.kms_ranger_plugin_repo), None, is_keyadmin = True)
+      if create_repo_response is not None and len(create_repo_response) > 0:
+        return True
+      else:
+        return False
+  else:
+    Logger.error('Ranger service is not reachable')
+    return False

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
new file mode 100755
index 0000000..613931b
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
@@ -0,0 +1,117 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+from resource_management.core.exceptions import Fail
+from resource_management.libraries.functions.check_process_status import check_process_status
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.script import Script
+from resource_management.core.resources.system import Execute, File
+from resource_management.core.exceptions import ComponentIsNotRunning
+from resource_management.libraries.functions.format import format
+from resource_management.core.logger import Logger
+from resource_management.core import shell
+from resource_management.libraries.functions.default import default
+from kms import kms, setup_kms_db, setup_java_patch, enable_kms_plugin, setup_kms_jce
+from kms_service import kms_service
+import upgrade
+
+class KmsServer(Script):
+
+  def get_component_name(self):
+    return "ranger-kms"
+
+  def install(self, env):
+    self.install_packages(env)
+    import params
+    env.set_params(params)
+
+    setup_kms_db()
+    self.configure(env)
+    setup_java_patch()
+
+  def stop(self, env, upgrade_type=None):
+    import params
+
+    env.set_params(params)
+    kms_service(action = 'stop', upgrade_type=upgrade_type)
+    if params.stack_supports_pid:
+      File(params.ranger_kms_pid_file,
+        action = "delete"
+      )
+
+  def start(self, env, upgrade_type=None):
+    import params
+
+    env.set_params(params)
+    self.configure(env)
+    enable_kms_plugin()
+    setup_kms_jce()
+    kms_service(action = 'start', upgrade_type=upgrade_type)
+
+  def status(self, env):
+    import status_params
+    env.set_params(status_params)
+
+    if status_params.stack_supports_pid:
+      check_process_status(status_params.ranger_kms_pid_file)
+      return
+
+    cmd = 'ps -ef | grep proc_rangerkms | grep -v grep'
+    code, output = shell.call(cmd, timeout=20)
+    if code != 0:
+      Logger.debug('KMS process not running')
+      raise ComponentIsNotRunning()
+    pass
+
+  def configure(self, env):
+    import params
+
+    env.set_params(params)
+    kms()
+
+  def pre_upgrade_restart(self, env, upgrade_type=None):
+    import params
+    env.set_params(params)
+
+    upgrade.prestart(env, "ranger-kms")
+    kms(upgrade_type=upgrade_type)
+    setup_java_patch()
+
+  def setup_ranger_kms_database(self, env):
+    import params
+    env.set_params(params)
+
+    upgrade_stack = stack_select._get_upgrade_stack()
+    if upgrade_stack is None:
+      raise Fail('Unable to determine the stack and stack version')
+
+    stack_version = upgrade_stack[1]
+    Logger.info(format('Setting Ranger KMS database schema, using version {stack_version}'))
+    setup_kms_db(stack_version=stack_version)
+
+  def get_log_folder(self):
+    import params
+    return params.kms_log_dir
+
+  def get_user(self):
+    import params
+    return params.kms_user
+
+if __name__ == "__main__":
+  KmsServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_service.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_service.py
new file mode 100644
index 0000000..2ff48c3
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_service.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management.core.resources.system import Execute, File
+from resource_management.core import shell
+from resource_management.libraries.functions.format import format
+from resource_management.core.exceptions import ComponentIsNotRunning
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions.show_logs import show_logs
+from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING
+from resource_management.libraries.functions.constants import Direction
+import os
+
+def kms_service(action='start', upgrade_type=None):
+  import params
+
+  env_dict = {'JAVA_HOME': params.java_home}
+  if params.db_flavor.lower() == 'sqla':
+    env_dict = {'JAVA_HOME': params.java_home, 'LD_LIBRARY_PATH': params.ld_library_path}
+
+  if action == 'start':
+    no_op_test = format('ps -ef | grep proc_rangerkms | grep -v grep')
+    cmd = format('{kms_home}/ranger-kms start')
+    try:
+      Execute(cmd, not_if=no_op_test, environment=env_dict, user=format('{kms_user}'))
+    except:
+      show_logs(params.kms_log_dir, params.kms_user)
+      raise
+  elif action == 'stop':
+    if upgrade_type == UPGRADE_TYPE_NON_ROLLING and params.upgrade_direction == Direction.UPGRADE:
+      if os.path.isfile(format('{kms_home}/ranger-kms')):
+        File(format('{kms_home}/ranger-kms'),
+          owner=params.kms_user,
+          group = params.kms_group
+        )
+    cmd = format('{kms_home}/ranger-kms stop')
+    try:
+      Execute(cmd, environment=env_dict, user=format('{kms_user}'))
+    except:
+      show_logs(params.kms_log_dir, params.kms_user)
+      raise

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/params.py
new file mode 100755
index 0000000..003eee1
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/params.py
@@ -0,0 +1,331 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+import os
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.script import Script
+from resource_management.libraries.functions.version import format_stack_version
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions.stack_features import get_stack_feature_version
+from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions.get_bare_principal import get_bare_principal
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.libraries.functions.setup_ranger_plugin_xml import generate_ranger_service_config
+from resource_management.libraries.resources.hdfs_resource import HdfsResource
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import get_kinit_path
+
+config  = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
+stack_root = Script.get_stack_root()
+
+stack_name = default("/hostLevelParams/stack_name", None)
+version = default("/commandParams/version", None)
+upgrade_direction = default("/commandParams/upgrade_direction", None)
+
+stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+
+# get the correct version to use for checking stack features
+version_for_stack_feature_checks = get_stack_feature_version(config)
+
+stack_supports_config_versioning = check_stack_feature(StackFeature.CONFIG_VERSIONING, version_for_stack_feature_checks)
+stack_support_kms_hsm = check_stack_feature(StackFeature.RANGER_KMS_HSM_SUPPORT, version_for_stack_feature_checks)
+stack_supports_ranger_kerberos = check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, version_for_stack_feature_checks)
+stack_supports_pid = check_stack_feature(StackFeature.RANGER_KMS_PID_SUPPORT, version_for_stack_feature_checks)
+stack_supports_ranger_audit_db = check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, version_for_stack_feature_checks)
+stack_supports_ranger_kms_ssl = check_stack_feature(StackFeature.RANGER_KMS_SSL, version_for_stack_feature_checks)
+
+hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+security_enabled = config['configurations']['cluster-env']['security_enabled']
+
+if stack_supports_config_versioning:
+  kms_home = format('{stack_root}/current/ranger-kms')
+  kms_conf_dir = format('{stack_root}/current/ranger-kms/conf')
+
+kms_log_dir = default("/configurations/kms-env/kms_log_dir", "/var/log/ranger/kms")
+java_home = config['hostLevelParams']['java_home']
+kms_user  = default("/configurations/kms-env/kms_user", "kms")
+kms_group = default("/configurations/kms-env/kms_group", "kms")
+
+ranger_kms_audit_log_maxfilesize = default('/configurations/kms-log4j/ranger_kms_audit_log_maxfilesize',256)
+ranger_kms_audit_log_maxbackupindex = default('/configurations/kms-log4j/ranger_kms_audit_log_maxbackupindex',20)
+ranger_kms_log_maxfilesize = default('/configurations/kms-log4j/ranger_kms_log_maxfilesize',256)
+ranger_kms_log_maxbackupindex = default('/configurations/kms-log4j/ranger_kms_log_maxbackupindex',20)
+
+jdk_location = config['hostLevelParams']['jdk_location']
+kms_log4j = config['configurations']['kms-log4j']['content']
+
+# ranger host
+ranger_admin_hosts = config['clusterHostInfo']['ranger_admin_hosts'][0]
+has_ranger_admin = len(ranger_admin_hosts) > 0
+kms_host = config['clusterHostInfo']['ranger_kms_server_hosts'][0]
+kms_port = config['configurations']['kms-env']['kms_port']
+
+create_db_user = config['configurations']['kms-env']['create_db_user']
+
+#kms properties
+db_flavor = (config['configurations']['kms-properties']['DB_FLAVOR']).lower()
+db_host = config['configurations']['kms-properties']['db_host']
+db_name = config['configurations']['kms-properties']['db_name']
+db_user = config['configurations']['kms-properties']['db_user']
+db_password = unicode(config['configurations']['kms-properties']['db_password'])
+kms_master_key_password = unicode(config['configurations']['kms-properties']['KMS_MASTER_KEY_PASSWD'])
+credential_provider_path = config['configurations']['dbks-site']['ranger.ks.jpa.jdbc.credential.provider.path']
+jdbc_alias = config['configurations']['dbks-site']['ranger.ks.jpa.jdbc.credential.alias']
+masterkey_alias = config['configurations']['dbks-site']['ranger.ks.masterkey.credential.alias']
+repo_name = str(config['clusterName']) + '_kms'
+repo_name_value = config['configurations']['ranger-kms-security']['ranger.plugin.kms.service.name']
+if not is_empty(repo_name_value) and repo_name_value != "{{repo_name}}":
+  repo_name = repo_name_value
+cred_lib_path = os.path.join(kms_home,"cred","lib","*")
+cred_setup_prefix = (format('{kms_home}/ranger_credential_helper.py'), '-l', cred_lib_path)
+credential_file = format('/etc/ranger/{repo_name}/cred.jceks')
+
+if has_ranger_admin:
+  policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+  if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
+    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
+  xa_audit_db_flavor = (config['configurations']['admin-properties']['DB_FLAVOR']).lower()
+  xa_audit_db_name = default('/configurations/admin-properties/audit_db_name', 'ranger_audits')
+  xa_audit_db_user = default('/configurations/admin-properties/audit_db_user', 'rangerlogger')
+  xa_audit_db_password = ''
+  if not is_empty(config['configurations']['admin-properties']['audit_db_password']) and stack_supports_ranger_audit_db:
+    xa_audit_db_password = config['configurations']['admin-properties']['audit_db_password']
+  xa_db_host = config['configurations']['admin-properties']['db_host']
+
+  admin_uname = config['configurations']['ranger-env']['admin_username']
+  admin_password = config['configurations']['ranger-env']['admin_password']
+  ambari_ranger_admin = config['configurations']['ranger-env']['ranger_admin_username']
+  ambari_ranger_password = config['configurations']['ranger-env']['ranger_admin_password']
+  admin_uname_password = format("{admin_uname}:{admin_password}")
+  ranger_audit_solr_urls = config['configurations']['ranger-admin-site']['ranger.audit.solr.urls']
+
+default_connectors_map = { "mssql":"sqljdbc4.jar",
+                           "mysql":"mysql-connector-java.jar",
+                           "postgres":"postgresql-jdbc.jar",
+                           "oracle":"ojdbc.jar",
+                           "sqla":"sajdbc4.jar"}
+
+java_share_dir = '/usr/share/java'
+jdbc_jar_name = None
+previous_jdbc_jar_name = None
+if db_flavor == 'mysql':
+  jdbc_jar_name = default("/hostLevelParams/custom_mysql_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mysql_jdbc_name", None)
+  db_jdbc_url = format('jdbc:log4jdbc:mysql://{db_host}/{db_name}')
+  db_jdbc_driver = "com.mysql.jdbc.Driver"
+  jdbc_dialect = "org.eclipse.persistence.platform.database.MySQLPlatform"
+elif db_flavor == 'oracle':
+  jdbc_jar_name = default("/hostLevelParams/custom_oracle_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_oracle_jdbc_name", None)
+  colon_count = db_host.count(':')
+  if colon_count == 2 or colon_count == 0:
+    db_jdbc_url = format('jdbc:oracle:thin:@{db_host}')
+  else:
+    db_jdbc_url = format('jdbc:oracle:thin:@//{db_host}')
+  db_jdbc_driver = "oracle.jdbc.OracleDriver"
+  jdbc_dialect = "org.eclipse.persistence.platform.database.OraclePlatform"
+elif db_flavor == 'postgres':
+  jdbc_jar_name = default("/hostLevelParams/custom_postgres_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_postgres_jdbc_name", None)
+  db_jdbc_url = format('jdbc:postgresql://{db_host}/{db_name}')
+  db_jdbc_driver = "org.postgresql.Driver"
+  jdbc_dialect = "org.eclipse.persistence.platform.database.PostgreSQLPlatform"
+elif db_flavor == 'mssql':
+  jdbc_jar_name = default("/hostLevelParams/custom_mssql_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mssql_jdbc_name", None)
+  db_jdbc_url = format('jdbc:sqlserver://{db_host};databaseName={db_name}')
+  db_jdbc_driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+  jdbc_dialect = "org.eclipse.persistence.platform.database.SQLServerPlatform"
+elif db_flavor == 'sqla':
+  jdbc_jar_name = default("/hostLevelParams/custom_sqlanywhere_jdbc_name", None)
+  previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_sqlanywhere_jdbc_name", None)
+  db_jdbc_url = format('jdbc:sqlanywhere:database={db_name};host={db_host}')
+  db_jdbc_driver = "sap.jdbc4.sqlanywhere.IDriver"
+  jdbc_dialect = "org.eclipse.persistence.platform.database.SQLAnywherePlatform"
+
+downloaded_custom_connector = format("{tmp_dir}/{jdbc_jar_name}")
+
+driver_curl_source = format("{jdk_location}/{jdbc_jar_name}")
+driver_curl_target = format("{kms_home}/ews/webapp/lib/{jdbc_jar_name}")
+previous_jdbc_jar = format("{kms_home}/ews/webapp/lib/{previous_jdbc_jar_name}")
+ews_lib_jar_path = format("{kms_home}/ews/webapp/lib/{jdbc_jar_name}")
+
+if db_flavor == 'sqla':
+  downloaded_custom_connector = format("{tmp_dir}/sqla-client-jdbc.tar.gz")
+  jar_path_in_archive = format("{tmp_dir}/sqla-client-jdbc/java/sajdbc4.jar")
+  libs_path_in_archive = format("{tmp_dir}/sqla-client-jdbc/native/lib64/*")
+  jdbc_libs_dir = format("{kms_home}/native/lib64")
+  ld_library_path = format("{jdbc_libs_dir}")
+
+if has_ranger_admin:
+  xa_previous_jdbc_jar_name = None
+  if stack_supports_ranger_audit_db:
+    if xa_audit_db_flavor == 'mysql':
+      jdbc_jar = default("/hostLevelParams/custom_mysql_jdbc_name", None)
+      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mysql_jdbc_name", None)
+      audit_jdbc_url = format('jdbc:mysql://{xa_db_host}/{xa_audit_db_name}')
+      jdbc_driver = "com.mysql.jdbc.Driver"
+    elif xa_audit_db_flavor == 'oracle':
+      jdbc_jar = default("/hostLevelParams/custom_oracle_jdbc_name", None)
+      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_oracle_jdbc_name", None)
+      colon_count = xa_db_host.count(':')
+      if colon_count == 2 or colon_count == 0:
+        audit_jdbc_url = format('jdbc:oracle:thin:@{xa_db_host}')
+      else:
+        audit_jdbc_url = format('jdbc:oracle:thin:@//{xa_db_host}')
+      jdbc_driver = "oracle.jdbc.OracleDriver"
+    elif xa_audit_db_flavor == 'postgres':
+      jdbc_jar = default("/hostLevelParams/custom_postgres_jdbc_name", None)
+      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_postgres_jdbc_name", None)
+      audit_jdbc_url = format('jdbc:postgresql://{xa_db_host}/{xa_audit_db_name}')
+      jdbc_driver = "org.postgresql.Driver"
+    elif xa_audit_db_flavor == 'mssql':
+      jdbc_jar = default("/hostLevelParams/custom_mssql_jdbc_name", None)
+      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_mssql_jdbc_name", None)
+      audit_jdbc_url = format('jdbc:sqlserver://{xa_db_host};databaseName={xa_audit_db_name}')
+      jdbc_driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+    elif xa_audit_db_flavor == 'sqla':
+      jdbc_jar = default("/hostLevelParams/custom_sqlanywhere_jdbc_name", None)
+      xa_previous_jdbc_jar_name = default("/hostLevelParams/previous_custom_sqlanywhere_jdbc_name", None)
+      audit_jdbc_url = format('jdbc:sqlanywhere:database={xa_audit_db_name};host={xa_db_host}')
+      jdbc_driver = "sap.jdbc4.sqlanywhere.IDriver"
+
+  downloaded_connector_path = format("{tmp_dir}/{jdbc_jar}") if stack_supports_ranger_audit_db else None
+  driver_source = format("{jdk_location}/{jdbc_jar}") if stack_supports_ranger_audit_db else None
+  driver_target = format("{kms_home}/ews/webapp/lib/{jdbc_jar}") if stack_supports_ranger_audit_db else None
+  xa_previous_jdbc_jar = format("{kms_home}/ews/webapp/lib/{previous_jdbc_jar_name}") if stack_supports_ranger_audit_db else None
+
+repo_config_username = config['configurations']['kms-properties']['REPOSITORY_CONFIG_USERNAME']
+repo_config_password = unicode(config['configurations']['kms-properties']['REPOSITORY_CONFIG_PASSWORD'])
+
+kms_plugin_config = {
+  'username' : repo_config_username,
+  'password' : repo_config_password,
+  'provider' : format('kms://http@{kms_host}:{kms_port}/kms')
+}
+
+xa_audit_db_is_enabled = False
+if stack_supports_ranger_audit_db:
+  xa_audit_db_is_enabled = config['configurations']['ranger-kms-audit']['xasecure.audit.destination.db']
+ssl_keystore_password = unicode(config['configurations']['ranger-kms-policymgr-ssl']['xasecure.policymgr.clientssl.keystore.password'])
+ssl_truststore_password = unicode(config['configurations']['ranger-kms-policymgr-ssl']['xasecure.policymgr.clientssl.truststore.password'])
+
+#For SQLA explicitly disable audit to DB for Ranger
+if xa_audit_db_flavor == 'sqla':
+  xa_audit_db_is_enabled = False
+
+current_host = config['hostname']
+ranger_kms_hosts = config['clusterHostInfo']['ranger_kms_server_hosts']
+if current_host in ranger_kms_hosts:
+  kms_host = current_host
+
+check_db_connection_jar_name = "DBConnectionVerification.jar"
+check_db_connection_jar = format("/usr/lib/ambari-agent/{check_db_connection_jar_name}")
+ranger_kms_jdbc_connection_url = config['configurations']['dbks-site']['ranger.ks.jpa.jdbc.url']
+ranger_kms_jdbc_driver = config['configurations']['dbks-site']['ranger.ks.jpa.jdbc.driver']
+
+jce_name = default("/hostLevelParams/jce_name", None)
+jce_source_dir = format('{tmp_dir}/jce_dir')
+
+#kms hsm support
+enable_kms_hsm = default("/configurations/dbks-site/ranger.ks.hsm.enabled", False)
+hms_partition_alias = default("/configurations/dbks-site/ranger.ks.hsm.partition.password.alias", "ranger.kms.hsm.partition.password")
+hms_partition_passwd = default("/configurations/kms-env/hsm_partition_password", None)
+
+# kms kerberos from stack 2.5 onward
+rangerkms_bare_principal = 'rangerkms'
+
+if stack_supports_ranger_kerberos:
+  if security_enabled:
+    rangerkms_principal = config['configurations']['dbks-site']['ranger.ks.kerberos.principal']
+    rangerkms_keytab = config['configurations']['dbks-site']['ranger.ks.kerberos.keytab']
+    if not is_empty(rangerkms_principal) and rangerkms_principal != '':
+      rangerkms_bare_principal = get_bare_principal(rangerkms_principal)
+      rangerkms_principal = rangerkms_principal.replace('_HOST', kms_host.lower())
+  kms_plugin_config['policy.download.auth.users'] = format('keyadmin,{rangerkms_bare_principal}')
+
+custom_ranger_service_config = generate_ranger_service_config(config['configurations']['kms-properties'])
+if len(custom_ranger_service_config) > 0:
+  kms_plugin_config.update(custom_ranger_service_config)
+
+kms_ranger_plugin_repo = {
+  'isEnabled' : 'true',
+  'configs' : kms_plugin_config,
+  'description' : 'kms repo',
+  'name' : repo_name,
+  'type' : 'kms'
+}
+
+# ranger kms pid
+user_group = config['configurations']['cluster-env']['user_group']
+ranger_kms_pid_dir = default("/configurations/kms-env/ranger_kms_pid_dir", "/var/run/ranger_kms")
+ranger_kms_pid_file = format('{ranger_kms_pid_dir}/rangerkms.pid')
+
+if security_enabled:
+  spengo_keytab = config['configurations']['kms-site']['hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab']
+  spnego_principal = config['configurations']['kms-site']['hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal']
+  spnego_principal = spnego_principal.replace('_HOST', current_host.lower())
+
+plugin_audit_password_property = 'xasecure.audit.destination.db.password'
+kms_plugin_password_properties = ['xasecure.policymgr.clientssl.keystore.password', 'xasecure.policymgr.clientssl.truststore.password']
+dbks_site_password_properties = ['ranger.db.encrypt.key.password', 'ranger.ks.jpa.jdbc.password', 'ranger.ks.hsm.partition.password']
+ranger_kms_site_password_properties = ['ranger.service.https.attrib.keystore.pass']
+ranger_kms_cred_ssl_path = config['configurations']['ranger-kms-site']['ranger.credential.provider.path']
+ranger_kms_ssl_keystore_alias = config['configurations']['ranger-kms-site']['ranger.service.https.attrib.keystore.credential.alias']
+ranger_kms_ssl_passwd = config['configurations']['ranger-kms-site']['ranger.service.https.attrib.keystore.pass']
+ranger_kms_ssl_enabled = config['configurations']['ranger-kms-site']['ranger.service.https.attrib.ssl.enabled']
+
+xa_audit_hdfs_is_enabled = default("/configurations/ranger-kms-audit/xasecure.audit.destination.hdfs", False)
+namenode_host = default("/clusterHostInfo/namenode_host", [])
+
+# need this to capture cluster name from where ranger kms plugin is enabled
+cluster_name = config['clusterName']
+
+has_namenode = len(namenode_host) > 0
+
+hdfs_user = default("/configurations/hadoop-env/hdfs_user", None)
+hdfs_user_keytab = default("/configurations/hadoop-env/hdfs_user_keytab", None)
+hdfs_principal_name = default("/configurations/hadoop-env/hdfs_principal_name", None)
+default_fs = default("/configurations/core-site/fs.defaultFS", None)
+hdfs_site = config['configurations']['hdfs-site'] if has_namenode else None
+hadoop_bin_dir = stack_select.get_hadoop_dir("bin") if has_namenode else None
+kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
+
+import functools
+# create partial functions with common arguments for every HdfsResource call
+# to create/delete hdfs directory/file/copyfromlocal we need to call params.HdfsResource in code
+HdfsResource = functools.partial(
+  HdfsResource,
+  user=hdfs_user,
+  security_enabled = security_enabled,
+  keytab = hdfs_user_keytab,
+  kinit_path_local = kinit_path_local,
+  hadoop_bin_dir = hadoop_bin_dir,
+  hadoop_conf_dir = hadoop_conf_dir,
+  principal_name = hdfs_principal_name,
+  hdfs_site = hdfs_site,
+  default_fs = default_fs
+)
+
+local_component_list = default("/localComponents", [])
+has_hdfs_client_on_node = 'HDFS_CLIENT' in local_component_list
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/service_check.py
new file mode 100644
index 0000000..84e4e73
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/service_check.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management.libraries.script import Script
+from resource_management.core.logger import Logger
+from resource_management.core import shell
+from resource_management.core.exceptions import ComponentIsNotRunning
+
+
+class KmsServiceCheck(Script):
+  def service_check(self, env):
+    import params
+
+    env.set_params(params)
+    cmd = 'ps -ef | grep proc_rangerkms | grep -v grep'
+    code, output = shell.call(cmd, timeout=20)
+    if code == 0:
+      Logger.info('KMS process up and running')
+    else:
+      Logger.debug('KMS process not running')
+      raise ComponentIsNotRunning()
+
+if __name__ == "__main__":
+  KmsServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/status_params.py
new file mode 100644
index 0000000..34d0082
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/status_params.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management.libraries.script import Script
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.version import format_stack_version
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions import StackFeature
+
+config  = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
+
+stack_name = default("/hostLevelParams/stack_name", None)
+stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+stack_supports_pid = stack_version_formatted and check_stack_feature(StackFeature.RANGER_KMS_PID_SUPPORT, stack_version_formatted)
+ranger_kms_pid_dir = default("/configurations/kms-env/ranger_kms_pid_dir", "/var/run/ranger_kms")
+ranger_kms_pid_file = format('{ranger_kms_pid_dir}/rangerkms.pid')
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/upgrade.py
new file mode 100644
index 0000000..8478bb8
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/upgrade.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+from resource_management.core.resources.system import Execute
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions.format import format
+
+def prestart(env, stack_component):
+  import params
+
+  if params.version and params.stack_supports_config_versioning:
+    conf_select.select(params.stack_name, stack_component, params.version)
+    stack_select.select(stack_component, params.version)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/templates/input.config-ranger-kms.json.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/templates/input.config-ranger-kms.json.j2 b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/templates/input.config-ranger-kms.json.j2
new file mode 100644
index 0000000..306fade
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/templates/input.config-ranger-kms.json.j2
@@ -0,0 +1,48 @@
+{#
+ # 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.
+ #}
+{
+  "input":[
+    {
+      "type":"ranger_kms",
+      "rowtype":"service",
+      "path":"{{default('/configurations/kms-env/kms_log_dir', '/var/log/ranger/kms')}}/kms.log"
+    }
+  ],
+  "filter":[
+    {
+      "filter":"grok",
+      "conditions":{
+        "fields":{
+          "type":[
+            "ranger_kms"
+          ]
+        }
+      },
+      "log4j_format":"%d{ISO8601} %-5p %c{1} - %m%n",
+      "multiline_pattern":"^(%{TIMESTAMP_ISO8601:logtime})",
+      "message_pattern":"(?m)^%{TIMESTAMP_ISO8601:logtime}%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVACLASS:logger_name}%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}",
+      "post_map_values":{
+        "logtime":{
+          "map_date":{
+            "target_date_pattern":"yyyy-MM-dd HH:mm:ss,SSS"
+          }
+        }
+      }
+    }
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/role_command_order.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/role_command_order.json b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/role_command_order.json
new file mode 100644
index 0000000..7ddab41
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/role_command_order.json
@@ -0,0 +1,7 @@
+{
+  "general_deps" : {
+    "_comment" : "dependencies for RANGER-KMS",
+    "RANGER_KMS_SERVER-START" : ["RANGER_ADMIN-START", "NAMENODE-START"],
+    "RANGER_KMS_SERVICE_CHECK-SERVICE_CHECK" : ["RANGER_KMS_SERVER-START"]
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py
new file mode 100644
index 0000000..b81e05b
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py
@@ -0,0 +1,358 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+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.
+"""
+
+# Python imports
+import imp
+import os
+import traceback
+import re
+import socket
+import fnmatch
+
+
+from resource_management.core.logger import Logger
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+  with open(PARENT_FILE, 'rb') as fp:
+    service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+  traceback.print_exc()
+  print "Failed to load parent"
+
+DB_TYPE_DEFAULT_PORT_MAP = {"MYSQL":"3306", "ORACLE":"1521", "POSTGRES":"5432", "MSSQL":"1433", "SQLA":"2638"}
+
+class Ranger_KMSServiceAdvisor(service_advisor.ServiceAdvisor):
+
+  def __init__(self, *args, **kwargs):
+    self.as_super = super(Ranger_KMSServiceAdvisor, self)
+    self.as_super.__init__(*args, **kwargs)
+
+    # Always call these methods
+    self.modifyMastersWithMultipleInstances()
+    self.modifyCardinalitiesDict()
+    self.modifyHeapSizeProperties()
+    self.modifyNotValuableComponents()
+    self.modifyComponentsNotPreferableOnServer()
+    self.modifyComponentLayoutSchemes()
+
+  def modifyMastersWithMultipleInstances(self):
+    """
+    Modify the set of masters with multiple instances.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def modifyCardinalitiesDict(self):
+    """
+    Modify the dictionary of cardinalities.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def modifyHeapSizeProperties(self):
+    """
+    Modify the dictionary of heap size properties.
+    Must be overriden in child class.
+    """
+    pass
+
+  def modifyNotValuableComponents(self):
+    """
+    Modify the set of components whose host assignment is based on other services.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def modifyComponentsNotPreferableOnServer(self):
+    """
+    Modify the set of components that are not preferable on the server.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def modifyComponentLayoutSchemes(self):
+    """
+    Modify layout scheme dictionaries for components.
+    The scheme dictionary basically maps the number of hosts to
+    host index where component should exist.
+    Must be overriden in child class.
+    """
+    # Nothing to do
+    pass
+
+  def getServiceComponentLayoutValidations(self, services, hosts):
+    """
+    Get a list of errors.
+    Must be overriden in child class.
+    """
+
+    return []
+
+  def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts):
+    """
+    Entry point.
+    Must be overriden in child class.
+    """
+    # Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
+    #            (self.__class__.__name__, inspect.stack()[0][3]))
+
+    recommender = RangerKMSRecommender()
+    recommender.recommendRangerKMSConfigurationsFromHDP23(configurations, clusterData, services, hosts)
+    recommender.recommendRangerKMSConfigurationsFromHDP25(configurations, clusterData, services, hosts)
+    recommender.recommendRangerKMSConfigurationsFromHDP26(configurations, clusterData, services, hosts)
+
+  def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
+    """
+    Entry point.
+    Validate configurations for the service. Return a list of errors.
+    The code for this function should be the same for each Service Advisor.
+    """
+    # Logger.info("Class: %s, Method: %s. Validating Configurations." %
+    #            (self.__class__.__name__, inspect.stack()[0][3]))
+
+    validator = RangerKMSValidator()
+    # Calls the methods of the validator using arguments,
+    # method(siteProperties, siteRecommendations, configurations, services, hosts)
+    return validator.validateListOfConfigUsingMethod(configurations, recommendedDefaults, services, hosts, validator.validators)
+
+class RangerKMSRecommender(service_advisor.ServiceAdvisor):
+  """
+  RangerKMS Recommender suggests properties when adding the service for the first time or modifying configs via the UI.
+  """
+
+  def __init__(self, *args, **kwargs):
+    self.as_super = super(RangerKMSRecommender, self)
+    self.as_super.__init__(*args, **kwargs)
+
+  def recommendRangerKMSConfigurationsFromHDP23(self, configurations, clusterData, services, hosts):
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+    putRangerKmsDbksProperty = self.putProperty(configurations, "dbks-site", services)
+    putRangerKmsProperty = self.putProperty(configurations, "kms-properties", services)
+    kmsEnvProperties = self.getSiteProperties(services['configurations'], 'kms-env')
+    putCoreSiteProperty = self.putProperty(configurations, "core-site", services)
+    putCoreSitePropertyAttribute = self.putPropertyAttribute(configurations, "core-site")
+    putRangerKmsAuditProperty = self.putProperty(configurations, "ranger-kms-audit", services)
+    security_enabled = self.isSecurityEnabled(services)
+    putRangerKmsSiteProperty = self.putProperty(configurations, "kms-site", services)
+    putRangerKmsSitePropertyAttribute = self.putPropertyAttribute(configurations, "kms-site")
+
+    if 'kms-properties' in services['configurations'] and ('DB_FLAVOR' in services['configurations']['kms-properties']['properties']):
+
+      rangerKmsDbFlavor = services['configurations']["kms-properties"]["properties"]["DB_FLAVOR"]
+
+      if ('db_host' in services['configurations']['kms-properties']['properties']) and ('db_name' in services['configurations']['kms-properties']['properties']):
+
+        rangerKmsDbHost =   services['configurations']["kms-properties"]["properties"]["db_host"]
+        rangerKmsDbName =   services['configurations']["kms-properties"]["properties"]["db_name"]
+
+        ranger_kms_db_url_dict = {
+          'MYSQL': {'ranger.ks.jpa.jdbc.driver': 'com.mysql.jdbc.Driver',
+                    'ranger.ks.jpa.jdbc.url': 'jdbc:mysql://' + self.getDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost) + '/' + rangerKmsDbName},
+          'ORACLE': {'ranger.ks.jpa.jdbc.driver': 'oracle.jdbc.driver.OracleDriver',
+                     'ranger.ks.jpa.jdbc.url': 'jdbc:oracle:thin:@' + self.getOracleDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost, rangerKmsDbName)},
+          'POSTGRES': {'ranger.ks.jpa.jdbc.driver': 'org.postgresql.Driver',
+                       'ranger.ks.jpa.jdbc.url': 'jdbc:postgresql://' + self.getDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost) + '/' + rangerKmsDbName},
+          'MSSQL': {'ranger.ks.jpa.jdbc.driver': 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
+                    'ranger.ks.jpa.jdbc.url': 'jdbc:sqlserver://' + self.getDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost) + ';databaseName=' + rangerKmsDbName},
+          'SQLA': {'ranger.ks.jpa.jdbc.driver': 'sap.jdbc4.sqlanywhere.IDriver',
+                   'ranger.ks.jpa.jdbc.url': 'jdbc:sqlanywhere:host=' + self.getDBConnectionHostPort(rangerKmsDbFlavor, rangerKmsDbHost) + ';database=' + rangerKmsDbName}
+        }
+
+        rangerKmsDbProperties = ranger_kms_db_url_dict.get(rangerKmsDbFlavor, ranger_kms_db_url_dict['MYSQL'])
+        for key in rangerKmsDbProperties:
+          putRangerKmsDbksProperty(key, rangerKmsDbProperties.get(key))
+
+    if kmsEnvProperties and self.checkSiteProperties(kmsEnvProperties, 'kms_user') and 'KERBEROS' in servicesList:
+      kmsUser = kmsEnvProperties['kms_user']
+      kmsUserOld = self.getOldValue(services, 'kms-env', 'kms_user')
+      self.put_proxyuser_value(kmsUser, '*', is_groups=True, services=services, configurations=configurations, put_function=putCoreSiteProperty)
+      if kmsUserOld is not None and kmsUser != kmsUserOld:
+        putCoreSitePropertyAttribute("hadoop.proxyuser.{0}.groups".format(kmsUserOld), 'delete', 'true')
+        services["forced-configurations"].append({"type" : "core-site", "name" : "hadoop.proxyuser.{0}.groups".format(kmsUserOld)})
+        services["forced-configurations"].append({"type" : "core-site", "name" : "hadoop.proxyuser.{0}.groups".format(kmsUser)})
+
+    if "HDFS" in servicesList:
+      if 'core-site' in services['configurations'] and ('fs.defaultFS' in services['configurations']['core-site']['properties']):
+        default_fs = services['configurations']['core-site']['properties']['fs.defaultFS']
+        putRangerKmsAuditProperty('xasecure.audit.destination.hdfs.dir', '{0}/{1}/{2}'.format(default_fs,'ranger','audit'))
+
+    required_services = [{'service' : 'YARN', 'config-type': 'yarn-env', 'property-name': 'yarn_user', 'proxy-category': ['hosts', 'users', 'groups']},
+                         {'service' : 'SPARK', 'config-type': 'livy-env', 'property-name': 'livy_user', 'proxy-category': ['hosts', 'users', 'groups']}]
+
+    required_services_for_secure = [{'service' : 'HIVE', 'config-type': 'hive-env', 'property-name': 'hive_user', 'proxy-category': ['hosts', 'users']},
+                                    {'service' : 'OOZIE', 'config-type': 'oozie-env', 'property-name': 'oozie_user', 'proxy-category': ['hosts', 'users']}]
+
+    if security_enabled:
+      required_services.extend(required_services_for_secure)
+
+    # recommendations for kms proxy related properties
+    self.recommendKMSProxyUsers(configurations, services, hosts, required_services)
+
+    ambari_user = self.getAmbariUser(services)
+    if security_enabled:
+      # adding for ambari user
+      putRangerKmsSiteProperty('hadoop.kms.proxyuser.{0}.users'.format(ambari_user), '*')
+      putRangerKmsSiteProperty('hadoop.kms.proxyuser.{0}.hosts'.format(ambari_user), '*')
+      # adding for HTTP
+      putRangerKmsSiteProperty('hadoop.kms.proxyuser.HTTP.users', '*')
+      putRangerKmsSiteProperty('hadoop.kms.proxyuser.HTTP.hosts', '*')
+    else:
+      self.deleteKMSProxyUsers(configurations, services, hosts, required_services_for_secure)
+      # deleting ambari user proxy properties
+      putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.hosts'.format(ambari_user), 'delete', 'true')
+      putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.users'.format(ambari_user), 'delete', 'true')
+      # deleting HTTP proxy properties
+      putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.HTTP.hosts', 'delete', 'true')
+      putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.HTTP.users', 'delete', 'true')
+
+  def recommendRangerKMSConfigurationsFromHDP25(self, configurations, clusterData, services, hosts):
+
+    security_enabled = self.isSecurityEnabled(services)
+    required_services = [{'service' : 'RANGER', 'config-type': 'ranger-env', 'property-name': 'ranger_user', 'proxy-category': ['hosts', 'users', 'groups']}]
+
+    if security_enabled:
+      # recommendations for kms proxy related properties
+      self.recommendKMSProxyUsers(configurations, services, hosts, required_services)
+    else:
+      self.deleteKMSProxyUsers(configurations, services, hosts, required_services)
+
+  def recommendRangerKMSConfigurationsFromHDP26(self, configurations, clusterData, services, hosts):
+    putRangerKmsEnvProperty = self.putProperty(configurations, "kms-env", services)
+
+    ranger_kms_ssl_enabled = False
+    ranger_kms_ssl_port = "9393"
+    if 'ranger-kms-site' in services['configurations'] and 'ranger.service.https.attrib.ssl.enabled' in services['configurations']['ranger-kms-site']['properties']:
+      ranger_kms_ssl_enabled = services['configurations']['ranger-kms-site']['properties']['ranger.service.https.attrib.ssl.enabled'].lower() == "true"
+
+    if 'ranger-kms-site' in services['configurations'] and 'ranger.service.https.port' in services['configurations']['ranger-kms-site']['properties']:
+      ranger_kms_ssl_port = services['configurations']['ranger-kms-site']['properties']['ranger.service.https.port']
+
+    if ranger_kms_ssl_enabled:
+      putRangerKmsEnvProperty("kms_port", ranger_kms_ssl_port)
+    else:
+      putRangerKmsEnvProperty("kms_port", "9292")
+
+  def getDBConnectionHostPort(self, db_type, db_host):
+    connection_string = ""
+    if db_type is None or db_type == "":
+      return connection_string
+    else:
+      colon_count = db_host.count(':')
+      if colon_count == 0:
+        if DB_TYPE_DEFAULT_PORT_MAP.has_key(db_type):
+          connection_string = db_host + ":" + DB_TYPE_DEFAULT_PORT_MAP[db_type]
+        else:
+          connection_string = db_host
+      elif colon_count == 1:
+        connection_string = db_host
+      elif colon_count == 2:
+        connection_string = db_host
+
+    return connection_string
+
+  def getOracleDBConnectionHostPort(self, db_type, db_host, rangerDbName):
+    connection_string = self.getDBConnectionHostPort(db_type, db_host)
+    colon_count = db_host.count(':')
+    if colon_count == 1 and '/' in db_host:
+      connection_string = "//" + connection_string
+    elif colon_count == 0 or colon_count == 1:
+      connection_string = "//" + connection_string + "/" + rangerDbName if rangerDbName else "//" + connection_string
+
+    return connection_string
+
+  def recommendKMSProxyUsers(self, configurations, services, hosts, requiredServices):
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+    putRangerKmsSiteProperty = self.putProperty(configurations, "kms-site", services)
+    putRangerKmsSitePropertyAttribute = self.putPropertyAttribute(configurations, "kms-site")
+
+    if 'forced-configurations' not in services:
+      services["forced-configurations"] = []
+
+    for index in range(len(requiredServices)):
+      service = requiredServices[index]['service']
+      config_type = requiredServices[index]['config-type']
+      property_name = requiredServices[index]['property-name']
+      proxy_category = requiredServices[index]['proxy-category']
+
+      if service in servicesList:
+        if config_type in services['configurations'] and property_name in services['configurations'][config_type]['properties']:
+          service_user = services['configurations'][config_type]['properties'][property_name]
+          service_old_user = self.getOldValue(services, config_type, property_name)
+
+          if 'groups' in proxy_category:
+            putRangerKmsSiteProperty('hadoop.kms.proxyuser.{0}.groups'.format(service_user), '*')
+          if 'hosts' in proxy_category:
+            putRangerKmsSiteProperty('hadoop.kms.proxyuser.{0}.hosts'.format(service_user), '*')
+          if 'users' in proxy_category:
+            putRangerKmsSiteProperty('hadoop.kms.proxyuser.{0}.users'.format(service_user), '*')
+
+          if service_old_user is not None and service_user != service_old_user:
+            if 'groups' in proxy_category:
+              putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.groups'.format(service_old_user), 'delete', 'true')
+              services["forced-configurations"].append({"type" : "kms-site", "name" : "hadoop.kms.proxyuser.{0}.groups".format(service_old_user)})
+              services["forced-configurations"].append({"type" : "kms-site", "name" : "hadoop.kms.proxyuser.{0}.groups".format(service_user)})
+            if 'hosts' in proxy_category:
+              putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.hosts'.format(service_old_user), 'delete', 'true')
+              services["forced-configurations"].append({"type" : "kms-site", "name" : "hadoop.kms.proxyuser.{0}.hosts".format(service_old_user)})
+              services["forced-configurations"].append({"type" : "kms-site", "name" : "hadoop.kms.proxyuser.{0}.hosts".format(service_user)})
+            if 'users' in proxy_category:
+              putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.users'.format(service_old_user), 'delete', 'true')
+              services["forced-configurations"].append({"type" : "kms-site", "name" : "hadoop.kms.proxyuser.{0}.users".format(service_old_user)})
+              services["forced-configurations"].append({"type" : "kms-site", "name" : "hadoop.kms.proxyuser.{0}.users".format(service_user)})
+
+  def deleteKMSProxyUsers(self, configurations, services, hosts, requiredServices):
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+    putRangerKmsSitePropertyAttribute = self.putPropertyAttribute(configurations, "kms-site")
+
+    for index in range(len(requiredServices)):
+      service = requiredServices[index]['service']
+      config_type = requiredServices[index]['config-type']
+      property_name = requiredServices[index]['property-name']
+      proxy_category = requiredServices[index]['proxy-category']
+
+      if service in servicesList:
+        if config_type in services['configurations'] and property_name in services['configurations'][config_type]['properties']:
+          service_user = services['configurations'][config_type]['properties'][property_name]
+
+          if 'groups' in proxy_category:
+            putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.groups'.format(service_user), 'delete', 'true')
+          if 'hosts' in proxy_category:
+            putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.hosts'.format(service_user), 'delete', 'true')
+          if 'users' in proxy_category:
+            putRangerKmsSitePropertyAttribute('hadoop.kms.proxyuser.{0}.users'.format(service_user), 'delete', 'true')
+
+class RangerKMSValidator(service_advisor.ServiceAdvisor):
+  """
+  RangerKMS Validator checks the correctness of properties whenever the service is first added or the user attempts to
+  change configs via the UI.
+  """
+
+  def __init__(self, *args, **kwargs):
+    self.as_super = super(RangerKMSValidator, self)
+    self.as_super.__init__(*args, **kwargs)
+
+    self.validators = []


[16/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-site.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-site.xml
deleted file mode 100644
index 5e60c06..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-site.xml
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_final="true">
-  <property>
-    <name>ranger.tagsync.logdir</name>
-    <value>/var/log/ranger/tagsync</value>
-    <description>Ranger Log dir</description>
-    <value-attributes>
-      <type>directory</type>
-      <overridable>false</overridable>
-      <editable-only-at-install>true</editable-only-at-install>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.dest.ranger.endpoint</name>
-    <value>{{ranger_external_url}}</value>
-    <description>Ranger TagAdmin REST URL</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.source.atlas</name>
-    <display-name>Enable Atlas Tag Source</display-name>
-    <value>false</value>
-    <description/>
-    <value-attributes>
-      <type>boolean</type>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>application-properties</type>
-        <name>atlas.server.bind.address</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.source.atlasrest</name>
-    <display-name>Enable AtlasRest Tag Source</display-name>
-    <value>false</value>
-    <description/>
-    <value-attributes>
-      <type>boolean</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.source.file</name>
-    <display-name>Enable File Tag Source</display-name>
-    <value>false</value>
-    <description/>
-    <value-attributes>
-      <type>boolean</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.source.file.check.interval.millis</name>
-    <display-name>File Source: File update polling interval</display-name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.source.atlasrest.download.interval.millis</name>
-    <display-name>AtlasREST Source: Atlas source download interval</display-name>
-    <value>60000</value>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.tagsync.source.file.filename</name>
-    <display-name>File Source: Filename</display-name>
-    <value/>
-    <description>File Source Filename</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.tagsync.source.atlasrest.endpoint</name>
-    <display-name>AtlasREST Source: Atlas endpoint</display-name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-    <depends-on>
-      <property>
-        <type>application-properties</type>
-        <name>atlas.server.http.port</name>
-      </property>
-      <property>
-        <type>application-properties</type>
-        <name>atlas.server.https.port</name>
-      </property>
-      <property>
-        <type>application-properties</type>
-        <name>atlas.enableTLS</name>
-      </property>
-    </depends-on>
-  </property>
-  <property>
-    <name>ranger.tagsync.kerberos.principal</name>
-    <value/>
-    <description/>
-    <property-type>KERBEROS_PRINCIPAL</property-type>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.kerberos.keytab</name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.dest.ranger.username</name>
-    <value>rangertagsync</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.tagsync.source.atlasrest.username</name>
-    <value>admin</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.tagsync.atlas.default.cluster.name</name>
-    <value>{{cluster_name}}</value>
-    <description>Capture cluster name</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.tagsync.keystore.filename</name>
-    <value>/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks</value>
-    <description>Keystore file</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.source.atlasrest.keystore.filename</name>
-    <value>/usr/hdp/current/ranger-tagsync/conf/atlasuser.jceks</value>
-    <description>Tagsync atlasrest keystore file</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.dest.ranger.ssl.config.filename</name>
-    <value>{{stack_root}}/current/ranger-tagsync/conf/ranger-policymgr-ssl.xml</value>
-    <description>Keystore and truststore information used for tagsync, required if tagsync -&gt; ranger admin communication is SSL enabled</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.tagsync.source.atlasrest.ssl.config.filename</name>
-    <value>{{stack_root}}/current/ranger-tagsync/conf/atlas-tagsync-ssl.xml</value>
-    <description>Keystore and truststore information used for tagsync, required if tagsync to atlas communication is SSL enabled</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
deleted file mode 100644
index 922fbd8..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
+++ /dev/null
@@ -1,577 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<configuration supports_final="true">
-  <property>
-    <name>ranger.usersync.port</name>
-    <value>5151</value>
-    <description>Port for unix authentication service, run within usersync</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ssl</name>
-    <value>true</value>
-    <description>SSL enabled? (ranger admin -&gt; usersync communication)</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.usersync.keystore.password</name>
-    <value>UnIx529p</value>
-    <property-type>PASSWORD</property-type>
-    <description>Keystore password</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.usersync.truststore.password</name>
-    <value>changeit</value>
-    <property-type>PASSWORD</property-type>
-    <description>Truststore password</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.passwordvalidator.path</name>
-    <value>./native/credValidator.uexe</value>
-    <description>Native program for password validation</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.enabled</name>
-    <display-name>Enable User Sync</display-name>
-    <value>true</value>
-    <description>Should users and groups be synchronized to Ranger Database? Required to setup Ranger policies</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.sink.impl.class</name>
-    <value>org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder</value>
-    <description>Class to be used as sink (to sync users into ranger admin)</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.policymanager.baseURL</name>
-    <value>{{ranger_external_url}}</value>
-    <description>URL to be used by clients to access ranger admin, use FQDN</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.policymanager.maxrecordsperapicall</name>
-    <value>1000</value>
-    <description>How many records to be returned per API call</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.policymanager.mockrun</name>
-    <value>false</value>
-    <description>Is user sync doing mock run?</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.unix.minUserId</name>
-    <display-name>Minimum User ID</display-name>
-    <value>500</value>
-    <description>Only sync users above this user id (applicable for UNIX)</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.unix.group.file</name>
-    <display-name>Group File</display-name>
-    <value>/etc/group</value>
-    <description>Location of the groups file on the linux server</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.unix.password.file</name>
-    <display-name>Password File</display-name>
-    <value>/etc/passwd</value>
-    <description>Location of the password file on the linux server</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.sleeptimeinmillisbetweensynccycle</name>
-    <value>60000</value>
-    <description>Sleeptime interval in milliseconds, if &lt; 6000 then default to 1 min</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.source.impl.class</name>
-    <value>org.apache.ranger.unixusersync.process.UnixUserGroupBuilder</value>
-    <display-name>Sync Source</display-name>
-    <description>For Ldap: org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder, For Unix: org.apache.ranger.unixusersync.process.UnixUserGroupBuilder, org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder</description>
-    <value-attributes>
-      <type>value-list</type>
-      <empty-value-valid>true</empty-value-valid>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>org.apache.ranger.unixusersync.process.UnixUserGroupBuilder</value>
-          <label>UNIX</label>
-        </entry>
-        <entry>
-          <value>org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder</value>
-          <label>FILE</label>
-        </entry>
-        <entry>
-          <value>org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder</value>
-          <label>LDAP/AD</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.filesource.file</name>
-    <display-name>File Name</display-name>
-    <value>/tmp/usergroup.txt</value>
-    <description>Path to the file with the users and groups information. Example: /tmp/usergroup.json or /tmp/usergroup.csv or /tmp/usergroup.txt</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.filesource.text.delimiter</name>
-    <display-name>Delimiter</display-name>
-    <value>,</value>
-    <description>Delimiter used in file, if File based user sync is used</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.url</name>
-    <display-name>LDAP/AD URL</display-name>
-    <value/>
-    <description>LDAP server URL. Example: value = ldap://localhost:389 or ldaps//localhost:636</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.binddn</name>
-    <display-name>​Bind User</display-name>
-    <value/>
-    <description>Full distinguished name (DN), including common name (CN), of an LDAP user account that has privileges to search for users. This user is used for searching the users. This could be read-only LDAP user. Example: cn=admin,dc=example,dc=com</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.ldapbindpassword</name>
-    <display-name>Bind User Password</display-name>
-    <value/>
-    <property-type>PASSWORD</property-type>
-    <description>Password for the LDAP bind user used for searching users.</description>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.bindalias</name>
-    <value>testldapalias</value>
-    <description>Set as ranger.usersync.ldap.bindalias (string as is)</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.usersync.ldap.searchBase</name>
-    <value>dc=hadoop,dc=apache,dc=org</value>
-    <description>"# search base for users and groups
-# sample value would be dc=hadoop,dc=apache,dc=org
-# From Ranger Release 0.6.0 multiple Ous can be configured with ; (semicolon) separated"</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.user.searchbase</name>
-    <display-name>User Search Base</display-name>
-    <value/>
-    <description>"# search base for users
-# sample value would be ou=users,dc=hadoop,dc=apache,dc=org
-# overrides value specified in ranger.usersync.ldap.searchBase
-# From Ranger Release 0.6.0 multiple Ous can be configured with ; (semicolon) separated eg: cn=users,dc=example,dc=com;ou=example1,ou=example2"</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.user.searchscope</name>
-    <display-name>User Search Scope</display-name>
-    <value>sub</value>
-    <description>"# search scope for the users, only base, one and sub are supported values
-# please customize the value to suit your deployment
-# default value: sub"</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.user.objectclass</name>
-    <display-name>User Object Class​</display-name>
-    <value>person</value>
-    <description>LDAP User Object Class. Example: person or user</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.user.searchfilter</name>
-    <display-name>​User Search Filter</display-name>
-    <value/>
-    <description>"optional additional filter constraining the users selected for syncing
-# a sample value would be (dept=eng)
-# please customize the value to suit your deployment
-# default value is empty"</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.user.nameattribute</name>
-    <display-name>Username Attribute</display-name>
-    <value/>
-    <description>LDAP user name attribute. Example: sAMAccountName in AD, uid or cn in OpenLDAP</description>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.referral</name>
-    <value>ignore</value>
-    <description>Set to follow if multiple LDAP servers are configured to return continuation references for results. Set to ignore (default) if no referrals should be followed</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.user.groupnameattribute</name>
-    <display-name>User Group Name Attribute</display-name>
-    <value>memberof, ismemberof</value>
-    <description>LDAP user group name attribute. Generally it is the same as username attribute. Example: sAMAccountName in AD, uid or cn in OpenLDAP</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.username.caseconversion</name>
-    <value>none</value>
-    <description>User name case conversion</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.groupname.caseconversion</name>
-    <value>none</value>
-    <description>Group name case conversion</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.logdir</name>
-    <value>{{usersync_log_dir}}</value>
-    <description>User sync log directory</description>
-    <value-attributes>
-      <visible>false</visible>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.usersync.group.usermapsyncenabled</name>
-    <value>true</value>
-    <display-name>Group User Map Sync</display-name>
-    <description>Sync specific groups for users?</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.group.searchbase</name>
-    <display-name>Group Search Base</display-name>
-    <value/>
-    <description>"# search base for groups
-# sample value would be ou=groups,dc=hadoop,dc=apache,dc=org
-# overrides value specified in ranger.usersync.ldap.searchBase,  ranger.usersync.ldap.user.searchbase
-# if a value is not specified, takes the value of  ranger.usersync.ldap.searchBase
-# if  ranger.usersync.ldap.searchBase is also not specified, takes the value of ranger.usersync.ldap.user.searchbase"
-# From Ranger Release 0.6.0 multiple Ous can be configured with ; (semicolon) separated eg: ou=groups,DC=example,DC=com;ou=group1,ou=group2"
-</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.group.searchscope</name>
-    <value/>
-    <description>"# search scope for the groups, only base, one and sub are supported values
-# please customize the value to suit your deployment
-# default value: sub"</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.group.objectclass</name>
-    <display-name>Group Object Class</display-name>
-    <value/>
-    <description>LDAP Group object class. Example: group</description>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>ranger.usersync.group.searchfilter</name>
-    <value/>
-    <display-name>Group Search Filter</display-name>
-    <description>"# optional additional filter constraining the groups selected for syncing
-# a sample value would be (dept=eng)
-# please customize the value to suit your deployment
-# default value is empty"</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.group.nameattribute</name>
-    <display-name>Group Name Attribute</display-name>
-    <value/>
-    <description>LDAP group name attribute. Example: cn</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.group.memberattributename</name>
-    <display-name>Group Member Attribute</display-name>
-    <value/>
-    <description>LDAP group member attribute name. Example: member</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.pagedresultsenabled</name>
-    <value>true</value>
-    <description>Results can be paged?</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.pagedresultssize</name>
-    <value>500</value>
-    <description>Page size</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.usersync.kerberos.principal</name>
-    <value/>
-    <description/>
-    <property-type>KERBEROS_PRINCIPAL</property-type>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.kerberos.keytab</name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.policymgr.username</name>
-    <value>rangerusersync</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.policymgr.alias</name>
-    <value>ranger.usersync.policymgr.password</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.usersync.group.search.first.enabled</name>
-    <display-name>Enable Group Search First</display-name>
-    <value>false</value>
-    <description/>
-    <value-attributes>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.user.searchenabled</name>
-    <display-name>Enable User Search</display-name>
-    <value>false</value>
-    <description/>
-    <value-attributes>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.deltasync</name>
-    <display-name>Incremental Sync</display-name>
-    <value>true</value>
-    <description>Enable Incremental Sync</description>
-    <value-attributes>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-
-  <property>
-    <name>ranger.usersync.group.searchenabled</name>
-    <display-name>Enable Group Sync</display-name>
-    <value>false</value>
-    <description>"# do we want to do ldapsearch to find groups instead of relying on user entry attributes
-    # valid values: true, false
-    # any value other than true would be treated as false
-    # default value: false"</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>ranger-ugsync-site</type>
-        <name>ranger.usersync.ldap.deltasync</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.keystore.file</name>
-    <value>/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks</value>
-    <description>Keystore file used for usersync</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.truststore.file</name>
-    <value>/usr/hdp/current/ranger-usersync/conf/mytruststore.jks</value>
-    <description>Truststore used for usersync, required if usersync -&gt; ranger admin communication is SSL enabled</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.ldap.bindkeystore</name>
-    <value/>
-    <description>Set same value as ranger.usersync.keystore.file property i.e default value /usr/hdp/current/ranger-usersync/conf/ugsync.jceks</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.credstore.filename</name>
-    <value>/usr/hdp/current/ranger-usersync/conf/ugsync.jceks</value>
-    <description>Credential store file name for user sync, specify full path</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.usersync.policymgr.keystore</name>
-    <value>/usr/hdp/current/ranger-usersync/conf/ugsync.jceks</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/tagsync-application-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/tagsync-application-properties.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/tagsync-application-properties.xml
deleted file mode 100644
index f616324..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/tagsync-application-properties.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>atlas.kafka.entities.group.id</name>
-    <display-name>Atlas Source: Kafka consumer group</display-name>
-    <value>ranger_entities_consumer</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>atlas.kafka.bootstrap.servers</name>
-    <display-name>Atlas Source: Kafka endpoint</display-name>
-    <value>localhost:6667</value>
-    <description/>
-    <depends-on>
-      <property>
-        <type>kafka-broker</type>
-        <name>port</name>
-      </property>
-    </depends-on>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>atlas.kafka.zookeeper.connect</name>
-    <display-name>Atlas Source: Zookeeper endpoint</display-name>
-    <value>localhost:2181</value>
-    <description/>
-    <depends-on>
-      <property>
-        <type>zoo.cfg</type>
-        <name>clientPort</name>
-      </property>
-    </depends-on>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/tagsync-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/tagsync-log4j.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/tagsync-log4j.xml
deleted file mode 100644
index 8ec85a0..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/tagsync-log4j.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_adding_forbidden="false">
-  <property>
-    <name>ranger_tagsync_log_maxfilesize</name>
-    <value>256</value>
-   <description>The maximum size of backup file before the log is rotated</description>
-    <display-name>Ranger tagsync Log: backup file size</display-name>
-    <value-attributes>
-      <unit>MB</unit>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-   </property>
-    <property>
-     <name>ranger_tagsync_log_number_of_backup_files</name>
-     <value>20</value>
-     <description>The number of backup files</description>
-     <display-name>Ranger tagsync Log: # of backup files</display-name>
-     <value-attributes>
-      <type>int</type>
-      <minimum>0</minimum>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>content</name>
-    <display-name>tagsync-log4j template</display-name>
-    <description>tagsync-log4j.properties</description>
-    <value>
-#
-# 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.
-#
-
-
-log4j.rootLogger = info,logFile
-
-# logFile
-log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.logFile.file=${logdir}/tagsync.log
-log4j.appender.logFile.datePattern='.'yyyy-MM-dd
-log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.logFile.MaxFileSize = {{ranger_tagsync_log_maxfilesize}}MB
-log4j.appender.logFile.MaxBackupIndex = {{ranger_tagsync_log_number_of_backup_files}}
-log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n
-
-# console
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Target=System.out
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n
-        </value>
-    <value-attributes>
-      <type>content</type>
-      <show-property-name>false</show-property-name>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/usersync-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/usersync-log4j.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/usersync-log4j.xml
deleted file mode 100644
index 6d91b6e..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/usersync-log4j.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_adding_forbidden="false">
-  <property>
-    <name>ranger_usersync_log_maxfilesize</name>
-    <value>256</value>
-   <description>The maximum size of backup file before the log is rotated</description>
-    <display-name>Ranger usersync Log: backup file size</display-name>
-    <value-attributes>
-      <unit>MB</unit>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-   </property>
-   <property>
-    <name>ranger_usersync_log_maxbackupindex</name>
-    <value>20</value>
-    <description>The number of backup files</description>
-    <display-name>Ranger usersync Log: # of backup files</display-name>
-    <value-attributes>
-      <type>int</type>
-      <minimum>0</minimum>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>content</name>
-    <display-name>usersync-log4j template</display-name>
-    <description>usersync-log4j.properties</description>
-    <value>
-#
-# 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.
-#
-
-log4j.rootLogger = info,logFile
-
-# logFile
-log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.logFile.file=${logdir}/usersync.log
-log4j.appender.logFile.datePattern='.'yyyy-MM-dd
-log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n
-log4j.appender.logFile.MaxFileSize = {{ranger_usersync_log_maxfilesize}}MB
-log4j.appender.logFile.MaxBackupIndex = {{ranger_usersync_log_maxbackupindex}}
-
-# console
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Target=System.out
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n
-        </value>
-    <value-attributes>
-      <type>content</type>
-      <show-property-name>false</show-property-name>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/usersync-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/usersync-properties.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/usersync-properties.xml
deleted file mode 100644
index 15aabe8..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/usersync-properties.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_final="false">
-
-
-
-
-
-
-
-
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/kerberos.json b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/kerberos.json
deleted file mode 100644
index 1fc8acf..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/kerberos.json
+++ /dev/null
@@ -1,153 +0,0 @@
-{
-  "services": [
-    {
-      "name": "RANGER",
-      "identities": [
-        {
-          "name": "/spnego"
-        },
-        {
-          "name": "/smokeuser"
-        }
-      ],
-      "configurations": [
-        {
-          "ranger-admin-site": {
-            "xasecure.audit.jaas.Client.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
-            "xasecure.audit.jaas.Client.loginModuleControlFlag": "required",
-            "xasecure.audit.jaas.Client.option.useKeyTab": "true",
-            "xasecure.audit.jaas.Client.option.storeKey": "false",
-            "xasecure.audit.jaas.Client.option.serviceName": "solr"
-          }
-        }
-      ],
-      "components": [
-        {
-          "name": "RANGER_ADMIN",
-          "identities": [
-            {
-              "name": "rangeradmin",
-              "principal": {
-                "value": "rangeradmin/_HOST@${realm}",
-                "type" : "service",
-                "configuration": "ranger-admin-site/ranger.admin.kerberos.principal",
-                "local_username" : "${ranger-env/ranger_user}"
-              },
-              "keytab": {
-                "file": "${keytab_dir}/rangeradmin.service.keytab",
-                "owner": {
-                  "name": "${ranger-env/ranger_user}",
-                  "access": "r"
-                },
-                "configuration": "ranger-admin-site/ranger.admin.kerberos.keytab"
-              }
-            },
-            {
-              "name": "rangerlookup",
-              "principal": {
-                "value": "rangerlookup/_HOST@${realm}",
-                "configuration": "ranger-admin-site/ranger.lookup.kerberos.principal",
-                "type" : "service"
-              },
-              "keytab": {
-                "file": "${keytab_dir}/rangerlookup.service.keytab",
-                "owner": {
-                  "name": "${ranger-env/ranger_user}",
-                  "access": "r"
-                },
-                "configuration": "ranger-admin-site/ranger.lookup.kerberos.keytab"
-              }
-            },
-            {
-              "name": "/spnego",
-              "keytab": {
-                "configuration": "ranger-admin-site/ranger.spnego.kerberos.keytab"
-              }
-            },
-            {
-              "name": "/RANGER/RANGER_ADMIN/rangeradmin",
-              "principal": {
-                "configuration": "ranger-admin-site/xasecure.audit.jaas.Client.option.principal"
-              },
-              "keytab": {
-                "configuration": "ranger-admin-site/xasecure.audit.jaas.Client.option.keyTab"
-              }
-            },
-            {
-              "name": "/AMBARI_INFRA/INFRA_SOLR/infra-solr",
-              "when" : {
-                "contains" : ["services", "AMBARI_INFRA"]
-              }
-            }
-          ]
-        },
-        {
-          "name": "RANGER_USERSYNC",
-          "identities": [
-            {
-              "name": "rangerusersync",
-              "principal": {
-                "value": "rangerusersync/_HOST@${realm}",
-                "type" : "service",
-                "configuration" : "ranger-ugsync-site/ranger.usersync.kerberos.principal",
-                "local_username" : "rangerusersync"
-              },
-              "keytab": {
-                "file": "${keytab_dir}/rangerusersync.service.keytab",
-                "owner": {
-                  "name": "${ranger-env/ranger_user}",
-                  "access": "r"
-                },
-                "configuration": "ranger-ugsync-site/ranger.usersync.kerberos.keytab"
-              }
-            }
-          ]
-        },
-        {
-          "name": "RANGER_TAGSYNC",
-          "identities": [
-            {
-              "name": "rangertagsync",
-              "principal": {
-                "value": "rangertagsync/_HOST@${realm}",
-                "type" : "service",
-                "configuration": "ranger-tagsync-site/ranger.tagsync.kerberos.principal",
-                "local_username" : "rangertagsync"
-              },
-              "keytab": {
-                "file": "${keytab_dir}/rangertagsync.service.keytab",
-                "owner": {
-                  "name": "${ranger-env/ranger_user}",
-                  "access": "r"
-                },
-                "configuration": "ranger-tagsync-site/ranger.tagsync.kerberos.keytab"
-              }
-            },
-            {
-              "name": "/RANGER/RANGER_TAGSYNC/rangertagsync",
-              "principal": {
-                "configuration": "tagsync-application-properties/atlas.jaas.KafkaClient.option.principal"
-              },
-              "keytab": {
-                "configuration": "tagsync-application-properties/atlas.jaas.KafkaClient.option.keyTab"
-              }
-            }
-          ],
-          "configurations": [
-            {
-              "tagsync-application-properties": {
-                "atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
-                "atlas.jaas.KafkaClient.loginModuleControlFlag": "required",
-                "atlas.jaas.KafkaClient.option.useKeyTab": "true",
-                "atlas.jaas.KafkaClient.option.storeKey": "true",
-                "atlas.jaas.KafkaClient.option.serviceName": "kafka",
-                "atlas.kafka.sasl.kerberos.service.name": "kafka",
-                "atlas.kafka.security.protocol": "PLAINTEXTSASL"
-              }
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/metainfo.xml b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/metainfo.xml
deleted file mode 100644
index e208800..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/metainfo.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * 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.
- */
--->
-<metainfo>
-  <schemaVersion>2.0</schemaVersion>
-  <services>
-    <service>
-      <name>RANGER</name>
-      <displayName>Ranger</displayName>
-      <comment>Comprehensive security for Hadoop</comment>
-      <version>0.7.0.3.0</version>
-      <components>
-          
-        <component>
-          <name>RANGER_ADMIN</name>
-          <displayName>Ranger Admin</displayName>
-          <category>MASTER</category>
-          <cardinality>1+</cardinality>
-          <versionAdvertised>true</versionAdvertised>
-          <dependencies>
-            <dependency>
-              <name>AMBARI_INFRA/INFRA_SOLR_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-          </dependencies>
-          <commandScript>
-            <script>scripts/ranger_admin.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-          <logs>
-            <log>
-              <logId>ranger_admin</logId>
-              <primary>true</primary>
-            </log>
-            <log>
-              <logId>ranger_dbpatch</logId>
-            </log>
-          </logs>
-        </component>
-
-        <component>
-          <name>RANGER_TAGSYNC</name>
-          <displayName>Ranger Tagsync</displayName>
-          <category>SLAVE</category>
-          <cardinality>0-1</cardinality>
-          <versionAdvertised>true</versionAdvertised>
-          <commandScript>
-            <script>scripts/ranger_tagsync.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-          <configuration-dependencies>
-            <config-type>ranger-tagsync-site</config-type>
-            <config-type>tagsync-application-properties</config-type>
-          </configuration-dependencies>
-        </component>
-
-        <component>
-          <name>RANGER_USERSYNC</name>
-          <displayName>Ranger Usersync</displayName>
-          <category>MASTER</category>
-          <cardinality>1</cardinality>
-          <versionAdvertised>true</versionAdvertised>
-          <auto-deploy>
-            <enabled>true</enabled>
-            <co-locate>RANGER/RANGER_ADMIN</co-locate>
-          </auto-deploy>
-          <commandScript>
-            <script>scripts/ranger_usersync.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-          <logs>
-            <log>
-              <logId>ranger_usersync</logId>
-              <primary>true</primary>
-            </log>
-          </logs>
-        </component>
-
-      </components>
-      <configuration-dependencies>
-        <config-type>admin-properties</config-type>
-        <config-type>ranger-site</config-type>
-        <config-type>usersync-properties</config-type>
-        <config-type>ranger-admin-site</config-type>
-        <config-type>ranger-ugsync-site</config-type>
-        <config-type>admin-log4j</config-type>
-        <config-type>usersync-log4j</config-type>
-        <config-type>ranger-solr-configuration</config-type>
-      </configuration-dependencies>
-
-      <commandScript>
-        <script>scripts/service_check.py</script>
-        <scriptType>PYTHON</scriptType>
-        <timeout>300</timeout>
-      </commandScript>
-
-      <themes>
-        <theme>
-          <fileName>theme_version_1.json</fileName>
-          <default>true</default>
-        </theme>
-        <theme>
-          <fileName>theme_version_2.json</fileName>
-          <default>true</default>
-        </theme>
-        <theme>
-          <fileName>theme_version_3.json</fileName>
-          <default>true</default>
-        </theme>
-        <theme>
-          <fileName>theme_version_5.json</fileName>
-          <default>true</default>
-        </theme>
-      </themes>
-
-      <osSpecifics>
-        <osSpecific>
-          <osFamily>redhat7,amazon2015,redhat6,suse11,suse12</osFamily>
-          <packages>
-            <package>
-              <name>ranger_${stack_version}-admin</name>
-            </package>
-            <package>
-              <name>ranger_${stack_version}-usersync</name>
-            </package>
-            <package>
-              <name>ranger_${stack_version}-tagsync</name>
-              <condition>should_install_ranger_tagsync</condition>
-            </package>
-            <package>
-              <name>ambari-infra-solr-client</name>
-              <condition>should_install_infra_solr_client</condition>
-            </package>
-          </packages>
-        </osSpecific>
-        <osSpecific>
-          <osFamily>debian7,ubuntu12,ubuntu14,ubuntu16</osFamily>
-          <packages>
-            <package>
-              <name>ranger-${stack_version}-admin</name>
-            </package>
-            <package>
-              <name>ranger-${stack_version}-usersync</name>
-            </package>
-            <package>
-              <name>ranger-${stack_version}-tagsync</name>
-              <condition>should_install_ranger_tagsync</condition>
-            </package>
-            <package>
-              <name>ambari-infra-solr-client</name>
-              <condition>should_install_infra_solr_client</condition>
-            </package>
-          </packages>
-        </osSpecific>
-      </osSpecifics>
-
-      <quickLinksConfigurations>
-        <quickLinksConfiguration>
-          <fileName>quicklinks.json</fileName>
-          <default>true</default>
-        </quickLinksConfiguration>
-      </quickLinksConfigurations>
-
-    </service>
-  </services>
-</metainfo>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/alerts/alert_ranger_admin_passwd_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/alerts/alert_ranger_admin_passwd_check.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/alerts/alert_ranger_admin_passwd_check.py
deleted file mode 100644
index 8ea8070..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/alerts/alert_ranger_admin_passwd_check.py
+++ /dev/null
@@ -1,195 +0,0 @@
-#!/usr/bin/env python
-
-"""
-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.
-"""
-
-import base64
-import urllib2
-import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
-import logging
-from resource_management.core.environment import Environment
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions.stack_features import check_stack_feature
-from resource_management.libraries.functions import StackFeature
-
-logger = logging.getLogger()
-RANGER_ADMIN_URL = '{{admin-properties/policymgr_external_url}}'
-ADMIN_USERNAME = '{{ranger-env/admin_username}}'
-ADMIN_PASSWORD = '{{ranger-env/admin_password}}'
-RANGER_ADMIN_USERNAME = '{{ranger-env/ranger_admin_username}}'
-RANGER_ADMIN_PASSWORD = '{{ranger-env/ranger_admin_password}}'
-SECURITY_ENABLED = '{{cluster-env/security_enabled}}'
-
-def get_tokens():
-  """
-  Returns a tuple of tokens in the format {{site/property}} that will be used
-  to build the dictionary passed into execute
-
-  :return tuple
-  """
-  return (RANGER_ADMIN_URL, ADMIN_USERNAME, ADMIN_PASSWORD, RANGER_ADMIN_USERNAME, RANGER_ADMIN_PASSWORD, SECURITY_ENABLED)
-
-
-def execute(configurations={}, parameters={}, host_name=None):
-  """
-  Returns a tuple containing the result code and a pre-formatted result label
-
-  Keyword arguments:
-  configurations (dictionary): a mapping of configuration key to value
-  parameters (dictionary): a mapping of script parameter key to value
-  host_name (string): the name of this host where the alert is running
-  """
-
-  if configurations is None:
-    return (('UNKNOWN', ['There were no configurations supplied to the script.']))
-
-  ranger_link = None
-  ranger_auth_link = None
-  ranger_get_user = None
-  admin_username = None
-  admin_password = None
-  ranger_admin_username = None
-  ranger_admin_password = None
-  security_enabled = False
-
-  stack_version_formatted = Script.get_stack_version()
-  stack_supports_ranger_kerberos = stack_version_formatted and check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, stack_version_formatted)
-
-  if RANGER_ADMIN_URL in configurations:
-    ranger_link = configurations[RANGER_ADMIN_URL]
-    if ranger_link.endswith('/'):
-      ranger_link = ranger_link[:-1]
-    ranger_auth_link = '{0}/{1}'.format(ranger_link, 'service/public/api/repository/count')
-    ranger_get_user = '{0}/{1}'.format(ranger_link, 'service/xusers/users')
-
-  if ADMIN_USERNAME in configurations:
-    admin_username = configurations[ADMIN_USERNAME]
-
-  if ADMIN_PASSWORD in configurations:
-    admin_password = configurations[ADMIN_PASSWORD]
-
-  if RANGER_ADMIN_USERNAME in configurations:
-    ranger_admin_username = configurations[RANGER_ADMIN_USERNAME]
-
-  if RANGER_ADMIN_PASSWORD in configurations:
-    ranger_admin_password = configurations[RANGER_ADMIN_PASSWORD]
-
-  if SECURITY_ENABLED in configurations:
-    security_enabled = str(configurations[SECURITY_ENABLED]).upper() == 'TRUE'
-
-  label = None
-  result_code = 'OK'
-
-  try:
-    if security_enabled and stack_supports_ranger_kerberos:
-      result_code = 'UNKNOWN'
-      label = 'This alert will get skipped for Ranger Admin on kerberos env'
-    else:
-      admin_http_code = check_ranger_login(ranger_auth_link, admin_username, admin_password)
-      if admin_http_code == 200:
-        get_user_code = get_ranger_user(ranger_get_user, admin_username, admin_password, ranger_admin_username)
-        if get_user_code:
-          user_http_code = check_ranger_login(ranger_auth_link, ranger_admin_username, ranger_admin_password)
-          if user_http_code == 200:
-            result_code = 'OK'
-            label = 'Login Successful for users {0} and {1}'.format(admin_username, ranger_admin_username)
-          elif user_http_code == 401:
-            result_code = 'CRITICAL'
-            label = 'User:{0} credentials on Ambari UI are not in sync with Ranger'.format(ranger_admin_username)
-          else:
-            result_code = 'WARNING'
-            label = 'Ranger Admin service is not reachable, please restart the service'
-        else:
-          result_code = 'OK'
-          label = 'Login Successful for user: {0}. User:{1} user not yet synced with Ranger'.format(admin_username, ranger_admin_username)
-      elif admin_http_code == 401:
-        result_code = 'CRITICAL'
-        label = 'User:{0} credentials on Ambari UI are not in sync with Ranger'.format(admin_username)
-      else:
-        result_code = 'WARNING'
-        label = 'Ranger Admin service is not reachable, please restart the service'
-
-  except Exception, e:
-    label = str(e)
-    result_code = 'UNKNOWN'
-    logger.exception(label)
-
-  return ((result_code, [label]))
-
-def check_ranger_login(ranger_auth_link, username, password):
-  """
-  params ranger_auth_link: ranger login url
-  params username: user credentials
-  params password: user credentials
-
-  return response code
-  """
-  try:
-    usernamepassword = '{0}:{1}'.format(username, password)
-    base_64_string = base64.encodestring(usernamepassword).replace('\n', '')
-    request = urllib2.Request(ranger_auth_link)
-    request.add_header("Content-Type", "application/json")
-    request.add_header("Accept", "application/json")
-    request.add_header("Authorization", "Basic {0}".format(base_64_string))
-    result = urllib2.urlopen(request, timeout=20)
-    response_code = result.getcode()
-    if response_code == 200:
-      response = json.loads(result.read())
-    return response_code
-  except urllib2.HTTPError, e:
-    logger.exception("Error during Ranger service authentication. Http status code - {0}. {1}".format(e.code, e.read()))
-    return e.code
-  except urllib2.URLError, e:
-    logger.exception("Error during Ranger service authentication. {0}".format(e.reason))
-    return None
-  except Exception, e:
-    return 401
-
-def get_ranger_user(ranger_get_user, username, password, user):
-  """
-  params ranger_get_user: ranger get user url
-  params username: user credentials
-  params password: user credentials
-  params user: user to be search
-  return Boolean if user exist or not
-  """
-  try:
-    url = '{0}?name={1}'.format(ranger_get_user, user)
-    usernamepassword = '{0}:{1}'.format(username, password)
-    base_64_string = base64.encodestring(usernamepassword).replace('\n', '')
-    request = urllib2.Request(url)
-    request.add_header("Content-Type", "application/json")
-    request.add_header("Accept", "application/json")
-    request.add_header("Authorization", "Basic {0}".format(base_64_string))
-    result = urllib2.urlopen(request, timeout=20)
-    response_code = result.getcode()
-    response = json.loads(result.read())
-    if response_code == 200 and len(response['vXUsers']) > 0:
-      for xuser in response['vXUsers']:
-        if xuser['name'] == user:
-          return True
-    else:
-      return False
-  except urllib2.HTTPError, e:
-    logger.exception("Error getting user from Ranger service. Http status code - {0}. {1}".format(e.code, e.read()))
-    return False
-  except urllib2.URLError, e:
-    logger.exception("Error getting user from Ranger service. {0}".format(e.reason))
-    return False
-  except Exception, e:
-    return False


[18/52] [abbrv] ambari git commit: AMBARI-21374 : Replication factor should be configurable in Atlas to create solr collections (Vishal Suvagia via mugdha)

Posted by jl...@apache.org.
AMBARI-21374 : Replication factor should be configurable in Atlas to create solr collections (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 78ebbef3db12b1261d71db361bc480a374f62e92
Parents: 3dc51b0
Author: Vishal Suvagia <vi...@yahoo.com>
Authored: Mon Jul 3 10:44:43 2017 +0530
Committer: Mugdha Varadkar <mu...@apache.org>
Committed: Thu Jul 6 10:44:50 2017 +0530

----------------------------------------------------------------------
 .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py  | 4 +++-
 .../ATLAS/0.7.0.3.0/configuration/atlas-env.xml                | 6 ++++++
 .../common-services/ATLAS/0.7.0.3.0/package/scripts/params.py  | 4 +++-
 .../stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml  | 6 ++++++
 4 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/78ebbef3/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index 111a248..0c84b5c 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -212,7 +212,9 @@ search_backend_solr = atlas_search_backend.startswith('solr')
 infra_solr_znode = default("/configurations/infra-solr-env/infra_solr_znode", None)
 infra_solr_hosts = default("/clusterHostInfo/infra_solr_hosts", [])
 infra_solr_replication_factor = 2 if len(infra_solr_hosts) > 1 else 1
-atlas_solr_shards = default("/configurations/atlas-env/atlas_solr-shards", 1)
+if 'atlas_solr_replication_factor' in config['configurations']['atlas-env']:
+  infra_solr_replication_factor = int(default("/configurations/atlas-env/atlas_solr_replication_factor", 1))
+atlas_solr_shards = default("/configurations/atlas-env/atlas_solr_shards", 1)
 has_infra_solr = len(infra_solr_hosts) > 0
 infra_solr_role_atlas = default('configurations/infra-solr-security-json/infra_solr_role_atlas', 'atlas_user')
 infra_solr_role_dev = default('configurations/infra-solr-security-json/infra_solr_role_dev', 'dev')

http://git-wip-us.apache.org/repos/asf/ambari/blob/78ebbef3/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
index c5a4fd6..f97ca98 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
@@ -179,4 +179,10 @@
     </value-attributes>
     <on-ambari-upgrade add="false"/>
   </property>
+  <property>
+    <name>atlas_solr_replication_factor</name>
+    <value>1</value>
+    <description>Replication factor for the atlas solr collections.</description>
+    <on-ambari-upgrade add="false" />
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/78ebbef3/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
index d26df33..61b41d6 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
@@ -211,7 +211,9 @@ search_backend_solr = atlas_search_backend.startswith('solr')
 infra_solr_znode = default("/configurations/infra-solr-env/infra_solr_znode", None)
 infra_solr_hosts = default("/clusterHostInfo/infra_solr_hosts", [])
 infra_solr_replication_factor = 2 if len(infra_solr_hosts) > 1 else 1
-atlas_solr_shards = default("/configurations/atlas-env/atlas_solr-shards", 1)
+if 'atlas_solr_replication_factor' in config['configurations']['atlas-env']:
+  infra_solr_replication_factor = int(default("/configurations/atlas-env/atlas_solr_replication_factor", 1))
+atlas_solr_shards = default("/configurations/atlas-env/atlas_solr_shards", 1)
 has_infra_solr = len(infra_solr_hosts) > 0
 infra_solr_role_atlas = default('configurations/infra-solr-security-json/infra_solr_role_atlas', 'atlas_user')
 infra_solr_role_dev = default('configurations/infra-solr-security-json/infra_solr_role_dev', 'dev')

http://git-wip-us.apache.org/repos/asf/ambari/blob/78ebbef3/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
index d54cf15..821fafa 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
@@ -38,4 +38,10 @@
     </value-attributes>
     <on-ambari-upgrade add="false"/>
   </property>
+   <property>
+    <name>atlas_solr_replication_factor</name>
+    <value>1</value>
+    <description>Replication factor for the atlas solr collections.</description>
+    <on-ambari-upgrade add="false" />
+  </property>
 </configuration>


[31/52] [abbrv] ambari git commit: AMBARI-21339 logviewer started along with nimbus if supervisor is not running on the same machine

Posted by jl...@apache.org.
AMBARI-21339 logviewer started along with nimbus if supervisor is not running on the same machine


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 1939dabcd7f6eeff3bb93e4d6f718b8a32351bd2
Parents: 6832ed9
Author: lpuskas <lp...@apache.org>
Authored: Thu Jun 29 17:11:59 2017 +0200
Committer: lpuskas <la...@sequenceiq.com>
Committed: Fri Jul 7 11:23:12 2017 +0200

----------------------------------------------------------------------
 .../STORM/0.9.1/package/scripts/nimbus.py       |  8 ++-
 .../stacks/2.1/STORM/test_storm_nimbus.py       | 60 +++++++++++++++++++-
 .../stacks/2.1/configs/default-storm-start.json | 14 +++++
 .../test/python/stacks/2.1/configs/default.json | 13 +++++
 .../stacks/2.1/configs/secured-storm-start.json | 13 +++++
 .../test/python/stacks/2.1/configs/secured.json | 15 ++++-
 6 files changed, 119 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1939dabc/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py
index 360af5d..126ae78 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py
@@ -70,12 +70,18 @@ class NimbusDefault(Nimbus):
     setup_ranger_storm(upgrade_type=upgrade_type)
     service("nimbus", action="start")
 
+    if "SUPERVISOR" not in params.config['localComponents']:
+      service("logviewer", action="start")
+
 
   def stop(self, env, upgrade_type=None):
     import params
     env.set_params(params)
     service("nimbus", action="stop")
 
+    if "SUPERVISOR" not in params.config['localComponents']:
+      service("logviewer", action="stop")
+
 
   def status(self, env):
     import status_params
@@ -85,7 +91,7 @@ class NimbusDefault(Nimbus):
   def get_log_folder(self):
     import params
     return params.log_dir
-  
+
   def get_user(self):
     import params
     return params.storm_user

http://git-wip-us.apache.org/repos/asf/ambari/blob/1939dabc/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
index 35f057c..fd25126 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
@@ -58,6 +58,15 @@ class TestStormNimbus(TestStormBase):
         owner = 'storm',
         group = 'hadoop',
     )
+    self.assertResourceCalled('Execute', 'source /etc/storm/conf/storm-env.sh ; export PATH=$JAVA_HOME/bin:$PATH ; storm logviewer > /var/log/storm/logviewer.out 2>&1 &\n echo $! > /var/run/storm/logviewer.pid',
+        path = ['/usr/bin'],
+        user = 'storm',
+        not_if = "ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1'",
+    )
+    self.assertResourceCalled('File', '/var/run/storm/logviewer.pid',
+        owner = 'storm',
+        group = 'hadoop',
+    )
     self.assertNoMoreResources()
 
   def test_start_with_metrics_collector(self):
@@ -99,6 +108,15 @@ class TestStormNimbus(TestStormBase):
         owner = 'storm',
         group = 'hadoop',
     )
+    self.assertResourceCalled('Execute', 'source /etc/storm/conf/storm-env.sh ; export PATH=$JAVA_HOME/bin:$PATH ; storm logviewer > /var/log/storm/logviewer.out 2>&1 &\n echo $! > /var/run/storm/logviewer.pid',
+      path = ['/usr/bin'],
+      user = 'storm',
+      not_if = "ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1'",
+    )
+    self.assertResourceCalled('File', '/var/run/storm/logviewer.pid',
+      owner = 'storm',
+      group = 'hadoop',
+    )
     self.assertNoMoreResources()
 
   def test_start_with_metrics_collector_modern(self):
@@ -141,12 +159,21 @@ class TestStormNimbus(TestStormBase):
         owner = 'storm',
         group = 'hadoop',
     )
+    self.assertResourceCalled('Execute', 'source /etc/storm/conf/storm-env.sh ; export PATH=$JAVA_HOME/bin:$PATH ; storm logviewer > /var/log/storm/logviewer.out 2>&1 &\n echo $! > /var/run/storm/logviewer.pid',
+      path = ['/usr/bin'],
+      user = 'storm',
+      not_if = "ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1'",
+    )
+    self.assertResourceCalled('File', '/var/run/storm/logviewer.pid',
+      owner = 'storm',
+      group = 'hadoop',
+    )
     self.assertNoMoreResources()
 
   @patch("os.path.exists")
   def test_stop_default(self, path_exists_mock):
     # Bool for the pid file
-    path_exists_mock.side_effect = [True]
+    path_exists_mock.side_effect = [True, True]
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "stop",
@@ -164,6 +191,16 @@ class TestStormNimbus(TestStormBase):
     self.assertResourceCalled('File', '/var/run/storm/nimbus.pid',
         action = ['delete'],
     )
+    self.assertResourceCalled('Execute', "ambari-sudo.sh kill 123",
+      not_if = "! (ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1')",
+    )
+    self.assertResourceCalled('Execute', "ambari-sudo.sh kill -9 123",
+      not_if = "sleep 2; ! (ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1') || sleep 20; ! (ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1')",
+      ignore_failures = True,
+    )
+    self.assertResourceCalled('File', '/var/run/storm/logviewer.pid',
+      action = ['delete'],
+    )
     self.assertNoMoreResources()
 
   def test_configure_secured(self):
@@ -196,12 +233,21 @@ class TestStormNimbus(TestStormBase):
         owner = 'storm',
         group = 'hadoop',
     )
+    self.assertResourceCalled('Execute', 'source /etc/storm/conf/storm-env.sh ; export PATH=$JAVA_HOME/bin:$PATH ; storm logviewer > /var/log/storm/logviewer.out 2>&1 &\n echo $! > /var/run/storm/logviewer.pid',
+        path = ['/usr/bin'],
+        user = 'storm',
+        not_if = "ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1'",
+    )
+    self.assertResourceCalled('File', '/var/run/storm/logviewer.pid',
+        owner = 'storm',
+        group = 'hadoop',
+    )
     self.assertNoMoreResources()
 
   @patch("os.path.exists")
   def test_stop_secured(self, path_exists_mock):
     # Bool for the pid file
-    path_exists_mock.side_effect = [True]
+    path_exists_mock.side_effect = [True, True]
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "stop",
@@ -219,6 +265,16 @@ class TestStormNimbus(TestStormBase):
     self.assertResourceCalled('File', '/var/run/storm/nimbus.pid',
         action = ['delete'],
     )
+    self.assertResourceCalled('Execute', "ambari-sudo.sh kill 123",
+      not_if = "! (ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1')",
+    )
+    self.assertResourceCalled('Execute', "ambari-sudo.sh kill -9 123",
+      not_if = "sleep 2; ! (ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1') || sleep 20; ! (ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1')",
+      ignore_failures = True,
+    )
+    self.assertResourceCalled('File', '/var/run/storm/logviewer.pid',
+      action = ['delete'],
+    )
     self.assertNoMoreResources()
 
   def test_pre_upgrade_restart(self):

http://git-wip-us.apache.org/repos/asf/ambari/blob/1939dabc/ambari-server/src/test/python/stacks/2.1/configs/default-storm-start.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/configs/default-storm-start.json b/ambari-server/src/test/python/stacks/2.1/configs/default-storm-start.json
index 27cb63e..05330a0 100644
--- a/ambari-server/src/test/python/stacks/2.1/configs/default-storm-start.json
+++ b/ambari-server/src/test/python/stacks/2.1/configs/default-storm-start.json
@@ -1,4 +1,18 @@
 {
+    "localComponents": [
+        "APP_TIMELINE_SERVER",
+        "TEZ_CLIENT",
+        "DATANODE",
+        "HDFS_CLIENT",
+        "ZOOKEEPER_SERVER",
+        "RESOURCEMANAGER",
+        "MAPREDUCE2_CLIENT",
+        "YARN_CLIENT",
+        "HISTORYSERVER",
+        "ZOOKEEPER_CLIENT",
+        "NAMENODE"
+    ],
+
     "configuration_attributes": {
         "storm-site": {},
         "hdfs-site": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1939dabc/ambari-server/src/test/python/stacks/2.1/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/configs/default.json b/ambari-server/src/test/python/stacks/2.1/configs/default.json
index e04e1eb..536074e 100644
--- a/ambari-server/src/test/python/stacks/2.1/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.1/configs/default.json
@@ -1,4 +1,17 @@
 {
+    "localComponents": [
+        "APP_TIMELINE_SERVER",
+        "TEZ_CLIENT",
+        "DATANODE",
+        "HDFS_CLIENT",
+        "ZOOKEEPER_SERVER",
+        "RESOURCEMANAGER",
+        "MAPREDUCE2_CLIENT",
+        "YARN_CLIENT",
+        "HISTORYSERVER",
+        "ZOOKEEPER_CLIENT",
+        "NAMENODE"
+    ],
     "roleCommand": "SERVICE_CHECK", 
     "clusterName": "c1", 
     "hostname": "c6401.ambari.apache.org", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1939dabc/ambari-server/src/test/python/stacks/2.1/configs/secured-storm-start.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/configs/secured-storm-start.json b/ambari-server/src/test/python/stacks/2.1/configs/secured-storm-start.json
index 1b027b7..6d7fdd1 100644
--- a/ambari-server/src/test/python/stacks/2.1/configs/secured-storm-start.json
+++ b/ambari-server/src/test/python/stacks/2.1/configs/secured-storm-start.json
@@ -1,4 +1,17 @@
 {
+    "localComponents": [
+        "APP_TIMELINE_SERVER",
+        "TEZ_CLIENT",
+        "DATANODE",
+        "HDFS_CLIENT",
+        "ZOOKEEPER_SERVER",
+        "RESOURCEMANAGER",
+        "MAPREDUCE2_CLIENT",
+        "YARN_CLIENT",
+        "HISTORYSERVER",
+        "ZOOKEEPER_CLIENT",
+        "NAMENODE"
+    ],
     "configuration_attributes": {
         "storm-site": {}, 
         "hdfs-site": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1939dabc/ambari-server/src/test/python/stacks/2.1/configs/secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/configs/secured.json b/ambari-server/src/test/python/stacks/2.1/configs/secured.json
index 61b359c..e2c22be 100644
--- a/ambari-server/src/test/python/stacks/2.1/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/2.1/configs/secured.json
@@ -1,5 +1,18 @@
 {
-    "roleCommand": "INSTALL", 
+  "localComponents": [
+    "APP_TIMELINE_SERVER",
+    "TEZ_CLIENT",
+    "DATANODE",
+    "HDFS_CLIENT",
+    "ZOOKEEPER_SERVER",
+    "RESOURCEMANAGER",
+    "MAPREDUCE2_CLIENT",
+    "YARN_CLIENT",
+    "HISTORYSERVER",
+    "ZOOKEEPER_CLIENT",
+    "NAMENODE"
+  ],
+    "roleCommand": "INSTALL",
     "clusterName": "c1", 
     "hostname": "c6401.ambari.apache.org", 
     "hostLevelParams": {


[12/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/service_advisor.py
deleted file mode 100644
index 875fa30..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/service_advisor.py
+++ /dev/null
@@ -1,793 +0,0 @@
-#!/usr/bin/env ambari-python-wrap
-"""
-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.
-"""
-
-# Python imports
-import imp
-import os
-import traceback
-import re
-import socket
-import fnmatch
-
-
-from resource_management.core.logger import Logger
-
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/')
-PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
-
-try:
-  with open(PARENT_FILE, 'rb') as fp:
-    service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
-except Exception as e:
-  traceback.print_exc()
-  print "Failed to load parent"
-
-DB_TYPE_DEFAULT_PORT_MAP = {"MYSQL":"3306", "ORACLE":"1521", "POSTGRES":"5432", "MSSQL":"1433", "SQLA":"2638"}
-
-class RangerServiceAdvisor(service_advisor.ServiceAdvisor):
-
-  def __init__(self, *args, **kwargs):
-    self.as_super = super(RangerServiceAdvisor, self)
-    self.as_super.__init__(*args, **kwargs)
-
-    # Always call these methods
-    self.modifyMastersWithMultipleInstances()
-    self.modifyCardinalitiesDict()
-    self.modifyHeapSizeProperties()
-    self.modifyNotValuableComponents()
-    self.modifyComponentsNotPreferableOnServer()
-    self.modifyComponentLayoutSchemes()
-
-  def modifyMastersWithMultipleInstances(self):
-    """
-    Modify the set of masters with multiple instances.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def modifyCardinalitiesDict(self):
-    """
-    Modify the dictionary of cardinalities.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def modifyHeapSizeProperties(self):
-    """
-    Modify the dictionary of heap size properties.
-    Must be overriden in child class.
-    """
-    pass
-
-  def modifyNotValuableComponents(self):
-    """
-    Modify the set of components whose host assignment is based on other services.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def modifyComponentsNotPreferableOnServer(self):
-    """
-    Modify the set of components that are not preferable on the server.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def modifyComponentLayoutSchemes(self):
-    """
-    Modify layout scheme dictionaries for components.
-    The scheme dictionary basically maps the number of hosts to
-    host index where component should exist.
-    Must be overriden in child class.
-    """
-    # Nothing to do
-    pass
-
-  def getServiceComponentLayoutValidations(self, services, hosts):
-    """
-    Get a list of errors.
-    Must be overriden in child class.
-    """
-
-    return []
-
-  def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts):
-    """
-    Entry point.
-    Must be overriden in child class.
-    """
-    #Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
-    #            (self.__class__.__name__, inspect.stack()[0][3]))
-
-    recommender = RangerRecommender()
-    recommender.recommendRangerConfigurationsFromHDP206(configurations, clusterData, services, hosts)
-    recommender.recommendRangerConfigurationsFromHDP22(configurations, clusterData, services, hosts)
-    recommender.recommendRangerConfigurationsFromHDP23(configurations, clusterData, services, hosts)
-    recommender.recommendRangerConfigurationsFromHDP25(configurations, clusterData, services, hosts)
-    recommender.recommendRangerConfigurationsFromHDP26(configurations, clusterData, services, hosts)
-
-
-
-  def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
-    """
-    Entry point.
-    Validate configurations for the service. Return a list of errors.
-    The code for this function should be the same for each Service Advisor.
-    """
-    #Logger.info("Class: %s, Method: %s. Validating Configurations." %
-    #            (self.__class__.__name__, inspect.stack()[0][3]))
-
-    validator = RangerValidator()
-    # Calls the methods of the validator using arguments,
-    # method(siteProperties, siteRecommendations, configurations, services, hosts)
-    return validator.validateListOfConfigUsingMethod(configurations, recommendedDefaults, services, hosts, validator.validators)
-
-
-
-class RangerRecommender(service_advisor.ServiceAdvisor):
-  """
-  Ranger Recommender suggests properties when adding the service for the first time or modifying configs via the UI.
-  """
-
-  def __init__(self, *args, **kwargs):
-    self.as_super = super(RangerRecommender, self)
-    self.as_super.__init__(*args, **kwargs)
-
-  def recommendRangerConfigurationsFromHDP206(self, configurations, clusterData, services, hosts):
-
-    putRangerAdminProperty = self.putProperty(configurations, "admin-properties", services)
-
-    # Build policymgr_external_url
-    protocol = 'http'
-    ranger_admin_host = 'localhost'
-    port = '6080'
-
-    # Check if http is disabled. For HDP-2.3 this can be checked in ranger-admin-site/ranger.service.http.enabled
-    # For Ranger-0.4.0 this can be checked in ranger-site/http.enabled
-    if ('ranger-site' in services['configurations'] and 'http.enabled' in services['configurations']['ranger-site']['properties'] \
-          and services['configurations']['ranger-site']['properties']['http.enabled'].lower() == 'false') or \
-            ('ranger-admin-site' in services['configurations'] and 'ranger.service.http.enabled' in services['configurations']['ranger-admin-site']['properties'] \
-               and services['configurations']['ranger-admin-site']['properties']['ranger.service.http.enabled'].lower() == 'false'):
-      # HTTPS protocol is used
-      protocol = 'https'
-      # Starting Ranger-0.5.0.2.3 port stored in ranger-admin-site ranger.service.https.port
-      if 'ranger-admin-site' in services['configurations'] and \
-                      'ranger.service.https.port' in services['configurations']['ranger-admin-site']['properties']:
-        port = services['configurations']['ranger-admin-site']['properties']['ranger.service.https.port']
-      # In Ranger-0.4.0 port stored in ranger-site https.service.port
-      elif 'ranger-site' in services['configurations'] and \
-                      'https.service.port' in services['configurations']['ranger-site']['properties']:
-        port = services['configurations']['ranger-site']['properties']['https.service.port']
-    else:
-      # HTTP protocol is used
-      # Starting Ranger-0.5.0.2.3 port stored in ranger-admin-site ranger.service.http.port
-      if 'ranger-admin-site' in services['configurations'] and \
-                      'ranger.service.http.port' in services['configurations']['ranger-admin-site']['properties']:
-        port = services['configurations']['ranger-admin-site']['properties']['ranger.service.http.port']
-      # In Ranger-0.4.0 port stored in ranger-site http.service.port
-      elif 'ranger-site' in services['configurations'] and \
-                      'http.service.port' in services['configurations']['ranger-site']['properties']:
-        port = services['configurations']['ranger-site']['properties']['http.service.port']
-
-    ranger_admin_hosts = self.getComponentHostNames(services, "RANGER", "RANGER_ADMIN")
-    if ranger_admin_hosts:
-      if len(ranger_admin_hosts) > 1 \
-        and services['configurations'] \
-        and 'admin-properties' in services['configurations'] and 'policymgr_external_url' in services['configurations']['admin-properties']['properties'] \
-        and services['configurations']['admin-properties']['properties']['policymgr_external_url'] \
-        and services['configurations']['admin-properties']['properties']['policymgr_external_url'].strip():
-
-        # in case of HA deployment keep the policymgr_external_url specified in the config
-        policymgr_external_url = services['configurations']['admin-properties']['properties']['policymgr_external_url']
-      else:
-
-        ranger_admin_host = ranger_admin_hosts[0]
-        policymgr_external_url = "%s://%s:%s" % (protocol, ranger_admin_host, port)
-
-      putRangerAdminProperty('policymgr_external_url', policymgr_external_url)
-
-    rangerServiceVersion = [service['StackServices']['service_version'] for service in services["services"] if service['StackServices']['service_name'] == 'RANGER'][0]
-    if rangerServiceVersion == '0.4.0':
-      # Recommend ldap settings based on ambari.properties configuration
-      # If 'ambari.ldap.isConfigured' == true
-      # For Ranger version 0.4.0
-      if 'ambari-server-properties' in services and \
-                      'ambari.ldap.isConfigured' in services['ambari-server-properties'] and \
-                      services['ambari-server-properties']['ambari.ldap.isConfigured'].lower() == "true":
-        putUserSyncProperty = self.putProperty(configurations, "usersync-properties", services)
-        serverProperties = services['ambari-server-properties']
-        if 'authentication.ldap.managerDn' in serverProperties:
-          putUserSyncProperty('SYNC_LDAP_BIND_DN', serverProperties['authentication.ldap.managerDn'])
-        if 'authentication.ldap.primaryUrl' in serverProperties:
-          ldap_protocol =  'ldap://'
-          if 'authentication.ldap.useSSL' in serverProperties and serverProperties['authentication.ldap.useSSL'] == 'true':
-            ldap_protocol =  'ldaps://'
-          ldapUrl = ldap_protocol + serverProperties['authentication.ldap.primaryUrl'] if serverProperties['authentication.ldap.primaryUrl'] else serverProperties['authentication.ldap.primaryUrl']
-          putUserSyncProperty('SYNC_LDAP_URL', ldapUrl)
-        if 'authentication.ldap.userObjectClass' in serverProperties:
-          putUserSyncProperty('SYNC_LDAP_USER_OBJECT_CLASS', serverProperties['authentication.ldap.userObjectClass'])
-        if 'authentication.ldap.usernameAttribute' in serverProperties:
-          putUserSyncProperty('SYNC_LDAP_USER_NAME_ATTRIBUTE', serverProperties['authentication.ldap.usernameAttribute'])
-
-
-      # Set Ranger Admin Authentication method
-      if 'admin-properties' in services['configurations'] and 'usersync-properties' in services['configurations'] and \
-                      'SYNC_SOURCE' in services['configurations']['usersync-properties']['properties']:
-        rangerUserSyncSource = services['configurations']['usersync-properties']['properties']['SYNC_SOURCE']
-        authenticationMethod = rangerUserSyncSource.upper()
-        if authenticationMethod != 'FILE':
-          putRangerAdminProperty('authentication_method', authenticationMethod)
-
-      # Recommend xasecure.audit.destination.hdfs.dir
-      # For Ranger version 0.4.0
-      servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
-      putRangerEnvProperty = self.putProperty(configurations, "ranger-env", services)
-      include_hdfs = "HDFS" in servicesList
-      if include_hdfs:
-        if 'core-site' in services['configurations'] and ('fs.defaultFS' in services['configurations']['core-site']['properties']):
-          default_fs = services['configurations']['core-site']['properties']['fs.defaultFS']
-          default_fs += '/ranger/audit/%app-type%/%time:yyyyMMdd%'
-          putRangerEnvProperty('xasecure.audit.destination.hdfs.dir', default_fs)
-
-      # Recommend Ranger Audit properties for ranger supported services
-      # For Ranger version 0.4.0
-      ranger_services = [
-        {'service_name': 'HDFS', 'audit_file': 'ranger-hdfs-plugin-properties'},
-        {'service_name': 'HBASE', 'audit_file': 'ranger-hbase-plugin-properties'},
-        {'service_name': 'HIVE', 'audit_file': 'ranger-hive-plugin-properties'},
-        {'service_name': 'KNOX', 'audit_file': 'ranger-knox-plugin-properties'},
-        {'service_name': 'STORM', 'audit_file': 'ranger-storm-plugin-properties'}
-      ]
-
-      for item in range(len(ranger_services)):
-        if ranger_services[item]['service_name'] in servicesList:
-          component_audit_file =  ranger_services[item]['audit_file']
-          if component_audit_file in services["configurations"]:
-            ranger_audit_dict = [
-              {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.db', 'target_configname': 'XAAUDIT.DB.IS_ENABLED'},
-              {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.hdfs', 'target_configname': 'XAAUDIT.HDFS.IS_ENABLED'},
-              {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.hdfs.dir', 'target_configname': 'XAAUDIT.HDFS.DESTINATION_DIRECTORY'}
-            ]
-            putRangerAuditProperty = self.putProperty(configurations, component_audit_file, services)
-
-            for item in ranger_audit_dict:
-              if item['filename'] in services["configurations"] and item['configname'] in  services["configurations"][item['filename']]["properties"]:
-                if item['filename'] in configurations and item['configname'] in  configurations[item['filename']]["properties"]:
-                  rangerAuditProperty = configurations[item['filename']]["properties"][item['configname']]
-                else:
-                  rangerAuditProperty = services["configurations"][item['filename']]["properties"][item['configname']]
-                putRangerAuditProperty(item['target_configname'], rangerAuditProperty)
-
-
-
-
-  def recommendRangerConfigurationsFromHDP22(self, configurations, clusterData, services, hosts):
-    putRangerEnvProperty = self.putProperty(configurations, "ranger-env")
-    cluster_env = self.getServicesSiteProperties(services, "cluster-env")
-    security_enabled = cluster_env is not None and "security_enabled" in cluster_env and \
-                       cluster_env["security_enabled"].lower() == "true"
-    if "ranger-env" in configurations and not security_enabled:
-      putRangerEnvProperty("ranger-storm-plugin-enabled", "No")
-
-  def getDBConnectionHostPort(self, db_type, db_host):
-    connection_string = ""
-    if db_type is None or db_type == "":
-      return connection_string
-    else:
-      colon_count = db_host.count(':')
-      if colon_count == 0:
-        if DB_TYPE_DEFAULT_PORT_MAP.has_key(db_type):
-          connection_string = db_host + ":" + DB_TYPE_DEFAULT_PORT_MAP[db_type]
-        else:
-          connection_string = db_host
-      elif colon_count == 1:
-        connection_string = db_host
-      elif colon_count == 2:
-        connection_string = db_host
-
-    return connection_string
-
-
-  def getOracleDBConnectionHostPort(self, db_type, db_host, rangerDbName):
-    connection_string = self.getDBConnectionHostPort(db_type, db_host)
-    colon_count = db_host.count(':')
-    if colon_count == 1 and '/' in db_host:
-      connection_string = "//" + connection_string
-    elif colon_count == 0 or colon_count == 1:
-      connection_string = "//" + connection_string + "/" + rangerDbName if rangerDbName else "//" + connection_string
-
-    return connection_string
-
-  def recommendRangerUrlConfigurations(self, configurations, services, requiredServices):
-    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
-
-    policymgr_external_url = ""
-    if 'admin-properties' in services['configurations'] and 'policymgr_external_url' in services['configurations']['admin-properties']['properties']:
-      if 'admin-properties' in configurations and 'policymgr_external_url' in configurations['admin-properties']['properties']:
-        policymgr_external_url = configurations['admin-properties']['properties']['policymgr_external_url']
-      else:
-        policymgr_external_url = services['configurations']['admin-properties']['properties']['policymgr_external_url']
-
-    for index in range(len(requiredServices)):
-      if requiredServices[index]['service_name'] in servicesList:
-        component_config_type = requiredServices[index]['config_type']
-        component_name = requiredServices[index]['service_name']
-        component_config_property = 'ranger.plugin.{0}.policy.rest.url'.format(component_name.lower())
-        if requiredServices[index]['service_name'] == 'RANGER_KMS':
-          component_config_property = 'ranger.plugin.kms.policy.rest.url'
-        putRangerSecurityProperty = self.putProperty(configurations, component_config_type, services)
-        if component_config_type in services["configurations"] and component_config_property in services["configurations"][component_config_type]["properties"]:
-          putRangerSecurityProperty(component_config_property, policymgr_external_url)
-
-  def recommendRangerConfigurationsFromHDP23(self, configurations, clusterData, services, hosts):
-    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
-    putRangerAdminProperty = self.putProperty(configurations, "ranger-admin-site", services)
-    putRangerEnvProperty = self.putProperty(configurations, "ranger-env", services)
-    putRangerUgsyncSite = self.putProperty(configurations, "ranger-ugsync-site", services)
-
-    if 'admin-properties' in services['configurations'] and ('DB_FLAVOR' in services['configurations']['admin-properties']['properties'])\
-      and ('db_host' in services['configurations']['admin-properties']['properties']) and ('db_name' in services['configurations']['admin-properties']['properties']):
-
-      rangerDbFlavor = services['configurations']["admin-properties"]["properties"]["DB_FLAVOR"]
-      rangerDbHost =   services['configurations']["admin-properties"]["properties"]["db_host"]
-      rangerDbName =   services['configurations']["admin-properties"]["properties"]["db_name"]
-      ranger_db_url_dict = {
-        'MYSQL': {'ranger.jpa.jdbc.driver': 'com.mysql.jdbc.Driver',
-                  'ranger.jpa.jdbc.url': 'jdbc:mysql://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + '/' + rangerDbName},
-        'ORACLE': {'ranger.jpa.jdbc.driver': 'oracle.jdbc.driver.OracleDriver',
-                   'ranger.jpa.jdbc.url': 'jdbc:oracle:thin:@' + self.getOracleDBConnectionHostPort(rangerDbFlavor, rangerDbHost, rangerDbName)},
-        'POSTGRES': {'ranger.jpa.jdbc.driver': 'org.postgresql.Driver',
-                     'ranger.jpa.jdbc.url': 'jdbc:postgresql://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + '/' + rangerDbName},
-        'MSSQL': {'ranger.jpa.jdbc.driver': 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
-                  'ranger.jpa.jdbc.url': 'jdbc:sqlserver://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + ';databaseName=' + rangerDbName},
-        'SQLA': {'ranger.jpa.jdbc.driver': 'sap.jdbc4.sqlanywhere.IDriver',
-                 'ranger.jpa.jdbc.url': 'jdbc:sqlanywhere:host=' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + ';database=' + rangerDbName}
-      }
-      rangerDbProperties = ranger_db_url_dict.get(rangerDbFlavor, ranger_db_url_dict['MYSQL'])
-      for key in rangerDbProperties:
-        putRangerAdminProperty(key, rangerDbProperties.get(key))
-
-      if 'admin-properties' in services['configurations'] and ('DB_FLAVOR' in services['configurations']['admin-properties']['properties']) \
-        and ('db_host' in services['configurations']['admin-properties']['properties']):
-
-        rangerDbFlavor = services['configurations']["admin-properties"]["properties"]["DB_FLAVOR"]
-        rangerDbHost =   services['configurations']["admin-properties"]["properties"]["db_host"]
-        ranger_db_privelege_url_dict = {
-          'MYSQL': {'ranger_privelege_user_jdbc_url': 'jdbc:mysql://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost)},
-          'ORACLE': {'ranger_privelege_user_jdbc_url': 'jdbc:oracle:thin:@' + self.getOracleDBConnectionHostPort(rangerDbFlavor, rangerDbHost, None)},
-          'POSTGRES': {'ranger_privelege_user_jdbc_url': 'jdbc:postgresql://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + '/postgres'},
-          'MSSQL': {'ranger_privelege_user_jdbc_url': 'jdbc:sqlserver://' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + ';'},
-          'SQLA': {'ranger_privelege_user_jdbc_url': 'jdbc:sqlanywhere:host=' + self.getDBConnectionHostPort(rangerDbFlavor, rangerDbHost) + ';'}
-        }
-        rangerPrivelegeDbProperties = ranger_db_privelege_url_dict.get(rangerDbFlavor, ranger_db_privelege_url_dict['MYSQL'])
-        for key in rangerPrivelegeDbProperties:
-          putRangerEnvProperty(key, rangerPrivelegeDbProperties.get(key))
-
-    # Recommend ldap settings based on ambari.properties configuration
-    if 'ambari-server-properties' in services and \
-        'ambari.ldap.isConfigured' in services['ambari-server-properties'] and \
-        services['ambari-server-properties']['ambari.ldap.isConfigured'].lower() == "true":
-      serverProperties = services['ambari-server-properties']
-      if 'authentication.ldap.baseDn' in serverProperties:
-        putRangerUgsyncSite('ranger.usersync.ldap.searchBase', serverProperties['authentication.ldap.baseDn'])
-      if 'authentication.ldap.groupMembershipAttr' in serverProperties:
-        putRangerUgsyncSite('ranger.usersync.group.memberattributename', serverProperties['authentication.ldap.groupMembershipAttr'])
-      if 'authentication.ldap.groupNamingAttr' in serverProperties:
-        putRangerUgsyncSite('ranger.usersync.group.nameattribute', serverProperties['authentication.ldap.groupNamingAttr'])
-      if 'authentication.ldap.groupObjectClass' in serverProperties:
-        putRangerUgsyncSite('ranger.usersync.group.objectclass', serverProperties['authentication.ldap.groupObjectClass'])
-      if 'authentication.ldap.managerDn' in serverProperties:
-        putRangerUgsyncSite('ranger.usersync.ldap.binddn', serverProperties['authentication.ldap.managerDn'])
-      if 'authentication.ldap.primaryUrl' in serverProperties:
-        ldap_protocol =  'ldap://'
-        if 'authentication.ldap.useSSL' in serverProperties and serverProperties['authentication.ldap.useSSL'] == 'true':
-          ldap_protocol =  'ldaps://'
-        ldapUrl = ldap_protocol + serverProperties['authentication.ldap.primaryUrl'] if serverProperties['authentication.ldap.primaryUrl'] else serverProperties['authentication.ldap.primaryUrl']
-        putRangerUgsyncSite('ranger.usersync.ldap.url', ldapUrl)
-      if 'authentication.ldap.userObjectClass' in serverProperties:
-        putRangerUgsyncSite('ranger.usersync.ldap.user.objectclass', serverProperties['authentication.ldap.userObjectClass'])
-      if 'authentication.ldap.usernameAttribute' in serverProperties:
-        putRangerUgsyncSite('ranger.usersync.ldap.user.nameattribute', serverProperties['authentication.ldap.usernameAttribute'])
-
-
-    # Recommend Ranger Authentication method
-    authMap = {
-      'org.apache.ranger.unixusersync.process.UnixUserGroupBuilder': 'UNIX',
-      'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder': 'LDAP'
-    }
-
-    if 'ranger-ugsync-site' in services['configurations'] and 'ranger.usersync.source.impl.class' in services['configurations']["ranger-ugsync-site"]["properties"]:
-      rangerUserSyncClass = services['configurations']["ranger-ugsync-site"]["properties"]["ranger.usersync.source.impl.class"]
-      if rangerUserSyncClass in authMap:
-        rangerSqlConnectorProperty = authMap.get(rangerUserSyncClass)
-        putRangerAdminProperty('ranger.authentication.method', rangerSqlConnectorProperty)
-
-
-    if 'ranger-env' in services['configurations'] and 'is_solrCloud_enabled' in services['configurations']["ranger-env"]["properties"]:
-      isSolrCloudEnabled = services['configurations']["ranger-env"]["properties"]["is_solrCloud_enabled"]  == "true"
-    else:
-      isSolrCloudEnabled = False
-
-    if isSolrCloudEnabled:
-      zookeeper_host_port = self.getZKHostPortString(services)
-      ranger_audit_zk_port = ''
-      if zookeeper_host_port:
-        ranger_audit_zk_port = '{0}/{1}'.format(zookeeper_host_port, 'ranger_audits')
-        putRangerAdminProperty('ranger.audit.solr.zookeepers', ranger_audit_zk_port)
-    else:
-      putRangerAdminProperty('ranger.audit.solr.zookeepers', 'NONE')
-
-    # Recommend ranger.audit.solr.zookeepers and xasecure.audit.destination.hdfs.dir
-    include_hdfs = "HDFS" in servicesList
-    if include_hdfs:
-      if 'core-site' in services['configurations'] and ('fs.defaultFS' in services['configurations']['core-site']['properties']):
-        default_fs = services['configurations']['core-site']['properties']['fs.defaultFS']
-        putRangerEnvProperty('xasecure.audit.destination.hdfs.dir', '{0}/{1}/{2}'.format(default_fs,'ranger','audit'))
-
-    # Recommend Ranger supported service's audit properties
-    ranger_services = [
-      {'service_name': 'HDFS', 'audit_file': 'ranger-hdfs-audit'},
-      {'service_name': 'YARN', 'audit_file': 'ranger-yarn-audit'},
-      {'service_name': 'HBASE', 'audit_file': 'ranger-hbase-audit'},
-      {'service_name': 'HIVE', 'audit_file': 'ranger-hive-audit'},
-      {'service_name': 'KNOX', 'audit_file': 'ranger-knox-audit'},
-      {'service_name': 'KAFKA', 'audit_file': 'ranger-kafka-audit'},
-      {'service_name': 'STORM', 'audit_file': 'ranger-storm-audit'}
-    ]
-
-    for item in range(len(ranger_services)):
-      if ranger_services[item]['service_name'] in servicesList:
-        component_audit_file =  ranger_services[item]['audit_file']
-        if component_audit_file in services["configurations"]:
-          ranger_audit_dict = [
-            {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.db', 'target_configname': 'xasecure.audit.destination.db'},
-            {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.hdfs', 'target_configname': 'xasecure.audit.destination.hdfs'},
-            {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.hdfs.dir', 'target_configname': 'xasecure.audit.destination.hdfs.dir'},
-            {'filename': 'ranger-env', 'configname': 'xasecure.audit.destination.solr', 'target_configname': 'xasecure.audit.destination.solr'},
-            {'filename': 'ranger-admin-site', 'configname': 'ranger.audit.solr.urls', 'target_configname': 'xasecure.audit.destination.solr.urls'},
-            {'filename': 'ranger-admin-site', 'configname': 'ranger.audit.solr.zookeepers', 'target_configname': 'xasecure.audit.destination.solr.zookeepers'}
-          ]
-          putRangerAuditProperty = self.putProperty(configurations, component_audit_file, services)
-
-          for item in ranger_audit_dict:
-            if item['filename'] in services["configurations"] and item['configname'] in  services["configurations"][item['filename']]["properties"]:
-              if item['filename'] in configurations and item['configname'] in  configurations[item['filename']]["properties"]:
-                rangerAuditProperty = configurations[item['filename']]["properties"][item['configname']]
-              else:
-                rangerAuditProperty = services["configurations"][item['filename']]["properties"][item['configname']]
-              putRangerAuditProperty(item['target_configname'], rangerAuditProperty)
-
-    audit_solr_flag = 'false'
-    audit_db_flag = 'false'
-    ranger_audit_source_type = 'solr'
-    if 'ranger-env' in services['configurations'] and 'xasecure.audit.destination.solr' in services['configurations']["ranger-env"]["properties"]:
-      audit_solr_flag = services['configurations']["ranger-env"]["properties"]['xasecure.audit.destination.solr']
-    if 'ranger-env' in services['configurations'] and 'xasecure.audit.destination.db' in services['configurations']["ranger-env"]["properties"]:
-      audit_db_flag = services['configurations']["ranger-env"]["properties"]['xasecure.audit.destination.db']
-
-    if audit_db_flag == 'true' and audit_solr_flag == 'false':
-      ranger_audit_source_type = 'db'
-    putRangerAdminProperty('ranger.audit.source.type',ranger_audit_source_type)
-
-    knox_host = 'localhost'
-    knox_port = '8443'
-    if 'KNOX' in servicesList:
-      knox_hosts = self.getComponentHostNames(services, "KNOX", "KNOX_GATEWAY")
-      if len(knox_hosts) > 0:
-        knox_hosts.sort()
-        knox_host = knox_hosts[0]
-      if 'gateway-site' in services['configurations'] and 'gateway.port' in services['configurations']["gateway-site"]["properties"]:
-        knox_port = services['configurations']["gateway-site"]["properties"]['gateway.port']
-      putRangerAdminProperty('ranger.sso.providerurl', 'https://{0}:{1}/gateway/knoxsso/api/v1/websso'.format(knox_host, knox_port))
-
-    required_services = [
-      {'service_name': 'HDFS', 'config_type': 'ranger-hdfs-security'},
-      {'service_name': 'YARN', 'config_type': 'ranger-yarn-security'},
-      {'service_name': 'HBASE', 'config_type': 'ranger-hbase-security'},
-      {'service_name': 'HIVE', 'config_type': 'ranger-hive-security'},
-      {'service_name': 'KNOX', 'config_type': 'ranger-knox-security'},
-      {'service_name': 'KAFKA', 'config_type': 'ranger-kafka-security'},
-      {'service_name': 'RANGER_KMS','config_type': 'ranger-kms-security'},
-      {'service_name': 'STORM', 'config_type': 'ranger-storm-security'}
-    ]
-
-    # recommendation for ranger url for ranger-supported plugins
-    self.recommendRangerUrlConfigurations(configurations, services, required_services)
-
-
-  def recommendRangerConfigurationsFromHDP25(self, configurations, clusterData, services, hosts):
-    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
-    has_ranger_tagsync = False
-
-    putTagsyncAppProperty = self.putProperty(configurations, "tagsync-application-properties", services)
-    putTagsyncSiteProperty = self.putProperty(configurations, "ranger-tagsync-site", services)
-    putRangerAdminProperty = self.putProperty(configurations, "ranger-admin-site", services)
-    putRangerEnvProperty = self.putProperty(configurations, "ranger-env", services)
-
-    application_properties = self.getServicesSiteProperties(services, "application-properties")
-
-    ranger_tagsync_host = self.getHostsForComponent(services, "RANGER", "RANGER_TAGSYNC")
-    has_ranger_tagsync = len(ranger_tagsync_host) > 0
-
-    if 'ATLAS' in servicesList and has_ranger_tagsync:
-      atlas_hosts = self.getHostNamesWithComponent("ATLAS", "ATLAS_SERVER", services)
-      atlas_host = 'localhost' if len(atlas_hosts) == 0 else atlas_hosts[0]
-      protocol = 'http'
-      atlas_port = '21000'
-
-      if application_properties and 'atlas.enableTLS' in application_properties and application_properties['atlas.enableTLS'].lower() == 'true':
-        protocol = 'https'
-        if 'atlas.server.https.port' in application_properties:
-          atlas_port = application_properties['atlas.server.https.port']
-      else:
-        protocol = 'http'
-        if application_properties and 'atlas.server.http.port' in application_properties:
-          atlas_port = application_properties['atlas.server.http.port']
-
-      atlas_rest_endpoint = '{0}://{1}:{2}'.format(protocol, atlas_host, atlas_port)
-
-      putTagsyncSiteProperty('ranger.tagsync.source.atlas', 'true')
-      putTagsyncSiteProperty('ranger.tagsync.source.atlasrest.endpoint', atlas_rest_endpoint)
-
-    zookeeper_host_port = self.getZKHostPortString(services)
-    if zookeeper_host_port and has_ranger_tagsync:
-      putTagsyncAppProperty('atlas.kafka.zookeeper.connect', zookeeper_host_port)
-
-    if 'KAFKA' in servicesList and has_ranger_tagsync:
-      kafka_hosts = self.getHostNamesWithComponent("KAFKA", "KAFKA_BROKER", services)
-      kafka_port = '6667'
-      if 'kafka-broker' in services['configurations'] and (
-          'port' in services['configurations']['kafka-broker']['properties']):
-        kafka_port = services['configurations']['kafka-broker']['properties']['port']
-      kafka_host_port = []
-      for i in range(len(kafka_hosts)):
-        kafka_host_port.append(kafka_hosts[i] + ':' + kafka_port)
-
-      final_kafka_host = ",".join(kafka_host_port)
-      putTagsyncAppProperty('atlas.kafka.bootstrap.servers', final_kafka_host)
-
-    is_solr_cloud_enabled = False
-    if 'ranger-env' in services['configurations'] and 'is_solrCloud_enabled' in services['configurations']['ranger-env']['properties']:
-      is_solr_cloud_enabled = services['configurations']['ranger-env']['properties']['is_solrCloud_enabled']  == 'true'
-
-    is_external_solr_cloud_enabled = False
-    if 'ranger-env' in services['configurations'] and 'is_external_solrCloud_enabled' in services['configurations']['ranger-env']['properties']:
-      is_external_solr_cloud_enabled = services['configurations']['ranger-env']['properties']['is_external_solrCloud_enabled']  == 'true'
-
-    ranger_audit_zk_port = ''
-
-    if 'AMBARI_INFRA' in servicesList and zookeeper_host_port and is_solr_cloud_enabled and not is_external_solr_cloud_enabled:
-      zookeeper_host_port = zookeeper_host_port.split(',')
-      zookeeper_host_port.sort()
-      zookeeper_host_port = ",".join(zookeeper_host_port)
-      infra_solr_znode = '/infra-solr'
-
-      if 'infra-solr-env' in services['configurations'] and \
-        ('infra_solr_znode' in services['configurations']['infra-solr-env']['properties']):
-        infra_solr_znode = services['configurations']['infra-solr-env']['properties']['infra_solr_znode']
-        ranger_audit_zk_port = '{0}{1}'.format(zookeeper_host_port, infra_solr_znode)
-      putRangerAdminProperty('ranger.audit.solr.zookeepers', ranger_audit_zk_port)
-    elif zookeeper_host_port and is_solr_cloud_enabled and is_external_solr_cloud_enabled:
-      ranger_audit_zk_port = '{0}/{1}'.format(zookeeper_host_port, 'ranger_audits')
-      putRangerAdminProperty('ranger.audit.solr.zookeepers', ranger_audit_zk_port)
-    else:
-      putRangerAdminProperty('ranger.audit.solr.zookeepers', 'NONE')
-
-    ranger_services = [
-      {'service_name': 'HDFS', 'audit_file': 'ranger-hdfs-audit'},
-      {'service_name': 'YARN', 'audit_file': 'ranger-yarn-audit'},
-      {'service_name': 'HBASE', 'audit_file': 'ranger-hbase-audit'},
-      {'service_name': 'HIVE', 'audit_file': 'ranger-hive-audit'},
-      {'service_name': 'KNOX', 'audit_file': 'ranger-knox-audit'},
-      {'service_name': 'KAFKA', 'audit_file': 'ranger-kafka-audit'},
-      {'service_name': 'STORM', 'audit_file': 'ranger-storm-audit'},
-      {'service_name': 'RANGER_KMS', 'audit_file': 'ranger-kms-audit'},
-      {'service_name': 'ATLAS', 'audit_file': 'ranger-atlas-audit'}
-    ]
-
-    for item in range(len(ranger_services)):
-      if ranger_services[item]['service_name'] in servicesList:
-        component_audit_file =  ranger_services[item]['audit_file']
-        if component_audit_file in services["configurations"]:
-          ranger_audit_dict = [
-            {'filename': 'ranger-admin-site', 'configname': 'ranger.audit.solr.urls', 'target_configname': 'xasecure.audit.destination.solr.urls'},
-            {'filename': 'ranger-admin-site', 'configname': 'ranger.audit.solr.zookeepers', 'target_configname': 'xasecure.audit.destination.solr.zookeepers'}
-          ]
-          putRangerAuditProperty = self.putProperty(configurations, component_audit_file, services)
-
-          for item in ranger_audit_dict:
-            if item['filename'] in services["configurations"] and item['configname'] in  services["configurations"][item['filename']]["properties"]:
-              if item['filename'] in configurations and item['configname'] in  configurations[item['filename']]["properties"]:
-                rangerAuditProperty = configurations[item['filename']]["properties"][item['configname']]
-              else:
-                rangerAuditProperty = services["configurations"][item['filename']]["properties"][item['configname']]
-              putRangerAuditProperty(item['target_configname'], rangerAuditProperty)
-
-    if "HDFS" in servicesList:
-      hdfs_user = None
-      if "hadoop-env" in services["configurations"] and "hdfs_user" in services["configurations"]["hadoop-env"]["properties"]:
-        hdfs_user = services["configurations"]["hadoop-env"]["properties"]["hdfs_user"]
-        putRangerAdminProperty('ranger.kms.service.user.hdfs', hdfs_user)
-
-    if "HIVE" in servicesList:
-      hive_user = None
-      if "hive-env" in services["configurations"] and "hive_user" in services["configurations"]["hive-env"]["properties"]:
-        hive_user = services["configurations"]["hive-env"]["properties"]["hive_user"]
-        putRangerAdminProperty('ranger.kms.service.user.hive', hive_user)
-
-    ranger_plugins_serviceuser = [
-      {'service_name': 'HDFS', 'file_name': 'hadoop-env', 'config_name': 'hdfs_user', 'target_configname': 'ranger.plugins.hdfs.serviceuser'},
-      {'service_name': 'HIVE', 'file_name': 'hive-env', 'config_name': 'hive_user', 'target_configname': 'ranger.plugins.hive.serviceuser'},
-      {'service_name': 'YARN', 'file_name': 'yarn-env', 'config_name': 'yarn_user', 'target_configname': 'ranger.plugins.yarn.serviceuser'},
-      {'service_name': 'HBASE', 'file_name': 'hbase-env', 'config_name': 'hbase_user', 'target_configname': 'ranger.plugins.hbase.serviceuser'},
-      {'service_name': 'KNOX', 'file_name': 'knox-env', 'config_name': 'knox_user', 'target_configname': 'ranger.plugins.knox.serviceuser'},
-      {'service_name': 'STORM', 'file_name': 'storm-env', 'config_name': 'storm_user', 'target_configname': 'ranger.plugins.storm.serviceuser'},
-      {'service_name': 'KAFKA', 'file_name': 'kafka-env', 'config_name': 'kafka_user', 'target_configname': 'ranger.plugins.kafka.serviceuser'},
-      {'service_name': 'RANGER_KMS', 'file_name': 'kms-env', 'config_name': 'kms_user', 'target_configname': 'ranger.plugins.kms.serviceuser'},
-      {'service_name': 'ATLAS', 'file_name': 'atlas-env', 'config_name': 'metadata_user', 'target_configname': 'ranger.plugins.atlas.serviceuser'}
-    ]
-
-    for item in range(len(ranger_plugins_serviceuser)):
-      if ranger_plugins_serviceuser[item]['service_name'] in servicesList:
-        file_name = ranger_plugins_serviceuser[item]['file_name']
-        config_name = ranger_plugins_serviceuser[item]['config_name']
-        target_configname = ranger_plugins_serviceuser[item]['target_configname']
-        if file_name in services["configurations"] and config_name in services["configurations"][file_name]["properties"]:
-          service_user = services["configurations"][file_name]["properties"][config_name]
-          putRangerAdminProperty(target_configname, service_user)
-
-    if "ATLAS" in servicesList:
-      if "ranger-env" in services["configurations"]:
-        putAtlasRangerAuditProperty = self.putProperty(configurations, 'ranger-atlas-audit', services)
-        xasecure_audit_destination_hdfs = ''
-        xasecure_audit_destination_hdfs_dir = ''
-        xasecure_audit_destination_solr = ''
-        if 'xasecure.audit.destination.hdfs' in configurations['ranger-env']['properties']:
-          xasecure_audit_destination_hdfs = configurations['ranger-env']['properties']['xasecure.audit.destination.hdfs']
-        else:
-          xasecure_audit_destination_hdfs = services['configurations']['ranger-env']['properties']['xasecure.audit.destination.hdfs']
-
-        if 'core-site' in services['configurations'] and ('fs.defaultFS' in services['configurations']['core-site']['properties']):
-          xasecure_audit_destination_hdfs_dir = '{0}/{1}/{2}'.format(services['configurations']['core-site']['properties']['fs.defaultFS'] ,'ranger','audit')
-
-        if 'xasecure.audit.destination.solr' in configurations['ranger-env']['properties']:
-          xasecure_audit_destination_solr = configurations['ranger-env']['properties']['xasecure.audit.destination.solr']
-        else:
-          xasecure_audit_destination_solr = services['configurations']['ranger-env']['properties']['xasecure.audit.destination.solr']
-
-        putAtlasRangerAuditProperty('xasecure.audit.destination.hdfs',xasecure_audit_destination_hdfs)
-        putAtlasRangerAuditProperty('xasecure.audit.destination.hdfs.dir',xasecure_audit_destination_hdfs_dir)
-        putAtlasRangerAuditProperty('xasecure.audit.destination.solr',xasecure_audit_destination_solr)
-    required_services = [
-      {'service_name': 'ATLAS', 'config_type': 'ranger-atlas-security'}
-    ]
-
-    # recommendation for ranger url for ranger-supported plugins
-    self.recommendRangerUrlConfigurations(configurations, services, required_services)
-
-
-  def recommendRangerConfigurationsFromHDP26(self, configurations, clusterData, services, hosts):
-
-    putRangerUgsyncSite = self.putProperty(configurations, 'ranger-ugsync-site', services)
-
-    delta_sync_enabled = False
-    if 'ranger-ugsync-site' in services['configurations'] and 'ranger.usersync.ldap.deltasync' in services['configurations']['ranger-ugsync-site']['properties']:
-      delta_sync_enabled = services['configurations']['ranger-ugsync-site']['properties']['ranger.usersync.ldap.deltasync'] == "true"
-
-    if delta_sync_enabled:
-      putRangerUgsyncSite("ranger.usersync.group.searchenabled", "true")
-    else:
-      putRangerUgsyncSite("ranger.usersync.group.searchenabled", "false")
-
-
-
-
-
-class RangerValidator(service_advisor.ServiceAdvisor):
-  """
-  Ranger Validator checks the correctness of properties whenever the service is first added or the user attempts to
-  change configs via the UI.
-  """
-
-  def __init__(self, *args, **kwargs):
-    self.as_super = super(RangerValidator, self)
-    self.as_super.__init__(*args, **kwargs)
-
-    self.validators = [("ranger-env", self.validateRangerConfigurationsEnvFromHDP22),
-                       ("admin-properties", self.validateRangerAdminConfigurationsFromHDP23),
-                       ("ranger-env", self.validateRangerConfigurationsEnvFromHDP23),
-                       ("ranger-tagsync-site", self.validateRangerTagsyncConfigurationsFromHDP25),
-                       ("ranger-ugsync-site", self.validateRangerUsersyncConfigurationsFromHDP26)]
-
-
-
-  def validateRangerConfigurationsEnvFromHDP22(self, properties, recommendedDefaults, configurations, services, hosts):
-    ranger_env_properties = properties
-    validationItems = []
-    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
-    if "ranger-storm-plugin-enabled" in ranger_env_properties and ranger_env_properties['ranger-storm-plugin-enabled'].lower() == 'yes' and not 'KERBEROS' in servicesList:
-      validationItems.append({"config-name": "ranger-storm-plugin-enabled",
-                              "item": self.getWarnItem("Ranger Storm plugin should not be enabled in non-kerberos environment.")})
-    return self.toConfigurationValidationProblems(validationItems, "ranger-env")
-
-  def validateRangerAdminConfigurationsFromHDP23(self, properties, recommendedDefaults, configurations, services, hosts):
-    ranger_site = properties
-    validationItems = []
-    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
-    if 'RANGER' in servicesList and 'policymgr_external_url' in ranger_site:
-      policymgr_mgr_url = ranger_site['policymgr_external_url']
-      if policymgr_mgr_url.endswith('/'):
-        validationItems.append({'config-name':'policymgr_external_url',
-                                'item':self.getWarnItem('Ranger External URL should not contain trailing slash "/"')})
-    return self.toConfigurationValidationProblems(validationItems,'admin-properties')
-
-
-  def validateRangerConfigurationsEnvFromHDP23(self, properties, recommendedDefaults, configurations, services, hosts):
-    ranger_env_properties = properties
-    validationItems = []
-    security_enabled = self.isSecurityEnabled(services)
-
-    if "ranger-kafka-plugin-enabled" in ranger_env_properties and ranger_env_properties["ranger-kafka-plugin-enabled"].lower() == 'yes' and not security_enabled:
-      validationItems.append({"config-name": "ranger-kafka-plugin-enabled",
-                              "item": self.getWarnItem(
-                                "Ranger Kafka plugin should not be enabled in non-kerberos environment.")})
-
-    validationProblems = self.toConfigurationValidationProblems(validationItems, "ranger-env")
-    return validationProblems
-
-
-  def validateRangerTagsyncConfigurationsFromHDP25(self, properties, recommendedDefaults, configurations, services, hosts):
-    ranger_tagsync_properties = properties
-    validationItems = []
-    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
-
-    has_atlas = False
-    if "RANGER" in servicesList:
-      has_atlas = not "ATLAS" in servicesList
-
-      if has_atlas and 'ranger.tagsync.source.atlas' in ranger_tagsync_properties and \
-                      ranger_tagsync_properties['ranger.tagsync.source.atlas'].lower() == 'true':
-        validationItems.append({"config-name": "ranger.tagsync.source.atlas",
-                                "item": self.getWarnItem(
-                                  "Need to Install ATLAS service to set ranger.tagsync.source.atlas as true.")})
-
-    return self.toConfigurationValidationProblems(validationItems, "ranger-tagsync-site")
-
-  def validateRangerUsersyncConfigurationsFromHDP26(self, properties, recommendedDefaults, configurations, services, hosts):
-    ranger_usersync_properties = properties
-    validationItems = []
-
-    delta_sync_enabled = 'ranger.usersync.ldap.deltasync' in ranger_usersync_properties \
-      and ranger_usersync_properties['ranger.usersync.ldap.deltasync'].lower() == 'true'
-    group_sync_enabled = 'ranger.usersync.group.searchenabled' in ranger_usersync_properties \
-      and ranger_usersync_properties['ranger.usersync.group.searchenabled'].lower() == 'true'
-    usersync_source_ldap_enabled = 'ranger.usersync.source.impl.class' in ranger_usersync_properties \
-      and ranger_usersync_properties['ranger.usersync.source.impl.class'] == 'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder'
-
-    if usersync_source_ldap_enabled and delta_sync_enabled and not group_sync_enabled:
-      validationItems.append({"config-name": "ranger.usersync.group.searchenabled",
-                            "item": self.getWarnItem(
-                            "Need to set ranger.usersync.group.searchenabled as true, as ranger.usersync.ldap.deltasync is enabled")})
-
-    return self.toConfigurationValidationProblems(validationItems, "ranger-ugsync-site")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_1.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_1.json b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_1.json
deleted file mode 100644
index e6724cd..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_1.json
+++ /dev/null
@@ -1,722 +0,0 @@
-{
-  "name": "default",
-  "description": "Default theme for Ranger service",
-  "configuration": {
-    "layouts": [
-      {
-        "name": "default",
-        "tabs": [
-          {
-            "name": "ranger_admin_settings",
-            "display-name": "Ranger Admin",
-            "layout": {
-              "tab-columns": "2",
-              "tab-rows": "2",
-              "sections": [
-                {
-                  "name": "section-ranger-admin",
-                  "display-name": "Ranger Admin",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "3",
-                  "column-span": "2",
-                  "section-columns": "2",
-                  "section-rows": "3",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-db-row1-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-ranger-db-row1-col2",
-                      "row-index": "0",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-ranger-db-root-user-col1",
-                      "row-index": "1",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-ranger-db-root-user-col2",
-                      "row-index": "1",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                }
-              ]
-            }
-          },
-          {
-            "name": "ranger_user_info",
-            "display-name": "Ranger User Info",
-            "layout": {
-              "tab-columns": "1",
-              "tab-rows": "1",
-              "sections": [
-                {
-                  "name": "section-user-info",
-                  "display-name": "Ranger User Info",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "2",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "2",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-user-row2-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1",
-                      "subsection-tabs": [
-                        {
-                          "name": "ldap-common-configs",
-                          "display-name": "Common Configs",
-                          "depends-on": [
-                            {
-                              "configs": [
-                                "usersync-properties/SYNC_SOURCE"
-                              ],
-                              "if": "${usersync-properties/SYNC_SOURCE} === ldap",
-                              "then": {
-                                "property_value_attributes": {
-                                  "visible": true
-                                }
-                              },
-                              "else": {
-                                "property_value_attributes": {
-                                  "visible": false
-                                }
-                              }
-                            }
-                          ]
-                        },
-                        {
-                          "name": "ldap-user-configs",
-                          "display-name": "User Configs",
-                          "depends-on": [
-                            {
-                              "configs": [
-                                "usersync-properties/SYNC_SOURCE"
-                              ],
-                              "if": "${usersync-properties/SYNC_SOURCE} === ldap",
-                              "then": {
-                                "property_value_attributes": {
-                                  "visible": true
-                                }
-                              },
-                              "else": {
-                                "property_value_attributes": {
-                                  "visible": false
-                                }
-                              }
-                            }
-                          ]
-                        }
-                      ]
-                    }
-                  ]
-                }
-              ]
-            }
-          },
-          {
-            "name": "ranger_plugin",
-            "display-name": "Ranger Plugin",
-            "layout": {
-              "tab-columns": "1",
-              "tab-rows": "1",
-              "sections": [
-                {
-                  "name": "section-ranger-plugin",
-                  "display-name": "Ranger Plugin",
-                  "row-index": "0",
-                  "column-index": "0",
-                  "row-span": "1",
-                  "column-span": "3",
-                  "section-columns": "3",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "section-ranger-plugin-row1-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "section-ranger-plugin-row1-col2",
-                      "row-index": "0",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "section-ranger-plugin-row1-col3",
-                      "row-index": "0",
-                      "column-index": "2",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                }
-              ]
-            }
-          },
-          {
-            "name": "ranger_audit_settings",
-            "display-name": "Ranger Audit",
-            "layout": {
-              "tab-columns": "1",
-              "tab-rows": "2",
-              "sections": [
-                {
-                  "name": "section-ranger-audit-hdfs",
-                  "display-name": "Audit to HDFS",
-                  "row-index": "0",
-                  "column-index": "1",
-                  "row-span": "1",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-hdfs-row1-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                },
-                {
-                  "name": "section-ranger-audit-db",
-                  "display-name": "Audit to DB",
-                  "row-index": "1",
-                  "column-index": "0",
-                  "row-span": "1",
-                  "column-span": "1",
-                  "section-columns": "1",
-                  "section-rows": "1",
-                  "subsections": [
-                    {
-                      "name": "subsection-ranger-audit-db-row2-col1",
-                      "row-index": "0",
-                      "column-index": "0",
-                      "row-span": "1",
-                      "column-span": "1"
-                    },
-                    {
-                      "name": "subsection-ranger-audit-db-row2-col2",
-                      "row-index": "0",
-                      "column-index": "1",
-                      "row-span": "1",
-                      "column-span": "1"
-                    }
-                  ]
-                }
-              ]
-            }
-          }
-        ]
-      }
-    ],
-    "placement": {
-      "configuration-layout": "default",
-      "configs": [
-        {
-          "config": "admin-properties/DB_FLAVOR",
-          "subsection-name": "subsection-ranger-db-row1-col1"
-        },
-        {
-          "config": "admin-properties/db_name",
-          "subsection-name": "subsection-ranger-db-row1-col1"
-        },
-        {
-          "config": "admin-properties/db_user",
-          "subsection-name": "subsection-ranger-db-row1-col1"
-        },
-        {
-          "config": "ranger-admin-site/ranger.jpa.jdbc.url",
-          "subsection-name": "subsection-ranger-db-row1-col1"
-        },
-        {
-          "config": "admin-properties/db_host",
-          "subsection-name": "subsection-ranger-db-row1-col2"
-        },
-        {
-          "config": "ranger-admin-site/ranger.jpa.jdbc.driver",
-          "subsection-name": "subsection-ranger-db-row1-col2"
-        },
-        {
-          "config": "admin-properties/db_password",
-          "subsection-name": "subsection-ranger-db-row1-col2"
-        },
-        {
-          "config": "admin-properties/db_root_user",
-          "subsection-name": "subsection-ranger-db-root-user-col1"
-        },
-        {
-          "config": "admin-properties/db_root_password",
-          "subsection-name": "subsection-ranger-db-root-user-col2"
-        },
-        {
-          "config": "usersync-properties/SYNC_SOURCE",
-          "subsection-name": "subsection-ranger-user-row2-col1"
-        },
-
-        {
-          "config": "usersync-properties/MIN_UNIX_USER_ID_TO_SYNC",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "usersync-properties/SYNC_SOURCE"
-              ],
-              "if": "${usersync-properties/SYNC_SOURCE} === unix",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "usersync-properties/SYNC_LDAP_URL",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-common-configs"
-        },
-        {
-          "config": "ranger-env/bind_anonymous",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-common-configs"
-        },
-        {
-          "config": "usersync-properties/SYNC_LDAP_BIND_DN",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-common-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/bind_anonymous"
-              ],
-              "if": "${ranger-env/bind_anonymous}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              }
-            }
-          ]
-
-        },
-        {
-          "config": "usersync-properties/SYNC_LDAP_BIND_PASSWORD",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-common-configs",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/bind_anonymous"
-              ],
-              "if": "${ranger-env/bind_anonymous}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "usersync-properties/SYNC_LDAP_USER_NAME_ATTRIBUTE",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "usersync-properties/SYNC_LDAP_USER_OBJECT_CLASS",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "usersync-properties/SYNC_LDAP_USER_SEARCH_BASE",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "usersync-properties/SYNC_LDAP_USER_SEARCH_FILTER",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "usersync-properties/SYNC_LDAP_USER_SEARCH_SCOPE",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "usersync-properties/SYNC_LDAP_USER_GROUP_NAME_ATTRIBUTE",
-          "subsection-name": "subsection-ranger-user-row2-col1",
-          "subsection-tab-name": "ldap-user-configs"
-        },
-        {
-          "config": "ranger-env/ranger-hdfs-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col1",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "HDFS",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-hive-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col1",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "HIVE",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-hbase-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col2",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "HBASE",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-storm-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col2",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "STORM",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/ranger-knox-plugin-enabled",
-          "subsection-name": "section-ranger-plugin-row1-col3",
-          "depends-on": [
-            {
-              "resource": "service",
-              "if": "KNOX",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.hdfs",
-          "subsection-name": "subsection-ranger-hdfs-row1-col1"
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.hdfs.dir",
-          "subsection-name": "subsection-ranger-hdfs-row1-col1",
-          "depends-on": [
-            {
-              "configs":[
-                "ranger-env/xasecure.audit.destination.hdfs"
-              ],
-              "if": "${ranger-env/xasecure.audit.destination.hdfs}",
-              "then": {
-                "property_value_attributes": {
-                  "visible": true
-                }
-              },
-              "else": {
-                "property_value_attributes": {
-                  "visible": false
-                }
-              }
-            }
-          ]
-        },
-        {
-          "config": "ranger-env/xasecure.audit.destination.db",
-          "subsection-name": "subsection-ranger-audit-db-row2-col1"
-        },
-        {
-          "config": "admin-properties/audit_db_user",
-          "subsection-name": "subsection-ranger-audit-db-row2-col1"
-        },
-        {
-          "config": "admin-properties/audit_db_name",
-          "subsection-name": "subsection-ranger-audit-db-row2-col2"
-        },
-        {
-          "config": "admin-properties/audit_db_password",
-          "subsection-name": "subsection-ranger-audit-db-row2-col2"
-        }
-      ]
-    },
-    "widgets": [
-      {
-        "config": "admin-properties/DB_FLAVOR",
-        "widget": {
-          "type": "combo"
-        }
-      },
-      {
-        "config": "admin-properties/db_user",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/db_name",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-admin-site/ranger.jpa.jdbc.url",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/db_host",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/db_password",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "admin-properties/db_root_user",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/db_root_password",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_SOURCE",
-        "widget": {
-          "type": "combo"
-        }
-      },
-      {
-        "config": "usersync-properties/MIN_UNIX_USER_ID_TO_SYNC",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_LDAP_URL",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-env/bind_anonymous",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_LDAP_BIND_DN",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_LDAP_BIND_PASSWORD",
-        "widget": {
-          "type": "password"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_LDAP_USER_NAME_ATTRIBUTE",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_LDAP_USER_OBJECT_CLASS",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_LDAP_USER_SEARCH_BASE",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_LDAP_USER_SEARCH_FILTER",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_LDAP_USER_SEARCH_SCOPE",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "usersync-properties/SYNC_LDAP_USER_GROUP_NAME_ATTRIBUTE",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-hdfs-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-hive-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-hbase-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-knox-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/ranger-storm-plugin-enabled",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.hdfs",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.hdfs.dir",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "ranger-env/xasecure.audit.destination.db",
-        "widget": {
-          "type": "toggle"
-        }
-      },
-      {
-        "config": "admin-properties/audit_db_user",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/audit_db_name",
-        "widget": {
-          "type": "text-field"
-        }
-      },
-      {
-        "config": "admin-properties/audit_db_password",
-        "widget": {
-          "type": "password"
-        }
-      }
-    ]
-  }
-}
-


[36/52] [abbrv] ambari git commit: AMBARI-21430 - Allow Multiple Versions of Stack Tools to Co-Exist (jonathanhurley)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/f33a250c/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-secured.json b/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-secured.json
index 4e7d857..bcadd03 100644
--- a/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-secured.json
+++ b/ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-secured.json
@@ -1,873 +1,873 @@
 {
     "localComponents": [
-        "SECONDARY_NAMENODE", 
-        "HDFS_CLIENT", 
-        "DATANODE", 
-        "NAMENODE", 
-        "RANGER_ADMIN", 
-        "RANGER_TAGSYNC", 
-        "RANGER_USERSYNC", 
-        "ZOOKEEPER_SERVER", 
-        "ZOOKEEPER_CLIENT", 
-        "KERBEROS_CLIENT", 
+        "SECONDARY_NAMENODE",
+        "HDFS_CLIENT",
+        "DATANODE",
+        "NAMENODE",
+        "RANGER_ADMIN",
+        "RANGER_TAGSYNC",
+        "RANGER_USERSYNC",
+        "ZOOKEEPER_SERVER",
+        "ZOOKEEPER_CLIENT",
+        "KERBEROS_CLIENT",
         "RANGER_KMS_SERVER"
-    ], 
+    ],
     "configuration_attributes": {
-        "ranger-kms-site": {}, 
-        "ranger-hdfs-audit": {}, 
-        "ssl-client": {}, 
-        "ranger-admin-site": {}, 
-        "kms-log4j": {}, 
-        "ranger-hdfs-policymgr-ssl": {}, 
-        "tagsync-application-properties": {}, 
-        "ranger-env": {}, 
-        "ranger-ugsync-site": {}, 
-        "ranger-hdfs-plugin-properties": {}, 
-        "ranger-kms-security": {}, 
-        "kerberos-env": {}, 
-        "kms-properties": {}, 
-        "admin-properties": {}, 
-        "ranger-kms-policymgr-ssl": {}, 
+        "ranger-kms-site": {},
+        "ranger-hdfs-audit": {},
+        "ssl-client": {},
+        "ranger-admin-site": {},
+        "kms-log4j": {},
+        "ranger-hdfs-policymgr-ssl": {},
+        "tagsync-application-properties": {},
+        "ranger-env": {},
+        "ranger-ugsync-site": {},
+        "ranger-hdfs-plugin-properties": {},
+        "ranger-kms-security": {},
+        "kerberos-env": {},
+        "kms-properties": {},
+        "admin-properties": {},
+        "ranger-kms-policymgr-ssl": {},
         "hdfs-site": {
             "final": {
-                "dfs.datanode.data.dir": "true", 
-                "dfs.namenode.http-address": "true", 
-                "dfs.datanode.failed.volumes.tolerated": "true", 
-                "dfs.support.append": "true", 
-                "dfs.namenode.name.dir": "true", 
+                "dfs.datanode.data.dir": "true",
+                "dfs.namenode.http-address": "true",
+                "dfs.datanode.failed.volumes.tolerated": "true",
+                "dfs.support.append": "true",
+                "dfs.namenode.name.dir": "true",
                 "dfs.webhdfs.enabled": "true"
             }
-        }, 
-        "ranger-tagsync-site": {}, 
-        "tagsync-log4j": {}, 
-        "ranger-kms-audit": {}, 
-        "hadoop-policy": {}, 
-        "hdfs-log4j": {}, 
-        "usersync-log4j": {}, 
-        "krb5-conf": {}, 
-        "kms-site": {}, 
+        },
+        "ranger-tagsync-site": {},
+        "tagsync-log4j": {},
+        "ranger-kms-audit": {},
+        "hadoop-policy": {},
+        "hdfs-log4j": {},
+        "usersync-log4j": {},
+        "krb5-conf": {},
+        "kms-site": {},
         "core-site": {
             "final": {
                 "fs.defaultFS": "true"
             }
-        }, 
-        "hadoop-env": {}, 
-        "zookeeper-log4j": {}, 
-        "ssl-server": {}, 
-        "ranger-site": {}, 
-        "zookeeper-env": {}, 
-        "admin-log4j": {}, 
-        "zoo.cfg": {}, 
-        "ranger-hdfs-security": {}, 
-        "usersync-properties": {}, 
-        "kms-env": {}, 
-        "dbks-site": {}, 
+        },
+        "hadoop-env": {},
+        "zookeeper-log4j": {},
+        "ssl-server": {},
+        "ranger-site": {},
+        "zookeeper-env": {},
+        "admin-log4j": {},
+        "zoo.cfg": {},
+        "ranger-hdfs-security": {},
+        "usersync-properties": {},
+        "kms-env": {},
+        "dbks-site": {},
         "cluster-env": {}
-    }, 
-    "public_hostname": "c6401.ambari.apache.org", 
-    "commandId": "43-0", 
-    "hostname": "c6401.ambari.apache.org", 
-    "kerberosCommandParams": [], 
-    "serviceName": "RANGER_KMS", 
-    "role": "RANGER_KMS_SERVER", 
-    "forceRefreshConfigTagsBeforeExecution": [], 
-    "requestId": 43, 
+    },
+    "public_hostname": "c6401.ambari.apache.org",
+    "commandId": "43-0",
+    "hostname": "c6401.ambari.apache.org",
+    "kerberosCommandParams": [],
+    "serviceName": "RANGER_KMS",
+    "role": "RANGER_KMS_SERVER",
+    "forceRefreshConfigTagsBeforeExecution": [],
+    "requestId": 43,
     "agentConfigParams": {
         "agent": {
             "parallel_execution": 0
         }
-    }, 
-    "clusterName": "c1", 
-    "commandType": "EXECUTION_COMMAND", 
-    "taskId": 200, 
-    "roleParams": {}, 
+    },
+    "clusterName": "c1",
+    "commandType": "EXECUTION_COMMAND",
+    "taskId": 200,
+    "roleParams": {},
     "configurationTags": {
         "ranger-kms-site": {
             "tag": "version1467026737262"
-        }, 
+        },
         "ranger-hdfs-audit": {
             "tag": "version1466705299922"
-        }, 
+        },
         "ssl-client": {
             "tag": "version1"
-        }, 
+        },
         "ranger-admin-site": {
             "tag": "version1467016680635"
-        }, 
+        },
         "kms-log4j": {
             "tag": "version1467026737262"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
             "tag": "version1466705299922"
-        }, 
+        },
         "tagsync-application-properties": {
             "tag": "version1467016680511"
-        }, 
+        },
         "ranger-env": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-ugsync-site": {
             "tag": "version1467016680537"
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
             "tag": "version1466705299922"
-        }, 
+        },
         "ranger-kms-security": {
             "tag": "version1467026737262"
-        }, 
+        },
         "kerberos-env": {
             "tag": "version1467016537243"
-        }, 
+        },
         "admin-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "admin-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-kms-policymgr-ssl": {
             "tag": "version1467026737262"
-        }, 
+        },
         "hdfs-site": {
             "tag": "version1467016680401"
-        }, 
+        },
         "ranger-tagsync-site": {
             "tag": "version1467016680586"
-        }, 
+        },
         "zoo.cfg": {
             "tag": "version1"
-        }, 
+        },
         "ranger-kms-audit": {
             "tag": "version1467026737262"
-        }, 
+        },
         "hadoop-policy": {
             "tag": "version1"
-        }, 
+        },
         "hdfs-log4j": {
             "tag": "version1"
-        }, 
+        },
         "usersync-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "krb5-conf": {
             "tag": "version1467016537243"
-        }, 
+        },
         "kms-site": {
             "tag": "version1467026751210"
-        }, 
+        },
         "core-site": {
             "tag": "version1467026751256"
-        }, 
+        },
         "hadoop-env": {
             "tag": "version1467016680446"
-        }, 
+        },
         "zookeeper-log4j": {
             "tag": "version1"
-        }, 
+        },
         "ssl-server": {
             "tag": "version1"
-        }, 
+        },
         "ranger-site": {
             "tag": "version1466705299949"
-        }, 
+        },
         "zookeeper-env": {
             "tag": "version1467016680492"
-        }, 
+        },
         "kms-properties": {
             "tag": "version1467026737262"
-        }, 
+        },
         "tagsync-log4j": {
             "tag": "version1466705299949"
-        }, 
+        },
         "ranger-hdfs-security": {
             "tag": "version1466705299922"
-        }, 
+        },
         "usersync-properties": {
             "tag": "version1466705299949"
-        }, 
+        },
         "kms-env": {
             "tag": "version1467026737262"
-        }, 
+        },
         "dbks-site": {
             "tag": "version1467026751234"
-        }, 
+        },
         "cluster-env": {
             "tag": "version1467016680567"
         }
-    }, 
-    "roleCommand": "START", 
+    },
+    "roleCommand": "START",
     "hostLevelParams": {
-        "agent_stack_retry_on_unavailability": "false", 
-        "stack_name": "HDP", 
-        "package_version": "2_5_0_0_*", 
+        "agent_stack_retry_on_unavailability": "false",
+        "stack_name": "HDP",
+        "package_version": "2_5_0_0_*",
         "custom_mysql_jdbc_name": "mysql-connector-java.jar",
         "previous_custom_mysql_jdbc_name": "mysql-connector-java-old.jar",
-        "host_sys_prepped": "false", 
-        "ambari_db_rca_username": "mapred", 
-        "current_version": "2.5.0.0-801", 
-        "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar", 
-        "agent_stack_retry_count": "5", 
-        "stack_version": "2.5", 
-        "jdk_name": "jdk-8u60-linux-x64.tar.gz", 
-        "ambari_db_rca_driver": "org.postgresql.Driver", 
-        "java_home": "/usr/jdk64/jdk1.7.0_45", 
-        "repository_version_id": "1", 
-        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
-        "not_managed_hdfs_path_list": "[\"/tmp\"]", 
-        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
-        "java_version": "8", 
-        "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.5\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]", 
-        "package_list": "[{\"name\":\"ranger_${stack_version}-kms\",\"condition\":\"\",\"skipUpgrade\":false}]", 
-        "db_name": "ambari", 
-        "group_list": "[\"kms\",\"ranger\",\"hadoop\",\"users\"]", 
-        "agentCacheDir": "/var/lib/ambari-agent/cache", 
-        "ambari_db_rca_password": "mapred", 
-        "jce_name": "UnlimitedJCEPolicyJDK7.zip", 
-        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar", 
-        "db_driver_filename": "mysql-connector-java.jar", 
-        "user_list": "[\"kms\",\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]", 
+        "host_sys_prepped": "false",
+        "ambari_db_rca_username": "mapred",
+        "current_version": "2.5.0.0-801",
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar",
+        "agent_stack_retry_count": "5",
+        "stack_version": "2.5",
+        "jdk_name": "jdk-8u60-linux-x64.tar.gz",
+        "ambari_db_rca_driver": "org.postgresql.Driver",
+        "java_home": "/usr/jdk64/jdk1.7.0_45",
+        "repository_version_id": "1",
+        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/",
+        "not_managed_hdfs_path_list": "[\"/tmp\"]",
+        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+        "java_version": "8",
+        "repo_info": "[{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.5\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0\",\"latestBaseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-801\",\"baseSaved\":true},{\"baseUrl\":\"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.21\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\",\"baseSaved\":true}]",
+        "package_list": "[{\"name\":\"ranger_${stack_version}-kms\",\"condition\":\"\",\"skipUpgrade\":false}]",
+        "db_name": "ambari",
+        "group_list": "[\"kms\",\"ranger\",\"hadoop\",\"users\"]",
+        "agentCacheDir": "/var/lib/ambari-agent/cache",
+        "ambari_db_rca_password": "mapred",
+        "jce_name": "UnlimitedJCEPolicyJDK7.zip",
+        "oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar",
+        "db_driver_filename": "mysql-connector-java.jar",
+        "user_list": "[\"kms\",\"zookeeper\",\"ambari-qa\",\"ranger\",\"hdfs\"]",
         "clientsToUpdateConfigs": "[\"*\"]"
-    }, 
+    },
     "commandParams": {
-        "service_package_folder": "common-services/RANGER_KMS/0.5.0.2.3/package", 
-        "script": "scripts/kms_server.py", 
-        "hooks_folder": "HDP/2.0.6/hooks", 
-        "version": "2.5.0.0-801", 
-        "max_duration_for_retries": "0", 
-        "command_retry_enabled": "false", 
-        "command_timeout": "600", 
+        "service_package_folder": "common-services/RANGER_KMS/0.5.0.2.3/package",
+        "script": "scripts/kms_server.py",
+        "hooks_folder": "HDP/2.0.6/hooks",
+        "version": "2.5.0.0-801",
+        "max_duration_for_retries": "0",
+        "command_retry_enabled": "false",
+        "command_timeout": "600",
         "script_type": "PYTHON"
-    }, 
-    "forceRefreshConfigTags": [], 
-    "stageId": 0, 
+    },
+    "forceRefreshConfigTags": [],
+    "stageId": 0,
     "clusterHostInfo": {
         "snamenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_use_ssl": [
             "false"
-        ], 
+        ],
         "all_ping_ports": [
             "8670"
-        ], 
+        ],
         "ranger_tagsync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ranger_kms_server_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ranger_usersync_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "slave_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "namenode_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "ambari_server_port": [
             "8080"
-        ], 
+        ],
         "ranger_admin_hosts": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "all_racks": [
             "/default-rack"
-        ], 
+        ],
         "all_ipv4_ips": [
             "172.22.83.73"
-        ], 
+        ],
         "ambari_server_host": [
             "c6401.ambari.apache.org"
-        ], 
+        ],
         "zookeeper_hosts": [
             "c6401.ambari.apache.org"
         ]
-    }, 
+    },
     "configurations": {
         "ranger-kms-site": {
-            "ranger.service.https.port": "9393", 
-            "ranger.service.https.attrib.ssl.enabled": "false", 
-            "xa.webapp.dir": "./webapp", 
-            "ranger.service.host": "{{kms_host}}", 
-            "ranger.service.shutdown.port": "7085", 
-            "ranger.contextName": "/kms", 
+            "ranger.service.https.port": "9393",
+            "ranger.service.https.attrib.ssl.enabled": "false",
+            "xa.webapp.dir": "./webapp",
+            "ranger.service.host": "{{kms_host}}",
+            "ranger.service.shutdown.port": "7085",
+            "ranger.contextName": "/kms",
             "ranger.service.http.port": "{{kms_port}}"
-        }, 
+        },
         "ranger-hdfs-audit": {
             "xasecure.audit.destination.solr.zookeepers": "NONE",
-            "xasecure.audit.destination.solr.urls": "", 
-            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool", 
+            "xasecure.audit.destination.solr.urls": "",
+            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/solr/spool",
             "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/hadoop/hdfs/audit/hdfs/spool",
-            "xasecure.audit.destination.hdfs": "true", 
-            "xasecure.audit.destination.solr": "false", 
-            "xasecure.audit.provider.summary.enabled": "false", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
+            "xasecure.audit.destination.hdfs": "true",
+            "xasecure.audit.destination.solr": "false",
+            "xasecure.audit.provider.summary.enabled": "false",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
             "xasecure.audit.is.enabled": "true"
-        }, 
+        },
         "ssl-client": {
-            "ssl.client.truststore.reload.interval": "10000", 
-            "ssl.client.keystore.password": "bigdata", 
-            "ssl.client.truststore.type": "jks", 
-            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks", 
-            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks", 
-            "ssl.client.truststore.password": "bigdata", 
+            "ssl.client.truststore.reload.interval": "10000",
+            "ssl.client.keystore.password": "bigdata",
+            "ssl.client.truststore.type": "jks",
+            "ssl.client.keystore.location": "/etc/security/clientKeys/keystore.jks",
+            "ssl.client.truststore.location": "/etc/security/clientKeys/all.jks",
+            "ssl.client.truststore.password": "bigdata",
             "ssl.client.keystore.type": "jks"
-        }, 
+        },
         "ranger-admin-site": {
-            "ranger.admin.kerberos.cookie.domain": "{{ranger_host}}", 
-            "ranger.kms.service.user.hdfs": "hdfs", 
-            "ranger.spnego.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.plugins.hive.serviceuser": "hive", 
-            "ranger.lookup.kerberos.keytab": "/etc/security/keytabs/rangerlookup.service.keytab", 
-            "ranger.plugins.kms.serviceuser": "kms", 
-            "ranger.service.https.attrib.ssl.enabled": "false", 
-            "ranger.sso.browser.useragent": "Mozilla,chrome", 
-            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01", 
-            "ranger.plugins.hbase.serviceuser": "hbase", 
+            "ranger.admin.kerberos.cookie.domain": "{{ranger_host}}",
+            "ranger.kms.service.user.hdfs": "hdfs",
+            "ranger.spnego.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "ranger.ldap.ad.url": "{{ranger_ug_ldap_url}}",
+            "ranger.plugins.hive.serviceuser": "hive",
+            "ranger.lookup.kerberos.keytab": "/etc/security/keytabs/rangerlookup.service.keytab",
+            "ranger.plugins.kms.serviceuser": "kms",
+            "ranger.service.https.attrib.ssl.enabled": "false",
+            "ranger.sso.browser.useragent": "Mozilla,chrome",
+            "ranger.jpa.jdbc.url": "jdbc:mysql://c6401.ambari.apache.org:3306/ranger01",
+            "ranger.plugins.hbase.serviceuser": "hbase",
             "ranger.plugins.hdfs.serviceuser": "hdfs",
-            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}", 
-            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net", 
-            "ranger.plugins.knox.serviceuser": "knox", 
-            "ranger.ldap.base.dn": "dc=example,dc=com", 
-            "ranger.sso.publicKey": "", 
-            "ranger.admin.kerberos.cookie.path": "/", 
+            "ranger.ldap.group.searchbase": "{{ranger_ug_ldap_group_searchbase}}",
+            "ranger.ldap.user.dnpattern": "uid={0},ou=users,dc=xasecure,dc=net",
+            "ranger.plugins.knox.serviceuser": "knox",
+            "ranger.ldap.base.dn": "dc=example,dc=com",
+            "ranger.sso.publicKey": "",
+            "ranger.admin.kerberos.cookie.path": "/",
             "ranger.service.https.attrib.clientAuth": "want",
-            "ranger.jpa.jdbc.user": "{{ranger_db_user}}", 
-            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})", 
-            "ranger.ldap.group.roleattribute": "cn", 
-            "ranger.plugins.kafka.serviceuser": "kafka", 
-            "ranger.admin.kerberos.principal": "rangeradmin/_HOST@EXAMPLE.COM", 
-            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
+            "ranger.jpa.jdbc.user": "{{ranger_db_user}}",
+            "ranger.ldap.ad.user.searchfilter": "(sAMAccountName={0})",
+            "ranger.ldap.group.roleattribute": "cn",
+            "ranger.plugins.kafka.serviceuser": "kafka",
+            "ranger.admin.kerberos.principal": "rangeradmin/_HOST@EXAMPLE.COM",
+            "ranger.ldap.ad.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
             "ranger.credential.provider.path": "/etc/ranger/admin/rangeradmin.jceks",
-            "ranger.ldap.referral": "ignore", 
-            "ranger.service.http.port": "6080", 
-            "ranger.ldap.user.searchfilter": "(uid={0})", 
-            "ranger.plugins.atlas.serviceuser": "atlas", 
-            "ranger.truststore.password": "changeit", 
-            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.password": "NONE", 
-            "ranger.audit.solr.zookeepers": "NONE", 
-            "ranger.lookup.kerberos.principal": "rangerlookup/_HOST@EXAMPLE.COM", 
-            "ranger.service.https.port": "6182", 
-            "ranger.plugins.storm.serviceuser": "storm", 
-            "ranger.externalurl": "{{ranger_external_url}}", 
-            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.kms.service.user.hive": "", 
-            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks", 
-            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}", 
-            "ranger.service.host": "{{ranger_host}}", 
+            "ranger.ldap.referral": "ignore",
+            "ranger.service.http.port": "6080",
+            "ranger.ldap.user.searchfilter": "(uid={0})",
+            "ranger.plugins.atlas.serviceuser": "atlas",
+            "ranger.truststore.password": "changeit",
+            "ranger.ldap.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.password": "NONE",
+            "ranger.audit.solr.zookeepers": "NONE",
+            "ranger.lookup.kerberos.principal": "rangerlookup/_HOST@EXAMPLE.COM",
+            "ranger.service.https.port": "6182",
+            "ranger.plugins.storm.serviceuser": "storm",
+            "ranger.externalurl": "{{ranger_external_url}}",
+            "ranger.truststore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.kms.service.user.hive": "",
+            "ranger.https.attrib.keystore.file": "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+            "ranger.jpa.jdbc.dialect": "{{jdbc_dialect}}",
+            "ranger.service.host": "{{ranger_host}}",
             "ranger.service.https.attrib.keystore.keyalias": "rangeradmin",
-            "ranger.service.https.attrib.keystore.pass": "xasecure", 
-            "ranger.unixauth.remote.login.enabled": "true", 
-            "ranger.jpa.jdbc.credential.alias": "rangeradmin", 
-            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}", 
-            "ranger.audit.solr.username": "ranger_solr", 
-            "ranger.sso.enabled": "false", 
-            "ranger.audit.solr.urls": "", 
-            "ranger.ldap.ad.domain": "", 
-            "ranger.plugins.yarn.serviceuser": "yarn", 
-            "ranger.audit.source.type": "solr", 
-            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}", 
-            "ranger.ldap.url": "{{ranger_ug_ldap_url}}", 
-            "ranger.authentication.method": "UNIX", 
-            "ranger.service.http.enabled": "true", 
-            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}", 
-            "ranger.ldap.ad.referral": "ignore", 
-            "ranger.ldap.ad.base.dn": "dc=example,dc=com", 
-            "ranger.jpa.jdbc.password": "_", 
-            "ranger.spnego.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab", 
-            "ranger.sso.providerurl": "", 
-            "ranger.unixauth.service.hostname": "{{ugsync_host}}", 
-            "ranger.admin.kerberos.keytab": "/etc/security/keytabs/rangeradmin.service.keytab", 
-            "ranger.admin.kerberos.token.valid.seconds": "30", 
-            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver", 
+            "ranger.service.https.attrib.keystore.pass": "xasecure",
+            "ranger.unixauth.remote.login.enabled": "true",
+            "ranger.jpa.jdbc.credential.alias": "rangeradmin",
+            "ranger.ldap.ad.bind.password": "{{ranger_usersync_ldap_ldapbindpassword}}",
+            "ranger.audit.solr.username": "ranger_solr",
+            "ranger.sso.enabled": "false",
+            "ranger.audit.solr.urls": "",
+            "ranger.ldap.ad.domain": "",
+            "ranger.plugins.yarn.serviceuser": "yarn",
+            "ranger.audit.source.type": "solr",
+            "ranger.ldap.bind.dn": "{{ranger_ug_ldap_bind_dn}}",
+            "ranger.ldap.url": "{{ranger_ug_ldap_url}}",
+            "ranger.authentication.method": "UNIX",
+            "ranger.service.http.enabled": "true",
+            "ranger.ldap.group.searchfilter": "{{ranger_ug_ldap_group_searchfilter}}",
+            "ranger.ldap.ad.referral": "ignore",
+            "ranger.ldap.ad.base.dn": "dc=example,dc=com",
+            "ranger.jpa.jdbc.password": "_",
+            "ranger.spnego.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab",
+            "ranger.sso.providerurl": "",
+            "ranger.unixauth.service.hostname": "{{ugsync_host}}",
+            "ranger.admin.kerberos.keytab": "/etc/security/keytabs/rangeradmin.service.keytab",
+            "ranger.admin.kerberos.token.valid.seconds": "30",
+            "ranger.jpa.jdbc.driver": "com.mysql.jdbc.Driver",
             "ranger.unixauth.service.port": "5151"
-        }, 
+        },
         "kms-log4j": {
             "content": "\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License. See accompanying LICENSE file.\n#\n\n# If the Java System property 'kms.log.dir' is not defined at KMS start up time\n# Setup sets its value to '${kms.home}/logs'\n\nlog4j.appender.kms=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.kms.DatePattern='.'yyyy-MM-dd\nlog4j.appender.kms.File=${kms.log.dir}/kms.log\nlog4j.appender.kms.Append=true\nlog4j.appender.kms.layout=org.apache.log4j.PatternLayout\
 nlog4j.appender.kms.layout.ConversionPattern=%d{ISO8601} %-5p %c{1} - %m%n\n\nlog4j.appender.kms-audit=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.kms-audit.DatePattern='.'yyyy-MM-dd\nlog4j.appender.kms-audit.File=${kms.log.dir}/kms-audit.log\nlog4j.appender.kms-audit.Append=true\nlog4j.appender.kms-audit.layout=org.apache.log4j.PatternLayout\nlog4j.appender.kms-audit.layout.ConversionPattern=%d{ISO8601} %m%n\n\nlog4j.logger.kms-audit=INFO, kms-audit\nlog4j.additivity.kms-audit=false\n\nlog4j.rootLogger=ALL, kms\nlog4j.logger.org.apache.hadoop.conf=ERROR\nlog4j.logger.org.apache.hadoop=INFO\nlog4j.logger.com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator=OFF"
-        }, 
+        },
         "ranger-hdfs-policymgr-ssl": {
-            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks", 
-            "xasecure.policymgr.clientssl.truststore.password": "changeit", 
-            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}", 
-            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks", 
-            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}", 
+            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-keystore.jks",
+            "xasecure.policymgr.clientssl.truststore.password": "changeit",
+            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}",
+            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/hadoop-client/conf/ranger-plugin-truststore.jks",
+            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}",
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
-        }, 
+        },
         "tagsync-application-properties": {
-            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181", 
-            "atlas.kafka.security.protocol": "SASL_PLAINTEXT", 
-            "atlas.jaas.KafkaClient.option.principal": "{{tagsync_jaas_principal}}", 
-            "atlas.jaas.KafkaClient.option.keyTab": "{{tagsync_keytab_path}}", 
-            "atlas.kafka.entities.group.id": "ranger_entities_consumer", 
-            "atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule", 
-            "atlas.jaas.KafkaClient.option.serviceName": "kafka", 
-            "atlas.kafka.bootstrap.servers": "localhost:6667", 
-            "atlas.jaas.KafkaClient.option.useKeyTab": "true", 
-            "atlas.jaas.KafkaClient.option.storeKey": "true", 
-            "atlas.jaas.KafkaClient.loginModuleControlFlag": "required", 
+            "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org:2181",
+            "atlas.kafka.security.protocol": "SASL_PLAINTEXT",
+            "atlas.jaas.KafkaClient.option.principal": "{{tagsync_jaas_principal}}",
+            "atlas.jaas.KafkaClient.option.keyTab": "{{tagsync_keytab_path}}",
+            "atlas.kafka.entities.group.id": "ranger_entities_consumer",
+            "atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
+            "atlas.jaas.KafkaClient.option.serviceName": "kafka",
+            "atlas.kafka.bootstrap.servers": "localhost:6667",
+            "atlas.jaas.KafkaClient.option.useKeyTab": "true",
+            "atlas.jaas.KafkaClient.option.storeKey": "true",
+            "atlas.jaas.KafkaClient.loginModuleControlFlag": "required",
             "atlas.kafka.sasl.kerberos.service.name": "kafka"
-        }, 
+        },
         "ranger-env": {
-            "ranger_solr_shards": "1", 
-            "ranger_solr_config_set": "ranger_audits", 
-            "ranger_user": "ranger", 
-            "xml_configurations_supported": "true", 
-            "ranger-atlas-plugin-enabled": "No", 
-            "ranger-hbase-plugin-enabled": "No", 
-            "ranger-yarn-plugin-enabled": "No", 
-            "bind_anonymous": "false", 
-            "ranger_admin_username": "amb_ranger_admin", 
-            "admin_password": "admin", 
-            "is_solrCloud_enabled": "false", 
-            "ranger-storm-plugin-enabled": "No", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "ranger_group": "ranger", 
-            "ranger-knox-plugin-enabled": "No", 
-            "ranger_admin_log_dir": "/var/log/ranger/admin", 
-            "ranger-kafka-plugin-enabled": "No", 
-            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306", 
-            "ranger-hive-plugin-enabled": "No", 
-            "xasecure.audit.destination.solr": "false", 
-            "ranger_pid_dir": "/var/run/ranger", 
-            "xasecure.audit.destination.hdfs": "true", 
-            "admin_username": "admin", 
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
-            "create_db_dbuser": "true", 
-            "ranger_solr_collection_name": "ranger_audits", 
-            "ranger_admin_password": "P1!q9xa96SMi5NCl", 
+            "ranger_solr_shards": "1",
+            "ranger_solr_config_set": "ranger_audits",
+            "ranger_user": "ranger",
+            "xml_configurations_supported": "true",
+            "ranger-atlas-plugin-enabled": "No",
+            "ranger-hbase-plugin-enabled": "No",
+            "ranger-yarn-plugin-enabled": "No",
+            "bind_anonymous": "false",
+            "ranger_admin_username": "amb_ranger_admin",
+            "admin_password": "admin",
+            "is_solrCloud_enabled": "false",
+            "ranger-storm-plugin-enabled": "No",
+            "ranger-hdfs-plugin-enabled": "No",
+            "ranger_group": "ranger",
+            "ranger-knox-plugin-enabled": "No",
+            "ranger_admin_log_dir": "/var/log/ranger/admin",
+            "ranger-kafka-plugin-enabled": "No",
+            "ranger_privelege_user_jdbc_url": "jdbc:mysql://c6401.ambari.apache.org:3306",
+            "ranger-hive-plugin-enabled": "No",
+            "xasecure.audit.destination.solr": "false",
+            "ranger_pid_dir": "/var/run/ranger",
+            "xasecure.audit.destination.hdfs": "true",
+            "admin_username": "admin",
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
+            "create_db_dbuser": "true",
+            "ranger_solr_collection_name": "ranger_audits",
+            "ranger_admin_password": "P1!q9xa96SMi5NCl",
             "ranger_usersync_log_dir": "/var/log/ranger/usersync"
-        }, 
+        },
         "ranger-ugsync-site": {
-            "ranger.usersync.ldap.binddn": "", 
-            "ranger.usersync.policymgr.username": "rangerusersync", 
-            "ranger.usersync.policymanager.mockrun": "false", 
-            "ranger.usersync.group.searchbase": "", 
-            "ranger.usersync.ldap.bindalias": "testldapalias", 
-            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks", 
-            "ranger.usersync.port": "5151", 
-            "ranger.usersync.pagedresultssize": "500", 
-            "ranger.usersync.group.memberattributename": "", 
-            "ranger.usersync.kerberos.principal": "rangerusersync/_HOST@EXAMPLE.COM", 
-            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder", 
-            "ranger.usersync.ldap.referral": "ignore", 
-            "ranger.usersync.group.searchfilter": "", 
-            "ranger.usersync.ldap.user.objectclass": "person", 
-            "ranger.usersync.logdir": "{{usersync_log_dir}}", 
-            "ranger.usersync.ldap.user.searchfilter": "", 
-            "ranger.usersync.ldap.groupname.caseconversion": "none", 
-            "ranger.usersync.ldap.ldapbindpassword": "", 
-            "ranger.usersync.unix.minUserId": "500", 
-            "ranger.usersync.policymanager.maxrecordsperapicall": "1000", 
-            "ranger.usersync.group.nameattribute": "", 
-            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password", 
-            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks", 
-            "ranger.usersync.user.searchenabled": "false", 
-            "ranger.usersync.group.usermapsyncenabled": "true", 
-            "ranger.usersync.ldap.bindkeystore": "", 
-            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof", 
-            "ranger.usersync.kerberos.keytab": "/etc/security/keytabs/rangerusersync.service.keytab", 
-            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe", 
-            "ranger.usersync.group.objectclass": "", 
-            "ranger.usersync.ldap.user.searchscope": "sub", 
-            "ranger.usersync.unix.password.file": "/etc/passwd", 
-            "ranger.usersync.ldap.user.nameattribute": "", 
-            "ranger.usersync.pagedresultsenabled": "true", 
-            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}", 
-            "ranger.usersync.group.search.first.enabled": "false", 
-            "ranger.usersync.group.searchenabled": "false", 
-            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder", 
-            "ranger.usersync.ssl": "true", 
-            "ranger.usersync.ldap.url": "", 
-            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org", 
-            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.ldap.user.searchbase": "", 
-            "ranger.usersync.ldap.username.caseconversion": "none", 
-            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks", 
-            "ranger.usersync.keystore.password": "UnIx529p", 
-            "ranger.usersync.unix.group.file": "/etc/group", 
-            "ranger.usersync.filesource.file": "/tmp/usergroup.txt", 
-            "ranger.usersync.group.searchscope": "", 
-            "ranger.usersync.truststore.password": "changeit", 
-            "ranger.usersync.enabled": "true", 
-            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000", 
+            "ranger.usersync.ldap.binddn": "",
+            "ranger.usersync.policymgr.username": "rangerusersync",
+            "ranger.usersync.policymanager.mockrun": "false",
+            "ranger.usersync.group.searchbase": "",
+            "ranger.usersync.ldap.bindalias": "testldapalias",
+            "ranger.usersync.truststore.file": "/usr/hdp/current/ranger-usersync/conf/mytruststore.jks",
+            "ranger.usersync.port": "5151",
+            "ranger.usersync.pagedresultssize": "500",
+            "ranger.usersync.group.memberattributename": "",
+            "ranger.usersync.kerberos.principal": "rangerusersync/_HOST@EXAMPLE.COM",
+            "ranger.usersync.source.impl.class": "org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
+            "ranger.usersync.ldap.referral": "ignore",
+            "ranger.usersync.group.searchfilter": "",
+            "ranger.usersync.ldap.user.objectclass": "person",
+            "ranger.usersync.logdir": "{{usersync_log_dir}}",
+            "ranger.usersync.ldap.user.searchfilter": "",
+            "ranger.usersync.ldap.groupname.caseconversion": "none",
+            "ranger.usersync.ldap.ldapbindpassword": "",
+            "ranger.usersync.unix.minUserId": "500",
+            "ranger.usersync.policymanager.maxrecordsperapicall": "1000",
+            "ranger.usersync.group.nameattribute": "",
+            "ranger.usersync.policymgr.alias": "ranger.usersync.policymgr.password",
+            "ranger.usersync.keystore.file": "/usr/hdp/current/ranger-usersync/conf/unixauthservice.jks",
+            "ranger.usersync.user.searchenabled": "false",
+            "ranger.usersync.group.usermapsyncenabled": "true",
+            "ranger.usersync.ldap.bindkeystore": "",
+            "ranger.usersync.ldap.user.groupnameattribute": "memberof, ismemberof",
+            "ranger.usersync.kerberos.keytab": "/etc/security/keytabs/rangerusersync.service.keytab",
+            "ranger.usersync.passwordvalidator.path": "./native/credValidator.uexe",
+            "ranger.usersync.group.objectclass": "",
+            "ranger.usersync.ldap.user.searchscope": "sub",
+            "ranger.usersync.unix.password.file": "/etc/passwd",
+            "ranger.usersync.ldap.user.nameattribute": "",
+            "ranger.usersync.pagedresultsenabled": "true",
+            "ranger.usersync.policymanager.baseURL": "{{ranger_external_url}}",
+            "ranger.usersync.group.search.first.enabled": "false",
+            "ranger.usersync.group.searchenabled": "false",
+            "ranger.usersync.sink.impl.class": "org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder",
+            "ranger.usersync.ssl": "true",
+            "ranger.usersync.ldap.url": "",
+            "ranger.usersync.ldap.searchBase": "dc=hadoop,dc=apache,dc=org",
+            "ranger.usersync.policymgr.keystore": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.ldap.user.searchbase": "",
+            "ranger.usersync.ldap.username.caseconversion": "none",
+            "ranger.usersync.credstore.filename": "/usr/hdp/current/ranger-usersync/conf/ugsync.jceks",
+            "ranger.usersync.keystore.password": "UnIx529p",
+            "ranger.usersync.unix.group.file": "/etc/group",
+            "ranger.usersync.filesource.file": "/tmp/usergroup.txt",
+            "ranger.usersync.group.searchscope": "",
+            "ranger.usersync.truststore.password": "changeit",
+            "ranger.usersync.enabled": "true",
+            "ranger.usersync.sleeptimeinmillisbetweensynccycle": "60000",
             "ranger.usersync.filesource.text.delimiter": ","
-        }, 
+        },
         "ranger-hdfs-plugin-properties": {
-            "hadoop.rpc.protection": "authentication", 
-            "ranger-hdfs-plugin-enabled": "No", 
-            "REPOSITORY_CONFIG_USERNAME": "hadoop", 
-            "policy_user": "ambari-qa", 
-            "common.name.for.certificate": "", 
+            "hadoop.rpc.protection": "authentication",
+            "ranger-hdfs-plugin-enabled": "No",
+            "REPOSITORY_CONFIG_USERNAME": "hadoop",
+            "policy_user": "ambari-qa",
+            "common.name.for.certificate": "",
             "REPOSITORY_CONFIG_PASSWORD": "hadoop"
-        }, 
+        },
         "ranger-kms-security": {
-            "ranger.plugin.kms.policy.pollIntervalMs": "30000", 
-            "ranger.plugin.kms.service.name": "{{repo_name}}", 
-            "ranger.plugin.kms.policy.source.impl": "org.apache.ranger.admin.client.RangerAdminRESTClient", 
-            "ranger.plugin.kms.policy.rest.ssl.config.file": "/etc/ranger/kms/conf/ranger-policymgr-ssl.xml", 
-            "ranger.plugin.kms.policy.cache.dir": "/etc/ranger/{{repo_name}}/policycache", 
+            "ranger.plugin.kms.policy.pollIntervalMs": "30000",
+            "ranger.plugin.kms.service.name": "{{repo_name}}",
+            "ranger.plugin.kms.policy.source.impl": "org.apache.ranger.admin.client.RangerAdminRESTClient",
+            "ranger.plugin.kms.policy.rest.ssl.config.file": "/etc/ranger/kms/conf/ranger-policymgr-ssl.xml",
+            "ranger.plugin.kms.policy.cache.dir": "/etc/ranger/{{repo_name}}/policycache",
             "ranger.plugin.kms.policy.rest.url": "{{policymgr_mgr_url}}"
-        }, 
+        },
         "kerberos-env": {
-            "kdc_hosts": "c6401.ambari.apache.org", 
-            "manage_auth_to_local": "true", 
-            "install_packages": "true", 
-            "realm": "EXAMPLE.COM", 
-            "encryption_types": "aes des3-cbc-sha1 rc4 des-cbc-md5", 
-            "ad_create_attributes_template": "\n{\n  \"objectClass\": [\"top\", \"person\", \"organizationalPerson\", \"user\"],\n  \"cn\": \"$principal_name\",\n  #if( $is_service )\n  \"servicePrincipalName\": \"$principal_name\",\n  #end\n  \"userPrincipalName\": \"$normalized_principal\",\n  \"unicodePwd\": \"$password\",\n  \"accountExpires\": \"0\",\n  \"userAccountControl\": \"66048\"\n}", 
-            "kdc_create_attributes": "", 
-            "admin_server_host": "c6401.ambari.apache.org", 
-            "group": "ambari-managed-principals", 
-            "password_length": "20", 
-            "ldap_url": "", 
-            "manage_identities": "true", 
-            "password_min_lowercase_letters": "1", 
-            "create_ambari_principal": "true", 
-            "service_check_principal_name": "${cluster_name|toLower()}-${short_date}", 
-            "executable_search_paths": "/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin", 
-            "password_chat_timeout": "5", 
-            "kdc_type": "mit-kdc", 
-            "set_password_expiry": "false", 
-            "password_min_punctuation": "1", 
-            "container_dn": "", 
-            "case_insensitive_username_rules": "false", 
-            "password_min_whitespace": "0", 
-            "password_min_uppercase_letters": "1", 
+            "kdc_hosts": "c6401.ambari.apache.org",
+            "manage_auth_to_local": "true",
+            "install_packages": "true",
+            "realm": "EXAMPLE.COM",
+            "encryption_types": "aes des3-cbc-sha1 rc4 des-cbc-md5",
+            "ad_create_attributes_template": "\n{\n  \"objectClass\": [\"top\", \"person\", \"organizationalPerson\", \"user\"],\n  \"cn\": \"$principal_name\",\n  #if( $is_service )\n  \"servicePrincipalName\": \"$principal_name\",\n  #end\n  \"userPrincipalName\": \"$normalized_principal\",\n  \"unicodePwd\": \"$password\",\n  \"accountExpires\": \"0\",\n  \"userAccountControl\": \"66048\"\n}",
+            "kdc_create_attributes": "",
+            "admin_server_host": "c6401.ambari.apache.org",
+            "group": "ambari-managed-principals",
+            "password_length": "20",
+            "ldap_url": "",
+            "manage_identities": "true",
+            "password_min_lowercase_letters": "1",
+            "create_ambari_principal": "true",
+            "service_check_principal_name": "${cluster_name|toLower()}-${short_date}",
+            "executable_search_paths": "/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin",
+            "password_chat_timeout": "5",
+            "kdc_type": "mit-kdc",
+            "set_password_expiry": "false",
+            "password_min_punctuation": "1",
+            "container_dn": "",
+            "case_insensitive_username_rules": "false",
+            "password_min_whitespace": "0",
+            "password_min_uppercase_letters": "1",
             "password_min_digits": "1"
-        }, 
+        },
         "kms-properties": {
-            "REPOSITORY_CONFIG_USERNAME": "keyadmin", 
-            "db_user": "rangerkms01", 
-            "DB_FLAVOR": "MYSQL", 
-            "db_password": "rangerkms01", 
-            "KMS_MASTER_KEY_PASSWD": "StrongPassword01", 
-            "db_root_user": "root", 
-            "db_name": "rangerkms01", 
-            "db_host": "c6401.ambari.apache.org", 
-            "db_root_password": "vagrant", 
-            "SQL_CONNECTOR_JAR": "{{driver_curl_target}}", 
+            "REPOSITORY_CONFIG_USERNAME": "keyadmin",
+            "db_user": "rangerkms01",
+            "DB_FLAVOR": "MYSQL",
+            "db_password": "rangerkms01",
+            "KMS_MASTER_KEY_PASSWD": "StrongPassword01",
+            "db_root_user": "root",
+            "db_name": "rangerkms01",
+            "db_host": "c6401.ambari.apache.org",
+            "db_root_password": "vagrant",
+            "SQL_CONNECTOR_JAR": "{{driver_curl_target}}",
             "REPOSITORY_CONFIG_PASSWORD": "keyadmin"
-        }, 
+        },
         "admin-properties": {
-            "db_user": "rangeradmin01", 
-            "DB_FLAVOR": "MYSQL", 
-            "db_password": "rangeradmin01", 
-            "db_root_user": "root", 
-            "policymgr_external_url": "http://c6401.ambari.apache.org:6080", 
-            "db_name": "ranger01", 
-            "db_host": "c6401.ambari.apache.org", 
-            "db_root_password": "vagrant", 
+            "db_user": "rangeradmin01",
+            "DB_FLAVOR": "MYSQL",
+            "db_password": "rangeradmin01",
+            "db_root_user": "root",
+            "policymgr_external_url": "http://c6401.ambari.apache.org:6080",
+            "db_name": "ranger01",
+            "db_host": "c6401.ambari.apache.org",
+            "db_root_password": "vagrant",
             "SQL_CONNECTOR_JAR": "{{driver_curl_target}}"
-        }, 
+        },
         "ranger-kms-policymgr-ssl": {
-            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/ranger-kms/conf/ranger-plugin-keystore.jks", 
-            "xasecure.policymgr.clientssl.truststore.password": "changeit", 
-            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}", 
-            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/ranger-kms/conf/ranger-plugin-truststore.jks", 
-            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}", 
+            "xasecure.policymgr.clientssl.keystore": "/usr/hdp/current/ranger-kms/conf/ranger-plugin-keystore.jks",
+            "xasecure.policymgr.clientssl.truststore.password": "changeit",
+            "xasecure.policymgr.clientssl.keystore.credential.file": "jceks://file{{credential_file}}",
+            "xasecure.policymgr.clientssl.truststore": "/usr/hdp/current/ranger-kms/conf/ranger-plugin-truststore.jks",
+            "xasecure.policymgr.clientssl.truststore.credential.file": "jceks://file{{credential_file}}",
             "xasecure.policymgr.clientssl.keystore.password": "myKeyFilePassword"
-        }, 
+        },
         "hdfs-site": {
-            "dfs.namenode.checkpoint.period": "21600", 
-            "dfs.namenode.avoid.write.stale.datanode": "true", 
-            "dfs.permissions.superusergroup": "hdfs", 
-            "dfs.namenode.startup.delay.block.deletion.sec": "3600", 
-            "dfs.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "dfs.datanode.kerberos.principal": "dn/_HOST@EXAMPLE.COM", 
-            "dfs.heartbeat.interval": "3", 
-            "dfs.content-summary.limit": "5000", 
-            "dfs.support.append": "true", 
-            "dfs.datanode.address": "0.0.0.0:1019", 
-            "dfs.cluster.administrators": " hdfs", 
-            "dfs.namenode.audit.log.async": "true", 
-            "dfs.datanode.balance.bandwidthPerSec": "6250000", 
-            "dfs.namenode.safemode.threshold-pct": "1", 
-            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}", 
-            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020", 
-            "dfs.permissions.enabled": "true", 
-            "dfs.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM", 
-            "dfs.client.read.shortcircuit": "true", 
-            "dfs.https.port": "50470", 
-            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470", 
-            "nfs.file.dump.dir": "/tmp/.hdfs-nfs", 
-            "dfs.blocksize": "134217728", 
-            "dfs.blockreport.initialDelay": "120", 
-            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode", 
-            "dfs.namenode.fslock.fair": "false", 
-            "dfs.datanode.max.transfer.threads": "4096", 
-            "dfs.secondary.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "dfs.replication": "3", 
-            "dfs.namenode.handler.count": "50", 
-            "dfs.web.authentication.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab", 
-            "fs.permissions.umask-mode": "022", 
-            "dfs.namenode.stale.datanode.interval": "30000", 
-            "dfs.datanode.ipc.address": "0.0.0.0:8010", 
-            "dfs.datanode.failed.volumes.tolerated": "0", 
-            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data", 
-            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070", 
-            "dfs.webhdfs.enabled": "true", 
-            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding", 
-            "dfs.namenode.accesstime.precision": "0", 
-            "dfs.namenode.write.stale.datanode.ratio": "1.0f", 
-            "dfs.datanode.https.address": "0.0.0.0:50475", 
-            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary", 
-            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090", 
-            "nfs.exports.allowed.hosts": "* rw", 
-            "dfs.namenode.checkpoint.txns": "1000000", 
-            "dfs.datanode.http.address": "0.0.0.0:1022", 
-            "dfs.datanode.du.reserved": "33011188224", 
-            "dfs.client.read.shortcircuit.streams.cache.size": "4096", 
-            "dfs.secondary.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab", 
-            "dfs.web.authentication.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "dfs.http.policy": "HTTP_ONLY", 
-            "dfs.block.access.token.enable": "true", 
-            "dfs.client.retry.policy.enabled": "false", 
-            "dfs.secondary.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM", 
-            "dfs.datanode.keytab.file": "/etc/security/keytabs/dn.service.keytab", 
-            "dfs.namenode.name.dir.restore": "true", 
-            "dfs.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab", 
-            "dfs.journalnode.https-address": "0.0.0.0:8481", 
-            "dfs.journalnode.http-address": "0.0.0.0:8480", 
-            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket", 
-            "dfs.namenode.avoid.read.stale.datanode": "true", 
-            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude", 
-            "dfs.datanode.data.dir.perm": "750", 
-            "dfs.encryption.key.provider.uri": "kms://http@c6401.ambari.apache.org:9292/kms", 
-            "dfs.replication.max": "50", 
+            "dfs.namenode.checkpoint.period": "21600",
+            "dfs.namenode.avoid.write.stale.datanode": "true",
+            "dfs.permissions.superusergroup": "hdfs",
+            "dfs.namenode.startup.delay.block.deletion.sec": "3600",
+            "dfs.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "dfs.datanode.kerberos.principal": "dn/_HOST@EXAMPLE.COM",
+            "dfs.heartbeat.interval": "3",
+            "dfs.content-summary.limit": "5000",
+            "dfs.support.append": "true",
+            "dfs.datanode.address": "0.0.0.0:1019",
+            "dfs.cluster.administrators": " hdfs",
+            "dfs.namenode.audit.log.async": "true",
+            "dfs.datanode.balance.bandwidthPerSec": "6250000",
+            "dfs.namenode.safemode.threshold-pct": "1",
+            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}",
+            "dfs.namenode.rpc-address": "c6401.ambari.apache.org:8020",
+            "dfs.permissions.enabled": "true",
+            "dfs.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM",
+            "dfs.client.read.shortcircuit": "true",
+            "dfs.https.port": "50470",
+            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470",
+            "nfs.file.dump.dir": "/tmp/.hdfs-nfs",
+            "dfs.blocksize": "134217728",
+            "dfs.blockreport.initialDelay": "120",
+            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode",
+            "dfs.namenode.fslock.fair": "false",
+            "dfs.datanode.max.transfer.threads": "4096",
+            "dfs.secondary.namenode.kerberos.internal.spnego.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "dfs.replication": "3",
+            "dfs.namenode.handler.count": "50",
+            "dfs.web.authentication.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab",
+            "fs.permissions.umask-mode": "022",
+            "dfs.namenode.stale.datanode.interval": "30000",
+            "dfs.datanode.ipc.address": "0.0.0.0:8010",
+            "dfs.datanode.failed.volumes.tolerated": "0",
+            "dfs.datanode.data.dir": "/grid/0/hadoop/hdfs/data",
+            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070",
+            "dfs.webhdfs.enabled": "true",
+            "dfs.encrypt.data.transfer.cipher.suites": "AES/CTR/NoPadding",
+            "dfs.namenode.accesstime.precision": "0",
+            "dfs.namenode.write.stale.datanode.ratio": "1.0f",
+            "dfs.datanode.https.address": "0.0.0.0:50475",
+            "dfs.namenode.checkpoint.dir": "/grid/0/hadoop/hdfs/namesecondary",
+            "dfs.namenode.secondary.http-address": "c6401.ambari.apache.org:50090",
+            "nfs.exports.allowed.hosts": "* rw",
+            "dfs.namenode.checkpoint.txns": "1000000",
+            "dfs.datanode.http.address": "0.0.0.0:1022",
+            "dfs.datanode.du.reserved": "33011188224",
+            "dfs.client.read.shortcircuit.streams.cache.size": "4096",
+            "dfs.secondary.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab",
+            "dfs.web.authentication.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "dfs.http.policy": "HTTP_ONLY",
+            "dfs.block.access.token.enable": "true",
+            "dfs.client.retry.policy.enabled": "false",
+            "dfs.secondary.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM",
+            "dfs.datanode.keytab.file": "/etc/security/keytabs/dn.service.keytab",
+            "dfs.namenode.name.dir.restore": "true",
+            "dfs.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab",
+            "dfs.journalnode.https-address": "0.0.0.0:8481",
+            "dfs.journalnode.http-address": "0.0.0.0:8480",
+            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket",
+            "dfs.namenode.avoid.read.stale.datanode": "true",
+            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude",
+            "dfs.datanode.data.dir.perm": "750",
+            "dfs.encryption.key.provider.uri": "kms://http@c6401.ambari.apache.org:9292/kms",
+            "dfs.replication.max": "50",
             "dfs.namenode.name.dir": "/grid/0/hadoop/hdfs/namenode"
-        }, 
+        },
         "ranger-tagsync-site": {
-            "ranger.tagsync.dest.ranger.ssl.config.filename": "/usr/hdp/current/ranger-tagsync/conf/mytruststore.jks", 
-            "ranger.tagsync.source.atlasrest.username": "", 
-            "ranger.tagsync.logdir": "/var/log/ranger/tagsync", 
-            "ranger.tagsync.source.atlasrest.download.interval.millis": "", 
-            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks", 
-            "ranger.tagsync.source.file.check.interval.millis": "", 
-            "ranger.tagsync.source.atlasrest.endpoint": "", 
-            "ranger.tagsync.dest.ranger.username": "rangertagsync", 
-            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}", 
-            "ranger.tagsync.kerberos.principal": "rangertagsync/_HOST@EXAMPLE.COM", 
-            "ranger.tagsync.kerberos.keytab": "/etc/security/keytabs/rangertagsync.service.keytab", 
-            "ranger.tagsync.source.atlas": "false", 
-            "ranger.tagsync.source.atlasrest": "false", 
-            "ranger.tagsync.source.file": "false", 
+            "ranger.tagsync.dest.ranger.ssl.config.filename": "/usr/hdp/current/ranger-tagsync/conf/mytruststore.jks",
+            "ranger.tagsync.source.atlasrest.username": "",
+            "ranger.tagsync.logdir": "/var/log/ranger/tagsync",
+            "ranger.tagsync.source.atlasrest.download.interval.millis": "",
+            "ranger.tagsync.keystore.filename": "/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks",
+            "ranger.tagsync.source.file.check.interval.millis": "",
+            "ranger.tagsync.source.atlasrest.endpoint": "",
+            "ranger.tagsync.dest.ranger.username": "rangertagsync",
+            "ranger.tagsync.dest.ranger.endpoint": "{{ranger_external_url}}",
+            "ranger.tagsync.kerberos.principal": "rangertagsync/_HOST@EXAMPLE.COM",
+            "ranger.tagsync.kerberos.keytab": "/etc/security/keytabs/rangertagsync.service.keytab",
+            "ranger.tagsync.source.atlas": "false",
+            "ranger.tagsync.source.atlasrest": "false",
+            "ranger.tagsync.source.file": "false",
             "ranger.tagsync.source.file.filename": ""
-        }, 
+        },
         "tagsync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/tagsync
 .log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n"
-        }, 
+        },
         "ranger-kms-audit": {
-            "xasecure.audit.destination.solr.zookeepers": "NONE", 
-            "xasecure.audit.destination.solr.urls": "", 
-            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/ranger/kms/audit/solr/spool", 
-            "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/ranger/kms/audit/hdfs/spool", 
-            "xasecure.audit.destination.hdfs": "true", 
-            "xasecure.audit.destination.solr": "true", 
+            "xasecure.audit.destination.solr.zookeepers": "NONE",
+            "xasecure.audit.destination.solr.urls": "",
+            "xasecure.audit.destination.solr.batch.filespool.dir": "/var/log/ranger/kms/audit/solr/spool",
+            "xasecure.audit.destination.hdfs.batch.filespool.dir": "/var/log/ranger/kms/audit/hdfs/spool",
+            "xasecure.audit.destination.hdfs": "true",
+            "xasecure.audit.destination.solr": "true",
             "xasecure.audit.provider.summary.enabled": "false",
-            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit", 
+            "xasecure.audit.destination.hdfs.dir": "hdfs://c6401.ambari.apache.org:8020/ranger/audit",
             "xasecure.audit.is.enabled": "true"
-        }, 
+        },
         "hadoop-policy": {
-            "security.job.client.protocol.acl": "*", 
-            "security.job.task.protocol.acl": "*", 
-            "security.datanode.protocol.acl": "*", 
-            "security.namenode.protocol.acl": "*", 
-            "security.client.datanode.protocol.acl": "*", 
-            "security.inter.tracker.protocol.acl": "*", 
-            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop", 
-            "security.client.protocol.acl": "*", 
-            "security.refresh.policy.protocol.acl": "hadoop", 
-            "security.admin.operations.protocol.acl": "hadoop", 
+            "security.job.client.protocol.acl": "*",
+            "security.job.task.protocol.acl": "*",
+            "security.datanode.protocol.acl": "*",
+            "security.namenode.protocol.acl": "*",
+            "security.client.datanode.protocol.acl": "*",
+            "security.inter.tracker.protocol.acl": "*",
+            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop",
+            "security.client.protocol.acl": "*",
+            "security.refresh.policy.protocol.acl": "hadoop",
+            "security.admin.operations.protocol.acl": "hadoop",
             "security.inter.datanode.protocol.acl": "*"
-        }, 
+        },
         "hdfs-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#  http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n\n# Define some default values that can be overridden by system properties\n# To change daemon root logger use hadoop_root_logger in hadoop-env\nhadoop.root.lo
 gger=INFO,console\nhadoop.log.dir=.\nhadoop.log.file=hadoop.log\n\n\n# Define the root logger to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\n\n# Logging Threshold\nlog4j.threshhold=ALL\n\n#\n# Daily Rolling File Appender\n#\n\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Rollver at midnight\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\n\n# 30-day backup\n#log4j.appender.DRFA.MaxBackupIndex=30\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\n\n# Pattern format: Date LogLevel LoggerName LogMessage\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n# Debugging Pattern format\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender
 .console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\n\n#\n# TaskLog Appender\n#\n\n#Default values\nhadoop.tasklog.taskid=null\nhadoop.tasklog.iscleanup=false\nhadoop.tasklog.noKeepSplits=4\nhadoop.tasklog.totalLogFileSize=100\nhadoop.tasklog.purgeLogSplits=true\nhadoop.tasklog.logsRetainHours=12\n\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\n\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n\n#\n#Security audit appender\n#\nhadoop.security.logger=INFO,console\nhadoop.security.log.maxfilesize=256MB\nhadoop.security.log.maxbackupindex=20\nlog4j.category.SecurityLogger=${hadoop.security.logg
 er}\nhadoop.security.log.file=SecurityAuth.audit\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\n\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\n\n#\n# hdfs audit logging\n#\nhdfs.audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=
 false\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# NameNode metrics logging.\n# The default is to retain two namenode-metrics.log files up to 64MB each.\n#\nnamenode.metrics.logger=INFO,NullAppender\nlog4j.logger.NameNodeMetricsLog=${namenode.metrics.logger}\nlog4j.additivity.NameNodeMetricsLog=false\nlog4j.appender.NNMETRICSRFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.NNMETRICSRFA.File=${hadoop.log.dir}/namenode-metrics.log\nlog4j.appender.NNMETRICSRFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.NNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n\nlog4j.appender.NNMETRICSRFA.MaxBackupIndex=1\nlog4j.appender.NNMETRICSRFA.MaxFileSize=64MB\n\n#\n# mapred audit logging\n#\nmapred
 .audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# Rolling File Appender\n#\n\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Logfile size and and 30-day backups\nlog4j.appender.RFA.MaxFileSize=256MB\nlog4j.appender.RFA.MaxBackupIndex=10\n\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n# Custom Logging leve
 ls\n\nhadoop.metrics.log.level=INFO\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\n\n# Jets3t library\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\n\n#\n# Null Appender\n# Trap security logger on the hadoop client side\n#\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\n\n#\n# Event Counter Appender\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\n#\nlog4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter\n\n# Removes \"deprecated\" messages\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\n\n#\n# HDFS block state change log from block manager\n#\n# Uncomment the following to suppress normal block state change\n# messages from BlockManager in NameNode.\n#log4j.logger.BlockStateCh
 ange=WARN"
-        }, 
+        },
         "usersync-log4j": {
             "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nlog4j.rootLogger = info,logFile\n\n# logFile\nlog4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.logFile.file=${logdir}/usersync.
 log\nlog4j.appender.logFile.datePattern='.'yyyy-MM-dd\nlog4j.appender.logFile.layout=org.apache.log4j.PatternLayout\nlog4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n\n\n# console\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.Target=System.out\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %m%n"
-        }, 
+        },
         "krb5-conf": {
-            "domains": "", 
-            "manage_krb5_conf": "true", 
-            "content": "\n[libdefaults]\n  renew_lifetime = 7d\n  forwardable = true\n  default_realm = {{realm}}\n  ticket_lifetime = 24h\n  dns_lookup_realm = false\n  dns_lookup_kdc = false\n  default_ccache_name = /tmp/krb5cc_%{uid}\n  #default_tgs_enctypes = {{encryption_types}}\n  #default_tkt_enctypes = {{encryption_types}}\n{% if domains %}\n[domain_realm]\n{%- for domain in domains.split(',') %}\n  {{domain|trim()}} = {{realm}}\n{%- endfor %}\n{% endif %}\n[logging]\n  default = FILE:/var/log/krb5kdc.log\n  admin_server = FILE:/var/log/kadmind.log\n  kdc = FILE:/var/log/krb5kdc.log\n\n[realms]\n  {{realm}} = {\n{%- if kdc_hosts > 0 -%}\n{%- set kdc_host_list = kdc_hosts.split(',')  -%}\n{%- if kdc_host_list and kdc_host_list|length > 0 %}\n    admin_server = {{admin_server_host|default(kdc_host_list[0]|trim(), True)}}\n{%- if kdc_host_list -%}\n{% for kdc_host in kdc_host_list %}\n    kdc = {{kdc_host|trim()}}\n{%- endfor -%}\n{% endif %}\n{%- endif %}\n{%- endif %}\n  }\n\
 n{# Append additional realm declarations below #}", 
+            "domains": "",
+            "manage_krb5_conf": "true",
+            "content": "\n[libdefaults]\n  renew_lifetime = 7d\n  forwardable = true\n  default_realm = {{realm}}\n  ticket_lifetime = 24h\n  dns_lookup_realm = false\n  dns_lookup_kdc = false\n  default_ccache_name = /tmp/krb5cc_%{uid}\n  #default_tgs_enctypes = {{encryption_types}}\n  #default_tkt_enctypes = {{encryption_types}}\n{% if domains %}\n[domain_realm]\n{%- for domain in domains.split(',') %}\n  {{domain|trim()}} = {{realm}}\n{%- endfor %}\n{% endif %}\n[logging]\n  default = FILE:/var/log/krb5kdc.log\n  admin_server = FILE:/var/log/kadmind.log\n  kdc = FILE:/var/log/krb5kdc.log\n\n[realms]\n  {{realm}} = {\n{%- if kdc_hosts > 0 -%}\n{%- set kdc_host_list = kdc_hosts.split(',')  -%}\n{%- if kdc_host_list and kdc_host_list|length > 0 %}\n    admin_server = {{admin_server_host|default(kdc_host_list[0]|trim(), True)}}\n{%- if kdc_host_list -%}\n{% for kdc_host in kdc_host_list %}\n    kdc = {{kdc_host|trim()}}\n{%- endfor -%}\n{% endif %}\n{%- endif %}\n{%- endif %}\n  }\n\
 n{# Append additional realm declarations below #}",
             "conf_dir": "/etc"
-        }, 
+        },
         "kms-site": {
-            "hadoop.kms.proxyuser.ranger.hosts": "*", 
-            "hadoop.kms.authentication.type": "kerberos", 
-            "hadoop.kms.proxyuser.ranger.groups": "*", 
-            "hadoop.kms.authentication.signer.secret.provider.zookeeper.path": "/hadoop-kms/hadoop-auth-signature-secret", 
-            "hadoop.kms.security.authorization.manager": "org.apache.ranger.authorization.kms.authorizer.RangerKmsAuthorizer", 
-            "hadoop.kms.authentication.kerberos.name.rules": "RULE:[1:$1@$0](ambari-qa-test_cluster01@EXAMPLE.COM)s/.*/ambari-qa/\nRULE:[1:$1@$0](hdfs-test_cluster01@EXAMPLE.COM)s/.*/hdfs/\nRULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nRULE:[2:$1@$0](dn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](nn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](rangeradmin@EXAMPLE.COM)s/.*/ranger/\nRULE:[2:$1@$0](rangerkms@EXAMPLE.COM)s/.*/keyadmin/\nRULE:[2:$1@$0](rangertagsync@EXAMPLE.COM)s/.*/rangertagsync/\nRULE:[2:$1@$0](rangerusersync@EXAMPLE.COM)s/.*/rangerusersync/\nDEFAULT", 
-            "hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab", 
-            "hadoop.kms.current.key.cache.timeout.ms": "30000", 
-            "hadoop.kms.authentication.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab", 
-            "hadoop.kms.audit.aggregation.window.ms": "10000", 
-            "hadoop.kms.proxyuser.ranger.users": "*", 
-            "hadoop.kms.authentication.signer.secret.provider.zookeeper.auth.type": "kerberos", 
-            "hadoop.kms.key.provider.uri": "dbks://http@localhost:9292/kms", 
-            "hadoop.security.keystore.JavaKeyStoreProvider.password": "none", 
-            "hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM", 
-            "hadoop.kms.authentication.signer.secret.provider": "random", 
-            "hadoop.kms.authentication.signer.secret.provider.zookeeper.connection.string": "#HOSTNAME#:#PORT#,...", 
-            "hadoop.kms.cache.enable": "true", 
-            "hadoop.kms.cache.timeout.ms": "600000", 
+            "hadoop.kms.proxyuser.ranger.hosts": "*",
+            "hadoop.kms.authentication.type": "kerberos",
+            "hadoop.kms.proxyuser.ranger.groups": "*",
+            "hadoop.kms.authentication.signer.secret.provider.zookeeper.path": "/hadoop-kms/hadoop-auth-signature-secret",
+            "hadoop.kms.security.authorization.manager": "org.apache.ranger.authorization.kms.authorizer.RangerKmsAuthorizer",
+            "hadoop.kms.authentication.kerberos.name.rules": "RULE:[1:$1@$0](ambari-qa-test_cluster01@EXAMPLE.COM)s/.*/ambari-qa/\nRULE:[1:$1@$0](hdfs-test_cluster01@EXAMPLE.COM)s/.*/hdfs/\nRULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nRULE:[2:$1@$0](dn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](nn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](rangeradmin@EXAMPLE.COM)s/.*/ranger/\nRULE:[2:$1@$0](rangerkms@EXAMPLE.COM)s/.*/keyadmin/\nRULE:[2:$1@$0](rangertagsync@EXAMPLE.COM)s/.*/rangertagsync/\nRULE:[2:$1@$0](rangerusersync@EXAMPLE.COM)s/.*/rangerusersync/\nDEFAULT",
+            "hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab",
+            "hadoop.kms.current.key.cache.timeout.ms": "30000",
+            "hadoop.kms.authentication.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab",
+            "hadoop.kms.audit.aggregation.window.ms": "10000",
+            "hadoop.kms.proxyuser.ranger.users": "*",
+            "hadoop.kms.authentication.signer.secret.provider.zookeeper.auth.type": "kerberos",
+            "hadoop.kms.key.provider.uri": "dbks://http@localhost:9292/kms",
+            "hadoop.security.keystore.JavaKeyStoreProvider.password": "none",
+            "hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal": "HTTP/_HOST@EXAMPLE.COM",
+            "hadoop.kms.authentication.signer.secret.provider": "random",
+            "hadoop.kms.authentication.signer.secret.provider.zookeeper.connection.string": "#HOSTNAME#:#PORT#,...",
+            "hadoop.kms.cache.enable": "true",
+            "hadoop.kms.cache.timeout.ms": "600000",
             "hadoop.kms.authentication.kerberos.principal": "*"
-        }, 
+        },
         "core-site": {
-            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py", 
-            "hadoop.proxyuser.hdfs.groups": "*", 
-            "fs.trash.interval": "360", 
-            "ipc.server.tcpnodelay": "true", 
-            "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec", 
-            "ipc.client.idlethreshold": "8000", 
-            "io.file.buffer.size": "131072", 
-            "hadoop.proxyuser.ambari-server-test_cluster01.groups": "*", 
-            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
-            "hadoop.security.authentication": "kerberos", 
-            "mapreduce.jobtracker.webinterface.trusted": "false", 
-            "hadoop.proxyuser.kms.groups": "*", 
-            "hadoop.proxyuser.hdfs.hosts": "*", 
-            "hadoop.proxyuser.HTTP.groups": "users", 
-            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020", 
-            "ha.failover-controller.active-standby-elector.zk.op.retries": "120", 
-            "hadoop.security.key.provider.path": "kms://http@c6401.ambari.apache.org:9292/kms", 
-            "hadoop.security.authorization": "true", 
-            "hadoop.http.authentication.simple.anonymous.allowed": "true", 
-            "ipc.client.connect.max.retries": "50", 
-            "hadoop.security.auth_to_local": "RULE:[1:$1@$0](ambari-qa-test_cluster01@EXAMPLE.COM)s/.*/ambari-qa/\nRULE:[1:$1@$0](hdfs-test_cluster01@EXAMPLE.COM)s/.*/hdfs/\nRULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nRULE:[2:$1@$0](dn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](nn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](rangeradmin@EXAMPLE.COM)s/.*/ranger/\nRULE:[2:$1@$0](rangerkms@EXAMPLE.COM)s/.*/keyadmin/\nRULE:[2:$1@$0](rangertagsync@EXAMPLE.COM)s/.*/rangertagsync/\nRULE:[2:$1@$0](rangerusersync@EXAMPLE.COM)s/.*/rangerusersync/\nDEFAULT", 
-            "hadoop.proxyuser.ambari-server-test_cluster01.hosts": "c6401.ambari.apache.org", 
+            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py",
+            "hadoop.proxyuser.hdfs.groups": "*",
+            "fs.trash.interval": "360",
+            "ipc.server.tcpnodelay": "true",
+            "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec",
+            "ipc.client.idlethreshold": "8000",
+            "io.file.buffer.size": "131072",
+            "hadoop.proxyuser.ambari-server-test_cluster01.groups": "*",
+            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization",
+            "hadoop.security.authentication": "kerberos",
+            "mapreduce.jobtracker.webinterface.trusted": "false",
+            "hadoop.proxyuser.kms.groups": "*",
+            "hadoop.proxyuser.hdfs.hosts": "*",
+            "hadoop.proxyuser.HTTP.groups": "users",
+            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020",
+            "ha.failover-controller.active-standby-elector.zk.op.retries": "120",
+            "hadoop.security.key.provider.path": "kms://http@c6401.ambari.apache.org:9292/kms",
+            "hadoop.security.authorization": "true",
+            "hadoop.http.authentication.simple.anonymous.allowed": "true",
+            "ipc.client.connect.max.retries": "50",
+            "hadoop.security.auth_to_local": "RULE:[1:$1@$0](ambari-qa-test_cluster01@EXAMPLE.COM)s/.*/ambari-qa/\nRULE:[1:$1@$0](hdfs-test_cluster01@EXAMPLE.COM)s/.*/hdfs/\nRULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nRULE:[2:$1@$0](dn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](nn@EXAMPLE.COM)s/.*/hdfs/\nRULE:[2:$1@$0](rangeradmin@EXAMPLE.COM)s/.*/ranger/\nRULE:[2:$1@$0](rangerkms@EXAMPLE.COM)s/.*/keyadmin/\nRULE:[2:$1@$0](rangertagsync@EXAMPLE.COM)s/.*/rangertagsync/\nRULE:[2:$1@$0](rangerusersync@EXAMPLE.COM)s/.*/rangerusersync/\nDEFAULT",
+            "hadoop.proxyuser.ambari-server-test_cluster01.hosts": "c6401.ambari.apache.org",
             "ipc.client.connection.maxidletime": "30000"
-        }, 
+        },
         "hadoop-env": {
-            "keyserver_port": "", 
-            "proxyuser_group": "users", 
-            "hdfs_user_nproc_limit": "65536", 
-            "hdfs_log_dir_prefix": "/var/log/hadoop", 
-            "hdfs_user_nofile_limit": "128000", 
-            "hdfs_user": "hdfs", 
+            "keyserver_port": "",
+            "proxyuser_group": "users",
+            "hdfs_user_nproc_limit": "65536",
+            "hdfs_log_dir_prefix": "/var/log/hadoop",
+            "hdfs_user_nofile_limit": "128000",
+            "hdfs_user": "hdfs",
             "hdfs_principal_name": "hdfs-cl1@EXAMPLE.COM",
-            "keyserver_host": " ", 
-            "namenode_opt_maxnewsize": "128m", 
-            "hdfs_user_keytab": "/etc/security/keytabs/hdfs.headless.keytab", 
-            "namenode_opt_maxpermsize": "256m", 
-            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-namenode/bin/kill-name-node\\\" -Dorg.mortbay.jetty.Request.maxFormContentSize=-1 ${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms
 {{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\\\" ${HADOOP_SECONDARYNAMENODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nSHARED_HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{name
 node_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT\"\nexport HADOOP_NAMENODE_OPTS=\"${SHARED_HADOOP_NAMENODE_OPTS} -XX:OnOutOfMemoryError=\\\"/usr/hdp/current/ha

<TRUNCATED>

[52/52] [abbrv] ambari git commit: AMBARI-21077: Fix build issues after reverting patch for AMBARI-21077 and merging latest trunk (jluniya)

Posted by jl...@apache.org.
AMBARI-21077: Fix build issues after reverting patch for AMBARI-21077 and merging latest trunk (jluniya)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: ba7b5cbe8296c0d3bf26bc7648d58de57aee3f39
Parents: f491f7b
Author: Jayush Luniya <jl...@hortonworks.com>
Authored: Mon Jul 10 12:53:08 2017 -0700
Committer: Jayush Luniya <jl...@hortonworks.com>
Committed: Mon Jul 10 12:53:08 2017 -0700

----------------------------------------------------------------------
 .../api/services/AbstractVersionService.java    | 370 -------------------
 .../api/services/MpackRequestSwagger.java       |  30 ++
 .../server/api/services/MpacksService.java      |  77 +++-
 .../api/services/RegistryRequestSwagger.java    |  30 ++
 .../server/api/services/RegistryService.java    |  66 +++-
 .../ambari/server/controller/MpackResponse.java |   9 +
 .../server/controller/RegistryResponse.java     |   9 +
 .../internal/MpackResourceProvider.java         |  19 +-
 .../internal/RegistryResourceProvider.java      |  11 +-
 .../server/upgrade/UpgradeCatalog251.java       |   5 -
 .../server/api/services/MpacksServiceTest.java  |   3 +-
 11 files changed, 226 insertions(+), 403 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/api/services/AbstractVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AbstractVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AbstractVersionService.java
deleted file mode 100644
index a5712d4..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AbstractVersionService.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/**
- * 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.api.services;
-
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-
-import org.apache.ambari.server.api.rest.BootStrapResource;
-import org.apache.ambari.server.api.rest.HealthCheck;
-import org.apache.ambari.server.api.rest.KdcServerReachabilityCheck;
-import org.apache.ambari.server.api.util.ApiVersion;
-
-/**
- * Abstract class for single entry point for an API version
- */
-public abstract class AbstractVersionService {
-
-  /**
-   * Handles /actions request.
-   *
-   * @return action service
-   */
-  @Path("/actions")
-  public ActionService getActionService(@PathParam("apiVersion") String apiVersion) {
-    return new ActionService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /alert_targets request.
-   *
-   * @return alert targets service
-   */
-  @Path("/alert_targets")
-  public AlertTargetService getAlertTargetService(@PathParam("apiVersion") String apiVersion) {
-    return new AlertTargetService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /privileges request.
-   *
-   * @return privileges service
-   */
-  @Path("/privileges")
-  public AmbariPrivilegeService getAmbariPrivilegeService(@PathParam("apiVersion") String apiVersion) {
-    return new AmbariPrivilegeService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /blueprints request.
-   *
-   * @return blueprints service
-   */
-  @Path("/blueprints")
-  public BlueprintService getBlueprintService(@PathParam("apiVersion") String apiVersion) {
-    return new BlueprintService(ApiVersion.valueOf(apiVersion));
-  }
-
-
-  /**
-   * Handles /links request.
-   *
-   * @return extension links service
-   */
-  @Path("/links")
-  public ExtensionLinksService getExtensionLinksService(@PathParam("apiVersion") String apiVersion) {
-    return new ExtensionLinksService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /extensions request.
-   *
-   * @return extensions service
-   */
-  @Path("/extensions")
-  public ExtensionsService getExtensionsService(@PathParam("apiVersion") String apiVersion) {
-    return new ExtensionsService(ApiVersion.valueOf(apiVersion));
-  }
-
-
-  /**
-   * Handles /clusters request.
-   *
-   * @return cluster service
-   */
-  @Path("/clusters")
-  public ClusterService getClusterService(@PathParam("apiVersion") String apiVersion) {
-    return new ClusterService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /feeds request.
-   * TODO: Cleanup?
-   *
-   * @return feed service
-   */
-  @Path("/feeds")
-  public FeedService getFeedService(@PathParam("apiVersion") String apiVersion) {
-    return new FeedService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /groups request.
-   *
-   * @return group service
-   */
-  @Path("/groups")
-  public GroupService getGroupService(@PathParam("apiVersion") String apiVersion) {
-    return new GroupService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /hosts request.
-   *
-   * @return host service
-   */
-  @Path("/hosts")
-  public HostService getHostService(@PathParam("apiVersion") String apiVersion) {
-    return new HostService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /instances request.
-   * TODO: Cleanup?
-   *
-   * @return instance service
-   */
-  @Path("/instances")
-  public InstanceService getInstanceService(@PathParam("apiVersion") String apiVersion) {
-    return new InstanceService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /kerberos_descriptors request.
-   *
-   * @return kerberos descriptor service
-   */
-  @Path("/kerberos_descriptors")
-  public KerberosDescriptorService getKerberosDescriptorService(@PathParam("apiVersion") String apiVersion) {
-    return new KerberosDescriptorService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /keys request.
-   *
-   * @return key service
-   */
-  @Path("/keys")
-  public KeyService getKeyService(@PathParam("apiVersion") String apiVersion) {
-    return new KeyService();
-  }
-
-  /**
-   * Handles /ldap_sync_events request.
-   *
-   * @return Ldap sync event service
-   */
-  @Path("/ldap_sync_events")
-  public LdapSyncEventService getLdapSyncEventService(@PathParam("apiVersion") String apiVersion) {
-    return new LdapSyncEventService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /logout request.
-   *
-   * @return logout service
-   */
-  @Path("/logout")
-  public LogoutService getLogoutService(@PathParam("apiVersion") String apiVersion) {
-    return new LogoutService();
-  }
-
-  /**
-   * Handles /permissions request.
-   *
-   * @return permission service
-   */
-  @Path("/permissions")
-  public PermissionService getPermissionService(@PathParam("apiVersion") String apiVersion) {
-    return new PermissionService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /persist request.
-   *
-   * @return persist service
-   */
-  @Path("/persist")
-  public PersistKeyValueService getPersistKeyValueService(@PathParam("apiVersion") String apiVersion) {
-    return new PersistKeyValueService();
-  }
-
-  /**
-   * Handles /remoteclusters request
-   *
-   * @return remote clusters service
-   */
-  @Path("/remoteclusters")
-  public RemoteClustersService getRemoteClustersService(@PathParam("apiVersion") String apiVersion) {
-    return new RemoteClustersService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /requests request.
-   *
-   * @return request service
-   */
-  @Path("/requests")
-  public RequestService getRequestService(@PathParam("apiVersion") String apiVersion) {
-    return new RequestService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /settings request.
-   *
-   * @return request service
-   */
-  @Path("/settings")
-  public SettingService getSettingService(@PathParam("apiVersion") String apiVersion) {
-    return new SettingService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /authorizations request.
-   *
-   * @return role authorization service
-   */
-  @Path("/authorizations")
-  public RoleAuthorizationService getRoleAuthorizationService(@PathParam("apiVersion") String apiVersion) {
-    return new RoleAuthorizationService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /services request.
-   *
-   * @return root service service
-   */
-  @Path("/services")
-  public RootServiceService getRootServiceService(@PathParam("apiVersion") String apiVersion) {
-    return new RootServiceService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /targets request.
-   * TODO: Cleanup?
-   *
-   * @return target cluster service
-   */
-  @Path("/targets")
-  public TargetClusterService getTargetClusterService(@PathParam("apiVersion") String apiVersion) {
-    return new TargetClusterService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /users request.
-   *
-   * @return user service
-   */
-  @Path("/users")
-  public UserService getUserService(@PathParam("apiVersion") String apiVersion) {
-    return new UserService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /version_definitions request.
-   *
-   * @return version definition service
-   */
-  @Path("/version_definitions")
-  public VersionDefinitionService getVersionDefinitionService(@PathParam("apiVersion") String apiVersion) {
-    return new VersionDefinitionService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /views request.
-   *
-   * @return view service
-   */
-  @Path("/views")
-  public ViewService getViewService(@PathParam("apiVersion") String apiVersion) {
-    return new ViewService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /view/urls request.
-   *
-   * @return view urls service
-   */
-  @Path("/view/urls")
-  public ViewUrlsService getViewUrlsService(@PathParam("apiVersion") String apiVersion) {
-    return new ViewUrlsService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /stacks request.
-   *
-   * @return stacks service
-   */
-  @Path("/stacks")
-  public StacksService getStacksService(@PathParam("apiVersion") String apiVersion) {
-    return new StacksService(ApiVersion.valueOf(apiVersion));
-  }
-
-
-  /**
-   * Handles /bootstrap request.
-   *
-   * @return bootstrap service
-   */
-  @Path("/bootstrap")
-  public BootStrapResource getBootStrapResource(@PathParam("apiVersion") String apiVersion) {
-    return new BootStrapResource();
-  }
-
-
-  /**
-   * Handles /check request.
-   *
-   * @return health check service
-   */
-  @Path("/check")
-  public HealthCheck getHealthCheck(@PathParam("apiVersion") String apiVersion) {
-    return new HealthCheck();
-  }
-
-  /**
-   * Handles /kdc_check request.
-   *
-   * @return kdc server reachability service
-   */
-  @Path("/kdc_check")
-  public KdcServerReachabilityCheck getKdcServerReachabilityCheck(@PathParam("apiVersion") String apiVersion) {
-    return new KdcServerReachabilityCheck();
-  }
-
-  /**
-   * Handles /registries request.
-   *
-   * @return registry service
-   */
-  @Path("/registries")
-  public RegistryService getRegistryService(@PathParam("apiVersion") String apiVersion) {
-    return new RegistryService(ApiVersion.valueOf(apiVersion));
-  }
-
-  /**
-   * Handles /mpacks request.
-   *
-   * @return mpacks service
-   */
-  @Path("/mpacks")
-  public MpacksService getMpacksService(@PathParam("apiVersion") String apiVersion) {
-    return new MpacksService(ApiVersion.valueOf(apiVersion));
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpackRequestSwagger.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpackRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpackRequestSwagger.java
new file mode 100644
index 0000000..5fe5693
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpackRequestSwagger.java
@@ -0,0 +1,30 @@
+/*
+ * 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.api.services;
+
+import org.apache.ambari.server.controller.ApiModel;
+import org.apache.ambari.server.controller.MpackRequest;
+import org.apache.ambari.server.controller.internal.MpackResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+@SuppressWarnings("unused") // for Swagger
+public interface MpackRequestSwagger extends ApiModel {
+  @ApiModelProperty(name = MpackResourceProvider.RESPONSE_KEY)
+  MpackRequest getMpackRequest();
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java
index 47c1af4..4b7e025 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java
@@ -26,22 +26,35 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
 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.api.util.ApiVersion;
+import org.apache.ambari.server.controller.MpackResponse.MpackResponseWrapper;
+import org.apache.ambari.server.controller.internal.MpackResourceProvider;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.http.HttpStatus;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 
 /**
  * Service for Mpacks Management.
  * Endpoint for Mpack Data
  */
-
+@Path("/mpacks/")
+@Api(value = "Mpacks", description = "Endpoint for mpack-specific operations")
 public class MpacksService extends BaseService {
 
-  public MpacksService(ApiVersion apiVersion) {
-    super(apiVersion);
+  private static final String MPACK_REQUEST_TYPE = "org.apache.ambari.server.api.services.MpackRequestSwagger";
+
+  public MpacksService() {
+    super();
   }
 
   /**
@@ -54,7 +67,28 @@ public class MpacksService extends BaseService {
    *
    */
   @GET
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns all mpacks registered with this Ambari instance",
+    response = MpackResponseWrapper.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING,
+      paramType = PARAM_TYPE_QUERY, defaultValue = MpackResourceProvider.MPACK_ID),
+    @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, dataType = DATA_TYPE_STRING,
+      paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE,
+      dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES,
+      defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES,
+      dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response getMpacks(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.GET,
             createMpackResource(null));
@@ -69,7 +103,20 @@ public class MpacksService extends BaseService {
    * @return information regarding the created mpack
    */
   @POST
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Registers an mpack with this Ambari mpack")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = MPACK_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response createMpacks(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.POST, createMpackResource(null));
   }
@@ -82,8 +129,22 @@ public class MpacksService extends BaseService {
    */
   @GET
   @Path("{mpack_id}")
-  @Produces("text/plain")
-  public Response getMpack(String body, @Context HttpHeaders headers, @Context UriInfo ui, @PathParam("mpack_id") String mpackId) {
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns information about a specific mpack that is registered with this Ambari instance",
+    response = MpackResponseWrapper.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING,
+      paramType = PARAM_TYPE_QUERY, defaultValue = MpackResourceProvider.ALL_PROPERTIES),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response getMpack(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @PathParam("mpack_id") String mpackId) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
             createMpackResource(mpackId));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/api/services/RegistryRequestSwagger.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RegistryRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RegistryRequestSwagger.java
new file mode 100644
index 0000000..4399418
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RegistryRequestSwagger.java
@@ -0,0 +1,30 @@
+/*
+ * 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.api.services;
+
+import org.apache.ambari.server.controller.ApiModel;
+import org.apache.ambari.server.controller.RegistryRequest;
+import org.apache.ambari.server.controller.internal.RegistryResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+@SuppressWarnings("unused") // for Swagger
+public interface RegistryRequestSwagger extends ApiModel {
+  @ApiModelProperty(name = RegistryResourceProvider.RESPONSE_KEY)
+  RegistryRequest getRegistryRequest();
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/api/services/RegistryService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RegistryService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RegistryService.java
index 5f1a0e4..8f5437d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RegistryService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RegistryService.java
@@ -26,17 +26,31 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
 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.api.util.ApiVersion;
+import org.apache.ambari.server.controller.RegistryResponse.RegistryResponseWrapper;
+import org.apache.ambari.server.controller.internal.RegistryResourceProvider;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.http.HttpStatus;
 
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+@Path("/registries/")
+@Api(value = "Registries", description = "Endpoint for software registry specific operations")
 public class RegistryService extends BaseService {
 
-    public RegistryService(final ApiVersion apiVersion) {
-        super(apiVersion);
+    private static final String REGISTRY_REQUEST_TYPE = "org.apache.ambari.server.api.services.RegistryRequestSwagger";
+
+    public RegistryService() {
+        super();
     }
 
     /**
@@ -48,7 +62,20 @@ public class RegistryService extends BaseService {
      * @return information regarding the softare registry
      */
     @POST
-    @Produces("text/plain")
+    @Produces(MediaType.TEXT_PLAIN)
+    @ApiOperation(value = "Connect a software registry with this Ambari instance")
+    @ApiImplicitParams({
+      @ApiImplicitParam(dataType = REGISTRY_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
+    })
+    @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+    })
     public Response createRegistries(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
         return handleRequest(headers, body, ui, Request.Type.POST, createRegistryResource(null));
     }
@@ -63,7 +90,21 @@ public class RegistryService extends BaseService {
      *
      */
     @GET
-    @Produces("text/plain")
+    @Produces(MediaType.TEXT_PLAIN)
+    @ApiOperation(value = "Returns all software registry connected with this Ambari instance",
+      response = RegistryResponseWrapper.class, responseContainer = RESPONSE_CONTAINER_LIST)
+    @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING,
+        paramType = PARAM_TYPE_QUERY, defaultValue = RegistryResourceProvider.REGISTRY_ID),
+      @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, dataType = DATA_TYPE_STRING,
+        paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE,
+        dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES,
+        defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES,
+        dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    })
     public Response getRegistries(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
         return handleRequest(headers, body, ui, Request.Type.GET,
                 createRegistryResource(null));
@@ -78,7 +119,20 @@ public class RegistryService extends BaseService {
      */
     @GET
     @Path("{registry_id}")
-    @Produces("text/plain")
+    @Produces(MediaType.TEXT_PLAIN)
+    @ApiOperation(value = "Returns information about a specific software registry that is connected with this Ambari instance",
+      response = RegistryResponseWrapper.class)
+    @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING,
+        paramType = PARAM_TYPE_QUERY, defaultValue = RegistryResourceProvider.ALL_PROPERTIES),
+    })
+    @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+    })
     public Response getRegistry(String body, @Context HttpHeaders headers, @Context UriInfo ui,
             @PathParam("registry_id") String registryId) {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java
index 76b0aba..ff42fde 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java
@@ -17,8 +17,11 @@
  */
 package org.apache.ambari.server.controller;
 
+import org.apache.ambari.server.controller.internal.MpackResourceProvider;
 import org.apache.ambari.server.state.Mpack;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Represents a mpack response.
  */
@@ -106,4 +109,10 @@ public class MpackResponse {
     MpackResponse MpackResponse = (MpackResponse) obj;
     return getMpackId().equals(MpackResponse.getMpackId());
   }
+
+  public interface MpackResponseWrapper extends ApiModel {
+    @ApiModelProperty(name = MpackResourceProvider.RESPONSE_KEY)
+    @SuppressWarnings("unused")
+    MpackResponse getMpackResponse();
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/controller/RegistryResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RegistryResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RegistryResponse.java
index adb512c..729451f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RegistryResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RegistryResponse.java
@@ -17,9 +17,12 @@
  */
 package org.apache.ambari.server.controller;
 
+import org.apache.ambari.server.controller.internal.RegistryResourceProvider;
 import org.apache.ambari.server.registry.Registry;
 import org.apache.ambari.server.registry.RegistryType;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Represents a software registry response.
  */
@@ -87,4 +90,10 @@ public class RegistryResponse {
         RegistryResponse registryResponse = (RegistryResponse) obj;
         return getRegistryId().equals(registryResponse.getRegistryId());
     }
+
+    public interface RegistryResponseWrapper extends ApiModel {
+        @ApiModelProperty(name = RegistryResourceProvider.RESPONSE_KEY)
+        @SuppressWarnings("unused")
+        RegistryResponse getRegistryResponse();
+    }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java
index 99a28cb..1bef4cd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java
@@ -43,6 +43,7 @@ import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException;
 import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
 import org.apache.ambari.server.controller.utilities.PredicateHelper;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
 import org.apache.ambari.server.orm.dao.MpackDAO;
 import org.apache.ambari.server.orm.dao.StackDAO;
 import org.apache.ambari.server.orm.entities.MpackEntity;
@@ -57,14 +58,16 @@ import com.google.inject.Inject;
 @StaticallyInject
 public class MpackResourceProvider extends AbstractControllerResourceProvider {
 
-  public static final String MPACK_ID = "MpackInfo/mpack_id";
-  public static final String REGISTRY_ID = "MpackInfo/registry_id";
-  public static final String MPACK_NAME = "MpackInfo/mpack_name";
-  public static final String MPACK_VERSION = "MpackInfo/mpack_version";
-  public static final String MPACK_URI = "MpackInfo/mpack_uri";
-  public static final String PACKLETS = "MpackInfo/packlets";
-  public static final String STACK_NAME_PROPERTY_ID = "MpackInfo/stack_name";
-  public static final String STACK_VERSION_PROPERTY_ID = "MpackInfo/stack_version";
+  public static final String RESPONSE_KEY = "MpackInfo";
+  public static final String ALL_PROPERTIES = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "*";
+  public static final String MPACK_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_id";
+  public static final String REGISTRY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "registry_id";
+  public static final String MPACK_NAME = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_name";
+  public static final String MPACK_VERSION = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_version";
+  public static final String MPACK_URI = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_uri";
+  public static final String PACKLETS = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "packlets";
+  public static final String STACK_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "stack_name";
+  public static final String STACK_VERSION_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "stack_version";
 
   private static Set<String> pkPropertyIds = new HashSet<>(
           Arrays.asList(MPACK_ID, STACK_NAME_PROPERTY_ID, STACK_VERSION_PROPERTY_ID));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RegistryResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RegistryResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RegistryResourceProvider.java
index 112b30f..715cd96 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RegistryResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RegistryResourceProvider.java
@@ -38,6 +38,7 @@ import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException;
 import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
 import org.apache.ambari.server.registry.RegistryType;
 import org.apache.commons.lang.Validate;
 
@@ -46,10 +47,12 @@ import org.apache.commons.lang.Validate;
  */
 @StaticallyInject
 public class RegistryResourceProvider extends AbstractControllerResourceProvider {
-  public static final String REGISTRY_ID = "RegistryInfo/registry_id";
-  public static final String REGISTRY_NAME = "RegistryInfo/registry_name";
-  public static final String REGISTRY_TYPE = "RegistryInfo/registry_type";
-  public static final String REGISTRY_URI = "RegistryInfo/registry_uri";
+  public static final String RESPONSE_KEY = "RegistryInfo";
+  public static final String ALL_PROPERTIES = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "*";
+  public static final String REGISTRY_ID =  RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP +  "registry_id";
+  public static final String REGISTRY_NAME = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "registry_name";
+  public static final String REGISTRY_TYPE = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "registry_type";
+  public static final String REGISTRY_URI = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "registry_uri";
 
   private static Set<String> pkPropertyIds = new HashSet<>(
     Arrays.asList(REGISTRY_ID, REGISTRY_NAME));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
index 87c4972..6200915 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
@@ -31,8 +31,6 @@ import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.SecurityType;
 import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -40,9 +38,6 @@ import org.slf4j.LoggerFactory;
 import com.google.inject.Inject;
 import com.google.inject.Injector;
 
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-
 /**
  * The {@link UpgradeCatalog251} upgrades Ambari from 2.5.0 to 2.5.1.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba7b5cbe/ambari-server/src/test/java/org/apache/ambari/server/api/services/MpacksServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/MpacksServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/MpacksServiceTest.java
index d2c655a..3c3184c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/MpacksServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/MpacksServiceTest.java
@@ -29,7 +29,6 @@ import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
 
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -65,7 +64,7 @@ public class MpacksServiceTest extends BaseServiceTest{
     private String m_mpackId;
 
     private TestMpacksService(String mpackId) {
-      super(ApiVersion.Default);
+      super();
       m_mpackId = mpackId;
     }
 


[20/52] [abbrv] ambari git commit: AMBARI-21399 Create property descriptions for internal Log Feeder configs (mgergely)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogFeederUtil.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogFeederUtil.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogFeederUtil.java
index 0fdc21f..a244a4e 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogFeederUtil.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogFeederUtil.java
@@ -32,6 +32,7 @@ import java.util.Properties;
 
 import org.apache.ambari.logfeeder.LogFeeder;
 import org.apache.ambari.logfeeder.metrics.MetricData;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
@@ -46,6 +47,26 @@ import com.google.gson.reflect.TypeToken;
 public class LogFeederUtil {
   private static final Logger LOG = Logger.getLogger(LogFeederUtil.class);
 
+  public static final String LOGFEEDER_PROPERTIES_FILE = "logfeeder.properties";
+
+  @LogSearchPropertyDescription(
+    name = "cluster.name",
+    description = "The name of the cluster the Log Feeder program runs in.",
+    examples = {"cl1"},
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
+  private static final String CLUSTER_NAME_PROPERTY = "cluster.name";
+
+  private static final String DEFAULT_TMP_DIR = "/tmp/$username/logfeeder/";
+  @LogSearchPropertyDescription(
+    name = "logfeeder.tmp.dir",
+    description = "The tmp dir used for creating temporary files.",
+    examples = {"/tmp/"},
+    defaultValue = DEFAULT_TMP_DIR,
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+   )
+  private static final String TMP_DIR_PROPERTY = "logfeeder.tmp.dir";
+
   private final static String GSON_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";
   private static Gson gson = new GsonBuilder().setDateFormat(GSON_DATE_FORMAT).create();
   
@@ -81,6 +102,10 @@ public class LogFeederUtil {
     return props;
   }
 
+  public static void loadProperties() throws Exception {
+    loadProperties(LOGFEEDER_PROPERTIES_FILE);
+  }
+  
   /**
    * This method will read the properties from System, followed by propFile and finally from the map
    */
@@ -236,16 +261,20 @@ public class LogFeederUtil {
     }
   }
   
-  private static String logfeederTempDir = null;
+  public static String getClusterName() {
+    return getStringProperty(CLUSTER_NAME_PROPERTY);
+  }
+  
+  private static String logFeederTempDir = null;
   
-  public synchronized static String getLogfeederTempDir() {
-    if (logfeederTempDir == null) {
-      String tempDirValue = getStringProperty("logfeeder.tmp.dir", "/tmp/$username/logfeeder/");
+  public synchronized static String getLogFeederTempDir() {
+    if (logFeederTempDir == null) {
+      String tempDirValue = getStringProperty(TMP_DIR_PROPERTY, DEFAULT_TMP_DIR);
       HashMap<String, String> contextParam = new HashMap<String, String>();
       String username = System.getProperty("user.name");
       contextParam.put("username", username);
-      logfeederTempDir = PlaceholderUtil.replaceVariables(tempDirValue, contextParam);
+      logFeederTempDir = PlaceholderUtil.replaceVariables(tempDirValue, contextParam);
     }
-    return logfeederTempDir;
+    return logFeederTempDir;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogfeederHDFSUtil.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogfeederHDFSUtil.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogfeederHDFSUtil.java
deleted file mode 100644
index c975b99..0000000
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/LogfeederHDFSUtil.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.logfeeder.util;
-
-import java.io.IOException;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
-
-public class LogfeederHDFSUtil {
-  private static final Logger LOG = Logger.getLogger(LogfeederHDFSUtil.class);
-
-  private LogfeederHDFSUtil() {
-    throw new UnsupportedOperationException();
-  }
-  
-  public static boolean copyFromLocal(String sourceFilepath, String destFilePath, FileSystem fileSystem, boolean overwrite,
-      boolean delSrc) {
-    Path src = new Path(sourceFilepath);
-    Path dst = new Path(destFilePath);
-    boolean isCopied = false;
-    try {
-      LOG.info("copying localfile := " + sourceFilepath + " to hdfsPath := " + destFilePath);
-      fileSystem.copyFromLocalFile(delSrc, overwrite, src, dst);
-      isCopied = true;
-    } catch (Exception e) {
-      LOG.error("Error copying local file :" + sourceFilepath + " to hdfs location : " + destFilePath, e);
-    }
-    return isCopied;
-  }
-
-  public static FileSystem buildFileSystem(String hdfsHost, String hdfsPort) {
-    try {
-      Configuration configuration = buildHdfsConfiguration(hdfsHost, hdfsPort);
-      FileSystem fs = FileSystem.get(configuration);
-      return fs;
-    } catch (Exception e) {
-      LOG.error("Exception is buildFileSystem :", e);
-    }
-    return null;
-  }
-
-  private static Configuration buildHdfsConfiguration(String hdfsHost, String hdfsPort) {
-    String url = "hdfs://" + hdfsHost + ":" + hdfsPort + "/";
-    Configuration configuration = new Configuration();
-    configuration.set("fs.default.name", url);
-    return configuration;
-  }
-
-  public static void closeFileSystem(FileSystem fileSystem) {
-    if (fileSystem != null) {
-      try {
-        fileSystem.close();
-      } catch (IOException e) {
-        LOG.error(e.getLocalizedMessage(), e.getCause());
-      }
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java
index d963de3..573bb1c 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java
@@ -19,6 +19,7 @@
 
 package org.apache.ambari.logfeeder.util;
 
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang3.ArrayUtils;
@@ -28,6 +29,8 @@ import org.apache.log4j.Logger;
 import java.io.File;
 import java.nio.charset.Charset;
 
+import static org.apache.ambari.logfeeder.util.LogFeederUtil.LOGFEEDER_PROPERTIES_FILE;
+
 public class SSLUtil {
   private static final Logger LOG = Logger.getLogger(SSLUtil.class);
 
@@ -42,6 +45,12 @@ public class SSLUtil {
   private static final String KEYSTORE_PASSWORD_FILE = "ks_pass.txt";
   private static final String TRUSTSTORE_PASSWORD_FILE = "ts_pass.txt";
 
+  @LogSearchPropertyDescription(
+    name = "hadoop.security.credential.provider.path",
+    description = "The jceks file that provides passwords.",
+    examples = {"jceks://file/etc/ambari-logsearch-logfeeder/conf/logfeeder.jceks"},
+    sources = {LOGFEEDER_PROPERTIES_FILE}
+  )
   private static final String CREDENTIAL_STORE_PROVIDER_PATH = "hadoop.security.credential.provider.path";
   private static final String LOGFEEDER_CERT_DEFAULT_FOLDER = "/etc/ambari-logsearch-portal/conf/keys";
   private static final String LOGFEEDER_STORE_DEFAULT_PASSWORD = "bigdata";

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java
index 8f75c3a..7abf177 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/filter/FilterJSONTest.java
@@ -25,7 +25,7 @@ import java.util.Map;
 import java.util.TimeZone;
 
 import org.apache.ambari.logfeeder.common.LogFeederConstants;
-import org.apache.ambari.logfeeder.common.LogfeederException;
+import org.apache.ambari.logfeeder.common.LogFeederException;
 import org.apache.ambari.logfeeder.input.InputMarker;
 import org.apache.ambari.logfeeder.output.OutputManager;
 import org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl.FilterJsonDescriptorImpl;
@@ -135,9 +135,9 @@ public class FilterJSONTest {
     String inputStr="invalid json";
     try{
     filterJson.apply(inputStr,new InputMarker(null, null, 0));
-    fail("Expected LogfeederException was not occured");
-    }catch(LogfeederException logfeederException){
-      assertEquals("Json parsing failed for inputstr = "+inputStr, logfeederException.getLocalizedMessage());
+    fail("Expected LogFeederException was not occured");
+    }catch(LogFeederException logFeederException){
+      assertEquals("Json parsing failed for inputstr = "+inputStr, logFeederException.getLocalizedMessage());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java
index 625e362..46fbc3b 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/input/InputManagerTest.java
@@ -143,32 +143,6 @@ public class InputManagerTest {
   }
 
   @Test
-  public void testInputManagr_waitOnAllInputs() throws Exception {
-    Input input1 = strictMock(Input.class);
-    Input input2 = strictMock(Input.class);
-    Input input3 = strictMock(Input.class);
-    
-    Thread mockThread = strictMock(Thread.class);
-    
-    expect(input1.getThread()).andReturn(null);
-    expect(input2.getThread()).andReturn(null);
-    expect(input3.getThread()).andReturn(mockThread);
-    
-    mockThread.join(); expectLastCall();
-    
-    replay(input1, input2, input3);
-    
-    InputManager manager = new InputManager();
-    manager.add("serviceName", input1);
-    manager.add("serviceName", input2);
-    manager.add("serviceName", input3);
-    
-    manager.waitOnAllInputs();
-    
-    verify(input1, input2, input3);
-  }
-
-  @Test
   public void testInputManager_checkInAll() throws Exception {
     Input input1 = strictMock(Input.class);
     Input input2 = strictMock(Input.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
index 1461352..4b4067c 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
@@ -80,7 +80,6 @@ public class MetricsManagerTest {
     assertEquals(metricList.size(), 1);
     
     TimelineMetric metric = metricList.get(0);
-    assertEquals(metric.getHostName(), "test_host_name");
     assertEquals(metric.getAppId(), "logfeeder");
     assertEquals(metric.getMetricName(), "metric1");
     assertEquals(metric.getType(), "Long");
@@ -116,7 +115,6 @@ public class MetricsManagerTest {
     assertEquals(metricList.size(), 1);
     
     TimelineMetric metric = metricList.get(0);
-    assertEquals(metric.getHostName(), "test_host_name");
     assertEquals(metric.getAppId(), "logfeeder");
     assertEquals(metric.getMetricName(), "metric1");
     assertEquals(metric.getType(), "Long");

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-logfeeder/src/test/resources/logfeeder.properties
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/resources/logfeeder.properties b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/resources/logfeeder.properties
index 19027d1..5476c96 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/resources/logfeeder.properties
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/resources/logfeeder.properties
@@ -17,5 +17,4 @@ logfeeder.log.filter.enable=true
 logfeeder.solr.config.interval=5
 logfeeder.solr.zk_connect_string=some_connect_string
 logfeeder.metrics.collector.hosts=some_collector_host
-node.hostname=test_host_name
 logfeeder.include.default.level=FATAL,ERROR,WARN
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c9bdbfe/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/LogSearchConfigConfigurer.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/LogSearchConfigConfigurer.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/LogSearchConfigConfigurer.java
index 978e91a..c34dce6 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/LogSearchConfigConfigurer.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/LogSearchConfigConfigurer.java
@@ -53,7 +53,7 @@ public class LogSearchConfigConfigurer implements Configurer {
         while (true) {
           try {
             logSearchConfig = LogSearchConfigFactory.createLogSearchConfig(Component.SERVER, PropertiesHelper.getProperties(),
-                LogSearchConfigZK.class);
+                null, LogSearchConfigZK.class);
             logSearchConfigState.setLogSearchConfigAvailable(true);
             break;
           } catch (Exception e) {


[05/52] [abbrv] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

Posted by jl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/themes/theme_version_1.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/themes/theme_version_1.json b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/themes/theme_version_1.json
new file mode 100644
index 0000000..a307f56
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/themes/theme_version_1.json
@@ -0,0 +1,1821 @@
+{
+  "name": "default",
+  "description": "Default theme for Ranger service",
+  "configuration": {
+    "layouts": [
+      {
+        "name": "default",
+        "tabs": [
+          {
+            "name": "ranger_admin_settings",
+            "display-name": "Ranger Admin",
+            "layout": {
+              "tab-columns": "2",
+              "tab-rows": "2",
+              "sections": [
+                {
+                  "name": "section-ranger-admin",
+                  "display-name": "Ranger Admin",
+                  "row-index": "0",
+                  "column-index": "0",
+                  "row-span": "3",
+                  "column-span": "2",
+                  "section-columns": "2",
+                  "section-rows": "3",
+                  "subsections": [
+                    {
+                      "name": "subsection-ranger-db-row1-col1",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    },
+                    {
+                      "name": "subsection-ranger-db-row1-col2",
+                      "row-index": "0",
+                      "column-index": "1",
+                      "row-span": "1",
+                      "column-span": "1"
+                    },
+                    {
+                      "name": "subsection-ranger-db-row2",
+                      "row-index": "1",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "2"
+                    },
+                    {
+                      "name": "subsection-ranger-db-root-user-col1",
+                      "row-index": "2",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1",
+                      "depends-on": [
+                        {
+                          "configs":[
+                            "ranger-env/create_db_dbuser"
+                          ],
+                          "if": "${ranger-env/create_db_dbuser}",
+                          "then": {
+                            "property_value_attributes": {
+                              "visible": true
+                            }
+                          },
+                          "else": {
+                            "property_value_attributes": {
+                              "visible": false
+                            }
+                          }
+                        }
+                      ]
+                    },
+                    {
+                      "name": "subsection-ranger-db-root-user-col2",
+                      "row-index": "2",
+                      "column-index": "1",
+                      "row-span": "1",
+                      "column-span": "1",
+                      "depends-on": [
+                        {
+                          "configs":[
+                            "ranger-env/create_db_dbuser"
+                          ],
+                          "if": "${ranger-env/create_db_dbuser}",
+                          "then": {
+                            "property_value_attributes": {
+                              "visible": true
+                            }
+                          },
+                          "else": {
+                            "property_value_attributes": {
+                              "visible": false
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  ]
+                }
+              ]
+            }
+          },
+          {
+            "name": "ranger_user_info",
+            "display-name": "Ranger User Info",
+            "layout": {
+              "tab-columns": "1",
+              "tab-rows": "1",
+              "sections": [
+                {
+                  "name": "section-user-info",
+                  "display-name": "Ranger User Info",
+                  "row-index": "0",
+                  "column-index": "0",
+                  "row-span": "2",
+                  "column-span": "1",
+                  "section-columns": "1",
+                  "section-rows": "2",
+                  "subsections": [
+                    {
+                      "name": "subsection-ranger-user-row1-col1",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    },
+                    {
+                      "name": "subsection-ranger-user-row2-col1",
+                      "row-index": "1",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1",
+                      "subsection-tabs": [
+                        {
+                          "name": "ldap-common-configs",
+                          "display-name": "Common Configs",
+                          "depends-on": [
+                            {
+                              "configs": [
+                                "ranger-ugsync-site/ranger.usersync.source.impl.class"
+                              ],
+                              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder",
+                              "then": {
+                                "property_value_attributes": {
+                                  "visible": true
+                                }
+                              },
+                              "else": {
+                                "property_value_attributes": {
+                                  "visible": false
+                                }
+                              }
+                            }
+                          ]
+                        },
+                        {
+                          "name": "ldap-user-configs",
+                          "display-name": "User Configs",
+                          "depends-on": [
+                            {
+                              "configs": [
+                                "ranger-ugsync-site/ranger.usersync.source.impl.class"
+                              ],
+                              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder",
+                              "then": {
+                                "property_value_attributes": {
+                                  "visible": true
+                                }
+                              },
+                              "else": {
+                                "property_value_attributes": {
+                                  "visible": false
+                                }
+                              }
+                            }
+                          ]
+                        },
+                        {
+                          "name": "ldap-group-configs",
+                          "display-name": "Group Configs",
+                          "depends-on": [
+                            {
+                              "configs": [
+                                "ranger-ugsync-site/ranger.usersync.source.impl.class"
+                              ],
+                              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder",
+                              "then": {
+                                "property_value_attributes": {
+                                  "visible": true
+                                }
+                              },
+                              "else": {
+                                "property_value_attributes": {
+                                  "visible": false
+                                }
+                              }
+                            }
+                          ]
+                        }
+                      ],
+                      "depends-on": [
+                        {
+                          "configs": [
+                            "ranger-ugsync-site/ranger.usersync.enabled"
+                          ],
+                          "if": "${ranger-ugsync-site/ranger.usersync.enabled}",
+                          "then": {
+                            "property_value_attributes": {
+                              "visible": true
+                            }
+                          },
+                          "else": {
+                            "property_value_attributes": {
+                              "visible": false
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  ]
+                }
+              ]
+            }
+          },
+          {
+            "name": "ranger_plugin",
+            "display-name": "Ranger Plugin",
+            "layout": {
+              "tab-columns": "1",
+              "tab-rows": "1",
+              "sections": [
+                {
+                  "name": "section-ranger-plugin",
+                  "display-name": "Ranger Plugin",
+                  "row-index": "0",
+                  "column-index": "0",
+                  "row-span": "1",
+                  "column-span": "3",
+                  "section-columns": "3",
+                  "section-rows": "1",
+                  "subsections": [
+                    {
+                      "name": "section-ranger-plugin-row1-col1",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    },
+                    {
+                      "name": "section-ranger-plugin-row1-col2",
+                      "row-index": "0",
+                      "column-index": "1",
+                      "row-span": "1",
+                      "column-span": "1"
+                    },
+                    {
+                      "name": "section-ranger-plugin-row1-col3",
+                      "row-index": "0",
+                      "column-index": "2",
+                      "row-span": "1",
+                      "column-span": "1"
+                    }
+                  ]
+                }
+              ]
+            }
+          },
+          {
+            "name": "ranger_audit_settings",
+            "display-name": "Ranger Audit",
+            "layout": {
+              "tab-columns": "2",
+              "tab-rows": "2",
+              "sections": [
+                {
+                  "name": "section-ranger-audit-solr",
+                  "display-name": "Audit to Solr",
+                  "row-index": "0",
+                  "column-index": "0",
+                  "row-span": "1",
+                  "column-span": "1",
+                  "section-columns": "1",
+                  "section-rows": "1",
+                  "subsections": [
+                    {
+                      "name": "subsection-ranger-solr-row1-col1",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    }
+                  ]
+                },
+                {
+                  "name": "section-ranger-audit-hdfs",
+                  "display-name": "Audit to HDFS",
+                  "row-index": "0",
+                  "column-index": "1",
+                  "row-span": "1",
+                  "column-span": "1",
+                  "section-columns": "1",
+                  "section-rows": "1",
+                  "subsections": [
+                    {
+                      "name": "subsection-ranger-hdfs-row1-col2",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    }
+                  ]
+                }
+              ]
+            }
+          },
+          {
+            "name": "ranger_tagsync",
+            "display-name": "Ranger Tagsync",
+            "layout": {
+              "tab-columns": "2",
+              "tab-rows": "2",
+              "sections": [
+                {
+                  "name": "section-tagsync-atlas",
+                  "display-name": "Atlas Tag Source",
+                  "row-index": "0",
+                  "column-index": "0",
+                  "row-span": "1",
+                  "column-span": "1",
+                  "section-columns": "1",
+                  "section-rows": "1",
+                  "subsections": [
+                    {
+                      "name": "subsection-ranger-tagsync-row1-col1",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    }
+                  ]
+                },
+                {
+                  "name": "section-tagsync-atlasrest",
+                  "display-name": "AtlasRest Tag Source",
+                  "row-index": "0",
+                  "column-index": "1",
+                  "row-span": "1",
+                  "column-span": "1",
+                  "section-columns": "1",
+                  "section-rows": "1",
+                  "subsections": [
+                    {
+                      "name": "subsection-ranger-tagsync-row1-col2",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    }
+                  ]
+                },
+                {
+                  "name": "section-tagsync-file",
+                  "display-name": "File Tag Source",
+                  "row-index": "1",
+                  "column-index": "0",
+                  "row-span": "1",
+                  "column-span": "1",
+                  "section-columns": "1",
+                  "section-rows": "1",
+                  "subsections": [
+                    {
+                      "name": "subsection-ranger-tagsync-row2-col1",
+                      "row-index": "0",
+                      "column-index": "0",
+                      "row-span": "1",
+                      "column-span": "1"
+                    }
+                  ]
+                }
+              ]
+            }
+          }
+        ]
+      }
+    ],
+    "placement": {
+      "configuration-layout": "default",
+      "configs": [
+        {
+          "config": "admin-properties/DB_FLAVOR",
+          "subsection-name": "subsection-ranger-db-row1-col1"
+        },
+        {
+          "config": "admin-properties/db_name",
+          "subsection-name": "subsection-ranger-db-row1-col1"
+        },
+        {
+          "config": "admin-properties/db_user",
+          "subsection-name": "subsection-ranger-db-row1-col1"
+        },
+        {
+          "config": "ranger-admin-site/ranger.jpa.jdbc.url",
+          "subsection-name": "subsection-ranger-db-row1-col1"
+        },
+        {
+          "config": "admin-properties/db_host",
+          "subsection-name": "subsection-ranger-db-row1-col2"
+        },
+        {
+          "config": "ranger-admin-site/ranger.jpa.jdbc.driver",
+          "subsection-name": "subsection-ranger-db-row1-col2"
+        },
+        {
+          "config": "admin-properties/db_password",
+          "subsection-name": "subsection-ranger-db-row1-col2"
+        },
+        {
+          "config": "ranger-env/test_db_connection",
+          "subsection-name": "subsection-ranger-db-row2",
+          "property_value_attributes": {
+            "ui_only_property": true
+          },
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/create_db_dbuser"
+              ],
+              "if": "${ranger-env/create_db_dbuser}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/create_db_dbuser",
+          "subsection-name": "subsection-ranger-db-row2"
+        },
+        {
+          "config": "admin-properties/db_root_user",
+          "subsection-name": "subsection-ranger-db-root-user-col1"
+        },
+        {
+          "config": "ranger-env/ranger_privelege_user_jdbc_url",
+          "subsection-name": "subsection-ranger-db-root-user-col1"
+        },
+        {
+          "config": "admin-properties/db_root_password",
+          "subsection-name": "subsection-ranger-db-root-user-col2"
+        },
+        {
+          "config": "ranger-env/test_root_db_connection",
+          "subsection-name": "subsection-ranger-db-root-user-col1",
+          "property_value_attributes": {
+            "ui_only_property": true
+          }
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.enabled",
+          "subsection-name": "subsection-ranger-user-row1-col1"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.source.impl.class",
+          "subsection-name": "subsection-ranger-user-row2-col1"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.unix.minUserId",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.source.impl.class"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.unix.password.file",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.source.impl.class"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.unix.group.file",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.source.impl.class"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.UnixUserGroupBuilder",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.filesource.file",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.source.impl.class"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.filesource.text.delimiter",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.source.impl.class"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.source.impl.class} === org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.url",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-common-configs"
+        },
+        {
+          "config": "ranger-env/bind_anonymous",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-common-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.binddn",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-common-configs",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/bind_anonymous"
+              ],
+              "if": "${ranger-env/bind_anonymous}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.ldapbindpassword",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-common-configs",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/bind_anonymous"
+              ],
+              "if": "${ranger-env/bind_anonymous}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.deltasync",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-common-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.nameattribute",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-user-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.objectclass",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-user-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchbase",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-user-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchfilter",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-user-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchscope",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-user-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.ldap.user.groupnameattribute",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-user-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.group.usermapsyncenabled",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-user-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.user.searchenabled",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-user-configs",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.group.search.first.enabled"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.group.search.first.enabled}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.group.searchenabled",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-group-configs"
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.group.memberattributename",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-group-configs",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.group.nameattribute",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-group-configs",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.group.objectclass",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-group-configs",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.group.searchbase",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-group-configs",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.group.searchfilter",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-group-configs",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-ugsync-site/ranger.usersync.group.search.first.enabled",
+          "subsection-name": "subsection-ranger-user-row2-col1",
+          "subsection-tab-name": "ldap-group-configs",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-ugsync-site/ranger.usersync.group.searchenabled"
+              ],
+              "if": "${ranger-ugsync-site/ranger.usersync.group.searchenabled}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/ranger-hdfs-plugin-enabled",
+          "subsection-name": "section-ranger-plugin-row1-col1",
+          "depends-on": [
+            {
+              "resource": "service",
+              "if": "HDFS",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/ranger-yarn-plugin-enabled",
+          "subsection-name": "section-ranger-plugin-row1-col1",
+          "depends-on": [
+            {
+              "resource": "service",
+              "if": "YARN",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/ranger-hive-plugin-enabled",
+          "subsection-name": "section-ranger-plugin-row1-col1",
+          "depends-on": [
+            {
+              "resource": "service",
+              "if": "HIVE",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/ranger-hbase-plugin-enabled",
+          "subsection-name": "section-ranger-plugin-row1-col2",
+          "depends-on": [
+            {
+              "resource": "service",
+              "if": "HBASE",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/ranger-storm-plugin-enabled",
+          "subsection-name": "section-ranger-plugin-row1-col2",
+          "depends-on": [
+            {
+              "resource": "service",
+              "if": "STORM",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/ranger-knox-plugin-enabled",
+          "subsection-name": "section-ranger-plugin-row1-col3",
+          "depends-on": [
+            {
+              "resource": "service",
+              "if": "KNOX",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/ranger-kafka-plugin-enabled",
+          "subsection-name": "section-ranger-plugin-row1-col3",
+          "depends-on": [
+            {
+              "resource": "service",
+              "if": "KAFKA",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/ranger-atlas-plugin-enabled",
+          "subsection-name": "section-ranger-plugin-row1-col3",
+          "depends-on": [
+            {
+              "resource": "service",
+              "if": "ATLAS",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/ranger-nifi-plugin-enabled",
+          "subsection-name": "section-ranger-plugin-row1-col1",
+          "depends-on": [
+            {
+              "resource": "service",
+              "if": "NIFI",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/xasecure.audit.destination.solr",
+          "subsection-name": "subsection-ranger-solr-row1-col1"
+        },
+        {
+          "config": "ranger-env/is_solrCloud_enabled",
+          "subsection-name": "subsection-ranger-solr-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/xasecure.audit.destination.solr"
+              ],
+              "if": "${ranger-env/xasecure.audit.destination.solr}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/is_external_solrCloud_enabled",
+          "subsection-name": "subsection-ranger-solr-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/xasecure.audit.destination.solr",
+                "ranger-env/is_solrCloud_enabled"
+              ],
+              "if": "${ranger-env/xasecure.audit.destination.solr} && ${ranger-env/is_solrCloud_enabled}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/is_external_solrCloud_kerberos",
+          "subsection-name": "subsection-ranger-solr-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/xasecure.audit.destination.solr",
+                "ranger-env/is_solrCloud_enabled",
+                "ranger-env/is_external_solrCloud_enabled"
+              ],
+              "if": "${ranger-env/xasecure.audit.destination.solr} && ${ranger-env/is_solrCloud_enabled} && ${ranger-env/is_external_solrCloud_enabled}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-admin-site/ranger.audit.solr.urls",
+          "subsection-name": "subsection-ranger-solr-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/is_solrCloud_enabled",
+                "ranger-env/xasecure.audit.destination.solr"
+              ],
+              "if": "${ranger-env/is_solrCloud_enabled} === false && ${ranger-env/xasecure.audit.destination.solr}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-admin-site/ranger.audit.solr.zookeepers",
+          "subsection-name": "subsection-ranger-solr-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/is_solrCloud_enabled",
+                "ranger-env/xasecure.audit.destination.solr"
+              ],
+              "if": "${ranger-env/is_solrCloud_enabled} && ${ranger-env/xasecure.audit.destination.solr}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-admin-site/ranger.audit.solr.username",
+          "subsection-name": "subsection-ranger-solr-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/xasecure.audit.destination.solr"
+              ],
+              "if": "${ranger-env/xasecure.audit.destination.solr}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-admin-site/ranger.audit.solr.password",
+          "subsection-name": "subsection-ranger-solr-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/xasecure.audit.destination.solr"
+              ],
+              "if": "${ranger-env/xasecure.audit.destination.solr}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-env/xasecure.audit.destination.hdfs",
+          "subsection-name": "subsection-ranger-hdfs-row1-col2"
+        },
+        {
+          "config": "ranger-env/xasecure.audit.destination.hdfs.dir",
+          "subsection-name": "subsection-ranger-hdfs-row1-col2",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-env/xasecure.audit.destination.hdfs"
+              ],
+              "if": "${ranger-env/xasecure.audit.destination.hdfs}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-tagsync-site/ranger.tagsync.source.atlas",
+          "subsection-name": "subsection-ranger-tagsync-row1-col1"
+        },
+        {
+          "config": "tagsync-application-properties/atlas.kafka.bootstrap.servers",
+          "subsection-name": "subsection-ranger-tagsync-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-tagsync-site/ranger.tagsync.source.atlas"
+              ],
+              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlas}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "tagsync-application-properties/atlas.kafka.zookeeper.connect",
+          "subsection-name": "subsection-ranger-tagsync-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-tagsync-site/ranger.tagsync.source.atlas"
+              ],
+              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlas}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "tagsync-application-properties/atlas.kafka.entities.group.id",
+          "subsection-name": "subsection-ranger-tagsync-row1-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-tagsync-site/ranger.tagsync.source.atlas"
+              ],
+              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlas}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest",
+          "subsection-name": "subsection-ranger-tagsync-row1-col2"
+        },
+        {
+          "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest.endpoint",
+          "subsection-name": "subsection-ranger-tagsync-row1-col2",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-tagsync-site/ranger.tagsync.source.atlasrest"
+              ],
+              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlasrest}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest.download.interval.millis",
+          "subsection-name": "subsection-ranger-tagsync-row1-col2",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-tagsync-site/ranger.tagsync.source.atlasrest"
+              ],
+              "if": "${ranger-tagsync-site/ranger.tagsync.source.atlasrest}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-tagsync-site/ranger.tagsync.source.file",
+          "subsection-name": "subsection-ranger-tagsync-row2-col1"
+        },
+        {
+          "config": "ranger-tagsync-site/ranger.tagsync.source.file.check.interval.millis",
+          "subsection-name": "subsection-ranger-tagsync-row2-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-tagsync-site/ranger.tagsync.source.file"
+              ],
+              "if": "${ranger-tagsync-site/ranger.tagsync.source.file}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        },
+        {
+          "config": "ranger-tagsync-site/ranger.tagsync.source.file.filename",
+          "subsection-name": "subsection-ranger-tagsync-row2-col1",
+          "depends-on": [
+            {
+              "configs":[
+                "ranger-tagsync-site/ranger.tagsync.source.file"
+              ],
+              "if": "${ranger-tagsync-site/ranger.tagsync.source.file}",
+              "then": {
+                "property_value_attributes": {
+                  "visible": true
+                }
+              },
+              "else": {
+                "property_value_attributes": {
+                  "visible": false
+                }
+              }
+            }
+          ]
+        }
+      ]
+    },
+    "widgets": [
+      {
+        "config": "admin-properties/DB_FLAVOR",
+        "widget": {
+          "type": "combo"
+        }
+      },
+      {
+        "config": "admin-properties/db_user",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "admin-properties/db_name",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-admin-site/ranger.jpa.jdbc.url",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-admin-site/ranger.jpa.jdbc.driver",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "admin-properties/db_host",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "admin-properties/db_password",
+        "widget": {
+          "type": "password"
+        }
+      },
+      {
+        "config": "ranger-env/test_db_connection",
+        "widget": {
+          "type": "test-db-connection",
+          "display-name": "Test Connection",
+          "required-properties": {
+            "jdbc.driver.class": "ranger-admin-site/ranger.jpa.jdbc.driver",
+            "jdbc.driver.url": "ranger-admin-site/ranger.jpa.jdbc.url",
+            "db.connection.source.host": "ranger-site/ranger_admin_hosts",
+            "db.type": "admin-properties/DB_FLAVOR",
+            "db.connection.destination.host": "admin-properties/db_host",
+            "db.connection.user": "admin-properties/db_user",
+            "db.connection.password": "admin-properties/db_password"
+          }
+        }
+      },
+      {
+        "config": "ranger-env/create_db_dbuser",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger_privelege_user_jdbc_url",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "admin-properties/db_root_user",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "admin-properties/db_root_password",
+        "widget": {
+          "type": "password"
+        }
+      },
+      {
+        "config": "ranger-env/test_root_db_connection",
+        "widget": {
+          "type": "test-db-connection",
+          "display-name": "Test Connection",
+          "required-properties": {
+            "jdbc.driver.class": "ranger-admin-site/ranger.jpa.jdbc.driver",
+            "jdbc.driver.url": "ranger-env/ranger_privelege_user_jdbc_url",
+            "db.connection.source.host": "ranger-site/ranger_admin_hosts",
+            "db.type": "admin-properties/DB_FLAVOR",
+            "db.connection.destination.host": "admin-properties/db_host",
+            "db.connection.user": "admin-properties/db_root_user",
+            "db.connection.password": "admin-properties/db_root_password"
+          }
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.source.impl.class",
+        "widget": {
+          "type": "combo"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.url",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-env/bind_anonymous",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.binddn",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.ldapbindpassword",
+        "widget": {
+          "type": "password"
+        }
+      },
+
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.group.usermapsyncenabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.user.searchenabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.nameattribute",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.objectclass",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchbase",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchfilter",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.searchscope",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.user.groupnameattribute",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.group.searchenabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.group.memberattributename",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.group.nameattribute",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.group.objectclass",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.group.searchbase",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.group.searchfilter",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.group.search.first.enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.unix.minUserId",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.unix.password.file",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.unix.group.file",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.filesource.file",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.filesource.text.delimiter",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-ugsync-site/ranger.usersync.ldap.deltasync",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger-hdfs-plugin-enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger-hive-plugin-enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger-hbase-plugin-enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger-kafka-plugin-enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger-knox-plugin-enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger-storm-plugin-enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger-yarn-plugin-enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger-atlas-plugin-enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/ranger-nifi-plugin-enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/xasecure.audit.destination.solr",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/is_solrCloud_enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/is_external_solrCloud_enabled",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/is_external_solrCloud_kerberos",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-admin-site/ranger.audit.solr.urls",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-admin-site/ranger.audit.solr.zookeepers",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-admin-site/ranger.audit.solr.username",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-admin-site/ranger.audit.solr.password",
+        "widget": {
+          "type": "password"
+        }
+      },
+      {
+        "config": "ranger-env/xasecure.audit.destination.hdfs",
+        "widget": {
+          "type": "toggle"
+        }
+      },
+      {
+        "config": "ranger-env/xasecure.audit.destination.hdfs.dir",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-tagsync-site/ranger.tagsync.source.file.check.interval.millis",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-tagsync-site/ranger.tagsync.source.file.filename",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest.download.interval.millis",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest.endpoint",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "tagsync-application-properties/atlas.kafka.entities.group.id",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "tagsync-application-properties/atlas.kafka.bootstrap.servers",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "tagsync-application-properties/atlas.kafka.zookeeper.connect",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "ranger-tagsync-site/ranger.tagsync.source.atlas",
+        "widget": {
+          "type": "checkbox"
+        }
+      },
+      {
+        "config": "ranger-tagsync-site/ranger.tagsync.source.atlasrest",
+        "widget": {
+          "type": "checkbox"
+        }
+      },
+      {
+        "config": "ranger-tagsync-site/ranger.tagsync.source.file",
+        "widget": {
+          "type": "checkbox"
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/alerts.json b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/alerts.json
deleted file mode 100644
index 05c3fe6..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/alerts.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "RANGER_KMS": {
-    "service": [],
-    "RANGER_KMS_SERVER": [
-      {
-        "name": "ranger_kms_server_process",
-        "label": "Ranger KMS Server Process",
-        "description": "This host-level alert is triggered if the Ranger KMS Server cannot be determined to be up.",
-        "interval": 1,
-        "scope": "HOST",
-        "source": {
-          "type": "PORT",
-          "uri": "{{kms-env/kms_port}}",
-          "default_port": 9292,
-          "reporting": {
-            "ok": {
-              "text": "TCP OK - {0:.3f}s response on port {1}"
-            },
-            "warning": {
-              "text": "TCP OK - {0:.3f}s response on port {1}",
-              "value": 1.5
-            },
-            "critical": {
-              "text": "Connection failed: {0} to {1}:{2}",
-              "value": 5.0
-            }
-          }
-        }
-      }
-    ]
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/dbks-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/dbks-site.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/dbks-site.xml
deleted file mode 100644
index 4ac20b3..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/dbks-site.xml
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>hadoop.kms.blacklist.DECRYPT_EEK</name>
-    <value>hdfs</value>
-    <description>Blacklist for decrypt EncryptedKey CryptoExtension operations</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.db.encrypt.key.password</name>
-    <value>_</value>
-    <property-type>PASSWORD</property-type>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <description>Password used for encrypting Master Key</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.jpa.jdbc.url</name>
-    <display-name>JDBC connect string</display-name>
-    <value>jdbc:mysql://localhost</value>
-    <description>URL for Database</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>kms-properties</type>
-        <name>DB_FLAVOR</name>
-      </property>
-      <property>
-        <type>kms-properties</type>
-        <name>db_host</name>
-      </property>
-      <property>
-        <type>kms-properties</type>
-        <name>db_name</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.jpa.jdbc.user</name>
-    <value>{{db_user}}</value>
-    <description>Database username used for operation</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.jpa.jdbc.password</name>
-    <value>_</value>
-    <property-type>PASSWORD</property-type>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <description>Database user's password</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.jpa.jdbc.credential.provider.path</name>
-    <value>/etc/ranger/kms/rangerkms.jceks</value>
-    <description>Credential provider path</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.jpa.jdbc.credential.alias</name>
-    <value>ranger.ks.jdbc.password</value>
-    <description>Credential alias used for password</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.masterkey.credential.alias</name>
-    <value>ranger.ks.masterkey.password</value>
-    <description>Credential alias used for masterkey</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.jpa.jdbc.dialect</name>
-    <value>{{jdbc_dialect}}</value>
-    <description>Dialect used for database</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.jpa.jdbc.driver</name>
-    <display-name>Driver class name for a JDBC Ranger KMS database</display-name>
-    <value>com.mysql.jdbc.Driver</value>
-    <description>Driver used for database</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>kms-properties</type>
-        <name>DB_FLAVOR</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.jdbc.sqlconnectorjar</name>
-    <value>{{ews_lib_jar_path}}</value>
-    <description>Driver used for database</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.hsm.type</name>
-    <display-name>HSM Type</display-name>
-    <value>LunaProvider</value>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>LunaProvider</value>
-          <label>Luna Provider</label>
-        </entry>
-      </entries>
-    </value-attributes>
-    <description>HSM type</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.hsm.enabled</name>
-    <display-name>HSM Enabled</display-name>
-    <value>false</value>
-    <description>Enable HSM ?</description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-      <type>value-list</type>
-      <overridable>false</overridable>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.hsm.partition.name</name>
-    <display-name>HSM partition name. In case of HSM HA enter the group name</display-name>
-    <value>par19</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.hsm.partition.password</name>
-    <value>_</value>
-    <property-type>PASSWORD</property-type>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <description>HSM partition password</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.hsm.partition.password.alias</name>
-    <display-name>HSM partition password alias</display-name>
-    <value>ranger.kms.hsm.partition.password</value>
-    <description>HSM partition password alias</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.kerberos.principal</name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger.ks.kerberos.keytab</name>
-    <value/>
-    <description/>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-env.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-env.xml
deleted file mode 100644
index e049840..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-env.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_adding_forbidden="true">
-  <property>
-    <name>kms_user</name>
-    <display-name>Kms User</display-name>
-    <value>kms</value>
-    <property-type>USER</property-type>
-    <description>Kms username</description>
-    <value-attributes>
-      <type>user</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>kms_group</name>
-    <display-name>Kms group</display-name>
-    <value>kms</value>
-    <property-type>GROUP</property-type>
-    <description>Kms group</description>
-    <value-attributes>
-      <type>user</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>kms_log_dir</name>
-    <value>/var/log/ranger/kms</value>
-    <description/>
-    <value-attributes>
-      <type>directory</type>
-      <overridable>false</overridable>
-      <editable-only-at-install>true</editable-only-at-install>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>kms_port</name>
-    <value>9292</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-    <depends-on>
-      <property>
-        <type>ranger-kms-site</type>
-        <name>ranger.service.https.port</name>
-      </property>
-      <property>
-        <type>ranger-kms-site</type>
-        <name>ranger.service.https.attrib.ssl.enabled</name>
-      </property>
-    </depends-on>
-  </property>
-  <property>
-    <name>create_db_user</name>
-    <display-name>Setup Database and Database User</display-name>
-    <value>true</value>
-    <description>If set to Yes, Ambari will create and setup Ranger Database and Database User. This will require to specify Database Admin user and password</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>true</value>
-          <label>Yes</label>
-        </entry>
-        <entry>
-          <value>false</value>
-          <label>No</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>hsm_partition_password</name>
-    <display-name>HSM partition password</display-name>
-    <value/>
-    <property-type>PASSWORD</property-type>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <description>HSM partition password</description>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_kms_pid_dir</name>
-    <value>/var/run/ranger_kms</value>
-    <description/>
-    <value-attributes>
-      <type>directory</type>
-      <overridable>false</overridable>
-      <editable-only-at-install>true</editable-only-at-install>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-log4j.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-log4j.xml
deleted file mode 100644
index 18dc46b..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-log4j.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration supports_adding_forbidden="false">
-   <property>
-    <name>ranger_kms_log_maxfilesize</name>
-    <value>256</value>
-    <description>The maximum size of backup file before the log is rotated</description>
-    <display-name>Ranger-kms Log: backup file size</display-name>
-    <value-attributes>
-      <unit>MB</unit>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-   </property>
-   <property>
-    <name>ranger_kms_log_maxbackupindex</name>
-    <value>20</value>
-    <description>The number of backup files</description>
-    <display-name>Ranger-kms Log: # of backup files</display-name>
-    <value-attributes>
-      <type>int</type>
-      <minimum>0</minimum>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>ranger_kms_audit_log_maxfilesize</name>
-    <value>256</value>
-    <description>The maximum size of backup file before the log is rotated</description>
-    <display-name>Ranger-kms Audit Log: backup file size</display-name>
-    <value-attributes>
-      <unit>MB</unit>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-   </property>
-   <property>
-    <name>ranger_kms_audit_log_maxbackupindex</name>
-    <value>20</value>
-    <description>The number of backup files</description>
-    <display-name>Ranger-kms Audit Log: # of backup files</display-name>
-    <value-attributes>
-      <type>int</type>
-      <minimum>0</minimum>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>content</name>
-    <display-name>kms-log4j template</display-name>
-    <description>kms-log4j.properties</description>
-    <value>
-#
-# Licensed 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. See accompanying LICENSE file.
-#
-
-# If the Java System property 'kms.log.dir' is not defined at KMS start up time
-# Setup sets its value to '${kms.home}/logs'
-
-log4j.appender.kms=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.kms.DatePattern='.'yyyy-MM-dd
-log4j.appender.kms.File=${kms.log.dir}/kms.log
-log4j.appender.kms.Append=true
-log4j.appender.kms.layout=org.apache.log4j.PatternLayout
-log4j.appender.kms.layout.ConversionPattern=%d{ISO8601} %-5p %c{1} - %m%n
-log4j.appender.kms.MaxFileSize = {{ranger_kms_log_maxfilesize}}MB
-log4j.appender.kms.MaxBackupIndex = {{ranger_kms_log_maxbackupindex}}
-
-log4j.appender.kms-audit=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.kms-audit.DatePattern='.'yyyy-MM-dd
-log4j.appender.kms-audit.File=${kms.log.dir}/kms-audit.log
-log4j.appender.kms-audit.Append=true
-log4j.appender.kms-audit.layout=org.apache.log4j.PatternLayout
-log4j.appender.kms-audit.layout.ConversionPattern=%d{ISO8601} %m%n
-log4j.appender.kms-audit.MaxFileSize = {{ranger_kms_audit_log_maxfilesize}}MB
-log4j.appender.kms-audit.MaxBackupIndex = {{ranger_kms_audit_log_maxbackupindex}}
-
-log4j.logger.kms-audit=INFO, kms-audit
-log4j.additivity.kms-audit=false
-
-log4j.logger=INFO, kms
-log4j.additivity.kms=false
-log4j.rootLogger=INFO, kms
-log4j.logger.org.apache.hadoop.conf=ERROR
-log4j.logger.org.apache.hadoop=INFO
-log4j.logger.com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator=OFF        
-    </value>
-    <value-attributes>
-      <type>content</type>
-      <show-property-name>false</show-property-name>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-properties.xml b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-properties.xml
deleted file mode 100644
index d2d4da5..0000000
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-properties.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>REPOSITORY_CONFIG_USERNAME</name>
-    <display-name>Repository config username</display-name>
-    <value>keyadmin</value>
-    <description/>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>REPOSITORY_CONFIG_PASSWORD</name>
-    <display-name>Repository config password</display-name>
-    <value>keyadmin</value>
-    <property-type>PASSWORD</property-type>
-    <description/>
-    <value-attributes>
-      <type>password</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>DB_FLAVOR</name>
-    <display-name>DB FLAVOR</display-name>
-    <value>MYSQL</value>
-    <description>The database type to be used</description>
-    <value-attributes>
-      <overridable>false</overridable>
-      <type>value-list</type>
-      <entries>
-        <entry>
-          <value>MYSQL</value>
-          <label>MYSQL</label>
-        </entry>
-        <entry>
-          <value>ORACLE</value>
-          <label>ORACLE</label>
-        </entry>
-        <entry>
-          <value>POSTGRES</value>
-          <label>POSTGRES</label>
-        </entry>
-        <entry>
-          <value>MSSQL</value>
-          <label>MSSQL</label>
-        </entry>
-        <entry>
-          <value>SQLA</value>
-          <label>SQL Anywhere</label>
-        </entry>
-      </entries>
-      <selection-cardinality>1</selection-cardinality>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>SQL_CONNECTOR_JAR</name>
-    <display-name>SQL connector jar</display-name>
-    <value>{{driver_curl_target}}</value>
-    <description>Location of DB client library (please check the location of the jar file)</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <depends-on>
-      <property>
-        <type>kms-properties</type>
-        <name>DB_FLAVOR</name>
-      </property>
-    </depends-on>
-    <on-ambari-upgrade add="false" update="false"/>
-  </property>
-  <property>
-    <name>db_root_user</name>
-    <display-name>Database Administrator (DBA) username</display-name>
-    <value>root</value>
-    <description>Database admin user. This user should have DBA permission to create the Ranger Database and Ranger Database User</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>db_root_password</name>
-    <display-name>Database Administrator (DBA) password</display-name>
-    <value/>
-    <property-type>PASSWORD</property-type>
-    <description>Database password for the database admin username</description>
-    <value-attributes>
-      <type>password</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>db_host</name>
-    <display-name>Ranger KMS DB host</display-name>
-    <value/>
-    <description>Database host</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>db_name</name>
-    <display-name>Ranger KMS DB name</display-name>
-    <value>rangerkms</value>
-    <description>Database name</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>db_user</name>
-    <display-name>Ranger KMS DB username</display-name>
-    <value>rangerkms</value>
-    <description>Database username used for the Ranger KMS schema</description>
-    <value-attributes>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>db_password</name>
-    <display-name>Ranger KMS DB password</display-name>
-    <value/>
-    <property-type>PASSWORD</property-type>
-    <description>Database password for the Ranger KMS schema</description>
-    <value-attributes>
-      <type>password</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-  <property>
-    <name>KMS_MASTER_KEY_PASSWD</name>
-    <display-name>KMS master key password</display-name>
-    <value/>
-    <property-type>PASSWORD</property-type>
-    <description/>
-    <value-attributes>
-      <type>password</type>
-      <overridable>false</overridable>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>


[29/52] [abbrv] ambari git commit: AMBARI-21388. Can't delete hosts components via bulk-menu (alexantonenko)

Posted by jl...@apache.org.
AMBARI-21388. Can't delete hosts components via bulk-menu (alexantonenko)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 7029e7fa0c3e2ebd8e6eea7eef1f965234018586
Parents: ac5eaae
Author: Alex Antonenko <hi...@gmail.com>
Authored: Mon Jul 3 15:35:28 2017 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Jul 7 10:38:45 2017 +0300

----------------------------------------------------------------------
 .../main/host/bulk_operations_controller.js          | 15 +++++++--------
 ambari-web/app/messages.js                           |  4 ++--
 .../main/host/delete_hosts_result_popup.hbs          |  8 ++++++--
 3 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7029e7fa/ambari-web/app/controllers/main/host/bulk_operations_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/bulk_operations_controller.js b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
index b921cd5..34d61d8 100644
--- a/ambari-web/app/controllers/main/host/bulk_operations_controller.js
+++ b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
@@ -717,6 +717,7 @@ App.BulkOperationsController = Em.Controller.extend({
 
       didInsertElement: function() {
         this.set('expanded', hostsToDelete.length <= minShown);
+        this._super();
       },
 
       onPrimary: function() {
@@ -763,6 +764,8 @@ App.BulkOperationsController = Em.Controller.extend({
         name: 'host.host_component.delete_components',
         sender: self,
         data: {
+          hostNames,
+          componentName: operationData.componentName,
           data: JSON.stringify({
             RequestInfo: {
               query: 'HostRoles/host_name.in(' + hostNames.join(',') + ')&HostRoles/component_name.in(' + operationData.componentName + ')'
@@ -783,7 +786,7 @@ App.BulkOperationsController = Em.Controller.extend({
     var undeletableHosts = [];
     if (arg1 == "error") {
       var request = arg0;
-      var params = arg4;
+      let params = arg4;
       var response = JSON.parse(request.responseText);
       var host = Ember.Object.create({
         error: {
@@ -797,7 +800,7 @@ App.BulkOperationsController = Em.Controller.extend({
       undeletableHosts.push(host);
     } else {
       var data = arg0;
-      var params = arg2;
+      let params = arg2;
       if (data) {
         data.deleteResult.forEach(function (host) {
           if (host.deleted) {
@@ -812,12 +815,7 @@ App.BulkOperationsController = Em.Controller.extend({
           }
         });
       } else {
-        var host = {
-          deleted: {
-            key: params.hosts[0]
-          }
-        };
-        deletedHosts.push(host);
+        deletedHosts.pushObjects(params.hostNames.map(hostName => ({deleted: {key: `${hostName}/${params.componentName}`}})));
       }
     }
 
@@ -831,6 +829,7 @@ App.BulkOperationsController = Em.Controller.extend({
         message: Em.I18n.t('hosts.bulkOperation.delete.component.dryRun.message').format(undeletableHosts.length),
         undeletableHosts: undeletableHosts,
         deletedHosts: deletedHosts.sortProperty('deleted.key'),
+        deleteComponents: true,
         onToggleHost: function (host) {
           host.contexts[0].toggleProperty('isCollapsed');
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/7029e7fa/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 5e1d08f..f75d801 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2597,8 +2597,8 @@ Em.I18n.translations = {
   'hosts.bulkOperation.confirmation.delete.component.minimum.body': 'At least {0} {1} should be installed in the cluster.',
   'hosts.bulkOperation.confirmation.delete.component.nothingToDo.body': '{0} are neither installed on selected hosts nor in the states that can be deleted.',
   'hosts.bulkOperation.confirmation.delete.component.skip':'The following hosts are skipped as {0} on them are not in the states that can be deleted.',
-  'hosts.bulkOperation.delete.component.result.header':'Delete Hosts',
-  'hosts.bulkOperation.delete.component.result.body': 'The following hosts were deleted successfully:',
+  'hosts.bulkOperation.delete.component.result.header':'Delete Components',
+  'hosts.bulkOperation.delete.component.result.body': 'The following components were deleted successfully:',
   'hosts.bulkOperation.delete.component.dryRun.message':'There are <strong>{0} host(s)</strong> that cannot be deleted (expand for reason):',
 
   'hosts.selectHostsDialog.title': 'Select Configuration Group Hosts',

http://git-wip-us.apache.org/repos/asf/ambari/blob/7029e7fa/ambari-web/app/templates/main/host/delete_hosts_result_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/delete_hosts_result_popup.hbs b/ambari-web/app/templates/main/host/delete_hosts_result_popup.hbs
index eb6f89c..2e074bc 100644
--- a/ambari-web/app/templates/main/host/delete_hosts_result_popup.hbs
+++ b/ambari-web/app/templates/main/host/delete_hosts_result_popup.hbs
@@ -16,7 +16,11 @@
 * limitations under the License.
 }}
 {{#if view.deletedHosts}}
-  <p>{{t hosts.bulkOperation.deleteHosts.result.body}}</p>
+  {{#if view.deleteComponents}}
+    <p>{{t hosts.bulkOperation.delete.component.result.body}}</p>
+  {{else}}
+    <p>{{t hosts.bulkOperation.deleteHosts.result.body}}</p>
+  {{/if}}
 {{/if}}
 
 {{#each deletedHost in view.deletedHosts}}
@@ -39,4 +43,4 @@
       </div>
     </div>
   {{/each}}
-{{/if}}
\ No newline at end of file
+{{/if}}