Replies: 1 comment
-
Is there any super pretty guy who can help me answer? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a script with some content similar to the following. In a loop, the backend sub threads execute some tasks in parallel, and a 'wait' statement is added at the end
In theory, my script should only execute the "echo ok" command after the subthread has completed execution. When I execute it locally in Linux, there is no logical problem,
But when executing the script on the dolphinscheduler, the wait is executed immediately and the 'echo ok' command is executed. Why?
下面的脚本在本地运行时,会等并行的方法执行完后再执行echo ok,丢到调度平台上执行的时候,直接就顺着下去执行echo ok,子线程没执行完任务就被关闭了,为什么呢?
Shell:
cat /usr/local/shellscript/project_7_c_shiye/conf/sfb_file.conf | while read rows
do
if [ ${rows:0:1} != '#' ]; then
{
sqlip=${rows[0]}
sqlun=${rows[1]}
sqlpw=${rows[2]}
sqldb=${rows[3]}
sqltb=${rows[4]}
hdatadb=${rows[5]}
hdatatb=${rows[6]}
hive_table_bak $sqlip $sqlun $sqlpw $sqldb $sqltb $hdatadb $hdatatb
truncate_hive_table $sqlip $sqlun $sqlpw $sqldb $sqltb $hdatadb $hdatatb
db_import_to_hive $sqlip $sqlun $sqlpw $sqldb $sqltb $hdatadb $hdatatb
hive_table_refresh $sqlip $sqlun $sqlpw $sqldb $sqltb $hdatadb $hdatatb
echo "===================Finished job======================"
}&
fi
done
wait
echo ok
Beta Was this translation helpful? Give feedback.
All reactions