Updated Branches: refs/heads/trunk 013a75a98 -> 8420c8773
Revert "AMBARI-3108. If the directories for NN/DN are changed the puppet scripts do not create the new dirs. (Vitaly Brodetskyi via dlysnichenko)" Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/8420c877 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/8420c877 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/8420c877 Branch: refs/heads/trunk Commit: 8420c8773654a6521e718229763fc806d50c56be Parents: 013a75a Author: Lisnichenko Dmitro <[email protected]> Authored: Thu Sep 5 20:29:38 2013 +0300 Committer: Lisnichenko Dmitro <[email protected]> Committed: Thu Sep 5 20:31:50 2013 +0300 ---------------------------------------------------------------------- .../modules/hdp-hadoop/files/checkForFormat.sh | 15 --------------- .../modules/hdp-hadoop/manifests/namenode/format.pp | 1 + 2 files changed, 1 insertion(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/8420c877/ambari-agent/src/main/puppet/modules/hdp-hadoop/files/checkForFormat.sh ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/files/checkForFormat.sh b/ambari-agent/src/main/puppet/modules/hdp-hadoop/files/checkForFormat.sh index a16b64e..d14091a 100644 --- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/files/checkForFormat.sh +++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/files/checkForFormat.sh @@ -38,21 +38,6 @@ if [[ -f ${mark_file} ]] ; then mkdir -p ${mark_dir} fi -#---Additional check, to format namenode directories if their pathes were changed. -for dir in `echo $name_dirs | tr ',' ' '` ; do - cmd="ls $dir | wc -l | grep -q ^0$" - eval $cmd - if [[ $? -eq 0 ]] ; then - list_of_empty_dirs="$list_of_empty_dirs $dir" - fi -done - -if [[ -d $mark_dir ]] && [[ ! -z $list_of_empty_dirs ]]; then - echo "Removing mark directory: ${mark_dir}" - rm -rf ${mark_dir} -fi -#--- - if [[ ! -d $mark_dir ]] ; then for dir in `echo $name_dirs | tr ',' ' '` ; do echo "NameNode Dirname = $dir" http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/8420c877/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode/format.pp ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode/format.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode/format.pp index 7dcca2d..fb9d2ab 100644 --- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode/format.pp +++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode/format.pp @@ -45,6 +45,7 @@ class hdp-hadoop::namenode::format( exec { '/tmp/checkForFormat.sh': command => "sh /tmp/checkForFormat.sh ${hdfs_user} ${hadoop_conf_dir} ${mark_dir} ${dfs_name_dir} ", + unless => "test -d ${mark_dir}", require => File['/tmp/checkForFormat.sh'], path => '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', logoutput => "true",
