On Tuesday, March 18, 2014 1:38:55 AM UTC-5, Shouvanik Haldar wrote:
>
> Hi,
>
> I have a basic hadoop copy command
> e.g.
> hadoop fs -copyToLocal s3://xx-xx-xxxx/scripts/sqoop-1.4.3-hadoop200.jar 
> sqoop-1.4.3-hadoop200.jar
>
> How can I execute this command from puppet? I looked into some sites. But 
> could not get any help.
>
>

Declare an appropriate Exec resource for the target node(s).  Something like

exec { 'hadoop-get-scoop':
  path => '/usr/bin:/bin:/usr/sbin:/sbin',

  command => 'hadoop fs -copyToLocal 
s3://xx-xx-xxxx/scripts/sqoop-1.4.3-hadoop200.jar 
/path/to/sqoop-1.4.3-hadoop200.jar',
  creates => '/path/to/sqoop-1.4.3-hadoop200.jar'
}

Alternatively, put the file in question on the master, and sync it via a 
File resource instead of via a hadoop command.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/deb74058-0cf2-4310-863c-ee178f087e2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to