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
Post a Comment