You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2017/06/21 18:05:57 UTC

[01/13] ambari git commit: AMBARI-21259 Need to use provided password when usersync sync source and authentication method are different (mugdha)

Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-20859 f5ca11451 -> 8f03fd044


AMBARI-21259 Need to use provided password when usersync sync source and authentication method are different (mugdha)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 8df01a8f84f9b404be9248f36484baebc7de582f
Parents: df21f9c
Author: Mugdha Varadkar <mu...@apache.org>
Authored: Thu Jun 15 18:41:24 2017 +0530
Committer: Mugdha Varadkar <mu...@apache.org>
Committed: Tue Jun 20 10:38:08 2017 +0530

----------------------------------------------------------------------
 .../RANGER/0.4.0/package/scripts/params.py              |  4 +++-
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py    | 12 ++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8df01a8f/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index 094d239..3789358 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -445,4 +445,6 @@ https_keystore_password = config['configurations']['ranger-admin-site']['ranger.
 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
+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/8df01a8f/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 85eb796..ba21494 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -336,7 +336,11 @@ def do_keystore_setup(upgrade_type=None):
     )
 
   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)
+    ranger_ldap_auth_password = params.ranger_usersync_ldap_ldapbindpassword
+    if params.ranger_ldap_bind_auth_password != "{{ranger_usersync_ldap_ldapbindpassword}}":
+      ranger_ldap_auth_password = params.ranger_ldap_bind_auth_password
+
+    ranger_credential_helper(params.cred_lib_path, params.ranger_ldap_password_alias, ranger_ldap_auth_password, params.ranger_credential_provider_path)
 
     File(params.ranger_credential_provider_path,
       owner = params.unix_user,
@@ -345,7 +349,11 @@ def do_keystore_setup(upgrade_type=None):
     )
 
   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)
+    ranger_ad_auth_password = params.ranger_usersync_ldap_ldapbindpassword
+    if params.ranger_ad_bind_auth_password != "{{ranger_usersync_ldap_ldapbindpassword}}":
+      ranger_ad_auth_password = params.ranger_ad_bind_auth_password
+
+    ranger_credential_helper(params.cred_lib_path, params.ranger_ad_password_alias, ranger_ad_auth_password, params.ranger_credential_provider_path)
 
     File(params.ranger_credential_provider_path,
       owner = params.unix_user,


[07/13] ambari git commit: AMBARI-21287. Cannot install Datanode/AppTimeLine server from ambari 3.0 (dlysnichenko)

Posted by rl...@apache.org.
AMBARI-21287. Cannot install Datanode/AppTimeLine server from ambari 3.0 (dlysnichenko)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 4dac1b196e24c67243387c124f2c3109cbb3eee0
Parents: d693273
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Tue Jun 20 18:21:21 2017 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Tue Jun 20 18:21:21 2017 +0300

----------------------------------------------------------------------
 .../stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py    | 2 ++
 .../3.0/hooks/before-INSTALL/scripts/repo_initialization.py  | 8 ++++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4dac1b19/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
index 6193c11..50c5a40 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
@@ -111,3 +111,5 @@ if has_hbase_masters:
 #repo params
 repo_info = config['hostLevelParams']['repo_info']
 service_repo_info = default("/hostLevelParams/service_repo_info",None)
+
+repo_file = default("/repositoryFile", None)

http://git-wip-us.apache.org/repos/asf/ambari/blob/4dac1b19/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py
index a35dce7..357bc62 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py
@@ -19,6 +19,7 @@ limitations under the License.
 
 from ambari_commons.os_check import OSCheck
 from resource_management.libraries.resources.repository import Repository
+from resource_management.libraries.functions.repository_util import create_repo_files, CommandRepository
 from resource_management.core.logger import Logger
 import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
 
@@ -63,6 +64,13 @@ def install_repos():
     return
 
   template = params.repo_rhel_suse if OSCheck.is_suse_family() or OSCheck.is_redhat_family() else params.repo_ubuntu
+
+  # use this newer way of specifying repositories, if available
+  if params.repo_file is not None:
+    create_repo_files(template, CommandRepository(params.repo_file))
+    return
+
   _alter_repo("create", params.repo_info, template)
+
   if params.service_repo_info:
     _alter_repo("create", params.service_repo_info, template)


[06/13] ambari git commit: AMBARI-21286. WebHDF request doesn't require user.name argument on secured clusters (aonishuk)

Posted by rl...@apache.org.
AMBARI-21286. WebHDF request doesn't require user.name argument on secured clusters (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: d693273dd2ddaa0532dccbf5b709d377122a209d
Parents: 242d79b
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Jun 20 17:35:29 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Jun 20 17:35:29 2017 +0300

----------------------------------------------------------------------
 .../libraries/providers/hdfs_resource.py                    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d693273d/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
index 69cc7cd..efca23d 100644
--- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
+++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
@@ -160,9 +160,14 @@ class WebHDFSUtil:
     depending on if query was successful or not, we can assert this for them
     """
     target = HdfsResourceProvider.parse_path(target)
+
+    url = format("{address}/webhdfs/v1{target}?op={operation}", address=self.address)
+    request_args = kwargs
+
+    if not self.security_enabled:
+      request_args['user.name'] = self.run_user
     
-    url = format("{address}/webhdfs/v1{target}?op={operation}&user.name={run_user}", address=self.address, run_user=self.run_user)
-    for k,v in kwargs.iteritems():
+    for k,v in request_args.iteritems():
       url = format("{url}&{k}={v}")
     
     cmd = ["curl", "-sS","-L", "-w", "%{http_code}", "-X", method]


[13/13] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-20859

Posted by rl...@apache.org.
Merge branch 'trunk' into branch-feature-AMBARI-20859


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 8f03fd044b805f350ca9ace6683a969a82b6c8f8
Parents: f5ca114 e7fc3a6
Author: Robert Levas <rl...@hortonworks.com>
Authored: Wed Jun 21 14:05:43 2017 -0400
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Wed Jun 21 14:05:43 2017 -0400

----------------------------------------------------------------------
 .../libraries/providers/hdfs_resource.py        |  9 +-
 ambari-funtest/pom.xml                          |  5 --
 .../metrics2/sink/timeline/Precision.java       |  2 +-
 .../ambari-metrics-host-monitoring/pom.xml      |  1 +
 ambari-metrics/pom.xml                          | 71 +++++++--------
 ambari-project/pom.xml                          | 23 ++++-
 ambari-server/pom.xml                           | 95 ++++++++------------
 .../internal/UpgradeResourceProvider.java       |  4 +-
 .../state/stack/upgrade/ClusterGrouping.java    |  4 +-
 .../server/state/stack/upgrade/ExecuteTask.java |  2 +-
 .../server/state/stack/upgrade/Grouping.java    |  2 +-
 .../state/stack/upgrade/StageWrapper.java       |  2 +-
 .../main/python/ambari_server/serverUpgrade.py  | 22 ++++-
 .../1.4.0.2.0/configuration/flume-log4j.xml     | 10 +--
 .../configuration/ranger-hive-security.xml      |  9 ++
 .../RANGER/0.4.0/package/scripts/params.py      |  4 +-
 .../0.4.0/package/scripts/setup_ranger_xml.py   | 12 ++-
 .../0.5.0/configuration/ranger-ugsync-site.xml  |  3 +
 .../configuration/ranger-ugsync-site.xml        |  3 +
 .../0.6.0.2.5/configuration/zeppelin-config.xml |  7 ++
 .../HIVE/configuration/ranger-hive-security.xml | 33 +++++++
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  | 10 +++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |  4 +
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml     |  1 +
 .../3.0/hooks/before-INSTALL/scripts/params.py  |  2 +
 .../scripts/repo_initialization.py              |  8 ++
 .../internal/UpgradeResourceProviderTest.java   |  2 +-
 .../src/test/python/TestAmbariServer.py         | 35 +++++++-
 .../python/stacks/2.0.6/FLUME/test_flume.py     | 10 +--
 .../test/python/stacks/2.6/configs/default.json |  3 +-
 ambari-web/pom.xml                              | 65 ++++++--------
 31 files changed, 294 insertions(+), 169 deletions(-)
----------------------------------------------------------------------



[09/13] ambari git commit: AMBARI-21263. Ambari 2.5.1 upgrade fails with HDPSearch mpack installed.(vbrodetskyi)

Posted by rl...@apache.org.
AMBARI-21263. Ambari 2.5.1 upgrade fails with HDPSearch mpack installed.(vbrodetskyi)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 31058596b4ed0cf5b78c464fec2585940051c597
Parents: aa33c1b
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Tue Jun 20 22:21:01 2017 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Tue Jun 20 22:21:01 2017 +0300

----------------------------------------------------------------------
 .../main/python/ambari_server/serverUpgrade.py  | 22 +++++++++---
 .../src/test/python/TestAmbariServer.py         | 35 +++++++++++++++++++-
 2 files changed, 52 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/31058596/ambari-server/src/main/python/ambari_server/serverUpgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverUpgrade.py b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
index b488ca6..a4a4ae2 100644
--- a/ambari-server/src/main/python/ambari_server/serverUpgrade.py
+++ b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
@@ -405,6 +405,7 @@ def find_and_copy_custom_services(resources_dir, services_search_path, old_dir_n
                                     old_dir_mask, base_service_dir):
   services = glob.glob(os.path.join(resources_dir, services_search_path))
   managed_services = []
+  is_common_services_base_dir = "common-services" in base_service_dir
   for service in services:
     if os.path.isdir(service) and not os.path.basename(service) in managed_services:
       managed_services.append(os.path.basename(service))
@@ -425,10 +426,23 @@ def find_and_copy_custom_services(resources_dir, services_search_path, old_dir_n
         continue
 
       # process dirs only
-      if os.path.isdir(backup_service) and not os.path.islink(backup_service):
-        service_name = os.path.basename(backup_service)
-        if not service_name in managed_services:
-          shutil.copytree(backup_service, os.path.join(current_base_service_dir,service_name))
+      if is_common_services_base_dir:
+        version_dirs_in_backup_service_dir = glob.glob(os.path.join(backup_service,"*"))
+        if os.path.isdir(backup_service) and not os.path.islink(backup_service):
+          service_name = os.path.basename(backup_service)
+          current_service_dir_path = os.path.join(current_base_service_dir, service_name)
+          if not service_name in managed_services:
+            if not os.path.exists(current_service_dir_path):
+              os.makedirs(current_service_dir_path)
+            for version_dir_path in version_dirs_in_backup_service_dir:
+              if not os.path.islink(version_dir_path):
+                version_dir =  os.path.basename(version_dir_path)
+                shutil.copytree(version_dir_path, os.path.join(current_service_dir_path, version_dir))
+      else:
+        if os.path.isdir(backup_service) and not os.path.islink(backup_service):
+          service_name = os.path.basename(backup_service)
+          if not service_name in managed_services:
+            shutil.copytree(backup_service, os.path.join(current_base_service_dir,service_name))
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/31058596/ambari-server/src/test/python/TestAmbariServer.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py
index 7f0cb93..8c135c3 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -114,7 +114,7 @@ with patch.object(platform, "linux_distribution", return_value = MagicMock(retur
                   download_and_install_jdk, prompt_db_properties, setup, \
                   AmbariUserChecks, AmbariUserChecksLinux, AmbariUserChecksWindows, JDKSetup, reset, setup_jce_policy, expand_jce_zip_file
                 from ambari_server.serverUpgrade import upgrade, change_objects_owner, \
-                  run_schema_upgrade, move_user_custom_actions
+                  run_schema_upgrade, move_user_custom_actions, find_and_copy_custom_services
                 from ambari_server.setupHttps import is_valid_https_port, setup_https, import_cert_and_key_action, get_fqdn, \
                   generate_random_string, get_cert_info, COMMON_NAME_ATTR, is_valid_cert_exp, NOT_AFTER_ATTR, NOT_BEFORE_ATTR, \
                   SSL_DATE_FORMAT, import_cert_and_key, is_valid_cert_host, setup_truststore, \
@@ -5336,6 +5336,39 @@ class TestAmbariServer(TestCase):
     pass
 
 
+  @patch("shutil.copytree")
+  @patch("os.makedirs")
+  @patch("os.path.islink")
+  @patch("os.path.exists")
+  @patch("os.path.getctime")
+  @patch("re.compile")
+  @patch("os.path.join")
+  @patch("os.path.basename")
+  @patch("os.path.isdir")
+  @patch("glob.glob")
+  def test_find_and_copy_custom_services(self, glob_mock, isdir_mock, basename_mock, join_mock, re_compile_mock,
+                                         getctime_mock, exists_mock, islink_mock, makedirs_mock, copytree_mock):
+    # service/version dir is not link
+    glob_mock.return_value = [""]
+    isdir_mock.side_effect = [False, True, True]
+    islink_mock.return_value = False
+    exists_mock.side_effect = [True, False]
+    find_and_copy_custom_services("", "", "", "", "", "/common-services/")
+
+    self.assertTrue(makedirs_mock.called)
+    self.assertTrue(copytree_mock.called)
+
+
+    # service/version dir is link
+    makedirs_mock.reset_mock()
+    copytree_mock.reset_mock()
+    islink_mock.side_effect = [False, True]
+
+    self.assertFalse(makedirs_mock.called)
+    self.assertFalse(copytree_mock.called)
+    pass
+
+
   @not_for_platform(PLATFORM_WINDOWS)
   @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value))
   @patch("__builtin__.open")


[08/13] ambari git commit: AMBARI-21191. Custom log4j.properties of Flume (wangjianfei via alejandro)

Posted by rl...@apache.org.
AMBARI-21191. Custom log4j.properties of Flume (wangjianfei via alejandro)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: aa33c1b5bb1fc1a4742ce98ad7e9ade06212ab20
Parents: 4dac1b1
Author: Alejandro Fernandez <af...@hortonworks.com>
Authored: Tue Jun 20 11:01:37 2017 -0700
Committer: Alejandro Fernandez <af...@hortonworks.com>
Committed: Tue Jun 20 11:01:37 2017 -0700

----------------------------------------------------------------------
 .../1.4.0.2.0/configuration/flume-log4j.xml     | 96 ++++++++++++++++++++
 .../FLUME/1.4.0.2.0/package/scripts/flume.py    |  4 +-
 2 files changed, 98 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/aa33c1b5/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-log4j.xml b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-log4j.xml
new file mode 100644
index 0000000..4066367
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-log4j.xml
@@ -0,0 +1,96 @@
+<?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 supports_final="false">
+  <property>
+    <name>content</name>
+    <display-name>flume-log4j template</display-name>
+    <description>Custom 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.
+
+
+# Define some default values that can be overridden by system properties.
+#
+# For testing, it may also be convenient to specify
+# -Dflume.root.logger=DEBUG,console when launching flume.
+
+#flume.root.logger=DEBUG,console
+flume.root.logger=INFO,LOGFILE
+flume.log.dir={{flume_log_dir}}
+flume.log.file=flume-{{agent_name}}.log
+
+log4j.logger.org.apache.flume.lifecycle = INFO
+log4j.logger.org.jboss = WARN
+log4j.logger.org.mortbay = INFO
+log4j.logger.org.apache.avro.ipc.NettyTransceiver = WARN
+log4j.logger.org.apache.hadoop = INFO
+
+# Define the root logger to the system property "flume.root.logger".
+log4j.rootLogger=${flume.root.logger}
+
+# Stock log4j rolling file appender
+# Default log rotation configuration
+log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
+log4j.appender.LOGFILE.MaxFileSize=100MB
+log4j.appender.LOGFILE.MaxBackupIndex=10
+log4j.appender.LOGFILE.File=${flume.log.dir}/${flume.log.file}
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n
+
+# Warning: If you enable the following appender it will fill up your disk if you don't have a cleanup job!
+# This uses the updated rolling file appender from log4j-extras that supports a reliable time-based rolling policy.
+# See http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/TimeBasedRollingPolicy.html
+# Add "DAILY" to flume.root.logger above if you want to use this
+log4j.appender.DAILY=org.apache.log4j.rolling.RollingFileAppender
+log4j.appender.DAILY.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
+log4j.appender.DAILY.rollingPolicy.ActiveFileName=${flume.log.dir}/${flume.log.file}
+log4j.appender.DAILY.rollingPolicy.FileNamePattern=${flume.log.dir}/${flume.log.file}.%d{yyyy-MM-dd}
+log4j.appender.DAILY.layout=org.apache.log4j.PatternLayout
+log4j.appender.DAILY.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n
+
+# console
+# Add "console" to flume.root.logger above if you want to use this
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.target=System.err
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d (%t) [%p - %l] %m%n    </value>
+    <value-attributes>
+      <type>content</type>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+    <on-ambari-upgrade add="true"/>
+  </property>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/aa33c1b5/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
index 6b1d286..0488298 100644
--- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
@@ -74,7 +74,7 @@ def flume(action = None):
                      properties=flume_agents[agent])
 
       File(flume_agent_log4j_file,
-           content=Template('log4j.properties.j2', agent_name = agent))
+           content=InlineTemplate(params.flume_log4j_content,agent_name=agent)),
 
       File(flume_agent_meta_file,
            content = json.dumps(ambari_meta(agent, flume_agents[agent])))
@@ -139,7 +139,7 @@ def flume(action = None):
         mode = 0644)
 
       File(flume_agent_log4j_file,
-        content=Template('log4j.properties.j2', agent_name = agent),
+        content=InlineTemplate(params.flume_log4j_content,agent_name=agent),
         owner=params.flume_user,
         mode = 0644)
 


[11/13] ambari git commit: AMBARI-21191. Custom log4j.properties of Flume - addendum: fix for Python unit test failure (wangjianfei via adoroszlai)

Posted by rl...@apache.org.
AMBARI-21191. Custom log4j.properties of Flume - addendum: fix for Python unit test failure (wangjianfei via adoroszlai)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 134406a652e249001ef353d5a55b24d5dd53e811
Parents: 7a050b0
Author: wangjianfei <wa...@cmss.chinamobile.com>
Authored: Wed Jun 21 10:01:06 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Wed Jun 21 10:01:06 2017 +0200

----------------------------------------------------------------------
 .../src/test/python/stacks/2.0.6/FLUME/test_flume.py      | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/134406a6/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
index 02810e2..b867561 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
@@ -257,7 +257,7 @@ class TestFlumeHandler(RMFTestCase):
 
     self.assertResourceCalled('File',
       '/etc/flume/conf/a1/log4j.properties',
-      content = Template('log4j.properties.j2', agent_name = 'a1'),
+      content = InlineTemplate(self.getConfig()['configurations']['flume-log4j']['content'],agent_name='a1'),
       owner='flume',
       mode = 0644)
 
@@ -311,7 +311,7 @@ class TestFlumeHandler(RMFTestCase):
     self.assertResourceCalled('File',
       '/etc/flume/conf/a1/log4j.properties',
       owner='flume',
-      content = Template('log4j.properties.j2', agent_name = 'a1'),
+      content = InlineTemplate(self.getConfig()['configurations']['flume-log4j']['content'],agent_name='a1'),
       mode = 0644)
     self.assertResourceCalled('File',
       '/etc/flume/conf/a1/ambari-meta.json',
@@ -335,7 +335,7 @@ class TestFlumeHandler(RMFTestCase):
     self.assertResourceCalled('File',
       '/etc/flume/conf/b1/log4j.properties',
       owner='flume',
-      content = Template('log4j.properties.j2', agent_name = 'b1'),
+      content = InlineTemplate(self.getConfig()['configurations']['flume-log4j']['content'],agent_name='b1'),
       mode = 0644)
     self.assertResourceCalled('File',
       '/etc/flume/conf/b1/ambari-meta.json',
@@ -482,7 +482,7 @@ class TestFlumeHandler(RMFTestCase):
     self.assertResourceCalled('File',
       '/etc/flume/conf/a1/log4j.properties',
       owner='flume',
-      content = Template('log4j.properties.j2', agent_name = 'a1'),
+      content = InlineTemplate(self.getConfig()['configurations']['flume-log4j']['content'],agent_name='a1'),
       mode = 0644)
 
     self.assertResourceCalled('File',
@@ -536,7 +536,7 @@ class TestFlumeHandler(RMFTestCase):
 
     self.assertResourceCalled('File',
       '/usr/hdp/current/flume-server/conf/a1/log4j.properties',
-      content = Template('log4j.properties.j2', agent_name = 'a1'),
+      content = InlineTemplate(self.getConfig()['configurations']['flume-log4j']['content'],agent_name='a1'),
       owner='flume',
       mode = 0644)
 


[05/13] ambari git commit: Revert "AMBARI-21191. Custom log4j.properties of Flume (wangjianfei via alejandro)"

Posted by rl...@apache.org.
Revert "AMBARI-21191. Custom log4j.properties of Flume (wangjianfei via alejandro)"

This reverts commit df21f9c4b2577a1d801145b131b8a065c8d02a7e.


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 242d79b8f5a2ced87a5d86b0caf5b7efa3678c89
Parents: 34b1e5f
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Tue Jun 20 16:14:04 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue Jun 20 16:14:04 2017 +0200

----------------------------------------------------------------------
 .../1.4.0.2.0/configuration/flume-log4j.xml     | 96 --------------------
 .../FLUME/1.4.0.2.0/package/scripts/flume.py    |  4 +-
 2 files changed, 2 insertions(+), 98 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/242d79b8/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-log4j.xml b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-log4j.xml
deleted file mode 100644
index fb9d7f8..0000000
--- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-log4j.xml
+++ /dev/null
@@ -1,96 +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 supports_final="false">
-  <property>
-    <name>content</name>
-    <display-name>flume-log4j template</display-name>
-    <description>Custom 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.
-
-
-# Define some default values that can be overridden by system properties.
-#
-# For testing, it may also be convenient to specify
-# -Dflume.root.logger=DEBUG,console when launching flume.
-
-#flume.root.logger=DEBUG,console
-flume.root.logger=INFO,LOGFILE
-flume.log.dir={{flume_log_dir}}
-flume.log.file=flume-{{agent_name}}.log
-
-log4j.logger.org.apache.flume.lifecycle = INFO
-log4j.logger.org.jboss = WARN
-log4j.logger.org.mortbay = INFO
-log4j.logger.org.apache.avro.ipc.NettyTransceiver = WARN
-log4j.logger.org.apache.hadoop = INFO
-
-# Define the root logger to the system property "flume.root.logger".
-log4j.rootLogger=${flume.root.logger}
-
-# Stock log4j rolling file appender
-# Default log rotation configuration
-log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
-log4j.appender.LOGFILE.MaxFileSize=100MB
-log4j.appender.LOGFILE.MaxBackupIndex=10
-log4j.appender.LOGFILE.File=${flume.log.dir}/${flume.log.file}
-log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.LOGFILE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n
-
-# Warning: If you enable the following appender it will fill up your disk if you don't have a cleanup job!
-# This uses the updated rolling file appender from log4j-extras that supports a reliable time-based rolling policy.
-# See http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/TimeBasedRollingPolicy.html
-# Add "DAILY" to flume.root.logger above if you want to use this
-log4j.appender.DAILY=org.apache.log4j.rolling.RollingFileAppender
-log4j.appender.DAILY.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
-log4j.appender.DAILY.rollingPolicy.ActiveFileName=${flume.log.dir}/${flume.log.file}
-log4j.appender.DAILY.rollingPolicy.FileNamePattern=${flume.log.dir}/${flume.log.file}.%d{yyyy-MM-dd}
-log4j.appender.DAILY.layout=org.apache.log4j.PatternLayout
-log4j.appender.DAILY.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n
-
-# console
-# Add "console" to flume.root.logger above if you want to use this
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.target=System.err
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d (%t) [%p - %l] %m%n    </value>
-  </property>
-  <value-attributes>
-    <type>content</type>
-    <show-property-name>false</show-property-name>
-  </value-attributes>
-  <on-ambari-upgrade add="true"/>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/242d79b8/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
index 0488298..6b1d286 100644
--- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
@@ -74,7 +74,7 @@ def flume(action = None):
                      properties=flume_agents[agent])
 
       File(flume_agent_log4j_file,
-           content=InlineTemplate(params.flume_log4j_content,agent_name=agent)),
+           content=Template('log4j.properties.j2', agent_name = agent))
 
       File(flume_agent_meta_file,
            content = json.dumps(ambari_meta(agent, flume_agents[agent])))
@@ -139,7 +139,7 @@ def flume(action = None):
         mode = 0644)
 
       File(flume_agent_log4j_file,
-        content=InlineTemplate(params.flume_log4j_content,agent_name=agent),
+        content=Template('log4j.properties.j2', agent_name = agent),
         owner=params.flume_user,
         mode = 0644)
 


[10/13] ambari git commit: AMBARI-21249 : Empty precision query parameter throws an error while fetching metrics from AMS.

Posted by rl...@apache.org.
AMBARI-21249 : Empty precision query parameter throws an error while fetching metrics from AMS.


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 7a050b0521db706d2e5622a611718c283c5331fc
Parents: 3105859
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Tue Jun 20 17:16:57 2017 -0700
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Tue Jun 20 17:16:57 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/metrics2/sink/timeline/Precision.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7a050b05/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
index 31044cc..e87f06e 100644
--- a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
+++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
@@ -35,7 +35,7 @@ public enum Precision {
   }
 
   public static Precision getPrecision(String precision) throws PrecisionFormatException {
-    if (precision == null ) {
+    if (precision == null || precision.isEmpty()) {
       return null;
     }
     try {


[12/13] ambari git commit: AMBARI-21271. Add zeppelin.server.ssl.port in Zeppelin's setting. (dipayanb)

Posted by rl...@apache.org.
AMBARI-21271. Add zeppelin.server.ssl.port in Zeppelin's setting. (dipayanb)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: e7fc3a6481a66b7b81afd7c728ace895e1763c3c
Parents: 134406a
Author: Dipayan Bhowmick <di...@gmail.com>
Authored: Wed Jun 21 16:42:20 2017 +0530
Committer: Dipayan Bhowmick <di...@gmail.com>
Committed: Wed Jun 21 16:42:20 2017 +0530

----------------------------------------------------------------------
 .../ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml      | 7 +++++++
 .../main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml | 5 +++++
 ambari-server/src/test/python/stacks/2.6/configs/default.json | 3 ++-
 3 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e7fc3a64/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
index 85f1859..13d726b 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
@@ -33,6 +33,13 @@
     <on-ambari-upgrade add="true"/>
   </property>
   <property>
+    <name>zeppelin.server.ssl.port</name>
+    <value>9995</value>
+    <description>Server ssl port. (used when ssl property is set to true)
+    </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
     <name>zeppelin.notebook.dir</name>
     <value>notebook</value>
     <description>notebook persist</description>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e7fc3a64/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
index df97727..1cbd78b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
@@ -26,6 +26,11 @@
             <transfer operation="delete" delete-key="shiro_ini_content" />
             <transfer operation="delete" delete-key="log4j_properties_content" />
           </definition>
+
+          <definition xsi:type="configure" id="hdp_2_6_0_0__set_zeppelin.server.ssl.port">
+            <type>zeppelin-config</type>
+            <set key="zeppelin.server.ssl.port" value="9995"/>
+          </definition>
         </changes>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e7fc3a64/ambari-server/src/test/python/stacks/2.6/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.6/configs/default.json b/ambari-server/src/test/python/stacks/2.6/configs/default.json
index 2570657..add31d0 100644
--- a/ambari-server/src/test/python/stacks/2.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.6/configs/default.json
@@ -334,7 +334,8 @@
       "zeppelin_group": "zeppelin"
     },
 "zeppelin-config": {
-            "zeppelin.server.port": "9995", 
+            "zeppelin.server.port": "9995",
+            "zeppelin.server.ssl.port": "9995",
             "zeppelin.ssl.truststore.password": "change me", 
             "zeppelin.interpreters": "org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter,org.apache.zeppelin.spark.SparkSqlInterpreter,org.apache.zeppelin.spark.DepInterpreter,org.apache.zeppelin.markdown.Markdown,org.apache.zeppelin.angular.AngularInterpreter,org.apache.zeppelin.shell.ShellInterpreter,org.apache.zeppelin.jdbc.JDBCInterpreter,org.apache.zeppelin.phoenix.PhoenixInterpreter,org.apache.zeppelin.livy.LivySparkInterpreter,org.apache.zeppelin.livy.LivyPySparkInterpreter,org.apache.zeppelin.livy.LivySparkRInterpreter,org.apache.zeppelin.livy.LivySparkSQLInterpreter",
             "zeppelin.interpreter.group.order": "spark,angular,jdbc,livy,md,sh",


[03/13] ambari git commit: AMBARI-21158. Eliminate Maven warnings

Posted by rl...@apache.org.
AMBARI-21158. Eliminate Maven warnings


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 597d003d43c9ab43cca381810462e0803962a4fa
Parents: 380fa69
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Wed May 31 15:56:18 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue Jun 20 08:47:21 2017 +0200

----------------------------------------------------------------------
 ambari-funtest/pom.xml                          |  5 --
 .../ambari-metrics-host-monitoring/pom.xml      |  1 +
 ambari-metrics/pom.xml                          | 71 +++++++--------
 ambari-project/pom.xml                          | 23 ++++-
 ambari-server/pom.xml                           | 95 ++++++++------------
 ambari-web/pom.xml                              | 65 ++++++--------
 6 files changed, 121 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/597d003d/ambari-funtest/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-funtest/pom.xml b/ambari-funtest/pom.xml
index 3738106..bb2068d 100644
--- a/ambari-funtest/pom.xml
+++ b/ambari-funtest/pom.xml
@@ -486,11 +486,6 @@
       <version>9.3-1101-jdbc4</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.httpcomponents</groupId>
-      <artifactId>httpclient</artifactId>
-      <version>4.2.5</version>
-    </dependency>
-    <dependency>
       <groupId>com.google.code.findbugs</groupId>
       <artifactId>jsr305</artifactId>
       <version>1.3.9</version>

http://git-wip-us.apache.org/repos/asf/ambari/blob/597d003d/ambari-metrics/ambari-metrics-host-monitoring/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-host-monitoring/pom.xml b/ambari-metrics/ambari-metrics-host-monitoring/pom.xml
index d6c1fab..e8f8556 100644
--- a/ambari-metrics/ambari-metrics-host-monitoring/pom.xml
+++ b/ambari-metrics/ambari-metrics-host-monitoring/pom.xml
@@ -86,6 +86,7 @@
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>exec-maven-plugin</artifactId>
+        <version>1.2.1</version>
         <executions>
           <execution>
             <configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/597d003d/ambari-metrics/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml
index b585916..560ef11 100644
--- a/ambari-metrics/pom.xml
+++ b/ambari-metrics/pom.xml
@@ -118,11 +118,6 @@
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.19</version>
-      </plugin>
-      <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>build-helper-maven-plugin</artifactId>
         <version>1.8</version>
@@ -147,6 +142,34 @@
               <failIfNoMatch>false</failIfNoMatch>
             </configuration>
           </execution>
+          <execution>
+            <id>parse-package-version</id>
+            <goals>
+              <goal>regex-property</goal>
+            </goals>
+            <configuration>
+              <name>package-version</name>
+              <value>${project.version}</value>
+              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
+              <replacement>$1.$2.$3.$4</replacement>
+              <failIfNoMatch>true</failIfNoMatch>
+            </configuration>
+          </execution>
+          <execution>
+            <id>parse-package-release</id>
+            <goals>
+              <goal>regex-property</goal>
+            </goals>
+            <configuration>
+              <name>package-release</name>
+              <value>${project.version}</value>
+              <regex>
+                ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)((([a-zA-Z]+)?([0-9]+))|(SNAPSHOT)).*
+              </regex>
+              <replacement>$7</replacement>
+              <failIfNoMatch>true</failIfNoMatch>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
       <plugin>
@@ -169,6 +192,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.19</version>
         <configuration>
           <skip>${skipSurefireTests}</skip>
 
@@ -187,6 +211,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-clean-plugin</artifactId>
+        <version>2.5</version>
         <configuration>
           <filesets>
             <fileset>
@@ -200,41 +225,6 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <version>1.8</version>
-        <executions>
-          <execution>
-            <id>parse-package-version</id>
-            <goals>
-              <goal>regex-property</goal>
-            </goals>
-            <configuration>
-              <name>package-version</name>
-              <value>${project.version}</value>
-              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
-              <replacement>$1.$2.$3.$4</replacement>
-              <failIfNoMatch>true</failIfNoMatch>
-            </configuration>
-          </execution>
-          <execution>
-            <id>parse-package-release</id>
-            <goals>
-              <goal>regex-property</goal>
-            </goals>
-            <configuration>
-              <name>package-release</name>
-              <value>${project.version}</value>
-              <regex>
-                ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)((([a-zA-Z]+)?([0-9]+))|(SNAPSHOT)).*
-              </regex>
-              <replacement>$7</replacement>
-              <failIfNoMatch>true</failIfNoMatch>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <!--Stub execution on direct plugin call - workaround for ambari rpm build process-->
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>rpm-maven-plugin</artifactId>
@@ -282,6 +272,7 @@
       <plugin>
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
+        <version>0.11</version>
         <configuration>
           <excludes>
             <exclude>pass.txt</exclude>

http://git-wip-us.apache.org/repos/asf/ambari/blob/597d003d/ambari-project/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml
index 7e1b813..524a8f7 100644
--- a/ambari-project/pom.xml
+++ b/ambari-project/pom.xml
@@ -33,6 +33,7 @@
     <jetty.version>8.1.19.v20160209</jetty.version>
     <checkstyle.version>6.19</checkstyle.version> <!-- last version that does not require Java 8 -->
     <swagger.version>1.5.10</swagger.version>
+    <swagger.maven.plugin.version>3.1.4</swagger.maven.plugin.version>
     <slf4j.version>1.7.20</slf4j.version>
     <forkCount>4</forkCount>
     <reuseForks>false</reuseForks>
@@ -525,7 +526,7 @@
       <dependency>
         <groupId>com.github.kongchen</groupId>
         <artifactId>swagger-maven-plugin</artifactId>
-        <version>3.1.4</version>
+        <version>${swagger.maven.plugin.version}</version>
       </dependency>
     </dependencies>
   </dependencyManagement>
@@ -575,6 +576,26 @@
             </dependency>
           </dependencies>
         </plugin>
+        <plugin>
+          <groupId>com.github.kongchen</groupId>
+          <artifactId>swagger-maven-plugin</artifactId>
+          <version>${swagger.maven.plugin.version}</version>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>properties-maven-plugin</artifactId>
+          <version>1.0.0</version>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>exec-maven-plugin</artifactId>
+          <version>1.2.1</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <version>2.20</version>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>

http://git-wip-us.apache.org/repos/asf/ambari/blob/597d003d/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index d4416a3..1ada974 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -170,6 +170,30 @@
               </target>
             </configuration>
           </execution>
+          <execution>
+            <id>clean-sample-upgrade-check-jar</id>
+            <phase>process-test-classes</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <delete dir="target/test-classes/checks" includeemptydirs="true"/>
+              </target>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-test-oozie2-checks-dir</id>
+            <phase>process-test-classes</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <mkdir dir="target/test-classes/extensions/EXT/0.1/services/OOZIE2/checks/tmp"/>
+              </target>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
       <plugin>
@@ -699,25 +723,6 @@
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <version>1.7</version>
-        <executions>
-          <execution>
-            <id>clean-sample-upgrade-check-jar</id>
-            <phase>process-test-classes</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <target>
-                <delete dir="target/test-classes/checks" includeemptydirs="true"/>
-              </target>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
         <version>3.0.2</version>
         <executions>
@@ -734,23 +739,6 @@
         </executions>
       </plugin>
       <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>generate-test-oozie2-checks-dir</id>
-            <phase>process-test-classes</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <target>
-                <mkdir dir="target/test-classes/extensions/EXT/0.1/services/OOZIE2/checks/tmp"/>
-              </target>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>exec-maven-plugin</artifactId>
         <version>1.2.1</version>
@@ -788,6 +776,20 @@
               <goal>exec</goal>
             </goals>
           </execution>
+          <execution>
+            <id>configuration-markdown</id>
+            <phase>site</phase>
+            <goals>
+              <goal>java</goal>
+            </goals>
+            <configuration>
+              <mainClass>org.apache.ambari.server.configuration.Configuration</mainClass>
+              <arguments>
+                <argument>-output</argument>
+                <argument>${basedir}/../ambari-server/docs/configuration/index.md</argument>
+              </arguments>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
       <plugin>
@@ -826,27 +828,6 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>exec-maven-plugin</artifactId>
-        <version>1.2.1</version>
-        <executions>
-          <execution>
-            <id>configuration-markdown</id>
-            <phase>site</phase>
-            <goals>
-              <goal>java</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <mainClass>org.apache.ambari.server.configuration.Configuration</mainClass>
-          <arguments>
-            <argument>-output</argument>
-            <argument>${basedir}/../ambari-server/docs/configuration/index.md</argument>
-          </arguments>
-        </configuration>
-      </plugin>
     </plugins>
     <resources>
       <resource>

http://git-wip-us.apache.org/repos/asf/ambari/blob/597d003d/ambari-web/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-web/pom.xml b/ambari-web/pom.xml
index d7a1d18..3a6f4f9 100644
--- a/ambari-web/pom.xml
+++ b/ambari-web/pom.xml
@@ -88,42 +88,6 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>exec-maven-plugin</artifactId>
-        <version>1.2.1</version>
-        <executions>
-          <execution>
-            <id>clean-rmdir</id>
-            <phase>clean</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>${executable.rmdir}</executable>
-              <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.rm.clean} public ${nodemodules.dir}</commandlineArgs>
-              <successCodes>
-                <successCode>0</successCode>
-                <successCode>1</successCode>
-                <successCode>2</successCode>
-              </successCodes>
-            </configuration>
-          </execution>
-          <execution>
-            <id>clean-mkdir</id>
-            <phase>clean</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>${executable.mkdir}</executable>
-              <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.mkdir} public</commandlineArgs>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>com.github.eirslett</groupId>
         <artifactId>frontend-maven-plugin</artifactId>
         <version>1.4</version>
@@ -164,6 +128,35 @@
         <version>1.2.1</version>
         <executions>
           <execution>
+            <id>clean-rmdir</id>
+            <phase>clean</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>${executable.rmdir}</executable>
+              <workingDirectory>${basedir}</workingDirectory>
+              <commandlineArgs>${args.rm.clean} public ${nodemodules.dir}</commandlineArgs>
+              <successCodes>
+                <successCode>0</successCode>
+                <successCode>1</successCode>
+                <successCode>2</successCode>
+              </successCodes>
+            </configuration>
+          </execution>
+          <execution>
+            <id>clean-mkdir</id>
+            <phase>clean</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>${executable.mkdir}</executable>
+              <workingDirectory>${basedir}</workingDirectory>
+              <commandlineArgs>${args.mkdir} public</commandlineArgs>
+            </configuration>
+          </execution>
+          <execution>
             <id>Brunch build</id>
             <phase>generate-resources</phase>
             <goals>


[02/13] ambari git commit: AMBARI-21190 Populate urlauth filesystem schemes in Ranger hive plugin (mugdha)

Posted by rl...@apache.org.
AMBARI-21190 Populate urlauth filesystem schemes in Ranger hive plugin (mugdha)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 380fa6985399fbeb3fc6da9ffaeeebd2f7652c1f
Parents: 8df01a8
Author: Mugdha Varadkar <mu...@apache.org>
Authored: Wed Jun 7 12:16:54 2017 +0530
Committer: Mugdha Varadkar <mu...@apache.org>
Committed: Tue Jun 20 10:40:49 2017 +0530

----------------------------------------------------------------------
 .../configuration/ranger-hive-security.xml      |  9 ++++++
 .../0.5.0/configuration/ranger-ugsync-site.xml  |  3 ++
 .../configuration/ranger-ugsync-site.xml        |  3 ++
 .../HIVE/configuration/ranger-hive-security.xml | 33 ++++++++++++++++++++
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |  5 +++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |  4 +++
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml     |  1 +
 7 files changed, 58 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml
index d98bc21..76b405c 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml
+++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml
@@ -71,4 +71,13 @@
     </value-attributes>
     <on-ambari-upgrade add="false"/>
   </property>
+  <property>
+    <name>ranger.plugin.hive.urlauth.filesystem.schemes</name>
+    <value>hdfs:,file:,wasb:,adl:</value>
+    <description>Add urlauth filesystem schemes</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/380fa698/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml b/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
index 439c495..331d07b 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
@@ -404,6 +404,9 @@
 # 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="true"/>
   </property>
   <property>

http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/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
index 2c62851..922fbd8 100644
--- 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
@@ -361,6 +361,9 @@
 # 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>

http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
new file mode 100644
index 0000000..889a7a3
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
@@ -0,0 +1,33 @@
+<?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.plugin.hive.urlauth.filesystem.schemes</name>
+    <value>hdfs:,file:,wasb:,adl:</value>
+    <description>Add urlauth filesystem schemes</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
index 564dead..df97727 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
@@ -56,6 +56,11 @@
             <set key="ranger.plugin.hive.ambari.cluster.name" value="{{cluster_name}}"
               if-type="ranger-hive-audit" if-key="xasecure.audit.destination.solr" if-key-state="present"/>
           </definition>
+          <definition xsi:type="configure" id="hdp_2_6_maint_ranger_hive_plugin_urlauth_filesystem_schemes">
+            <type>ranger-hive-security</type>
+            <set key="ranger.plugin.hive.urlauth.filesystem.schemes" value="hdfs:,file:,wasb:,adl:"
+              if-type="ranger-hive-security" if-key="ranger.plugin.hive.service.name" if-key-state="present"/>
+          </definition>
         </changes>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
index 6b827c9..ede267a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
@@ -303,6 +303,10 @@
         <task xsi:type="configure" id="hdp_2_6_maint_ranger_hive_plugin_cluster_name"/>
       </execute-stage>
 
+      <execute-stage service="HIVE" component="HIVE_SERVER" title="Apply config changes for Ranger Hive plugin">
+        <task xsi:type="configure" id="hdp_2_6_maint_ranger_hive_plugin_urlauth_filesystem_schemes"/>
+      </execute-stage>
+
       <!-- HBASE -->
       <execute-stage service="HBASE" component="HBASE_MASTER" title="Apply config changes for Ranger Hbase plugin">
         <task xsi:type="configure" id="hdp_2_6_maint_ranger_hbase_plugin_cluster_name"/>

http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
index 9227669..b70943b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
@@ -791,6 +791,7 @@
       <component name="HIVE_SERVER">
         <pre-upgrade>
           <task xsi:type="configure" id="hdp_2_6_maint_ranger_hive_plugin_cluster_name"/>
+          <task xsi:type="configure" id="hdp_2_6_maint_ranger_hive_plugin_urlauth_filesystem_schemes"/>
         </pre-upgrade>
         <pre-downgrade/> <!--  no-op to prevent config changes on downgrade -->
         <upgrade>


[04/13] ambari git commit: AMBARI-21281 Code refactoring: rename RU_TASKS Stagewrapper type to upgrade tasks (dili)

Posted by rl...@apache.org.
AMBARI-21281 Code refactoring: rename RU_TASKS Stagewrapper type to upgrade tasks (dili)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 34b1e5f4bb1a3aee03cee31dfd51f57e6480b4ce
Parents: 597d003
Author: Di Li <di...@apache.org>
Authored: Tue Jun 20 08:56:23 2017 -0400
Committer: Di Li <di...@apache.org>
Committed: Tue Jun 20 08:56:23 2017 -0400

----------------------------------------------------------------------
 .../server/controller/internal/UpgradeResourceProvider.java      | 4 ++--
 .../ambari/server/state/stack/upgrade/ClusterGrouping.java       | 4 ++--
 .../apache/ambari/server/state/stack/upgrade/ExecuteTask.java    | 2 +-
 .../org/apache/ambari/server/state/stack/upgrade/Grouping.java   | 2 +-
 .../apache/ambari/server/state/stack/upgrade/StageWrapper.java   | 2 +-
 .../server/controller/internal/UpgradeResourceProviderTest.java  | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/34b1e5f4/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 2f6ffc1..22858dd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -176,7 +176,7 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
 
   /**
    * The role that will be used when creating HRC's for the type
-   * {@link StageWrapper.Type#RU_TASKS}.
+   * {@link StageWrapper.Type#UPGRADE_TASKS}.
    */
   protected static final String EXECUTE_TASK_ROLE = "ru_execute_tasks";
 
@@ -828,7 +828,7 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
         makeCommandStage(context, request, effectiveRepositoryVersion, entity, wrapper, skippable,
             supportsAutoSkipOnFailure, allowRetry);
         break;
-      case RU_TASKS:
+      case UPGRADE_TASKS:
         makeActionStage(context, request, effectiveRepositoryVersion, entity, wrapper, skippable,
             supportsAutoSkipOnFailure, allowRetry);
         break;

http://git-wip-us.apache.org/repos/asf/ambari/blob/34b1e5f4/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
index 8e59602..fa988c3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
@@ -296,7 +296,7 @@ public class ClusterGrouping extends Grouping {
         }
 
         return new StageWrapper(
-            StageWrapper.Type.RU_TASKS,
+            StageWrapper.Type.UPGRADE_TASKS,
             execution.title,
             new TaskWrapper(service, component, realHosts, et));
       }
@@ -313,7 +313,7 @@ public class ClusterGrouping extends Grouping {
       }
 
       return new StageWrapper(
-          StageWrapper.Type.RU_TASKS,
+          StageWrapper.Type.UPGRADE_TASKS,
           execution.title,
           new TaskWrapper(service, component, hostNames, et));
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/34b1e5f4/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java
index 960a04c..11c42c2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java
@@ -68,7 +68,7 @@ public class ExecuteTask extends Task {
 
   @Override
   public StageWrapper.Type getStageWrapperType() {
-    return StageWrapper.Type.RU_TASKS;
+    return StageWrapper.Type.UPGRADE_TASKS;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/34b1e5f4/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java
index 51bd168..4f278fd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java
@@ -310,7 +310,7 @@ public class Grouping {
           type = StageWrapper.Type.SERVER_SIDE_ACTION;
           break;
         case EXECUTE:
-          type = StageWrapper.Type.RU_TASKS;
+          type = StageWrapper.Type.UPGRADE_TASKS;
           break;
         case CONFIGURE_FUNCTION:
           type = StageWrapper.Type.CONFIGURE;

http://git-wip-us.apache.org/repos/asf/ambari/blob/34b1e5f4/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StageWrapper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StageWrapper.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StageWrapper.java
index 288f98a..70589ec 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StageWrapper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StageWrapper.java
@@ -155,7 +155,7 @@ public class StageWrapper {
   public enum Type {
     SERVER_SIDE_ACTION,
     RESTART,
-    RU_TASKS,
+    UPGRADE_TASKS,
     SERVICE_CHECK,
     STOP,
     START,

http://git-wip-us.apache.org/repos/asf/ambari/blob/34b1e5f4/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
index 014ab42..583f83b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
@@ -1658,7 +1658,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
   }
 
   /**
-   * Tests that commands created for {@link org.apache.ambari.server.state.stack.upgrade.StageWrapper.Type#RU_TASKS} set the
+   * Tests that commands created for {@link org.apache.ambari.server.state.stack.upgrade.StageWrapper.Type#UPGRADE_TASKS} set the
    * service and component on the {@link ExecutionCommand}.
    * <p/>
    * Without this, commands of this type would not be able to determine which