AMBARI-13881. Devdeploy: YARN,Mahout service checks fail on all OSes (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/99413382 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/99413382 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/99413382 Branch: refs/heads/branch-2.1 Commit: 994133826c47b1371240e8235c5bf3a86beccd58 Parents: 203195c Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Nov 13 14:48:01 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Nov 13 14:48:01 2015 +0200 ---------------------------------------------------------------------- .../2.1.0.2.0/package/scripts/params_linux.py | 2 ++ .../YARN/2.1.0.2.0/package/scripts/yarn.py | 8 ++++++ .../stacks/2.0.6/YARN/test_historyserver.py | 30 ++++++++++++++++++++ 3 files changed, 40 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/99413382/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 0e9d77c..cc42481 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -175,6 +175,8 @@ nm_log_dirs_list = nm_log_dirs.split(',') distrAppJarName = "hadoop-yarn-applications-distributedshell-2.*.jar" hadoopMapredExamplesJarName = "hadoop-mapreduce-examples-2.*.jar" +entity_file_history_directory = "/tmp/entity-file-history/active" + yarn_pid_dir = status_params.yarn_pid_dir mapred_pid_dir = status_params.mapred_pid_dir http://git-wip-us.apache.org/repos/asf/ambari/blob/99413382/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py index 8c52de2..aa79fe4 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py @@ -71,6 +71,14 @@ def yarn(name = None): mode=0777, recursive_chmod=True ) + + + params.HdfsResource(params.entity_file_history_directory, + action="create_on_execute", + type="directory", + owner=params.yarn_user, + group=params.user_group + ) params.HdfsResource("/mapred", type="directory", action="create_on_execute", http://git-wip-us.apache.org/repos/asf/ambari/blob/99413382/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py index bd1643d..f345cf6 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py @@ -202,6 +202,21 @@ class TestHistoryServer(RMFTestCase): action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', mode = 0777, ) + self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active', + security_enabled = False, + hadoop_bin_dir = '/usr/bin', + keytab = UnknownConfigurationMock(), + default_fs = 'hdfs://c6401.ambari.apache.org:8020', + hdfs_site = self.getConfig()['configurations']['hdfs-site'], + kinit_path_local = '/usr/bin/kinit', + principal_name = UnknownConfigurationMock(), + user = 'hdfs', + owner = 'yarn', + group = 'hadoop', + hadoop_conf_dir = '/etc/hadoop/conf', + type = 'directory', + action = ['create_on_execute'], + ) self.assertResourceCalled('HdfsResource', '/mapred', security_enabled = False, hadoop_bin_dir = '/usr/bin', @@ -428,6 +443,21 @@ class TestHistoryServer(RMFTestCase): action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name='hdfs', default_fs='hdfs://c6401.ambari.apache.org:8020', mode = 0777, ) + self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active', + security_enabled = True, + hadoop_bin_dir = '/usr/bin', + keytab = '/etc/security/keytabs/hdfs.headless.keytab', + default_fs = 'hdfs://c6401.ambari.apache.org:8020', + hdfs_site = self.getConfig()['configurations']['hdfs-site'], + kinit_path_local = '/usr/bin/kinit', + principal_name = 'hdfs', + user = 'hdfs', + owner = 'yarn', + group = 'hadoop', + hadoop_conf_dir = '/etc/hadoop/conf', + type = 'directory', + action = ['create_on_execute'], + ) self.assertResourceCalled('HdfsResource', '/mapred', security_enabled = True, hadoop_bin_dir = '/usr/bin',