crontab定时任务, 执行shell脚本, 报错: hadoop not found, spark not found
- 权限问题
在shell脚本最前面添加下面内容:
#hadoop
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/user/torch/install/bin:
/usr/local/hadoop/bin:/usr/local/hbase/bin:/usr/local/hive/bin:/usr/local/spark/bin:/usr/local/zookeeper/bin
export HADOOP_CONF_DIR=/usr/local/hadoop/etc/hadoop