incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgog...@apache.org
Subject svn commit: r1335938 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/puppet/modules/hdp-hadoop/manifests/hdfs/service_check.pp
Date Wed, 09 May 2012 06:02:28 GMT
Author: vgogate
Date: Wed May  9 06:02:28 2012
New Revision: 1335938

URL: http://svn.apache.org/viewvc?rev=1335938&view=rev
Log:
AMBARI-192 Check for NN safemode during restarts by Ramya Sunil

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/hdfs/service_check.pp

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1335938&r1=1335937&r2=1335938&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Wed May  9 06:02:28 2012
@@ -2,6 +2,8 @@ Ambari Change log
 
 Release 0.x.x - unreleased
 
+  AMBARI-192. Check for NN safemode during restarts (Ramya via vgogate)
+
   AMBARI-191. Implement hive server stopped state (Ramya via vgogate)
 
   AMBARI-195. Fix typo in java license question (Hitesh Shah via vgogate)

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/hdfs/service_check.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/hdfs/service_check.pp?rev=1335938&r1=1335937&r2=1335938&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/hdfs/service_check.pp
(original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/hdfs/service_check.pp
Wed May  9 06:02:28 2012
@@ -4,6 +4,8 @@ class hdp-hadoop::hdfs::service_check()
   $dir = '/tmp'
   $tmp_file = "${dir}/${unique}"
 
+  $safemode_command = "dfsadmin -safemode get | grep OFF"
+
   $create_dir_cmd = "fs -mkdir ${dir} ; hadoop fs -chmod -R 777 ${dir}"
   $test_dir_exists = "hadoop fs -test -e ${dir}" #TODO: may fix up fact that test needs explicit
hadoop while omamnd does not
   $cleanup_cmd = "fs -rm ${tmp_file}"
@@ -13,12 +15,20 @@ class hdp-hadoop::hdfs::service_check()
 
   anchor { 'hdp-hadoop::hdfs::service_check::begin':}
 
+  hdp-hadoop::exec-hadoop { 'hdfs::service_check::check_safemode':
+    command   => $safemode_command,
+    tries     => 40,
+    try_sleep => 15,
+    logoutput => true,
+    require   => Anchor['hdp-hadoop::hdfs::service_check::begin']
+  }
+
   hdp-hadoop::exec-hadoop { 'hdfs::service_check::create_dir':
     command   => $create_dir_cmd,
     unless    => $test_dir_exists,
     tries     => 3,
     try_sleep => 5,
-    require   => Anchor['hdp-hadoop::hdfs::service_check::begin']
+    require   => Hdp-hadoop::Exec-hadoop['hdfs::service_check::check_safemode']
   }
 
   hdp-hadoop::exec-hadoop { 'hdfs::service_check::create_file':



Mime
View raw message