Repository: ambari
Updated Branches:
  refs/heads/trunk dd9cb4ee5 -> 4abd45570


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/4abd4557
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4abd4557
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4abd4557

Branch: refs/heads/trunk
Commit: 4abd45570e67b86ba44f94ddf7b7501e3cbbf491
Parents: dd9cb4e
Author: Andrew Onishuk <[email protected]>
Authored: Mon May 19 21:14:52 2014 +0300
Committer: Andrew Onishuk <[email protected]>
Committed: Mon May 19 21:14:52 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/4abd4557/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 966acb4..dab3fb9 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/4abd4557/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/4abd4557/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 861ed55..bfaf8b8 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
@@ -72,6 +72,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/4abd4557/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 b2b6699..1daadf6 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/4abd4557/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/4abd4557/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 e57a53c..f77a0c7 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',
@@ -111,11 +114,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',

Reply via email to