How to create hadoop directory vi puppet script.

92 views
Skip to first unread message

Ayyanar

unread,
Jul 9, 2015, 11:42:23 PM7/9/15
to puppet...@googlegroups.com
1. exec { "/home/haas":
        #command => "/usr/hdp/current/hadoop-yarn-nodemanager/sbin/yarn-daemon.sh stop resourcemanager",
        command =>  "hadoop fs -mkdir -p /apps/hive/warehouse",
user => haas
}

Note: my site.pp file contain this code. while executing this command facing validation issue. how to solve this.

2. "Error: Validation of Exec[/home/haas] failed: 'hadoop fs -mkdir -p /apps/hive/warehouse' is not qualified and no path was specified. Please qualify the command or specify a path. at /etc/puppet/manifests/site.pp:491"

Thanks,
Ayyanar Thangaraj

Tom Limoncelli

unread,
Jul 10, 2015, 12:02:27 PM7/10/15
to puppet...@googlegroups.com
"fully qualitied" means the path to the command is included.  That is, "/usr/bin/cat" is qualified.  "cat" is note.

exec {} commands have to be qualified ("/usr/bin/cat") or you have to add the parameter "path" and specify the path to the command.

I generally use the path parameter if the code will run on many different operating systems, each with a different path.

More info:

Tom


--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/282c193c-9ba2-4283-8878-cb541a0d8b2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Email: t...@whatexit.org    Work: tlimo...@StackOverflow.com
Skype: YesThatTom
Blog:  http://EverythingSysadmin.com
Reply all
Reply to author
Forward
0 new messages