Repository: ambari Updated Branches: refs/heads/branch-1.6.0 f31e9dc7c -> 14b8c9e9f
AMBARI-5807. MapReduce Service Check fails. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/14b8c9e9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/14b8c9e9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/14b8c9e9 Branch: refs/heads/branch-1.6.0 Commit: 14b8c9e9f70aa6e262e8e8f5cbfe06d54f502fc8 Parents: f31e9dc Author: Andrew Onishuk <[email protected]> Authored: Mon May 19 21:15:35 2014 +0300 Committer: Andrew Onishuk <[email protected]> Committed: Mon May 19 21:15:35 2014 +0300 ---------------------------------------------------------------------- .../HDP/1.3.2/hooks/after-INSTALL/scripts/params.py | 1 + .../hooks/after-INSTALL/scripts/shared_initialization.py | 7 ++++++- .../stacks/HDP/2.0.6/hooks/before-START/scripts/params.py | 1 + .../hooks/before-START/scripts/shared_initialization.py | 5 ++++- .../1.3.2/hooks/after-INSTALL/test_after_install.py | 5 ++++- .../stacks/2.0.6/hooks/before-START/test_before_start.py | 10 ++++++++-- 6 files changed, 24 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/14b8c9e9/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/params.py index 48b8701..77661d8 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/params.py @@ -30,6 +30,7 @@ security_enabled = ( not is_empty(_authentication) and _authentication == 'kerbe java_home = config['hostLevelParams']['java_home'] #hadoop params hadoop_conf_dir = "/etc/hadoop/conf" +hadoop_conf_empty_dir = "/etc/hadoop/conf.empty" hdfs_log_dir_prefix = config['configurations']['global']['hdfs_log_dir_prefix'] hadoop_pid_dir_prefix = config['configurations']['global']['hadoop_pid_dir_prefix'] http://git-wip-us.apache.org/repos/asf/ambari/blob/14b8c9e9/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/shared_initialization.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/shared_initialization.py index 2a26e2e..c5aff35 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/shared_initialization.py @@ -25,11 +25,16 @@ def setup_hadoop_env(): tc_owner = "root" else: tc_owner = params.hdfs_user - Directory(params.hadoop_conf_dir, + + Directory(params.hadoop_conf_empty_dir, recursive=True, owner='root', group='root' ) + Link(params.hadoop_conf_dir, + to=params.hadoop_conf_empty_dir + ) + File(os.path.join(params.hadoop_conf_dir, 'hadoop-env.sh'), owner=tc_owner, content=Template('hadoop-env.sh.j2') http://git-wip-us.apache.org/repos/asf/ambari/blob/14b8c9e9/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py index 889f9fb..a36ab26 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py @@ -77,6 +77,7 @@ if has_ganglia_server: hadoop_tmp_dir = format("/tmp/hadoop-{hdfs_user}") hadoop_lib_home = "/usr/lib/hadoop/lib" hadoop_conf_dir = "/etc/hadoop/conf" +hadoop_conf_empty_dir = "/etc/hadoop/conf.empty" hadoop_pid_dir_prefix = config['configurations']['global']['hadoop_pid_dir_prefix'] hadoop_home = "/usr" hadoop_bin = "/usr/lib/hadoop/sbin" http://git-wip-us.apache.org/repos/asf/ambari/blob/14b8c9e9/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py index e0d5e2b..7daa4b0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py @@ -34,11 +34,14 @@ def setup_hadoop(): install_snappy() #directories - Directory(params.hadoop_conf_dir, + Directory(params.hadoop_conf_empty_dir, recursive=True, owner='root', group='root' ) + Link(params.hadoop_conf_dir, + to=params.hadoop_conf_empty_dir + ) Directory(params.hdfs_log_dir_prefix, recursive=True, owner='root', http://git-wip-us.apache.org/repos/asf/ambari/blob/14b8c9e9/ambari-server/src/test/python/stacks/1.3.2/hooks/after-INSTALL/test_after_install.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/1.3.2/hooks/after-INSTALL/test_after_install.py b/ambari-server/src/test/python/stacks/1.3.2/hooks/after-INSTALL/test_after_install.py index 1cc6f6f..8bb41a2 100644 --- a/ambari-server/src/test/python/stacks/1.3.2/hooks/after-INSTALL/test_after_install.py +++ b/ambari-server/src/test/python/stacks/1.3.2/hooks/after-INSTALL/test_after_install.py @@ -30,11 +30,14 @@ class TestHookAfterInstall(RMFTestCase): command="hook", config_file="default.json" ) - self.assertResourceCalled('Directory', '/etc/hadoop/conf', + self.assertResourceCalled('Directory', '/etc/hadoop/conf.empty', owner = 'root', group = 'root', recursive = True, ) + self.assertResourceCalled('Link', '/etc/hadoop/conf', + to = '/etc/hadoop/conf.empty' + ) self.assertResourceCalled('File', '/etc/hadoop/conf/hadoop-env.sh', content = Template('hadoop-env.sh.j2'), owner = 'hdfs', http://git-wip-us.apache.org/repos/asf/ambari/blob/14b8c9e9/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py index c49bb53..ca202cf 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py @@ -36,11 +36,14 @@ class TestHookBeforeStart(RMFTestCase): ) self.assertResourceCalled('Execute', 'mkdir -p /usr/lib/hadoop/lib/native/Linux-amd64-64; ln -sf /usr/lib64/libsnappy.so /usr/lib/hadoop/lib/native/Linux-amd64-64/libsnappy.so', ) - self.assertResourceCalled('Directory', '/etc/hadoop/conf', + self.assertResourceCalled('Directory', '/etc/hadoop/conf.empty', owner = 'root', group = 'root', recursive = True, ) + self.assertResourceCalled('Link', '/etc/hadoop/conf', + to = '/etc/hadoop/conf.empty' + ) self.assertResourceCalled('Directory', '/var/log/hadoop', owner = 'root', group = 'root', @@ -118,11 +121,14 @@ class TestHookBeforeStart(RMFTestCase): ) self.assertResourceCalled('Execute', 'mkdir -p /usr/lib/hadoop/lib/native/Linux-amd64-64; ln -sf /usr/lib64/libsnappy.so /usr/lib/hadoop/lib/native/Linux-amd64-64/libsnappy.so', ) - self.assertResourceCalled('Directory', '/etc/hadoop/conf', + self.assertResourceCalled('Directory', '/etc/hadoop/conf.empty', owner = 'root', group = 'root', recursive = True, ) + self.assertResourceCalled('Link', '/etc/hadoop/conf', + to = '/etc/hadoop/conf.empty' + ) self.assertResourceCalled('Directory', '/var/log/hadoop', owner = 'root', group = 'root',
