ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/2] git commit: AMBARI-4429. Write unnitests for MAPREDUCE1 install script (Arsen Babych via aonishuk)
Date Tue, 28 Jan 2014 12:48:30 GMT
Updated Branches:
  refs/heads/trunk 3d7270b38 -> 371186173


AMBARI-4429. Write unnitests for MAPREDUCE1 install script (Arsen Babych
via aonishuk)


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

Branch: refs/heads/trunk
Commit: 2aad5bbb4aa9e51d2b98de4cfe88cebf2ad64a28
Parents: 3d7270b
Author: Andrew Onischuk <aonishuk@hortonworks.com>
Authored: Fri Jan 17 03:52:24 2014 -0800
Committer: Andrew Onischuk <aonishuk@hortonworks.com>
Committed: Fri Jan 17 03:52:24 2014 -0800

----------------------------------------------------------------------
 .../stacks/1.3.3/HIVE/test_hive_client.py       |  18 --
 .../stacks/1.3.3/HIVE/test_hive_metastore.py    |  16 --
 .../stacks/1.3.3/HIVE/test_hive_server.py       |  16 --
 .../1.3.3/MAPREDUCE/test_mapreduce_client.py    |  87 ++++++++
 .../MAPREDUCE/test_mapreduce_historyserver.py   | 157 +++++++++++++++
 .../MAPREDUCE/test_mapreduce_jobtracker.py      | 196 +++++++++++++++++++
 .../MAPREDUCE/test_mapreduce_service_check.py   |  78 ++++++++
 .../MAPREDUCE/test_mapreduce_tasktracker.py     | 157 +++++++++++++++
 .../1.3.3/ZOOKEEPER/test_zookeeper_client.py    |  92 ++++-----
 .../1.3.3/ZOOKEEPER/test_zookeeper_server.py    |  12 +-
 .../stacks/2.1.1/HIVE/test_hive_client.py       |  16 --
 .../stacks/2.1.1/HIVE/test_hive_metastore.py    |  16 --
 .../stacks/2.1.1/HIVE/test_hive_server.py       |  17 --
 .../2.1.1/ZOOKEEPER/test_zookeeper_client.py    |  91 ++++-----
 .../2.1.1/ZOOKEEPER/test_zookeeper_server.py    |  17 +-
 15 files changed, 752 insertions(+), 234 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_client.py b/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_client.py
index bcd5d75..56eff70 100644
--- a/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_client.py
+++ b/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_client.py
@@ -28,7 +28,6 @@ class TestHiveClient(RMFTestCase):
                        command = "configure",
                        config_file="default.json"
     )
-
     self.assertResourceCalled('Directory', '/etc/hive/conf',
       owner = 'hive',
       group = 'hadoop',
@@ -57,14 +56,6 @@ class TestHiveClient(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
     self.assertNoMoreResources()
 
 
@@ -75,7 +66,6 @@ class TestHiveClient(RMFTestCase):
                        command = "configure",
                        config_file="secured.json"
     )
-
     self.assertResourceCalled('Directory', '/etc/hive/conf',
       owner = 'hive',
       group = 'hadoop',
@@ -104,12 +94,4 @@ class TestHiveClient(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
     self.assertNoMoreResources()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_metastore.py
index c5088dd..d43cf4b 100644
--- a/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_metastore.py
@@ -154,14 +154,6 @@ class TestHiveMetastore(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
 
   def assert_configure_secured(self):
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/HDP-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar /usr/lib/hive/lib//mysql-connector-java.jar',
@@ -219,12 +211,4 @@ class TestHiveMetastore(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_server.py
index e669411..44effe7 100644
--- a/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_server.py
+++ b/ambari-server/src/test/python/stacks/1.3.3/HIVE/test_hive_server.py
@@ -155,14 +155,6 @@ class TestHiveServer(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
 
   def assert_configure_secured(self):
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/HDP-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar /usr/lib/hive/lib//mysql-connector-java.jar',
@@ -220,12 +212,4 @@ class TestHiveServer(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_client.py b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_client.py
new file mode 100644
index 0000000..632ae49
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_client.py
@@ -0,0 +1,87 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+from mock.mock import MagicMock, call, patch
+from stacks.utils.RMFTestCase import *
+
+class TestMapreduceClient(RMFTestCase):
+
+  def test_configure_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/client.py",
+                       classname = "Client",
+                       command = "configure",
+                       config_file="default.json"
+    )
+    self.assertResourceCalled('Directory', '/var/run/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/var/log/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/hadoop/mapred',
+      owner = 'mapred',
+      recursive = True,
+      mode = 493,
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.include',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+    self.assertNoMoreResources()
+
+  def test_configure_secured(self):
+
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/client.py",
+      classname = "Client",
+      command = "configure",
+      config_file="secured.json"
+    )
+    self.assertResourceCalled('Directory', '/var/run/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/var/log/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/hadoop/mapred',
+      owner = 'mapred',
+      recursive = True,
+      mode = 493,
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.include',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+
+    self.assertNoMoreResources()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_historyserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_historyserver.py b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_historyserver.py
new file mode 100644
index 0000000..51735ce
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_historyserver.py
@@ -0,0 +1,157 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+from mock.mock import MagicMock, call, patch
+from stacks.utils.RMFTestCase import *
+
+class TestHistoryServer(RMFTestCase):
+
+  def test_configure_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/historyserver.py",
+                       classname = "Historyserver",
+                       command = "configure",
+                       config_file="default.json"
+    )
+    self.assert_configure_default()
+    self.assertNoMoreResources()
+
+  def test_start_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/historyserver.py",
+                         classname = "Historyserver",
+                         command = "start",
+                         config_file="default.json"
+      )
+
+    self.assert_configure_default()
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start historyserver',
+                              user = 'mapred',
+                              not_if = 'ls /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid` >/dev/null 2>&1'
+    )
+    self.assertResourceCalled('Execute', 'ls /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid` >/dev/null 2>&1',
+                              user = 'mapred',
+                              initial_wait = 5,
+                              not_if= 'ls /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid` >/dev/null 2>&1'
+    )
+    self.assertNoMoreResources()
+
+  def test_stop_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/historyserver.py",
+                       classname = "Historyserver",
+                       command = "stop",
+                       config_file="default.json"
+    )
+
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop historyserver',
+                              user = 'mapred'
+    )
+    self.assertResourceCalled('Execute', 'rm -f /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid')
+    self.assertNoMoreResources()
+
+
+  def test_configure_secured(self):
+
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/historyserver.py",
+                       classname = "Historyserver",
+                       command = "configure",
+                       config_file="secured.json"
+    )
+    self.assert_configure_secured()
+    self.assertNoMoreResources()
+
+  def test_start_secured(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/historyserver.py",
+                         classname = "Historyserver",
+                         command = "start",
+                         config_file="secured.json"
+    )
+
+    self.assert_configure_default()
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start historyserver',
+                              user = 'mapred',
+                              not_if = 'ls /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid` >/dev/null 2>&1'
+    )
+    self.assertResourceCalled('Execute', 'ls /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid` >/dev/null 2>&1',
+                              user = 'mapred',
+                              initial_wait = 5,
+                              not_if= 'ls /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid` >/dev/null 2>&1'
+    )
+    self.assertNoMoreResources()
+
+  def test_stop_secured(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/historyserver.py",
+                       classname = "Historyserver",
+                       command = "stop",
+                       config_file="secured.json"
+    )
+
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop historyserver',
+                              user = 'mapred'
+    )
+    self.assertResourceCalled('Execute', 'rm -f /var/run/hadoop/mapred/hadoop-mapred-historyserver.pid')
+    self.assertNoMoreResources()
+
+  def assert_configure_default(self):
+    self.assertResourceCalled('Directory', '/var/run/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/var/log/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/hadoop/mapred',
+      owner = 'mapred',
+      recursive = True,
+      mode = 493,
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.include',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+
+  def assert_configure_secured(self):
+    self.assertResourceCalled('Directory', '/var/run/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/var/log/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/hadoop/mapred',
+      owner = 'mapred',
+      recursive = True,
+      mode = 493,
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.include',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_jobtracker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_jobtracker.py b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_jobtracker.py
new file mode 100644
index 0000000..80762f8
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_jobtracker.py
@@ -0,0 +1,196 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+from mock.mock import MagicMock, call, patch
+from stacks.utils.RMFTestCase import *
+
+class TestJobtracker(RMFTestCase):
+
+  def test_configure_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/jobtracker.py",
+                       classname = "Jobtracker",
+                       command = "configure",
+                       config_file="default.json"
+    )
+    self.assert_configure_default()
+    self.assertNoMoreResources()
+
+  def test_start_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/jobtracker.py",
+                       classname = "Jobtracker",
+                       command = "start",
+                       config_file="default.json"
+      )
+
+    self.assert_configure_default()
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start jobtracker',
+                       user = 'mapred',
+                       not_if = 'ls /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid` >/dev/null 2>&1'
+    )
+    self.assertResourceCalled('Execute', 'ls /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid` >/dev/null 2>&1',
+                       user = 'mapred',
+                       initial_wait = 5,
+                       not_if= 'ls /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid` >/dev/null 2>&1'
+    )
+    self.assertNoMoreResources()
+
+  def test_stop_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/jobtracker.py",
+                       classname = "Jobtracker",
+                       command = "stop",
+                       config_file="default.json"
+    )
+
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop jobtracker',
+                              user = 'mapred'
+    )
+    self.assertResourceCalled('Execute', 'rm -f /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid')
+    self.assertNoMoreResources()
+
+  def test_decommission_default(self):
+
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/jobtracker.py",
+                       classname = "Jobtracker",
+                       command = "decommission",
+                       config_file="default.json"
+    )
+
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+                       owner = 'mapred',
+                       content = Template('exclude_hosts_list.j2'),
+                       group = 'hadoop',
+    )
+    self.assertResourceCalled('ExecuteHadoop', 'mradmin -refreshNodes',
+                       conf_dir = '/etc/hadoop/conf',
+                       kinit_override = True,
+                       user = 'mapred',
+    )
+    self.assertNoMoreResources()
+
+  def test_configure_secured(self):
+
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/jobtracker.py",
+                       classname = "Jobtracker",
+                       command = "configure",
+                       config_file="secured.json"
+    )
+    self.assert_configure_secured()
+    self.assertNoMoreResources()
+
+  def test_start_secured(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/jobtracker.py",
+                       classname = "Jobtracker",
+                       command = "start",
+                       config_file="secured.json"
+    )
+
+    self.assert_configure_default()
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start jobtracker',
+                       user = 'mapred',
+                       not_if = 'ls /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid` >/dev/null 2>&1'
+    )
+    self.assertResourceCalled('Execute', 'ls /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid` >/dev/null 2>&1',
+                       user = 'mapred',
+                       initial_wait = 5,
+                       not_if= 'ls /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid` >/dev/null 2>&1'
+    )
+    self.assertNoMoreResources()
+
+  def test_stop_secured(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/jobtracker.py",
+                       classname = "Jobtracker",
+                       command = "stop",
+                       config_file="secured.json"
+    )
+
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop jobtracker',
+                       user = 'mapred'
+    )
+    self.assertResourceCalled('Execute', 'rm -f /var/run/hadoop/mapred/hadoop-mapred-jobtracker.pid')
+    self.assertNoMoreResources()
+
+  def test_decommission_secured(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/jobtracker.py",
+                       classname = "Jobtracker",
+                       command = "decommission",
+                       config_file="secured.json"
+    )
+
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+                       owner = 'mapred',
+                       content = Template('exclude_hosts_list.j2'),
+                       group = 'hadoop',
+    )
+
+    self.assertResourceCalled('ExecuteHadoop', 'mradmin -refreshNodes',
+                       conf_dir = '/etc/hadoop/conf',
+                       kinit_override = True,
+                       user = 'mapred',
+    )
+    self.assertNoMoreResources()
+
+  def assert_configure_default(self):
+    self.assertResourceCalled('Directory', '/var/run/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/var/log/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/hadoop/mapred',
+      owner = 'mapred',
+      recursive = True,
+      mode = 493,
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.include',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+
+  def assert_configure_secured(self):
+    self.assertResourceCalled('Directory', '/var/run/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/var/log/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/hadoop/mapred',
+      owner = 'mapred',
+      recursive = True,
+      mode = 493,
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.include',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_service_check.py b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_service_check.py
new file mode 100644
index 0000000..337c3c0
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_service_check.py
@@ -0,0 +1,78 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+from mock.mock import MagicMock, call, patch
+from stacks.utils.RMFTestCase import *
+
+class TestServiceCheck(RMFTestCase):
+
+  def test_service_check_default(self):
+
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/service_check.py",
+                        classname="ServiceCheck",
+                        command="service_check",
+                        config_file="default.json"
+    )
+    self.assertResourceCalled('ExecuteHadoop', 'dfs -rmr mapredsmokeoutput mapredsmokeinput ; hadoop dfs -put /etc/passwd mapredsmokeinput',
+                        try_sleep = 5,
+                        tries = 1,
+                        user = 'ambari-qa',
+                        conf_dir = '/etc/hadoop/conf',
+    )
+    self.assertResourceCalled('ExecuteHadoop', 'jar /usr/lib/hadoop//hadoop-examples.jar wordcount mapredsmokeinput mapredsmokeoutput',
+                        logoutput = True,
+                        try_sleep = 5,
+                        tries = 1,
+                        user = 'ambari-qa',
+                        conf_dir = '/etc/hadoop/conf',
+    )
+    self.assertResourceCalled('ExecuteHadoop', 'fs -test -e mapredsmokeoutput',
+                        user = 'ambari-qa',
+                        conf_dir = '/etc/hadoop/conf',
+    )
+    self.assertNoMoreResources()
+
+  def test_service_check_secured(self):
+
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/service_check.py",
+                       classname="ServiceCheck",
+                       command="service_check",
+                       config_file="secured.json"
+    )
+    self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa;',
+                       user = 'ambari-qa',
+    )
+    self.assertResourceCalled('ExecuteHadoop', 'dfs -rmr mapredsmokeoutput mapredsmokeinput ; hadoop dfs -put /etc/passwd mapredsmokeinput',
+                       try_sleep = 5,
+                       tries = 1,
+                       user = 'ambari-qa',
+                       conf_dir = '/etc/hadoop/conf',
+    )
+    self.assertResourceCalled('ExecuteHadoop', 'jar /usr/lib/hadoop//hadoop-examples.jar wordcount mapredsmokeinput mapredsmokeoutput',
+                       logoutput = True,
+                       try_sleep = 5,
+                       tries = 1,
+                       user = 'ambari-qa',
+                       conf_dir = '/etc/hadoop/conf',
+    )
+    self.assertResourceCalled('ExecuteHadoop', 'fs -test -e mapredsmokeoutput',
+                       user = 'ambari-qa',
+                       conf_dir = '/etc/hadoop/conf',
+    )
+    self.assertNoMoreResources()

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_tasktracker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_tasktracker.py b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_tasktracker.py
new file mode 100644
index 0000000..a36bf52
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/1.3.3/MAPREDUCE/test_mapreduce_tasktracker.py
@@ -0,0 +1,157 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+from mock.mock import MagicMock, call, patch
+from stacks.utils.RMFTestCase import *
+
+class TestTasktracker(RMFTestCase):
+
+  def test_configure_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/tasktracker.py",
+                       classname = "Tasktracker",
+                       command = "configure",
+                       config_file="default.json"
+    )
+    self.assert_configure_default()
+    self.assertNoMoreResources()
+
+  def test_start_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/tasktracker.py",
+                         classname = "Tasktracker",
+                         command = "start",
+                         config_file="default.json"
+      )
+
+    self.assert_configure_default()
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start tasktracker',
+                              user = 'mapred',
+                              not_if = 'ls /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid` >/dev/null 2>&1'
+    )
+    self.assertResourceCalled('Execute', 'ls /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid` >/dev/null 2>&1',
+                              user = 'mapred',
+                              initial_wait = 5,
+                              not_if= 'ls /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid` >/dev/null 2>&1'
+    )
+    self.assertNoMoreResources()
+
+  def test_stop_default(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/tasktracker.py",
+                       classname = "Tasktracker",
+                       command = "stop",
+                       config_file="default.json"
+    )
+
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop tasktracker',
+                              user = 'mapred'
+    )
+    self.assertResourceCalled('Execute', 'rm -f /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid')
+    self.assertNoMoreResources()
+
+
+  def test_configure_secured(self):
+
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/tasktracker.py",
+                       classname = "Tasktracker",
+                       command = "configure",
+                       config_file="secured.json"
+    )
+    self.assert_configure_secured()
+    self.assertNoMoreResources()
+
+  def test_start_secured(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/tasktracker.py",
+                         classname = "Tasktracker",
+                         command = "start",
+                         config_file="secured.json"
+    )
+
+    self.assert_configure_default()
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start tasktracker',
+                              user = 'mapred',
+                              not_if = 'ls /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid` >/dev/null 2>&1'
+    )
+    self.assertResourceCalled('Execute', 'ls /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid` >/dev/null 2>&1',
+                              user = 'mapred',
+                              initial_wait = 5,
+                              not_if= 'ls /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid >/dev/null 2>&1 && ps `cat /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid` >/dev/null 2>&1'
+    )
+    self.assertNoMoreResources()
+
+  def test_stop_secured(self):
+    self.executeScript("1.3.3/services/MAPREDUCE/package/scripts/tasktracker.py",
+                       classname = "Tasktracker",
+                       command = "stop",
+                       config_file="secured.json"
+    )
+
+    self.assertResourceCalled('Execute', 'export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop tasktracker',
+                              user = 'mapred'
+    )
+    self.assertResourceCalled('Execute', 'rm -f /var/run/hadoop/mapred/hadoop-mapred-tasktracker.pid')
+    self.assertNoMoreResources()
+
+  def assert_configure_default(self):
+    self.assertResourceCalled('Directory', '/var/run/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/var/log/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/hadoop/mapred',
+      owner = 'mapred',
+      recursive = True,
+      mode = 493,
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.include',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+
+  def assert_configure_secured(self):
+    self.assertResourceCalled('Directory', '/var/run/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/var/log/hadoop/mapred',
+      owner = 'mapred',
+      group = 'hadoop',
+      recursive = True,
+    )
+    self.assertResourceCalled('Directory', '/hadoop/mapred',
+      owner = 'mapred',
+      recursive = True,
+      mode = 493,
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.exclude',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
+    self.assertResourceCalled('File', '/etc/hadoop/conf/mapred.include',
+      owner = 'mapred',
+      group = 'hadoop',
+    )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_client.py b/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_client.py
index 7eacc6a..1100118 100644
--- a/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_client.py
+++ b/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_client.py
@@ -28,59 +28,46 @@ class TestZookeeperClient(RMFTestCase):
                        command = "configure",
                        config_file="default.json"
     )
-
     self.assertResourceCalled('Directory', '/etc/zookeeper/conf',
       owner = 'zookeeper',
       group = 'hadoop',
-      recursive = True
+      recursive = True,
     )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo.cfg',
       owner = 'zookeeper',
       content = Template('zoo.cfg.j2'),
-      group = 'hadoop'
+      group = 'hadoop',
     )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zookeeper-env.sh',
       owner = 'zookeeper',
       content = Template('zookeeper-env.sh.j2'),
-      group = 'hadoop'
+      group = 'hadoop',
     )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/configuration.xsl',
       owner = 'zookeeper',
       content = Template('configuration.xsl.j2'),
-      group = 'hadoop'
+      group = 'hadoop',
     )
-
     self.assertResourceCalled('Directory', '/var/run/zookeeper',
       owner = 'zookeeper',
       group = 'hadoop',
-      recursive = True
+      recursive = True,
     )
-
     self.assertResourceCalled('Directory', '/var/log/zookeeper',
       owner = 'zookeeper',
       group = 'hadoop',
-      recursive = True
+      recursive = True,
     )
-
     self.assertResourceCalled('Directory', '/hadoop/zookeeper',
       owner = 'zookeeper',
       group = 'hadoop',
-      recursive = True
+      recursive = True,
     )
-
-    self.assertResourceCalled('File', '/etc/zookeeper/conf/log4j.properties',
-      owner = 'zookeeper',
-      content = Template('log4j.properties.j2'),
-      group = 'hadoop'
-    )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo_sample.cfg',
       owner = 'zookeeper',
-      group = 'hadoop'
+      group = 'hadoop',
     )
+    self.assertNoMoreResources()
 
   def test_configure_secured(self):
 
@@ -91,52 +78,47 @@ class TestZookeeperClient(RMFTestCase):
     )
 
     self.assertResourceCalled('Directory', '/etc/zookeeper/conf',
-      owner='zookeeper',
-      group='hadoop',
-      recursive=True
+      owner = 'zookeeper',
+      group = 'hadoop',
+      recursive = True,
     )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo.cfg',
-      owner='zookeeper',
-      content=Template('zoo.cfg.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      content = Template('zoo.cfg.j2'),
+      group = 'hadoop',
     )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zookeeper-env.sh',
-      owner='zookeeper',
-      content=Template('zookeeper-env.sh.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      content = Template('zookeeper-env.sh.j2'),
+      group = 'hadoop',
     )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/configuration.xsl',
-      owner='zookeeper',
-      content=Template('configuration.xsl.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      content = Template('configuration.xsl.j2'),
+      group = 'hadoop',
     )
     self.assertResourceCalled('Directory', '/var/run/zookeeper',
-      owner='zookeeper',
-      group='hadoop',
-      recursive=True,
+      owner = 'zookeeper',
+      group = 'hadoop',
+      recursive = True,
     )
     self.assertResourceCalled('Directory', '/var/log/zookeeper',
-      owner='zookeeper',
-      group='hadoop',
-      recursive=True,
+      owner = 'zookeeper',
+      group = 'hadoop',
+      recursive = True,
     )
     self.assertResourceCalled('Directory', '/hadoop/zookeeper',
-      owner='zookeeper',
-      group='hadoop',
-      recursive=True,
-    )
-    self.assertResourceCalled('File', '/etc/zookeeper/conf/log4j.properties',
-      owner='zookeeper',
-      content=Template('log4j.properties.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      group = 'hadoop',
+      recursive = True,
     )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zookeeper_client_jaas.conf',
-      owner='zookeeper',
-      content=Template('zookeeper_client_jaas.conf.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      content = Template('zookeeper_client_jaas.conf.j2'),
+      group = 'hadoop',
     )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo_sample.cfg',
-      owner='zookeeper',
-      group='hadoop',
-    )
\ No newline at end of file
+      owner = 'zookeeper',
+      group = 'hadoop',
+    )
+    self.assertNoMoreResources()

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_server.py b/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_server.py
index 021a1e8..79058ec 100644
--- a/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_server.py
+++ b/ambari-server/src/test/python/stacks/1.3.3/ZOOKEEPER/test_zookeeper_server.py
@@ -138,18 +138,13 @@ class TestZookeeperServer(RMFTestCase):
       content = '1',
       mode = 420,
     )
-    self.assertResourceCalled('File', '/etc/zookeeper/conf/log4j.properties',
-      owner = 'zookeeper',
-      content = Template('log4j.properties.j2'),
-      group = 'hadoop',
-    )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo_sample.cfg',
       owner = 'zookeeper',
       group = 'hadoop',
     )
 
-
   def assert_configure_secured(self):
+
     self.assertResourceCalled('Directory', '/etc/zookeeper/conf',
       owner = 'zookeeper',
       group = 'hadoop',
@@ -189,11 +184,6 @@ class TestZookeeperServer(RMFTestCase):
       content = '1',
       mode = 420,
     )
-    self.assertResourceCalled('File', '/etc/zookeeper/conf/log4j.properties',
-      owner = 'zookeeper',
-      content = Template('log4j.properties.j2'),
-      group = 'hadoop',
-    )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zookeeper_jaas.conf',
       owner = 'zookeeper',
       content = Template('zookeeper_jaas.conf.j2'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_client.py b/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_client.py
index bcd5d75..e9e162f 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_client.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_client.py
@@ -57,14 +57,6 @@ class TestHiveClient(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
     self.assertNoMoreResources()
 
 
@@ -104,12 +96,4 @@ class TestHiveClient(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
     self.assertNoMoreResources()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_metastore.py
index 7ce7063..fffafea 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_metastore.py
@@ -153,14 +153,6 @@ class TestHiveMetastore(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
 
   def assert_configure_secured(self):
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/HDP-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar /usr/lib/hive/lib//mysql-connector-java.jar',
@@ -218,12 +210,4 @@ class TestHiveMetastore(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_server.py
index e669411..4f93087 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_server.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/HIVE/test_hive_server.py
@@ -155,14 +155,6 @@ class TestHiveServer(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
 
   def assert_configure_secured(self):
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/HDP-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar /usr/lib/hive/lib//mysql-connector-java.jar',
@@ -220,12 +212,3 @@ class TestHiveServer(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties.template',
-      owner = 'hive',
-      group = 'hadoop',
-    )
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_client.py b/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_client.py
index a5d6a8a..e92a1b9 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_client.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_client.py
@@ -32,55 +32,43 @@ class TestZookeeperClient(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/zookeeper/conf',
       owner = 'zookeeper',
       group = 'hadoop',
-      recursive = True
+      recursive = True,
     )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo.cfg',
       owner = 'zookeeper',
       content = Template('zoo.cfg.j2'),
-      group = 'hadoop'
+      group = 'hadoop',
     )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zookeeper-env.sh',
       owner = 'zookeeper',
       content = Template('zookeeper-env.sh.j2'),
-      group = 'hadoop'
+      group = 'hadoop',
     )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/configuration.xsl',
       owner = 'zookeeper',
       content = Template('configuration.xsl.j2'),
-      group = 'hadoop'
+      group = 'hadoop',
     )
-
     self.assertResourceCalled('Directory', '/var/run/zookeeper',
       owner = 'zookeeper',
       group = 'hadoop',
-      recursive = True
+      recursive = True,
     )
-
     self.assertResourceCalled('Directory', '/var/log/zookeeper',
       owner = 'zookeeper',
       group = 'hadoop',
-      recursive = True
+      recursive = True,
     )
-
     self.assertResourceCalled('Directory', '/hadoop/zookeeper',
       owner = 'zookeeper',
       group = 'hadoop',
-      recursive = True
+      recursive = True,
     )
-
-    self.assertResourceCalled('File', '/etc/zookeeper/conf/log4j.properties',
-      owner = 'zookeeper',
-      content = Template('log4j.properties.j2'),
-      group = 'hadoop'
-    )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo_sample.cfg',
       owner = 'zookeeper',
-      group = 'hadoop'
+      group = 'hadoop',
     )
+    self.assertNoMoreResources()
 
   def test_configure_secured(self):
 
@@ -91,52 +79,47 @@ class TestZookeeperClient(RMFTestCase):
     )
 
     self.assertResourceCalled('Directory', '/etc/zookeeper/conf',
-      owner='zookeeper',
-      group='hadoop',
-      recursive=True
+      owner = 'zookeeper',
+      group = 'hadoop',
+      recursive = True,
     )
-
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo.cfg',
-      owner='zookeeper',
-      content=Template('zoo.cfg.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      content = Template('zoo.cfg.j2'),
+      group = 'hadoop',
     )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zookeeper-env.sh',
-      owner='zookeeper',
-      content=Template('zookeeper-env.sh.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      content = Template('zookeeper-env.sh.j2'),
+      group = 'hadoop',
     )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/configuration.xsl',
-      owner='zookeeper',
-      content=Template('configuration.xsl.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      content = Template('configuration.xsl.j2'),
+      group = 'hadoop',
     )
     self.assertResourceCalled('Directory', '/var/run/zookeeper',
-      owner='zookeeper',
-      group='hadoop',
-      recursive=True,
+      owner = 'zookeeper',
+      group = 'hadoop',
+      recursive = True,
     )
     self.assertResourceCalled('Directory', '/var/log/zookeeper',
-      owner='zookeeper',
-      group='hadoop',
-      recursive=True,
+      owner = 'zookeeper',
+      group = 'hadoop',
+      recursive = True,
     )
     self.assertResourceCalled('Directory', '/hadoop/zookeeper',
-      owner='zookeeper',
-      group='hadoop',
-      recursive=True,
-    )
-    self.assertResourceCalled('File', '/etc/zookeeper/conf/log4j.properties',
-      owner='zookeeper',
-      content=Template('log4j.properties.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      group = 'hadoop',
+      recursive = True,
     )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zookeeper_client_jaas.conf',
-      owner='zookeeper',
-      content=Template('zookeeper_client_jaas.conf.j2'),
-      group='hadoop',
+      owner = 'zookeeper',
+      content = Template('zookeeper_client_jaas.conf.j2'),
+      group = 'hadoop',
     )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo_sample.cfg',
-      owner='zookeeper',
-      group='hadoop',
-    )
\ No newline at end of file
+      owner = 'zookeeper',
+      group = 'hadoop',
+    )
+    self.assertNoMoreResources()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/2aad5bbb/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_server.py b/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_server.py
index 48c8382..ba26aa0 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_server.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/ZOOKEEPER/test_zookeeper_server.py
@@ -28,7 +28,6 @@ class TestZookeeperServer(RMFTestCase):
                    command = "configure",
                    config_file="default.json"
     )
-
     self.assert_configure_default()
     self.assertNoMoreResources()
 
@@ -65,7 +64,6 @@ class TestZookeeperServer(RMFTestCase):
                   command = "configure",
                   config_file="secured.json"
     )
-
     self.assert_configure_secured()
     self.assertNoMoreResources()
 
@@ -98,7 +96,6 @@ class TestZookeeperServer(RMFTestCase):
     self.assertNoMoreResources()
 
   def assert_configure_default(self):
-
     self.assertResourceCalled('Directory', '/etc/zookeeper/conf',
       owner = 'zookeeper',
       group = 'hadoop',
@@ -138,17 +135,11 @@ class TestZookeeperServer(RMFTestCase):
       content = '1',
       mode = 420,
     )
-    self.assertResourceCalled('File', '/etc/zookeeper/conf/log4j.properties',
-      owner = 'zookeeper',
-      content = Template('log4j.properties.j2'),
-      group = 'hadoop',
-    )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo_sample.cfg',
       owner = 'zookeeper',
       group = 'hadoop',
     )
 
-
   def assert_configure_secured(self):
     self.assertResourceCalled('Directory', '/etc/zookeeper/conf',
       owner = 'zookeeper',
@@ -189,11 +180,6 @@ class TestZookeeperServer(RMFTestCase):
       content = '1',
       mode = 420,
     )
-    self.assertResourceCalled('File', '/etc/zookeeper/conf/log4j.properties',
-      owner = 'zookeeper',
-      content = Template('log4j.properties.j2'),
-      group = 'hadoop',
-    )
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zookeeper_jaas.conf',
       owner = 'zookeeper',
       content = Template('zookeeper_jaas.conf.j2'),
@@ -207,4 +193,5 @@ class TestZookeeperServer(RMFTestCase):
     self.assertResourceCalled('File', '/etc/zookeeper/conf/zoo_sample.cfg',
       owner = 'zookeeper',
       group = 'hadoop',
-    )
\ No newline at end of file
+    )
+


Mime
View raw message