I did my hadoop manifest as below: exec { "Namenode - Format dfs.name.dir": path => '/usr/bin:/usr/sbin:/bin', command => 'echo "Y" | hadoop namenode -format', user => 'hdfs', unless => "test -d $dfs_name_dir/image", require => Exec['Namenode - Create dfs.name.dir'], }
Regards, Felipe On Wednesday, September 19, 2012 11:30:39 AM UTC-7, Bai Shen wrote: > > I'm using puppet to automate the creation and maintenance of my hadoop > cluster. However, I'm not sure how to handle this next step. In order for > the cluster to run, the namenode needs to be formatted. > > su hdfs -c "/usr/bin/hadoop namenode -format" > > I'm not sure what the best method to handle this is. Do I just add an > exec command? How do I make sure that it only gets run during the initial > setup? > > Thanks. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/4k7KjLhocQ0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.