通过 shell 脚本调用 oozie 操作时找不到命令错误
command not found error on calling oozie action via shell script
我正在尝试通过 shell 脚本触发 Oozie 作业。但是在执行 shell 脚本时出现以下错误:
"command not found" error in the line: ooziejob =$(oozie job -oozie
http://oozieserver:port/oozie -config
/root/SqoopWrapper1/sqoop_job.properties -run);
我的shell由oozie命令组成的脚本是;
input=/root/SqoopWrapper1/InputFile.txt
echo "internal field sep"
IFS='|'
while read SourceDB db_name Mysql_table hdfsdir libpath
do
echo "do...while"
if [ SourceDB = Mysql ]
then
driver = com.mysql.jdbc.Driver
jdbcUri = jdbc:mysql://host:3306
Mysql_table = WrapperTbl
UserName = ****
Password = ****
fi
echo "Oozie command exe"
ooziejob =$(oozie job -oozie http://oozieserver:port/oozie -config /root/SqoopWrapper1/sqoop_job.properties -run);
echo $ooziejob;
done < $input
exit 0
您在 equal-sign 之前有一个 space。
顺便说一句,如果你 post 这种问题,你应该总是说出你正在使用什么 shell 和什么 OS。
我正在尝试通过 shell 脚本触发 Oozie 作业。但是在执行 shell 脚本时出现以下错误:
"command not found" error in the line: ooziejob =$(oozie job -oozie http://oozieserver:port/oozie -config /root/SqoopWrapper1/sqoop_job.properties -run);
我的shell由oozie命令组成的脚本是;
input=/root/SqoopWrapper1/InputFile.txt
echo "internal field sep"
IFS='|'
while read SourceDB db_name Mysql_table hdfsdir libpath
do
echo "do...while"
if [ SourceDB = Mysql ]
then
driver = com.mysql.jdbc.Driver
jdbcUri = jdbc:mysql://host:3306
Mysql_table = WrapperTbl
UserName = ****
Password = ****
fi
echo "Oozie command exe"
ooziejob =$(oozie job -oozie http://oozieserver:port/oozie -config /root/SqoopWrapper1/sqoop_job.properties -run);
echo $ooziejob;
done < $input
exit 0
您在 equal-sign 之前有一个 space。
顺便说一句,如果你 post 这种问题,你应该总是说出你正在使用什么 shell 和什么 OS。