linux - Hadoop/Hive commands not working from Crontab -


i not able execute hadoop/hive commands crontab. have scheduled perl script in crontab contains system commands setting path before operations.

i aware that, env of running cron different regular shell. that's reason setting paths below. there other way make work?

system(". /home/ciber/.bash_profile");

system("export java_home=/usr/lib/jvm/java-6-openjdk-amd64");

system("export hadoop_install=~/poc/install/hadoop-1.0.3");

system("export path=$path:$hadoop_install/bin");

system("export hadoop_home=$hadoop_install");

system("export hive_install=~/poc/install/hive-0.9.0");

system("export path=$path:$hive_install/bin");

@jingguo yao: have idea abt this?

you can absolute path of commands in crontab . also, can declare env variable in crontab . example foo=bar


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -