Author: swagle
Date: Wed May 8 00:43:24 2013
New Revision: 1480138
URL: http://svn.apache.org/r1480138
Log:
AMBARI-2094. Create smoke test for NODEMANAGER component as a part of MapReduce
V2 Service check. (swagle)
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager/
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager/service_check.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/smoketest.pp
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/resourcemanager/service_check.pp
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/Role.java
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1480138&r1=1480137&r2=1480138&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed May 8 00:43:24 2013
@@ -12,6 +12,9 @@ Trunk (unreleased changes):
NEW FEATURES
+ AMBARI-2094. Create smoke test for NODEMANAGER component as a part of
+ MapReduce V2 Service check. (swagle)
+
AMBARI-2093. Add Tez as a configurable Service in Hadoop 2.0 stack. (swagle)
AMBARI-2031. AMBARI-2031. Add clover code coverage profile.
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager/service_check.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager/service_check.pp?rev=1480138&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager/service_check.pp
(added)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager/service_check.pp
Wed May 8 00:43:24 2013
@@ -0,0 +1,24 @@
+#
+#
+# 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.
+#
+#
+class hdp-yarn::nodemanager::service_check() inherits hdp-yarn::params
+{
+ class { 'hdp-yarn::smoketest': component_name => 'resourcemanager'}
+}
\ No newline at end of file
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/resourcemanager/service_check.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/resourcemanager/service_check.pp?rev=1480138&r1=1480137&r2=1480138&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/resourcemanager/service_check.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/resourcemanager/service_check.pp
Wed May 8 00:43:24 2013
@@ -20,27 +20,5 @@
#
class hdp-yarn::resourcemanager::service_check() inherits hdp-yarn::params
{
- $smoke_test_user = $hdp::params::smokeuser
-
- $validateStatusFileName = "validateYarnComponentStatus.py"
- $validateStatusFilePath = "/tmp/$validateStatusFileName"
- $yarn_webui_port = $hdp-yarn::params::yarn_webui_port
- $validateStatusCmd = "su - ${smoke_test_user} -c 'python
$validateStatusFilePath rm -p $yarn_webui_port'"
-
- $test_cmd = "fs -test -e ${output_file}"
-
- file { $validateStatusFilePath:
- ensure => present,
- source => "puppet:///modules/hdp-yarn/$validateStatusFileName",
- mode => '0755'
- }
-
- exec { $validateStatusFilePath:
- command => $validateStatusCmd,
- tries => 3,
- try_sleep => 5,
- path => '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
- logoutput => "true"
- }
- File[$validateStatusFilePath] -> Exec[$validateStatusFilePath]
+ class { 'hdp-yarn::smoketest': component_name => 'resourcemanager'}
}
\ No newline at end of file
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/smoketest.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/smoketest.pp?rev=1480138&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/smoketest.pp
(added)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/smoketest.pp
Wed May 8 00:43:24 2013
@@ -0,0 +1,56 @@
+#
+#
+# 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.
+#
+#
+class hdp-yarn::smoketest(
+ $component_name = undef
+)
+{
+ if ($component_name == 'resourcemanager') {
+ $component_type = 'rm'
+ } elsif ($component_name == 'nodemanger') {
+ $component_type = 'nm'
+ } elsif ($component_name == 'historyserver') {
+ $component_type = 'hs'
+ } else {
+ hdp_fail("Unsupported component name: $component_name")
+ }
+
+ $smoke_test_user = $hdp::params::smokeuser
+
+ $validateStatusFileName = "validateYarnComponentStatus.py"
+ $validateStatusFilePath = "/tmp/$validateStatusFileName"
+ $yarn_webui_port = $hdp-yarn::params::yarn_webui_port
+ $validateStatusCmd = "su - ${smoke_test_user} -c 'python
$validateStatusFilePath $component_type -p $yarn_webui_port'"
+
+ file { $validateStatusFilePath:
+ ensure => present,
+ source => "puppet:///modules/hdp-yarn/$validateStatusFileName",
+ mode => '0755'
+ }
+
+ exec { $validateStatusFilePath:
+ command => $validateStatusCmd,
+ tries => 3,
+ try_sleep => 5,
+ path => '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
+ logoutput => "true"
+ }
+ File[$validateStatusFilePath] -> Exec[$validateStatusFilePath]
+}
Modified:
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py?rev=1480138&r1=1480137&r2=1480138&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
Wed May 8 00:43:24 2013
@@ -125,6 +125,7 @@ rolesToClass = {
'DECOMMISSION_DATANODE': 'hdp-hadoop::hdfs::decommission',
'HUE_SERVICE_CHECK': 'hdp-hue::service_check',
'RESOURCEMANAGER_SERVICE_CHECK': 'hdp-yarn::resourcemanager::service_check',
+ 'NODEMANAGER_SERVICE_CHECK': 'hdp-yarn::nodemanager::service_check',
'TEZ_CLIENT': 'hdp-tez::tez_client'
}
Modified:
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/Role.java
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/Role.java?rev=1480138&r1=1480137&r2=1480138&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/Role.java
(original)
+++
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/Role.java
Wed May 8 00:43:24 2013
@@ -72,6 +72,7 @@ public enum Role {
AMBARI_SERVER_ACTION,
RESOURCEMANAGER,
RESOURCEMANAGER_SERVICE_CHECK,
+ NODEMANAGER_SERVICE_CHECK,
NODEMANAGER,
YARN_CLIENT,
HISTORYSERVER,