You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2013/08/22 00:55:59 UTC

git commit: AMBARI-2983. Change YARN Service check to not use distrbuted shell. (mahadev)

Updated Branches:
  refs/heads/trunk d26ad0f42 -> 30365506a


AMBARI-2983. Change YARN Service check to not use distrbuted shell. (mahadev)


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

Branch: refs/heads/trunk
Commit: 30365506a9eba096bbcdb06e12fae72b1a02176e
Parents: d26ad0f
Author: Mahadev Konar <ma...@apache.org>
Authored: Wed Aug 21 15:43:39 2013 -0700
Committer: Mahadev Konar <ma...@apache.org>
Committed: Wed Aug 21 15:43:43 2013 -0700

----------------------------------------------------------------------
 .../main/puppet/modules/hdp-hadoop/manifests/init.pp    | 12 ++++++------
 .../modules/hdp-yarn/manifests/yarn/service_check.pp    |  7 ++++---
 2 files changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/30365506/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
index b9624c4..793f477 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
@@ -439,17 +439,17 @@ define hdp-hadoop::exec-hadoop(
   } else {
     $kinit_if_needed = ""
   }
-
+  
   if ($path == undef) {
     if ($echo_yes == true) {
       $cmd = "yes Y | hadoop --config ${conf_dir} ${command}"
     } else {
       $cmd = "hadoop --config ${conf_dir} ${command}"
+    } 
+    } else {
+      $cmd = "${path} ${command}"
     }
-  } else {
-    $cmd = "${path} ${command}"
-  }
-
+  
   if ($kinit_if_needed != "") {
     exec { "kinit_before_${cmd}":
       command => $kinit_if_needed,
@@ -467,6 +467,6 @@ define hdp-hadoop::exec-hadoop(
     timeout     => $timeout,
     try_sleep   => $try_sleep,
     logoutput   => $logoutput,
-    onlyif      => $onlyif
+    onlyif      => $onlyif,
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/30365506/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/yarn/service_check.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/yarn/service_check.pp b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/yarn/service_check.pp
index fe053ac..4f2fffe 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/yarn/service_check.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/yarn/service_check.pp
@@ -22,16 +22,17 @@ class hdp-yarn::yarn::service_check() inherits hdp-yarn::params
 {
 
   $jar_path = "$hadoop_yarn_home/$distrAppJarName"
-  $run_dist_shell_app_cmd = "jar $jar_path -appname yarnservicecheck -master_memory 512 -container_memory 128 -num_containers 2 -shell_command \"ls\" -jar $jar_path"
+  $run_yarn_check_cmd = "node -list"
   
   ## Check availability of REST api
   hdp-yarn::smoketest{'hdp-yarn::smoketest:rm': component_name => 'resourcemanager'}
   
   ## Run distributed shell application check
   hdp-hadoop::exec-hadoop { 'hdp-yarn::yarn::service_check':
-    command     => $run_dist_shell_app_cmd,
+    path        => '/usr/bin/yarn',
+    command     => $run_yarn_check_cmd,
     user        => $smoke_test_user
   }
   
   anchor{"hdp-yarn::yarn::service_check::begin":} -> Hdp-yarn::Smoketest['hdp-yarn::smoketest:rm'] ->  Hdp-hadoop::Exec-hadoop['hdp-yarn::yarn::service_check'] -> anchor{"hdp-yarn::yarn::service_check::end":}
-}
\ No newline at end of file
+}