status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
unknown
language
stringclasses
5 values
commit_datetime
unknown
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* * @rurn Boolan whhr has faild ask */ priva boolan hasFaildTask(){ his.askFaildSubmi){ rurn ru; } his.rrorTaskLis.siz() > 0){ rurn ru; } rurn his.dpndFaildTask.siz() > 0; } /** * procss insanc failur * * @rurn Boolan whhr procss insanc faild */ priva boolan procssFaild(){ hasFaildTask()) { procssInsanc.gFailurSragy() == FailurSragy.END){ rurn ru; } if (procssInsanc.gFailurSragy() == FailurSragy.CONTINUE) { rurn radyToSubmiTaskLis.siz() == 0 || acivTaskNod.siz() == 0; } } rurn fals; } /** * whhr ask for waiing hrad
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* @rurn Boolan whhr has waiing hrad ask */ priva boolan hasWaiingThradTask(){ Lis<TaskInsanc> waiingLis = gComplTaskBySa(ExcuionSaus.WAITTING_THREAD); rurn CollcionUils.isNoEmpy(waiingLis); } /** * prpar for paus * 1,faild rry ask in h prparaion quu , rurns o failur dircly * 2,xiss paus ask,complmn no compld, pnding submission of asks, rurn o suspnsion * 3,succss * @rurn ExcuionSaus */ priva ExcuionSaus procssRadyPaus(){ hasRryTaskInSandBy()){ rurn ExcuionSaus.FAILURE; } Lis<TaskInsanc> pausLis = gComplTaskBySa(ExcuionSaus.PAUSE); CollcionUils.isNoEmpy(pausLis) || !isComplmnEnd() || radyToSubmiTaskLis.siz() > 0){ rurn ExcuionSaus.PAUSE; }ls{ rurn ExcuionSaus.SUCCESS; } } /** * gnra h las procss insanc saus by h asks sa * @rurn procss insanc xcuion saus */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva ExcuionSaus gProcssInsancSa(){ ProcssInsanc insanc = procssSrvic.findProcssInsancById(procssInsanc.gId()); ExcuionSaus sa = insanc.gSa(); acivTaskNod.siz() > 0 || havRryTaskSandBy()){ rurn runningSa(sa); } // procss failur procssFaild()){ rurn ExcuionSaus.FAILURE; } // waiing hrad hasWaiingThradTask()){ rurn ExcuionSaus.WAITTING_THREAD; } // paus sa == ExcuionSaus.READY_PAUSE){ rurn procssRadyPaus(); } // sop sa == ExcuionSaus.READY_STOP){ Lis<TaskInsanc> sopLis = gComplTaskBySa(ExcuionSaus.STOP); Lis<TaskInsanc> killLis = gComplTaskBySa(ExcuionSaus.KILL); CollcionUils.isNoEmpy(sopLis) || CollcionUils.isNoEmpy(killLis) || !isComplmnEnd()){ rurn ExcuionSaus.STOP; }ls{ rurn ExcuionSaus.SUCCESS; } } // succss
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
sa == ExcuionSaus.RUNNING_EXEUTION){ radyToSubmiTaskLis.siz() > 0){ //asks curr rurn ExcuionSaus.RUNNING_EXEUTION; }ls{ // if h w rurn ExcuionSaus.SUCCESS; } } rurn sa; } /** * whhr sandby ask lis hav rry asks * @rurn */ priva boolan havRryTaskSandBy() { boolan rsul = fals; for(Sring askNam : radyToSubmiTaskLis.kyS()){ TaskInsanc ask = radyToSubmiTaskLis.g(askNam); ask.gSa().ypIsFailur()){ rsul = ru; brak; } } rurn rsul; } /** * whhr complmn nd * @rurn Boolan whhr is complmn nd */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva boolan isComplmnEnd() { !procssInsanc.isComplmnDaa()){ rurn ru; } ry { Map<Sring, Sring> cmdParam = JSONUils.oMap(procssInsanc.gCommandParam()); Da ndTim = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_END_DATE)); rurn procssInsanc.gSchdulTim().quals(ndTim); } cach (Excpion ) { loggr.rror("complmn nd faild ",); rurn fals; } } /** * updaProcssInsanc procss insanc sa * afr ach bach of asks is xcud, h saus of h procss insanc is updad */ priva void updaProcssInsancSa() { ExcuionSaus sa = gProcssInsancSa(); procssInsanc.gSa() != sa){ loggr.info( "work flow procss insanc [id: {}, nam:{}], sa chang from {} o {}, cmd yp: {}", procssInsanc.gId(), procssInsanc.gNam(), procssInsanc.gSa(), sa, procssInsanc.gCommandTyp()); ProcssInsanc insanc = procssSrvic.findProcssInsancById(procssInsanc.gId()); insanc.sSa(sa); insanc.sProcssDfiniion(procssInsanc.gProcssDfiniion()); procssSrvic.updaProcssInsanc(insanc); procssInsanc = insanc;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} } /** * g ask dpndncy rsul * @param askInsanc ask insanc * @rurn DpndRsul */ priva DpndRsul gDpndRsulForTask(TaskInsanc askInsanc){ rurn isTaskDpsCompl(askInsanc.gNam()); } /** * add ask o sandby lis * @param askInsanc ask insanc */ priva void addTaskToSandByLis(TaskInsanc askInsanc){ loggr.info("add ask o sand by lis: {}", askInsanc.gNam()); radyToSubmiTaskLis.puIfAbsn(askInsanc.gNam(), askInsanc); } /** * rmov ask from sand by lis * @param askInsanc ask insanc */ priva void rmovTaskFromSandbyLis(TaskInsanc askInsanc){ loggr.info("rmov ask from sand by lis: {}", askInsanc.gNam()); radyToSubmiTaskLis.rmov(askInsanc.gNam()); } /** * has rry ask in sandby * @rurn Boolan whhr has rry ask in sandby */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva boolan hasRryTaskInSandBy(){ for (Map.Enry<Sring, TaskInsanc> nry: radyToSubmiTaskLis.nryS()) { nry.gValu().gSa().ypIsFailur()){ rurn ru; } } rurn fals; } /** * submi and wach h asks, unil h work flow sop */ priva void runProcss(){ // submi sar nod submiPosNod(null); boolan sndTimWarning = fals; whil(!procssInsanc.isProcssInsancSop()){ // snd warn !sndTimWarning && chckProcssTimOu(procssInsanc) ){ alrManagr.sndProcssTimouAlr(procssInsanc, procssSrvic.findProcssDfinById(procssInsanc.gProcssDfiniionId())); sndTimWarning = ru; } for(Map.Enry<MasrBasTaskExcThrad,Fuur<Boolan>> nry: acivTaskNod.nryS()) { Fuur<Boolan> fuur = nry.gValu(); TaskInsanc ask = nry.gKy().gTaskInsanc(); !fuur.isDon()){ coninu; } // nod moni ask = his.procssSrvic.findTaskInsancById(ask.gId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
ask == null){ his.askFaildSubmi = ru; acivTaskNod.rmov(nry.gKy()); coninu; } // nod moni ask.gSa().ypIsFinishd()){ acivTaskNod.rmov(nry.gKy()); } loggr.info("ask :{}, id:{} compl, sa is {} ", ask.gNam(), ask.gId(), ask.gSa()); // nod succ ask.gSa() == ExcuionSaus.SUCCESS){ complTaskLis.pu(ask.gNam(), ask); submiPosNod(ask.gNam()); coninu; } // nod fail ask.gSa().ypIsFailur()){ ask.gSa() == ExcuionSaus.NEED_FAULT_TOLERANCE){ his.rcovrTolrancFaulTaskLis.add(ask); } ask.askCanRry()){ addTaskToSandByLis(ask); }ls{ complTaskLis.pu(ask.gNam(), ask); ask.isCondiionsTask() || DagHlpr.havCondiionsAfrNod(ask.gNam(), dag)) { submiPosNod(ask.gNam()); }ls{
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
rrorTaskLis.pu(ask.gNam(), ask); procssInsanc.gFailurSragy() == FailurSragy.END){ killThOhrTasks(); } } } coninu; } // ohr sa complTaskLis.pu(ask.gNam(), ask); } // snd alr CollcionUils.isNoEmpy(his.rcovrTolrancFaulTaskLis)){ alrManagr.sndAlrWorkrTolrancFaul(procssInsanc, rcovrTolrancFaulTaskLis); his.rcovrTolrancFaulTaskLis.clar(); } // updaPro // failur p // if a ask rrorTaskLis.siz() > 0){ for(Map.Enry<Sring, TaskInsanc> nry: complTaskLis.nryS()) { TaskInsanc complTask = nry.gValu(); complTask.gSa()== ExcuionSaus.PAUSE){ complTask.sSa(ExcuionSaus.KILL); complTaskLis.pu(nry.gKy(), complTask); procssSrvic.updaTaskInsanc(complTask); } } } canSubmiTaskToQuu()){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
submiSandByTask(); } ry { Thrad.slp(Consans.SLEEP_TIME_MILLIS); } cach (InrrupdExcpion ) { loggr.rror(.gMssag(),); } updaProcssInsancSa(); } loggr.info("procss:{} nd, sa :{}", procssInsanc.gId(), procssInsanc.gSa()); } /** * whhr chck procss im ou * @param procssInsanc ask insanc * @rurn ru if im ou of procss insanc > running im of procss insanc */ priva boolan chckProcssTimOu(ProcssInsanc procssInsanc) { procssInsanc.gTimou() == 0 ){ rurn fals; } Da now = nw Da(); long runningTim = DaUils.diffMin(now, procssInsanc.gSarTim()); rurn runningTim > procssInsanc.gTimou(); } /** * whhr can submi ask o quu * @rurn boolan */ priva boolan canSubmiTaskToQuu() { rurn OSUils.chckRsourc(masrConfig.gMasrMaxCpuloadAvg(), masrConfig.gMasrRsrvdMmory());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} /** * clos h on going asks */ priva void killThOhrTasks() { loggr.info("kill calld on : {}, num: {}", procssInsanc.gId(), acivTaskNod.siz()); for (Map.Enry<MasrBasTaskExcThrad, Fuur<Boolan>> nry : acivTaskNod.nryS()) { MasrBasTaskExcThrad askExcThrad = nry.gKy(); Fuur<Boolan> fuur = nry.gValu(); TaskInsanc askInsanc = askExcThrad.gTaskInsanc(); askInsanc = procssSrvic.findTaskInsancById(askInsanc.gId()); askInsanc != null && askInsanc.gSa().ypIsFinishd()){ coninu; } if (!fuur.isDon()) { // rcord ki loggr.info("kill procss insanc, id: {}, ask: {}", procssInsanc.gId(), askExcThrad.gTaskInsanc().gId()); // kill nod askExcThrad.kill(); } } } /** * whhr h rry inrval is imd ou * @param askInsanc ask insanc * @rurn Boolan */ priva boolan rryTaskInrvalOvrTim(TaskInsanc askInsanc){ askInsanc.gSa() != ExcuionSaus.FAILURE){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
rurn ru; } askInsanc.gId() == 0 || askInsanc.gMaxRryTims() ==0 || askInsanc.gRryInrval() == 0 ){ rurn ru; } Da now = nw Da(); long faildTimInrval = DaUils.diffrSc(now, askInsanc.gEndTim()); // ask rry dos no ovr im, rurn fals rurn askInsanc.gRryInrval() * SEC_2_MINUTES_TIME_UNIT < faildTimInrval; } /** * handling h lis of asks o b submid */ priva void submiSandByTask(){ for(Map.Enry<Sring, TaskInsanc> nry: radyToSubmiTaskLis.nryS()) { TaskInsanc ask = nry.gValu(); DpndRsul dpndRsul = gDpndRsulForTask(ask); DpndRsul.SUCCESS == dpndRsul){ rryTaskInrvalOvrTim(ask)){ submiTaskExc(ask); rmovTaskFromSandbyLis(ask); } }ls DpndRsul.FAILED == dpndRsul){ // if h d dpndFaildTask.pu(nry.gKy(), ask); rmovTaskFromSandbyLis(ask); loggr.info("ask {},id:{} dpnd rsul : {}",ask.gNam(), ask.gId(), dpndRsul); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} } /** * g rcovry ask insanc * @param askId ask id * @rurn rcovry ask insanc */ priva TaskInsanc gRcovryTaskInsanc(Sring askId){ !SringUils.isNoEmpy(askId)){ rurn null; } ry { Ingr inId = Ingr.valuOf(askId); TaskInsanc ask = procssSrvic.findTaskInsancById(inId); ask == null){ loggr.rror("sar nod id canno b found: {}", askId); }ls { rurn ask; } }cach (Excpion ){ loggr.rror("g rcovry ask insanc faild ",); } rurn null; } /** * g sar ask insanc lis * @param cmdParam command param * @rurn ask insanc lis */ priva Lis<TaskInsanc> gSarTaskInsancLis(Sring cmdParam){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
Lis<TaskInsanc> insancLis = nw ArrayLis<>(); Map<Sring, Sring> paramMap = JSONUils.oMap(cmdParam); paramMap != null && paramMap.conainsKy(CMDPARAM_RECOVERY_START_NODE_STRING)){ Sring[] idLis = paramMap.g(CMDPARAM_RECOVERY_START_NODE_STRING).spli(Consans.COMMA); for(Sring nodId : idLis){ TaskInsanc ask = gRcovryTaskInsanc(nodId); ask != null){ insancLis.add(ask); } } } rurn insancLis; } /** * pars "SarNodNamLis" from cmd param * @param cmdParam command param * @rurn sar nod nam lis */ priva Lis<Sring> parsSarNodNam(Sring cmdParam){ Lis<Sring> sarNodNamLis = nw ArrayLis<>(); Map<Sring, Sring> paramMap = JSONUils.oMap(cmdParam); paramMap == null){ rurn sarNodNamLis; } paramMap.conainsKy(CMDPARAM_START_NODE_NAMES)){ sarNodNamLis = Arrays.asLis(paramMap.g(CMDPARAM_START_NODE_NAMES).spli(Consans.COMMA)); } rurn sarNodNamLis; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
"2020-05-08T06:20:02Z"
java
"2020-05-18T10:27:16Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* gnra sar nod nam lis from parsing command param; * if "SarNodIdLis" xiss in command param, rurn SarNodIdLis * @rurn rcovry nod nam lis */ priva Lis<Sring> gRcovryNodNamLis(){ Lis<Sring> rcovryNodNamLis = nw ArrayLis<>(); CollcionUils.isNoEmpy(rcovrNodIdLis)) { for (TaskInsanc ask : rcovrNodIdLis) { rcovryNodNamLis.add(ask.gNam()); } } rurn rcovryNodNamLis; } /** * gnra flow dag * @param procssDfiniionJson procss dfiniion json * @param sarNodNamLis sar nod nam lis * @param rcovryNodNamLis rcovry nod nam lis * @param dpNodTyp dpnd nod yp * @rurn ProcssDag procss dag * @hrows Excpion xcpion */ public ProcssDag gnraFlowDag(Sring procssDfiniionJson, Lis<Sring> sarNodNamLis, Lis<Sring> rcovryNodNamLis, TaskDpndTyp dpNodTyp)hrows Excpion{ rurn DagHlpr.gnraFlowDag(procssDfiniionJson, sarNodNamLis, rcovryNodNamLis, dpNodTyp); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.config; import org.apache.dolphinscheduler.common.Constants; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.PropertySource; import org.springframework.stereotype.Component; @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
@PropertySource(value = "master.properties") public class MasterConfig { @Value("${master.exec.threads:100}") private int masterExecThreads; @Value("${master.exec.task.num:20}") private int masterExecTaskNum; @Value("${master.heartbeat.interval:10}") private int masterHeartbeatInterval; @Value("${master.task.commit.retryTimes:5}") private int masterTaskCommitRetryTimes; @Value("${master.task.commit.interval:1000}") private int masterTaskCommitInterval; @Value("${master.max.cpuload.avg:-1}") private double masterMaxCpuloadAvg; @Value("${master.reserved.memory:0.3}") private double masterReservedMemory; @Value("${master.host.selector:lowerWeight}") private String hostSelector;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
@Value("${master.listen.port:5678}") private int listenPort; public int getListenPort() { return listenPort; } public void setListenPort(int listenPort) { this.listenPort = listenPort; } public String getHostSelector() { return hostSelector; } public void setHostSelector(String hostSelector) { this.hostSelector = hostSelector; } public int getMasterExecThreads() { return masterExecThreads; } public void setMasterExecThreads(int masterExecThreads) { this.masterExecThreads = masterExecThreads; } public int getMasterExecTaskNum() { return masterExecTaskNum; } public void setMasterExecTaskNum(int masterExecTaskNum) { this.masterExecTaskNum = masterExecTaskNum; } public int getMasterHeartbeatInterval() { return masterHeartbeatInterval; } public void setMasterHeartbeatInterval(int masterHeartbeatInterval) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
this.masterHeartbeatInterval = masterHeartbeatInterval; } public int getMasterTaskCommitRetryTimes() { return masterTaskCommitRetryTimes; } public void setMasterTaskCommitRetryTimes(int masterTaskCommitRetryTimes) { this.masterTaskCommitRetryTimes = masterTaskCommitRetryTimes; } public int getMasterTaskCommitInterval() { return masterTaskCommitInterval; } public void setMasterTaskCommitInterval(int masterTaskCommitInterval) { this.masterTaskCommitInterval = masterTaskCommitInterval; } public double getMasterMaxCpuloadAvg() { if (masterMaxCpuloadAvg == -1){ return Constants.DEFAULT_MASTER_CPU_LOAD; } return masterMaxCpuloadAvg; } public void setMasterMaxCpuloadAvg(double masterMaxCpuloadAvg) { this.masterMaxCpuloadAvg = masterMaxCpuloadAvg; } public double getMasterReservedMemory() { return masterReservedMemory; } public void setMasterReservedMemory(double masterReservedMemory) { this.masterReservedMemory = masterReservedMemory; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.consumer; import com.alibaba.fastjson.JSONObject; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.enums.TaskType; import org.apache.dolphinscheduler.common.enums.UdfType; import org.apache.dolphinscheduler.common.model.TaskNode; import org.apache.dolphinscheduler.common.process.ResourceInfo; import org.apache.dolphinscheduler.common.task.AbstractParameters; import org.apache.dolphinscheduler.common.task.datax.DataxParameters; import org.apache.dolphinscheduler.common.task.procedure.ProcedureParameters; import org.apache.dolphinscheduler.common.task.sql.SqlParameters;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
import org.apache.dolphinscheduler.common.task.sqoop.SqoopParameters; import org.apache.dolphinscheduler.common.task.sqoop.sources.SourceMysqlParameter; import org.apache.dolphinscheduler.common.task.sqoop.targets.TargetMysqlParameter; import org.apache.dolphinscheduler.common.thread.Stopper; import org.apache.dolphinscheduler.common.thread.ThreadUtils; import org.apache.dolphinscheduler.common.utils.*; import org.apache.dolphinscheduler.dao.entity.*; import org.apache.dolphinscheduler.server.builder.TaskExecutionContextBuilder; import org.apache.dolphinscheduler.server.entity.*; import org.apache.dolphinscheduler.server.master.dispatch.ExecutorDispatcher; import org.apache.dolphinscheduler.server.master.dispatch.context.ExecutionContext; import org.apache.dolphinscheduler.server.master.dispatch.enums.ExecutorType; import org.apache.dolphinscheduler.server.master.dispatch.exceptions.ExecuteException; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.service.queue.TaskPriorityQueue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; import static org.apache.dolphinscheduler.common.Constants.SLEEP_TIME_MILLIS; /** * TaskUpdateQueue consumer */ @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
public class TaskPriorityQueueConsumer extends Thread{ /** * logger of TaskUpdateQueueConsumer */ private static final Logger logger = LoggerFactory.getLogger(TaskPriorityQueueConsumer.class); /** * taskUpdateQueue */ @Autowired private TaskPriorityQueue taskPriorityQueue; /** * processService */ @Autowired private ProcessService processService; /** * executor dispatcher */ @Autowired private ExecutorDispatcher dispatcher; @PostConstruct
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
public void init(){ super.setName("TaskUpdateQueueConsumerThread"); super.start(); } @Override public void run() { while (Stopper.isRunning()){ try { String taskPriorityInfo = taskPriorityQueue.take(); TaskPriority taskPriority = TaskPriority.of(taskPriorityInfo); dispatch(taskPriority.getTaskId()); }catch (Exception e){ logger.error("dispatcher task error",e); } } } /** * dispatch task * * @param taskInstanceId taskInstanceId * @return result */ private Boolean dispatch(int taskInstanceId){ TaskExecutionContext context = getTaskExecutionContext(taskInstanceId); ExecutionContext executionContext = new ExecutionContext(context.toCommand(), ExecutorType.WORKER, context.getWorkerGroup()); Boolean result = false; while (Stopper.isRunning()){ try { result = dispatcher.dispatch(executionContext);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
} catch (ExecuteException e) { logger.error("dispatch error",e); ThreadUtils.sleep(SLEEP_TIME_MILLIS); } if (result || taskInstanceIsFinalState(taskInstanceId)){ break; } } return result; } /** * taskInstance is final state * success,failure,kill,stop,pause,threadwaiting is final state * @param taskInstanceId taskInstanceId * @return taskInstance is final state */ public Boolean taskInstanceIsFinalState(int taskInstanceId){ TaskInstance taskInstance = processService.findTaskInstanceById(taskInstanceId); return taskInstance.getState().typeIsFinished(); } /** * get TaskExecutionContext * @param taskInstanceId taskInstanceId * @return TaskExecutionContext */ protected TaskExecutionContext getTaskExecutionContext(int taskInstanceId){ TaskInstance taskInstance = processService.getTaskInstanceDetailByTaskId(taskInstanceId); // task type TaskType taskType = TaskType.valueOf(taskInstance.getTaskType()); // task node
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
TaskNode taskNode = JSONObject.parseObject(taskInstance.getTaskJson(), TaskNode.class); Integer userId = taskInstance.getProcessDefine() == null ? 0 : taskInstance.getProcessDefine().getUserId(); Tenant tenant = processService.getTenantForProcess(taskInstance.getProcessInstance().getTenantId(), userId); // verify tenant is null if (verifyTenantIsNull(tenant, taskInstance)) { processService.changeTaskState(ExecutionStatus.FAILURE, taskInstance.getStartTime(), taskInstance.getHost(), null, null, taskInstance.getId()); return null; } // set queue for process instance, user-specified queue takes precedence over tenant queue String userQueue = processService.queryUserQueueByProcessInstanceId(taskInstance.getProcessInstanceId()); taskInstance.getProcessInstance().setQueue(StringUtils.isEmpty(userQueue) ? tenant.getQueue() : userQueue); taskInstance.getProcessInstance().setTenantCode(tenant.getTenantCode()); taskInstance.setExecutePath(getExecLocalPath(taskInstance)); taskInstance.setResources(getResourceFullNames(taskNode)); SQLTaskExecutionContext sqlTaskExecutionContext = new SQLTaskExecutionContext(); DataxTaskExecutionContext dataxTaskExecutionContext = new DataxTaskExecutionContext(); ProcedureTaskExecutionContext procedureTaskExecutionContext = new ProcedureTaskExecutionContext(); SqoopTaskExecutionContext sqoopTaskExecutionContext = new SqoopTaskExecutionContext(); // SQL task if (taskType == TaskType.SQL){ setSQLTaskRelation(sqlTaskExecutionContext, taskNode); } // DATAX task if (taskType == TaskType.DATAX){ setDataxTaskRelation(dataxTaskExecutionContext, taskNode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
} // procedure task if (taskType == TaskType.PROCEDURE){ setProcedureTaskRelation(procedureTaskExecutionContext, taskNode); } if (taskType == TaskType.SQOOP){ setSqoopTaskRelation(sqoopTaskExecutionContext,taskNode); } return TaskExecutionContextBuilder.get() .buildTaskInstanceRelatedInfo(taskInstance) .buildProcessInstanceRelatedInfo(taskInstance.getProcessInstance()) .buildProcessDefinitionRelatedInfo(taskInstance.getProcessDefine()) .buildSQLTaskRelatedInfo(sqlTaskExecutionContext) .buildDataxTaskRelatedInfo(dataxTaskExecutionContext) .buildProcedureTaskRelatedInfo(procedureTaskExecutionContext) .buildSqoopTaskRelatedInfo(sqoopTaskExecutionContext) .create(); } /** * set procedure task relation * @param procedureTaskExecutionContext procedureTaskExecutionContext * @param taskNode taskNode */ private void setProcedureTaskRelation(ProcedureTaskExecutionContext procedureTaskExecutionContext, TaskNode taskNode) { ProcedureParameters procedureParameters = JSONObject.parseObject(taskNode.getParams(), ProcedureParameters.class); int datasourceId = procedureParameters.getDatasource(); DataSource datasource = processService.findDataSourceById(datasourceId); procedureTaskExecutionContext.setConnectionParams(datasource.getConnectionParams()); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
* set datax task relation * @param dataxTaskExecutionContext dataxTaskExecutionContext * @param taskNode taskNode */ private void setDataxTaskRelation(DataxTaskExecutionContext dataxTaskExecutionContext, TaskNode taskNode) { DataxParameters dataxParameters = JSONObject.parseObject(taskNode.getParams(), DataxParameters.class); DataSource dataSource = processService.findDataSourceById(dataxParameters.getDataSource()); DataSource dataTarget = processService.findDataSourceById(dataxParameters.getDataTarget()); if (dataSource != null){ dataxTaskExecutionContext.setDataSourceId(dataxParameters.getDataSource()); dataxTaskExecutionContext.setSourcetype(dataSource.getType().getCode()); dataxTaskExecutionContext.setSourceConnectionParams(dataSource.getConnectionParams()); } if (dataTarget != null){ dataxTaskExecutionContext.setDataTargetId(dataxParameters.getDataTarget()); dataxTaskExecutionContext.setTargetType(dataTarget.getType().getCode()); dataxTaskExecutionContext.setTargetConnectionParams(dataTarget.getConnectionParams()); } } /** * set datax task relation * @param sqoopTaskExecutionContext sqoopTaskExecutionContext * @param taskNode taskNode */ private void setSqoopTaskRelation(SqoopTaskExecutionContext sqoopTaskExecutionContext, TaskNode taskNode) { SqoopParameters sqoopParameters = JSONObject.parseObject(taskNode.getParams(), SqoopParameters.class); SourceMysqlParameter sourceMysqlParameter = JSONUtils.parseObject(sqoopParameters.getSourceParams(), SourceMysqlParameter.class); TargetMysqlParameter targetMysqlParameter = JSONUtils.parseObject(sqoopParameters.getTargetParams(), TargetMysqlParameter.class); DataSource dataSource = processService.findDataSourceById(sourceMysqlParameter.getSrcDatasource()); DataSource dataTarget = processService.findDataSourceById(targetMysqlParameter.getTargetDatasource());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
if (dataSource != null){ sqoopTaskExecutionContext.setDataSourceId(dataSource.getId()); sqoopTaskExecutionContext.setSourcetype(dataSource.getType().getCode()); sqoopTaskExecutionContext.setSourceConnectionParams(dataSource.getConnectionParams()); } if (dataTarget != null){ sqoopTaskExecutionContext.setDataTargetId(dataTarget.getId()); sqoopTaskExecutionContext.setTargetType(dataTarget.getType().getCode()); sqoopTaskExecutionContext.setTargetConnectionParams(dataTarget.getConnectionParams()); } } /** * set SQL task relation * @param sqlTaskExecutionContext sqlTaskExecutionContext * @param taskNode taskNode */ private void setSQLTaskRelation(SQLTaskExecutionContext sqlTaskExecutionContext, TaskNode taskNode) { SqlParameters sqlParameters = JSONObject.parseObject(taskNode.getParams(), SqlParameters.class); int datasourceId = sqlParameters.getDatasource(); DataSource datasource = processService.findDataSourceById(datasourceId); sqlTaskExecutionContext.setConnectionParams(datasource.getConnectionParams()); // whether udf type boolean udfTypeFlag = EnumUtils.isValidEnum(UdfType.class, sqlParameters.getType()) && StringUtils.isNotEmpty(sqlParameters.getUdfs()); if (udfTypeFlag){ String[] udfFunIds = sqlParameters.getUdfs().split(","); int[] udfFunIdsArray = new int[udfFunIds.length]; for(int i = 0 ; i < udfFunIds.length;i++){ udfFunIdsArray[i]=Integer.parseInt(udfFunIds[i]); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
List<UdfFunc> udfFuncList = processService.queryUdfFunListByids(udfFunIdsArray); sqlTaskExecutionContext.setUdfFuncList(udfFuncList); } } /** * get execute local path * * @return execute local path */ private String getExecLocalPath(TaskInstance taskInstance){ return FileUtils.getProcessExecDir(taskInstance.getProcessDefine().getProjectId(), taskInstance.getProcessDefine().getId(), taskInstance.getProcessInstance().getId(), taskInstance.getId()); } /** * whehter tenant is null * @param tenant tenant * @param taskInstance taskInstance * @return result */ private boolean verifyTenantIsNull(Tenant tenant, TaskInstance taskInstance) { if(tenant == null){ logger.error("tenant not exists,process instance id : {},task instance id : {}", taskInstance.getProcessInstance().getId(), taskInstance.getId()); return true; } return false; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
/** * get resource full name list */ private List<String> getResourceFullNames(TaskNode taskNode) { List<String> resourceFullNameList = new ArrayList<>(); AbstractParameters baseParam = TaskParametersUtils.getParameters(taskNode.getType(), taskNode.getParams()); if (baseParam != null) { List<ResourceInfo> projectResourceFiles = baseParam.getResourceFilesList(); if (projectResourceFiles != null) { // filter Set<ResourceInfo> oldVersionResources = projectResourceFiles.stream().filter(t -> t.getId() == 0).collect(Collectors.toSet()); if (CollectionUtils.isNotEmpty(oldVersionResources)) { resourceFullNameList.addAll(oldVersionResources.stream().map(resource -> resource.getRes()).collect(Collectors.toSet())); } // get the Stream<Integer> resourceIdStream = projectResourceFiles.stream().map(resourceInfo -> resourceInfo.getId()); Set<Integer> resourceIdsSet = resourceIdStream.collect(Collectors.toSet()); if (CollectionUtils.isNotEmpty(resourceIdsSet)) { Integer[] resourceIds = resourceIdsSet.toArray(new Integer[resourceIdsSet.size()]); List<Resource> resources = processService.listResourceByIds(resourceIds); resourceFullNameList.addAll(resources.stream() .map(resourceInfo -> resourceInfo.getFullName()) .collect(Collectors.toList())); } } } return resourceFullNameList; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.consumer; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.DbType; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.dao.entity.*; import org.apache.dolphinscheduler.server.master.dispatch.ExecutorDispatcher; import org.apache.dolphinscheduler.server.master.dispatch.executor.NettyExecutorManager; import org.apache.dolphinscheduler.server.registry.DependencyConfig; import org.apache.dolphinscheduler.server.registry.ZookeeperNodeManager; import org.apache.dolphinscheduler.server.registry.ZookeeperRegistryCenter; import org.apache.dolphinscheduler.server.zk.SpringZKServer;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.service.queue.TaskPriorityQueue; import org.apache.dolphinscheduler.service.queue.TaskPriorityQueueImpl; import org.apache.dolphinscheduler.service.zk.ZookeeperCachedOperator; import org.apache.dolphinscheduler.service.zk.ZookeeperConfig; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Date; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes={DependencyConfig.class, SpringApplicationContext.class, SpringZKServer.class, NettyExecutorManager.class, ExecutorDispatcher.class, ZookeeperRegistryCenter.class, TaskPriorityQueueConsumer.class, ZookeeperNodeManager.class, ZookeeperCachedOperator.class, ZookeeperConfig.class}) public class TaskPriorityQueueConsumerTest { @Autowired private TaskPriorityQueue taskPriorityQueue; @Autowired private TaskPriorityQueueConsumer taskPriorityQueueConsumer; @Autowired private ProcessService processService; @Autowired private ExecutorDispatcher dispatcher; @Before public void init(){ Tenant tenant = new Tenant();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
tenant.setId(1); tenant.setTenantCode("journey"); tenant.setTenantName("journey"); tenant.setDescription("journey"); tenant.setQueueId(1); tenant.setCreateTime(new Date()); tenant.setUpdateTime(new Date()); Mockito.when(processService.getTenantForProcess(1,2)).thenReturn(tenant); Mockito.when(processService.queryUserQueueByProcessInstanceId(1)).thenReturn("default"); } @Test public void testSHELLTask() throws Exception { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SHELL"); taskInstance.setProcessDefinitionId(1); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setTaskJson("{\"conditionResult\":\"{\\\"successNode\\\":[\\\"\\\"],\\\"failedNode\\\":[\\\"\\\"]}\",\"conditionsTask\":false,\"depList\":[],\"dependence\":\"{}\",\"forbidden\":false,\"id\":\"tasks-55201\",\"maxRetryTimes\":0,\"name\":\"测试任务\",\"params\":\"{\\\"rawScript\\\":\\\"echo \\\\\\\"测试任务\\\\\\\"\\\",\\\"localParams\\\":[],\\\"resourceList\\\":[]}\",\"preTasks\":\"[]\",\"retryInterval\":1,\"runFlag\":\"NORMAL\",\"taskInstancePriority\":\"MEDIUM\",\"taskTimeoutParameter\":{\"enable\":false,\"interval\":0},\"timeout\":\"{\\\"enable\\\":false,\\\"strategy\\\":\\\"\\\"}\",\"type\":\"SHELL\",\"workerGroup\":\"default\"}"); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); processDefinition.setProjectId(1); taskInstance.setProcessDefine(processDefinition);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
Mockito.when(processService.getTaskInstanceDetailByTaskId(1)).thenReturn(taskInstance); taskPriorityQueue.put("2_1_2_1_default"); Thread.sleep(10000); } @Test public void testSQLTask() throws Exception { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SQL"); taskInstance.setProcessDefinitionId(1); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setTaskJson("{\"conditionsTask\":false,\"depList\":[],\"dependence\":\"{}\",\"forbidden\":false,\"id\":\"tasks-3655\",\"maxRetryTimes\":0,\"name\":\"UDF测试\",\"params\":\"{\\\"postStatements\\\":[],\\\"connParams\\\":\\\"\\\",\\\"receiversCc\\\":\\\"\\\",\\\"udfs\\\":\\\"1\\\",\\\"type\\\":\\\"HIVE\\\",\\\"title\\\":\\\"test\\\",\\\"sql\\\":\\\"select id,name,ds,zodia(ds) from t_journey_user\\\",\\\"preStatements\\\":[],\\\"sqlType\\\":0,\\\"receivers\\\":\\\"[email protected]\\\",\\\"datasource\\\":3,\\\"showType\\\":\\\"TABLE\\\",\\\"localParams\\\":[]}\",\"preTasks\":\"[]\",\"retryInterval\":1,\"runFlag\":\"NORMAL\",\"taskInstancePriority\":\"MEDIUM\",\"taskTimeoutParameter\":{\"enable\":false,\"interval\":0},\"timeout\":\"{\\\"enable\\\":false,\\\"strategy\\\":\\\"\\\"}\",\"type\":\"SQL\"}"); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); processDefinition.setProjectId(1); taskInstance.setProcessDefine(processDefinition); Mockito.when(processService.getTaskInstanceDetailByTaskId(1)).thenReturn(taskInstance); taskPriorityQueue.put("2_1_2_1_default"); DataSource dataSource = new DataSource(); dataSource.setId(1); dataSource.setName("sqlDatasource"); dataSource.setType(DbType.MYSQL);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
dataSource.setUserId(2); dataSource.setConnectionParams("{\"address\":\"jdbc:mysql://192.168.221.185:3306\",\"database\":\"dolphinscheduler_qiaozhanwei\",\"jdbcUrl\":\"jdbc:mysql://192.168.221.185:3306/dolphinscheduler_qiaozhanwei\",\"user\":\"root\",\"password\":\"root@123\"}"); dataSource.setCreateTime(new Date()); dataSource.setUpdateTime(new Date()); Mockito.when(processService.findDataSourceById(1)).thenReturn(dataSource); Thread.sleep(10000); } @Test public void testDataxTask() throws Exception { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("DATAX"); taskInstance.setProcessDefinitionId(1); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setTaskJson("{\"conditionResult\":\"{\\\"successNode\\\":[\\\"\\\"],\\\"failedNode\\\":[\\\"\\\"]}\",\"conditionsTask\":false,\"depList\":[],\"dependence\":\"{}\",\"forbidden\":false,\"id\":\"tasks-97625\",\"maxRetryTimes\":0,\"name\":\"MySQL数据相互导入\",\"params\":\"{\\\"targetTable\\\":\\\"pv2\\\",\\\"postStatements\\\":[],\\\"jobSpeedRecord\\\":1000,\\\"customConfig\\\":0,\\\"dtType\\\":\\\"MYSQL\\\",\\\"dsType\\\":\\\"MYSQL\\\",\\\"jobSpeedByte\\\":0,\\\"dataSource\\\":80,\\\"dataTarget\\\":80,\\\"sql\\\":\\\"SELECT dt,count FROM pv\\\",\\\"preStatements\\\":[]}\",\"preTasks\":\"[]\",\"retryInterval\":1,\"runFlag\":\"NORMAL\",\"taskInstancePriority\":\"MEDIUM\",\"taskTimeoutParameter\":{\"enable\":false,\"interval\":0},\"timeout\":\"{\\\"enable\\\":false,\\\"strategy\\\":\\\"\\\"}\",\"type\":\"DATAX\",\"workerGroup\":\"default\"}"); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); processDefinition.setProjectId(1); taskInstance.setProcessDefine(processDefinition); Mockito.when(processService.getTaskInstanceDetailByTaskId(1)).thenReturn(taskInstance); taskPriorityQueue.put("2_1_2_1_default"); DataSource dataSource = new DataSource();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
dataSource.setId(80); dataSource.setName("datax"); dataSource.setType(DbType.MYSQL); dataSource.setUserId(2); dataSource.setConnectionParams("{\"address\":\"jdbc:mysql://192.168.221.185:3306\",\"database\":\"dolphinscheduler_qiaozhanwei\",\"jdbcUrl\":\"jdbc:mysql://192.168.221.185:3306/dolphinscheduler_qiaozhanwei\",\"user\":\"root\",\"password\":\"root@123\"}"); dataSource.setCreateTime(new Date()); dataSource.setUpdateTime(new Date()); Mockito.when(processService.findDataSourceById(80)).thenReturn(dataSource); Thread.sleep(10000); } @Test public void testSqoopTask() throws Exception { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SQOOP"); taskInstance.setProcessDefinitionId(1); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setTaskJson("{\"conditionResult\":\"{\\\"successNode\\\":[\\\"\\\"],\\\"failedNode\\\":[\\\"\\\"]}\",\"conditionsTask\":false,\"depList\":[],\"dependence\":\"{}\",\"forbidden\":false,\"id\":\"tasks-63634\",\"maxRetryTimes\":0,\"name\":\"MySQL数据导入HDSF\",\"params\":\"{\\\"sourceType\\\":\\\"MYSQL\\\",\\\"targetType\\\":\\\"HDFS\\\",\\\"targetParams\\\":\\\"{\\\\\\\"targetPath\\\\\\\":\\\\\\\"/test/datatest\\\\\\\",\\\\\\\"deleteTargetDir\\\\\\\":true,\\\\\\\"fileType\\\\\\\":\\\\\\\"--as-textfile\\\\\\\",\\\\\\\"compressionCodec\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"fieldsTerminated\\\\\\\":\\\\\\\",\\\\\\\",\\\\\\\"linesTerminated\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\n\\\\\\\"}\\\",\\\"modelType\\\":\\\"import\\\",\\\"sourceParams\\\":\\\"{\\\\\\\"srcType\\\\\\\":\\\\\\\"MYSQL\\\\\\\",\\\\\\\"srcDatasource\\\\\\\":1,\\\\\\\"srcTable\\\\\\\":\\\\\\\"t_ds_user\\\\\\\",\\\\\\\"srcQueryType\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"srcQuerySql\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"srcColumnType\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"srcColumns\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"srcConditionList\\\\\\\":[],\\\\\\\"mapColumnHive\\\\\\\":[],\\\\\\\"mapColumnJava\\\\\\\":[]}\\\",\\\"localParams\\\":[],\\\"concurrency\\\":1}\",\"preTasks\":\"[]\",\"retryInterval\":1,\"runFlag\":\"NORMAL\",\"taskInstancePriority\":\"MEDIUM\",\"taskTimeoutParameter\":{\"enable\":false,\"interval\":0},\"timeout\":\"{\\\"enable\\\":false,\\\"strategy\\\":\\\"\\\"}\",\"type\":\"SQOOP\",\"workerGroup\":\"default\"}"); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); processDefinition.setProjectId(1); taskInstance.setProcessDefine(processDefinition);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
Mockito.when(processService.getTaskInstanceDetailByTaskId(1)).thenReturn(taskInstance); taskPriorityQueue.put("2_1_2_1_default"); DataSource dataSource = new DataSource(); dataSource.setId(1); dataSource.setName("datax"); dataSource.setType(DbType.MYSQL); dataSource.setUserId(2); dataSource.setConnectionParams("{\"address\":\"jdbc:mysql://192.168.221.185:3306\",\"database\":\"dolphinscheduler_qiaozhanwei\",\"jdbcUrl\":\"jdbc:mysql://192.168.221.185:3306/dolphinscheduler_qiaozhanwei\",\"user\":\"root\",\"password\":\"root@123\"}"); dataSource.setCreateTime(new Date()); dataSource.setUpdateTime(new Date()); Mockito.when(processService.findDataSourceById(1)).thenReturn(dataSource); Thread.sleep(10000); } @Test public void testTaskInstanceIsFinalState(){ TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SHELL"); taskInstance.setProcessDefinitionId(1); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setTaskJson("{\"conditionResult\":\"{\\\"successNode\\\":[\\\"\\\"],\\\"failedNode\\\":[\\\"\\\"]}\",\"conditionsTask\":false,\"depList\":[],\"dependence\":\"{}\",\"forbidden\":false,\"id\":\"tasks-55201\",\"maxRetryTimes\":0,\"name\":\"测试任务\",\"params\":\"{\\\"rawScript\\\":\\\"echo \\\\\\\"测试任务\\\\\\\"\\\",\\\"localParams\\\":[],\\\"resourceList\\\":[]}\",\"preTasks\":\"[]\",\"retryInterval\":1,\"runFlag\":\"NORMAL\",\"taskInstancePriority\":\"MEDIUM\",\"taskTimeoutParameter\":{\"enable\":false,\"interval\":0},\"timeout\":\"{\\\"enable\\\":false,\\\"strategy\\\":\\\"\\\"}\",\"type\":\"SHELL\",\"workerGroup\":\"default\"}"); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2); Mockito.when( processService.findTaskInstanceById(1)).thenReturn(taskInstance); taskPriorityQueueConsumer.taskInstanceIsFinalState(1); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/runner/MasterTaskExecThreadTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/runner/MasterTaskExecThreadTest.java
* distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.runner; import junit.framework.Assert; import org.apache.dolphinscheduler.server.master.config.MasterConfig; import org.apache.dolphinscheduler.server.master.consumer.TaskPriorityQueueConsumer; import org.apache.dolphinscheduler.server.master.dispatch.ExecutorDispatcher; import org.apache.dolphinscheduler.server.master.dispatch.executor.NettyExecutorManager; import org.apache.dolphinscheduler.server.registry.DependencyConfig; import org.apache.dolphinscheduler.server.registry.ZookeeperNodeManager; import org.apache.dolphinscheduler.server.registry.ZookeeperRegistryCenter; import org.apache.dolphinscheduler.server.zk.SpringZKServer; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import org.apache.dolphinscheduler.service.queue.TaskPriorityQueueImpl; import org.apache.dolphinscheduler.service.zk.ZookeeperCachedOperator; import org.apache.dolphinscheduler.service.zk.ZookeeperConfig; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.HashSet; import java.util.Set; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes={DependencyConfig.class, SpringApplicationContext.class, SpringZKServer.class, NettyExecutorManager.class, ExecutorDispatcher.class, ZookeeperRegistryCenter.class, TaskPriorityQueueConsumer.class, ZookeeperNodeManager.class, ZookeeperCachedOperator.class, ZookeeperConfig.class, MasterConfig.class})
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/runner/MasterTaskExecThreadTest.java
public class MasterTaskExecThreadTest { @Test public void testExistsValidWorkerGroup1(){ ZookeeperRegistryCenter zookeeperRegistryCenter = Mockito.mock(ZookeeperRegistryCenter.class); Mockito.when(zookeeperRegistryCenter.getWorkerGroupDirectly()).thenReturn(null); MasterTaskExecThread masterTaskExecThread = new MasterTaskExecThread(null); masterTaskExecThread.existsValidWorkerGroup("default"); } @Test public void testExistsValidWorkerGroup2(){ ZookeeperRegistryCenter zookeeperRegistryCenter = Mockito.mock(ZookeeperRegistryCenter.class); Set<String> workerGorups = new HashSet<>(); workerGorups.add("test1"); workerGorups.add("test2"); Mockito.when(zookeeperRegistryCenter.getWorkerGroupDirectly()).thenReturn(workerGorups); MasterTaskExecThread masterTaskExecThread = new MasterTaskExecThread(null); masterTaskExecThread.existsValidWorkerGroup("default"); } @Test public void testExistsValidWorkerGroup3(){ ZookeeperRegistryCenter zookeeperRegistryCenter = Mockito.mock(ZookeeperRegistryCenter.class); Set<String> workerGorups = new HashSet<>(); workerGorups.add("test1"); Mockito.when(zookeeperRegistryCenter.getWorkerGroupDirectly()).thenReturn(workerGorups); Mockito.when(zookeeperRegistryCenter.getWorkerGroupNodesDirectly("test1")).thenReturn(workerGorups); MasterTaskExecThread masterTaskExecThread = new MasterTaskExecThread(null); masterTaskExecThread.existsValidWorkerGroup("test1"); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/registry/DependencyConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/registry/DependencyConfig.java
* the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.registry; import org.apache.dolphinscheduler.dao.AlertDao; import org.apache.dolphinscheduler.dao.mapper.*; import org.apache.dolphinscheduler.server.master.cache.impl.TaskInstanceCacheManagerImpl; import org.apache.dolphinscheduler.server.master.dispatch.ExecutorDispatcher; import org.apache.dolphinscheduler.server.master.dispatch.host.HostManager; import org.apache.dolphinscheduler.server.master.dispatch.host.RandomHostManager; import org.apache.dolphinscheduler.server.master.processor.queue.TaskResponseService; import org.apache.dolphinscheduler.server.worker.processor.TaskCallbackService; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.service.queue.TaskPriorityQueue; import org.apache.dolphinscheduler.service.queue.TaskPriorityQueueImpl; import org.mockito.Mockito; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * dependency config */ @Configuration public class DependencyConfig {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/registry/DependencyConfig.java
@Bean public AlertDao alertDao() { return new AlertDao(); } @Bean public AlertMapper alertMapper() { return Mockito.mock(AlertMapper.class); } @Bean public UserAlertGroupMapper userAlertGroupMapper() { return Mockito.mock(UserAlertGroupMapper.class); } @Bean public TaskInstanceCacheManagerImpl taskInstanceCacheManagerImpl(){ return Mockito.mock(TaskInstanceCacheManagerImpl.class); } @Bean public ProcessService processService(){ return Mockito.mock(ProcessService.class); } @Bean public UserMapper userMapper(){ return Mockito.mock(UserMapper.class); } @Bean public ProcessDefinitionMapper processDefineMapper(){ return Mockito.mock(ProcessDefinitionMapper.class); } @Bean public ProcessInstanceMapper processInstanceMapper(){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/registry/DependencyConfig.java
return Mockito.mock(ProcessInstanceMapper.class); } @Bean public DataSourceMapper dataSourceMapper(){ return Mockito.mock(DataSourceMapper.class); } @Bean public ProcessInstanceMapMapper processInstanceMapMapper(){ return Mockito.mock(ProcessInstanceMapMapper.class); } @Bean public TaskInstanceMapper taskInstanceMapper(){ return Mockito.mock(TaskInstanceMapper.class); } @Bean public CommandMapper commandMapper(){ return Mockito.mock(CommandMapper.class); } @Bean public ScheduleMapper scheduleMapper(){ return Mockito.mock(ScheduleMapper.class); } @Bean public UdfFuncMapper udfFuncMapper(){ return Mockito.mock(UdfFuncMapper.class); } @Bean public ResourceMapper resourceMapper(){ return Mockito.mock(ResourceMapper.class); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,762
[BUG]the master would be blocked when worker group not exists
**Is your feature request related to a problem? Please describe.** i create a task with a special worker group, master would be blocked when the worker group does not exists, In this case, other tasks would not run anymore. version: [dev-1.3.0]
https://github.com/apache/dolphinscheduler/issues/2762
https://github.com/apache/dolphinscheduler/pull/2764
7d2441f63468fb4c9e340f0be0bd6844923a9743
7a05c007b45ea742e3ed1a7558c1a641515c140c
"2020-05-20T02:17:55Z"
java
"2020-05-21T02:34:14Z"
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/registry/DependencyConfig.java
@Bean public ErrorCommandMapper errorCommandMapper(){ return Mockito.mock(ErrorCommandMapper.class); } @Bean public TenantMapper tenantMapper(){ return Mockito.mock(TenantMapper.class); } @Bean public ProjectMapper projectMapper(){ return Mockito.mock(ProjectMapper.class); } @Bean public TaskCallbackService taskCallbackService(){ return Mockito.mock(TaskCallbackService.class); } @Bean public HostManager hostManager(){ return new RandomHostManager(); } @Bean public TaskResponseService taskResponseService(){ return Mockito.mock(TaskResponseService.class); } @Bean public TaskPriorityQueue taskPriorityQueue(){ return new TaskPriorityQueueImpl(); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
* this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.common.enums; import com.baomidou.mybatisplus.annotation.EnumValue; /** * running status for workflow and task nodes * */ public enum ExecutionStatus { /** * status: * 0 submit success * 1 running * 2 ready pause * 3 pause * 4 ready stop * 5 stop * 6 failure * 7 success
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
* 8 need fault tolerance * 9 kill * 10 waiting thread * 11 waiting depend node complete */ SUBMITTED_SUCCESS(0, "submit success"), RUNNING_EXEUTION(1, "running"), READY_PAUSE(2, "ready pause"), PAUSE(3, "pause"), READY_STOP(4, "ready stop"), STOP(5, "stop"), FAILURE(6, "failure"), SUCCESS(7, "success"), NEED_FAULT_TOLERANCE(8, "need fault tolerance"), KILL(9, "kill"), WAITTING_THREAD(10, "waiting thread"), WAITTING_DEPEND(11, "waiting depend node complete"); ExecutionStatus(int code, String descp){ this.code = code; this.descp = descp; } @EnumValue private final int code; private final String descp; /** * status is success * @return status */ public boolean typeIsSuccess(){ return this == SUCCESS;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
} /** * status is failure * @return status */ public boolean typeIsFailure(){ return this == FAILURE || this == NEED_FAULT_TOLERANCE; } /** * status is finished * @return status */ public boolean typeIsFinished(){ return typeIsSuccess() || typeIsFailure() || typeIsCancel() || typeIsPause() || typeIsWaittingThread(); } /** * status is waiting thread * @return status */ public boolean typeIsWaittingThread(){ return this == WAITTING_THREAD; } /** * status is pause * @return status */ public boolean typeIsPause(){ return this == PAUSE; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
/** * status is running * @return status */ public boolean typeIsRunning(){ return this == RUNNING_EXEUTION || this == WAITTING_DEPEND; } /** * status is cancel * @return status */ public boolean typeIsCancel(){ return this == KILL || this == STOP ; } public int getCode() { return code; } public String getDescp() { return descp; } public static ExecutionStatus of(int status){ for(ExecutionStatus es : values()){ if(es.getCode() == status){ return es; } } throw new IllegalArgumentException("invalid status : " + status); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java
*/ package org.apache.dolphinscheduler.server.master.runner; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.DependResult; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.model.DependentTaskModel; import org.apache.dolphinscheduler.common.task.dependent.DependentParameters; import org.apache.dolphinscheduler.common.thread.Stopper; import org.apache.dolphinscheduler.common.utils.DependentUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.common.utils.LoggerUtils; import org.apache.dolphinscheduler.common.utils.OSUtils; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.server.utils.DependentExecute; import org.slf4j.LoggerFactory; import java.util.*; import static org.apache.dolphinscheduler.common.Constants.DEPENDENT_SPLIT; public class DependentTaskExecThread extends MasterBaseTaskExecThread { private DependentParameters dependentParameters; /** * dependent task list */ private List<DependentExecute> dependentTaskList = new ArrayList<>(); /** * depend item result map * save the result to log file */ private Map<String, DependResult> dependResultMap = new HashMap<>(); /** * dependent date
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java
*/ private Date dependentDate; /** * constructor of MasterBaseTaskExecThread * * @param taskInstance task instance */ public DependentTaskExecThread(TaskInstance taskInstance) { super(taskInstance); } @Override public Boolean submitWaitComplete() { try{ logger.info("dependent task start"); this.taskInstance = submit(); logger = LoggerFactory.getLogger(LoggerUtils.buildTaskId(LoggerUtils.TASK_LOGGER_INFO_PREFIX, taskInstance.getProcessDefinitionId(), taskInstance.getProcessInstanceId(), taskInstance.getId())); String threadLoggerInfoName = String.format(Constants.TASK_LOG_INFO_FORMAT, processService.formatTaskAppId(this.taskInstance)); Thread.currentThread().setName(threadLoggerInfoName); initTaskParameters(); initDependParameters(); waitTaskQuit(); updateTaskState(); }catch (Exception e){ logger.error("dependent task run exception" , e); } return true; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java
/** * init dependent parameters */ private void initDependParameters() { this.dependentParameters = JSONUtils.parseObject(this.taskInstance.getDependency(), DependentParameters.class); for(DependentTaskModel taskModel : dependentParameters.getDependTaskList()){ this.dependentTaskList.add(new DependentExecute( taskModel.getDependItemList(), taskModel.getRelation())); } if(this.processInstance.getScheduleTime() != null){ this.dependentDate = this.processInstance.getScheduleTime(); }else{ this.dependentDate = new Date(); } } /** * */ private void updateTaskState() { ExecutionStatus status; if(this.cancel){ status = ExecutionStatus.KILL; }else{ DependResult result = getTaskDependResult(); status = (result == DependResult.SUCCESS) ? ExecutionStatus.SUCCESS : ExecutionStatus.FAILURE; } taskInstance.setState(status); taskInstance.setEndTime(new Date()); processService.saveTaskInstance(taskInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java
} /** * wait dependent tasks quit */ private Boolean waitTaskQuit() { logger.info("wait depend task : {} complete", this.taskInstance.getName()); if (taskInstance.getState().typeIsFinished()) { logger.info("task {} already complete. task state:{}", this.taskInstance.getName(), this.taskInstance.getState()); return true; } while (Stopper.isRunning()) { try{ if(this.processInstance == null){ logger.error("process instance not exists , master task exec thread exit"); return true; } if(this.cancel || this.processInstance.getState() == ExecutionStatus.READY_STOP){ cancelTaskInstance(); break; } if ( allDependentTaskFinish() || taskInstance.getState().typeIsFinished()){ break; } taskInstance = processService.findTaskInstanceById(taskInstance.getId()); processInstance = processService.findProcessInstanceById(processInstance.getId()); Thread.sleep(Constants.SLEEP_TIME_MILLIS); } catch (Exception e) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java
logger.error("exception",e); if (processInstance != null) { logger.error("wait task quit failed, instance id:{}, task id:{}", processInstance.getId(), taskInstance.getId()); } } } return true; } /** * cancel dependent task */ private void cancelTaskInstance() { this.cancel = true; } private void initTaskParameters() { taskInstance.setLogPath(getTaskLogPath(taskInstance)); taskInstance.setHost(OSUtils.getHost() + Constants.COLON + masterConfig.getListenPort()); taskInstance.setState(ExecutionStatus.RUNNING_EXEUTION); taskInstance.setStartTime(new Date()); processService.updateTaskInstance(taskInstance); } /** * judge all dependent tasks finish * @return whether all dependent tasks finish */ private boolean allDependentTaskFinish(){ boolean finish = true; for(DependentExecute dependentExecute : dependentTaskList){ for(Map.Entry<String, DependResult> entry: dependentExecute.getDependResultMap().entrySet()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java
if(!dependResultMap.containsKey(entry.getKey())){ dependResultMap.put(entry.getKey(), entry.getValue()); logger.info("dependent item complete {} {},{}", DEPENDENT_SPLIT, entry.getKey(), entry.getValue()); } } if(!dependentExecute.finish(dependentDate)){ finish = false; } } return finish; } /** * get dependent result * @return DependResult */ private DependResult getTaskDependResult(){ List<DependResult> dependResultList = new ArrayList<>(); for(DependentExecute dependentExecute : dependentTaskList){ DependResult dependResult = dependentExecute.getModelDependResult(dependentDate); dependResultList.add(dependResult); } DependResult result = DependentUtils.getDependResultForRelation( this.dependentParameters.getRelation(), dependResultList ); logger.info("dependent task completed, dependent result:{}", result); return result; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
/* * Licnsd o h Apach Sofwar Foundaion (ASF) undr on or mor * conribuor licns agrmns. S h NOTICE fil disribud wih * his work for addiional informaion rgarding copyrigh ownrship. * Th ASF licnss his fil o You undr h Apach Licns, Vrsion 2.0 * (h "Licns"); you may no us his fil xcp in complianc wih * h Licns. You may obain a copy of h Licns a * * hp://www.apach.org/licnss/LICENSE-2.0 * * Unlss rquird by applicabl law or agrd o in wriing, sofwar * disribud undr h Licns is disribud on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ihr xprss or implid. * S h Licns for h spcific languag govrning prmissions and * limiaions undr h Licns. */ packag org.apach.dolphinschdulr.srvr.masr.runnr; impor com.alibaba.fasjson.JSON; impor com.googl.common.collc.Liss; impor org.apach.commons.io.FilUils; impor org.apach.dolphinschdulr.common.Consans; impor org.apach.dolphinschdulr.common.nums.*; impor org.apach.dolphinschdulr.common.graph.DAG;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
impor org.apach.dolphinschdulr.common.modl.TaskNod; impor org.apach.dolphinschdulr.common.modl.TaskNodRlaion; impor org.apach.dolphinschdulr.common.procss.ProcssDag; impor org.apach.dolphinschdulr.common.ask.condiions.CondiionsParamrs; impor org.apach.dolphinschdulr.common.hrad.Soppr; impor org.apach.dolphinschdulr.common.hrad.ThradUils; impor org.apach.dolphinschdulr.common.uils.*; impor org.apach.dolphinschdulr.dao.niy.ProcssInsanc; impor org.apach.dolphinschdulr.dao.niy.Schdul; impor org.apach.dolphinschdulr.dao.niy.TaskInsanc; impor org.apach.dolphinschdulr.dao.uils.DagHlpr; impor org.apach.dolphinschdulr.rmo.NyRmoingClin; impor org.apach.dolphinschdulr.srvr.masr.config.MasrConfig; impor org.apach.dolphinschdulr.srvr.uils.AlrManagr; impor org.apach.dolphinschdulr.srvic.ban.SpringApplicaionConx; impor org.apach.dolphinschdulr.srvic.procss.ProcssSrvic; impor org.apach.dolphinschdulr.srvic.quarz.cron.CronUils; impor org.slf4j.Loggr; impor org.slf4j.LoggrFacory; impor java.io.Fil; impor java.io.IOExcpion; impor java.uil.*; impor java.uil.concurrn.ConcurrnHashMap; impor java.uil.concurrn.ExcuorSrvic; impor java.uil.concurrn.Fuur; impor saic org.apach.dolphinschdulr.common.Consans.*; /** * masr xc hrad,spli dag */ public class MasrExcThrad implmns Runnabl {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
/** * loggr of MasrExcThrad */ priva saic final Loggr loggr = LoggrFacory.gLoggr(MasrExcThrad.class); /** * procss insanc */ priva ProcssInsanc procssInsanc; /** * runing TaskNod */ priva final Map<MasrBasTaskExcThrad,Fuur<Boolan>> acivTaskNod = nw ConcurrnHashMap<>(); /** * ask xc srvic */ priva final ExcuorSrvic askExcSrvic; /** * submi failur nods */ priva boolan askFaildSubmi = fals; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* rcovr nod id lis */ priva Lis<TaskInsanc> rcovrNodIdLis = nw ArrayLis<>(); /** * rror ask lis */ priva Map<Sring,TaskInsanc> rrorTaskLis = nw ConcurrnHashMap<>(); /** * compl ask lis */ priva Map<Sring, TaskInsanc> complTaskLis = nw ConcurrnHashMap<>(); /** * rady o submi ask lis */ priva Map<Sring, TaskInsanc> radyToSubmiTaskLis = nw ConcurrnHashMap<>(); /** * dpnd faild ask map */ priva Map<Sring, TaskInsanc> dpndFaildTask = nw ConcurrnHashMap<>(); /** * forbiddn ask map */ priva Map<Sring, TaskNod> forbiddnTaskLis = nw ConcurrnHashMap<>(); /** * skip ask map */ priva Map<Sring, TaskNod> skipTaskNodLis = nw ConcurrnHashMap<>(); /** * rcovr olranc faul ask lis */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva Lis<TaskInsanc> rcovrTolrancFaulTaskLis = nw ArrayLis<>(); /** * alr managr */ priva AlrManagr alrManagr = nw AlrManagr(); /** * h objc of DAG */ priva DAG<Sring,TaskNod,TaskNodRlaion> dag; /** * procss srvic */ priva ProcssSrvic procssSrvic; /** * masr config */ priva MasrConfig masrConfig; /** * */ priva NyRmoingClin nyRmoingClin; /** * consrucor of MasrExcThrad * @param procssInsanc procssInsanc * @param procssSrvic procssSrvic * @param nyRmoingClin nyRmoingClin */ public MasrExcThrad(ProcssInsanc procssInsanc, ProcssSrvic procssSrvic, NyRmoingClin nyRmoingClin){ his.procssSrvic = procssSrvic; his.procssInsanc = procssInsanc;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
his.masrConfig = SpringApplicaionConx.gBan(MasrConfig.class); in masrTaskExcNum = masrConfig.gMasrExcTaskNum(); his.askExcSrvic = ThradUils.nwDamonFixdThradExcuor("Masr-Task-Exc-Thrad", masrTaskExcNum); his.nyRmoingClin = nyRmoingClin; } @Ovrrid public void run() { if (procssInsanc == null){ loggr.info("procss insanc is no xiss"); rurn; } if (procssInsanc.gSa().ypIsFinishd()){ loggr.info("procss insanc is don : {}",procssInsanc.gId()); rurn; } ry { if (procssInsanc.isComplmnDaa() && Flag.NO == procssInsanc.gIsSubProcss()){ xcuComplmnProcss(); }ls{ xcuProcss(); } }cach (Excpion ){ loggr.rror("masr xc hrad xcpion", ); loggr.rror("procss xcu faild, procss id:{}", procssInsanc.gId()); procssInsanc.sSa(ExcuionSaus.FAILURE);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
procssInsanc.sEndTim(nw Da()); procssSrvic.updaProcssInsanc(procssInsanc); }finally { askExcSrvic.shudown(); posHandl(); } } /** * xcu procss * @hrows Excpion xcpion */ priva void xcuProcss() hrows Excpion { prparProcss(); runProcss(); ndProcss(); } /** * xcu complmn procss * @hrows Excpion xcpion */ priva void xcuComplmnProcss() hrows Excpion { Map<Sring, Sring> cmdParam = JSONUils.oMap(procssInsanc.gCommandParam()); Da sarDa = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_START_DATE)); Da ndDa = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_END_DATE)); procssSrvic.savProcssInsanc(procssInsanc); in procssDfiniionId = procssInsanc.gProcssDfiniionId(); Lis<Schdul> schduls = procssSrvic.quryRlasSchdulrLisByProcssDfiniionId(procssDfiniionId); Lis<Da> lisDa = Liss.nwLinkdLis();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
!CollcionUils.isEmpy(schduls)){ for (Schdul schdul : schduls) { lisDa.addAll(CronUils.gSlfFirDaLis(sarDa, ndDa, schdul.gCronab())); } } Iraor<Da> iraor = null; Da schdulDa = null; !CollcionUils.isEmpy(lisDa)) { iraor = lisDa.iraor(); schdulDa = iraor.nx(); procssInsanc.sSchdulTim(schdulDa); procssSrvic.updaProcssInsanc(procssInsanc); }ls{ schdulDa = procssInsanc.gSchdulTim(); schdulDa == null){ schdulDa = sarDa; } } whil(Soppr.isRunning()){ prparProcss(); dag == null){ loggr.rror("procss {} dag is null, plas chck ou paramrs", procssInsanc.gId()); procssInsanc.sSa(ExcuionSaus.SUCCESS); procssSrvic.updaProcssInsanc(procssInsanc); rurn; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
runProcss(); !procssInsanc.gSa().ypIsSuccss()){ loggr.info("procss {} sa {}, complmn no complly!", procssInsanc.gId(), procssInsanc.gSa()); brak; } // null == iraor){ // schdulDa = DaUils.gSomDay(schdulDa, 1); schdulDa.afr(ndDa)){ // loggr.info("procss {} complmn complly!", procssInsanc.gId()); brak; } }ls{ // !iraor.hasNx()){ // loggr.info("procss {} complmn complly!", procssInsanc.gId()); brak; } schdulDa = iraor.nx(); } loggr.info("procss {} sar o complmn {} daa", procssInsanc.gId(), DaUils.daToSring(schdulDa)); // procssInsanc.sSchdulTim(schdulDa); cmdParam.conainsKy(Consans.CMDPARAM_RECOVERY_START_NODE_STRING)){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
cmdParam.rmov(Consans.CMDPARAM_RECOVERY_START_NODE_STRING); procssInsanc.sCommandParam(JSONUils.oJson(cmdParam)); } Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId()); for(TaskInsanc askInsanc : askInsancLis){ askInsanc.sFlag(Flag.NO); procssSrvic.updaTaskInsanc(askInsanc); } procssInsanc.sSa(ExcuionSaus.RUNNING_EXEUTION); procssInsanc.sGlobalParams(ParamrUils.curingGlobalParams( procssInsanc.gProcssDfiniion().gGlobalParamMap(), procssInsanc.gProcssDfiniion().gGlobalParamLis(), CommandTyp.COMPLEMENT_DATA, procssInsanc.gSchdulTim())); procssSrvic.savProcssInsanc(procssInsanc); } // flow nd ndProcss(); } /** * prpar procss paramr * @hrows Excpion xcpion */ priva void prparProcss() hrows Excpion { // iniTaskQuu(); // buildFlowDag(); loggr.info("prpar procss :{} nd", procssInsanc.gId()); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* procss nd handl */ priva void ndProcss() { procssInsanc.sEndTim(nw Da()); procssSrvic.updaProcssInsanc(procssInsanc); procssInsanc.gSa().ypIsWaiingThrad()){ procssSrvic.craRcovryWaiingThradCommand(null, procssInsanc); } Lis<TaskInsanc> askInsancs = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId()); alrManagr.sndAlrProcssInsanc(procssInsanc, askInsancs); } /** * * @hrows Excpion xcpion */ priva void buildFlowDag() hrows Excpion { rcovrNodIdLis = gSarTaskInsancLis(procssInsanc.gCommandParam()); forbiddnTaskLis = DagHlpr.gForbiddnTaskNodMaps(procssInsanc.gProcssInsancJson()); // Lis<Sring> rcovryNamLis = gRcovryNodNamLis(); Lis<Sring> sarNodNamLis = parsSarNodNam(procssInsanc.gCommandParam()); ProcssDag procssDag = gnraFlowDag(procssInsanc.gProcssInsancJson(), sarNodNamLis, rcovryNamLis, procssInsanc.gTaskDpndTyp()); procssDag == null){ loggr.rror("procssDag is null"); rurn; } // dag = DagHlpr.buildDagGraph(procssDag); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
/** * */ priva void iniTaskQuu(){ askFaildSubmi = fals; acivTaskNod.clar(); dpndFaildTask.clar(); complTaskLis.clar(); rrorTaskLis.clar(); Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId()); for(TaskInsanc ask : askInsancLis){ ask.isTaskCompl()){ complTaskLis.pu(ask.gNam(), ask); } ask.gSa().ypIsFailur() && !ask.askCanRry()){ rrorTaskLis.pu(ask.gNam(), ask); } } } /** * procss pos handl */ priva void posHandl() { loggr.info("dvlop mod is: {}", CommonUils.isDvlopMod()); if (!CommonUils.isDvlopMod()) { // Sring xcLocalPah = org.apach.dolphinschdulr.common.uils.FilUils .gProcssExcDir(procssInsanc.gProcssDfiniion().gProjcId(), procssInsanc.gProcssDfiniionId(), procssInsanc.gId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
ry { FilUils.dlDircory(nw Fil(xcLocalPah)); } cach (IOExcpion ) { loggr.rror("dl xc dir faild ", ); } } } /** * submi ask o xcu * @param askInsanc ask insanc * @rurn TaskInsanc */ priva TaskInsanc submiTaskExc(TaskInsanc askInsanc) { MasrBasTaskExcThrad absracExcThrad = null; askInsanc.isSubProcss()){ absracExcThrad = nw SubProcssTaskExcThrad(askInsanc); }ls askInsanc.isDpndTask()){ absracExcThrad = nw DpndnTaskExcThrad(askInsanc); }ls askInsanc.isCondiionsTask()){ absracExcThrad = nw CondiionsTaskExcThrad(askInsanc); }ls { absracExcThrad = nw MasrTaskExcThrad(askInsanc); } Fuur<Boolan> fuur = askExcSrvic.submi(absracExcThrad); acivTaskNod.puIfAbsn(absracExcThrad, fuur); rurn absracExcThrad.gTaskInsanc(); } /** * find ask insanc in db. * in cas submi mor han on sam nam ask in h sam im.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* @param askNam ask nam * @rurn TaskInsanc */ priva TaskInsanc findTaskIfExiss(Sring askNam){ Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(his.procssInsanc.gId()); for(TaskInsanc askInsanc : askInsancLis){ askInsanc.gNam().quals(askNam)){ rurn askInsanc; } } rurn null; } /** * ncapsulaion ask * @param procssInsanc procss insanc * @param nodNam nod nam * @rurn TaskInsanc */ priva TaskInsanc craTaskInsanc(ProcssInsanc procssInsanc, Sring nodNam, TaskNod askNod) { TaskInsanc askInsanc = findTaskIfExiss(nodNam); askInsanc == null){ askInsanc = nw TaskInsanc(); // ask nam askInsanc.sNam(nodNam); // askInsanc.sProcssDfiniionId(procssInsanc.gProcssDfiniionId()); // askInsanc.sSa(ExcuionSaus.SUBMITTED_SUCCESS); //
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
askInsanc.sProcssInsancId(procssInsanc.gId()); // askInsanc.sTaskJson(JSON.oJSONSring(askNod)); // askInsanc.sTaskTyp(askNod.gTyp()); // askInsanc.sAlrFlag(Flag.NO); // askInsanc.sSarTim(nw Da()); // askInsanc.sFlag(Flag.YES); // askInsanc.sRryTims(0); // askInsanc.sMaxRryTims(askNod.gMaxRryTims()); // askInsanc.sRryInrval(askNod.gRryInrval()); // askNod.gTaskInsancPrioriy() == null){ askInsanc.sTaskInsancPrioriy(Prioriy.MEDIUM); }ls{ askInsanc.sTaskInsancPrioriy(askNod.gTaskInsancPrioriy()); } Sring procssWorkrGroup = procssInsanc.gWorkrGroup(); procssWorkrGroup = SringUils.isBlank(procssWorkrGroup) ? DEFAULT_WORKER_GROUP : procssWorkrGroup; Sring askWorkrGroup = SringUils.isBlank(askNod.gWorkrGroup()) ? procssWorkrGroup : askNod.gWorkrGroup(); if (!procssWorkrGroup.quals(DEFAULT_WORKER_GROUP) && askWorkrGroup.quals(DEFAULT_WORKER_GROUP)) { askInsanc.sWorkrGroup(procssWorkrGroup); }ls { askInsanc.sWorkrGroup(askWorkrGroup);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} } rurn askInsanc; } /** * if all of h ask dpndnc ar skip, skip i oo. * @param askNod * @rurn */ priva boolan isTaskNodNdSkip(TaskNod askNod){ CollcionUils.isEmpy(askNod.gDpLis())){ rurn fals; } for(Sring dpNod : askNod.gDpLis()){ !skipTaskNodLis.conainsKy(dpNod)){ rurn fals; } } rurn ru; } /** * s ask nod skip if dpndnc all skip * @param askNodsSkipLis */ priva void sTaskNodSkip(Lis<Sring> askNodsSkipLis){ for(Sring skipNod : askNodsSkipLis){ skipTaskNodLis.puIfAbsn(skipNod, dag.gNod(skipNod)); Collcion<Sring> posNodLis = DagHlpr.gSarVrx(skipNod, dag, complTaskLis); Lis<Sring> posSkipLis = nw ArrayLis<>(); for(Sring pos : posNodLis){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
TaskNod posNod = dag.gNod(pos); isTaskNodNdSkip(posNod)){ posSkipLis.add(pos); } } sTaskNodSkip(posSkipLis); } } /** * pars condiion ask find h branch procss * s skip flag for anohr on. * @param nodNam * @rurn */ priva Lis<Sring> parsCondiionTask(Sring nodNam){ Lis<Sring> condiionTaskLis = nw ArrayLis<>(); TaskNod askNod = dag.gNod(nodNam); !askNod.isCondiionsTask()){ rurn condiionTaskLis; } CondiionsParamrs condiionsParamrs = JSONUils.parsObjc(askNod.gCondiionRsul(), CondiionsParamrs.class); TaskInsanc askInsanc = complTaskLis.g(nodNam); askInsanc == null){ loggr.rror("ask insanc {} canno find, plas chck i!", nodNam); rurn condiionTaskLis; } askInsanc.gSa().ypIsSuccss()){ condiionTaskLis = condiionsParamrs.gSuccssNod(); sTaskNodSkip(condiionsParamrs.gFaildNod());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
}ls askInsanc.gSa().ypIsFailur()){ condiionTaskLis = condiionsParamrs.gFaildNod(); sTaskNodSkip(condiionsParamrs.gSuccssNod()); }ls{ condiionTaskLis.add(nodNam); } rurn condiionTaskLis; } /** * pars pos nod lis of prvious nod * if condiion nod: rurn procss according o h sings * if pos nod compld, rurn pos nods of h compld nod * @param prviousNodNam * @rurn */ priva Lis<Sring> parsPosNodLis(Sring prviousNodNam){ Lis<Sring> posNodLis = nw ArrayLis<>(); TaskNod askNod = dag.gNod(prviousNodNam); askNod != null && askNod.isCondiionsTask()){ rurn parsCondiionTask(prviousNodNam); } Collcion<Sring> posNodCollcion = DagHlpr.gSarVrx(prviousNodNam, dag, complTaskLis); Lis<Sring> posSkipLis = nw ArrayLis<>(); // // // // for(Sring posNod : posNodCollcion){ complTaskLis.conainsKy(posNod)){ TaskInsanc posTaskInsanc = complTaskLis.g(posNod);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
dag.gNod(posNod).isCondiionsTask()){ Lis<Sring> condiionTaskNodLis = parsCondiionTask(posNod); for(Sring condiions : condiionTaskNodLis){ posNodLis.addAll(parsPosNodLis(condiions)); } }ls posTaskInsanc.gSa().ypIsSuccss()){ posNodLis.addAll(parsPosNodLis(posNod)); }ls{ posNodLis.add(posNod); } }ls isTaskNodNdSkip(dag.gNod(posNod))){ posSkipLis.add(posNod); sTaskNodSkip(posSkipLis); posSkipLis.clar(); }ls{ posNodLis.add(posNod); } } rurn posNodLis; } /** * submi pos nod * @param parnNodNam parn nod nam */ priva void submiPosNod(Sring parnNodNam){ Lis<Sring> submiTaskNodLis = parsPosNodLis(parnNodNam); Lis<TaskInsanc> askInsancs = nw ArrayLis<>(); for(Sring askNod : submiTaskNodLis){ askInsancs.add(craTaskInsanc(procssInsanc, askNod, dag.gNod(askNod)));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} // for(TaskInsanc ask : askInsancs){ radyToSubmiTaskLis.conainsKy(ask.gNam())){ coninu; } complTaskLis.conainsKy(ask.gNam())){ loggr.info("ask {} has alrady run succss", ask.gNam()); coninu; } ask.gSa().ypIsPaus() || ask.gSa().ypIsCancl()){ loggr.info("ask {} soppd, h sa is {}", ask.gNam(), ask.gSa()); }ls{ addTaskToSandByLis(ask); } } } /** * drmin whhr h dpndncis of h ask nod ar compl * @rurn DpndRsul */ priva DpndRsul isTaskDpsCompl(Sring askNam) { Collcion<Sring> sarNods = dag.gBginNod(); // sarNods.conains(askNam)){ rurn DpndRsul.SUCCESS; } TaskNod askNod = dag.gNod(askNam); Lis<Sring> dpNamLis = askNod.gDpLis(); for(Sring dpsNod : dpNamLis ){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
!dag.conainsNod(dpsNod) || forbiddnTaskLis.conainsKy(dpsNod) || skipTaskNodLis.conainsKy(dpsNod)){ coninu; } // !complTaskLis.conainsKy(dpsNod)){ rurn DpndRsul.WAITING; } ExcuionSaus dpTaskSa = complTaskLis.g(dpsNod).gSa(); // dpTaskSa.ypIsFailur() && !DagHlpr.havCondiionsAfrNod(dpsNod, dag ) && !dag.gNod(dpsNod).isCondiionsTask()){ rurn DpndRsul.FAILED; } dpTaskSa.ypIsPaus() || dpTaskSa.ypIsCancl()){ rurn DpndRsul.WAITING; } } loggr.info("askNam: {} complDpndTaskLis: {}", askNam, Arrays.oSring(complTaskLis.kyS().oArray())); rurn DpndRsul.SUCCESS; } /** * qury ask insanc by compl sa * @param sa sa * @rurn ask insanc lis */ priva Lis<TaskInsanc> gComplTaskBySa(ExcuionSaus sa){ Lis<TaskInsanc> rsulLis = nw ArrayLis<>();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
for (Map.Enry<Sring, TaskInsanc> nry: complTaskLis.nryS()) { nry.gValu().gSa() == sa){ rsulLis.add(nry.gValu()); } } rurn rsulLis; } /** * whr hr ar ongoing asks * @param sa sa * @rurn ExcuionSaus */ priva ExcuionSaus runningSa(ExcuionSaus sa){ sa == ExcuionSaus.READY_STOP || sa == ExcuionSaus.READY_PAUSE || sa == ExcuionSaus.WAITTING_THREAD){ // rurn sa; }ls{ rurn ExcuionSaus.RUNNING_EXEUTION; } } /** * xiss failur ask,conains submi failur、dpndncy failur,xcu failur(rry afr) * * @rurn Boolan whhr has faild ask */ priva boolan hasFaildTask(){ his.askFaildSubmi){ rurn ru;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} his.rrorTaskLis.siz() > 0){ rurn ru; } rurn his.dpndFaildTask.siz() > 0; } /** * procss insanc failur * * @rurn Boolan whhr procss insanc faild */ priva boolan procssFaild(){ hasFaildTask()) { procssInsanc.gFailurSragy() == FailurSragy.END){ rurn ru; } if (procssInsanc.gFailurSragy() == FailurSragy.CONTINUE) { rurn radyToSubmiTaskLis.siz() == 0 || acivTaskNod.siz() == 0; } } rurn fals; } /** * whhr ask for waiing hrad * @rurn Boolan whhr has waiing hrad ask */ priva boolan hasWaiingThradTask(){ Lis<TaskInsanc> waiingLis = gComplTaskBySa(ExcuionSaus.WAITTING_THREAD); rurn CollcionUils.isNoEmpy(waiingLis); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
/** * prpar for paus * 1,faild rry ask in h prparaion quu , rurns o failur dircly * 2,xiss paus ask,complmn no compld, pnding submission of asks, rurn o suspnsion * 3,succss * @rurn ExcuionSaus */ priva ExcuionSaus procssRadyPaus(){ hasRryTaskInSandBy()){ rurn ExcuionSaus.FAILURE; } Lis<TaskInsanc> pausLis = gComplTaskBySa(ExcuionSaus.PAUSE); CollcionUils.isNoEmpy(pausLis) || !isComplmnEnd() || radyToSubmiTaskLis.siz() > 0){ rurn ExcuionSaus.PAUSE; }ls{ rurn ExcuionSaus.SUCCESS; } } /** * gnra h las procss insanc saus by h asks sa * @rurn procss insanc xcuion saus */ priva ExcuionSaus gProcssInsancSa(){ ProcssInsanc insanc = procssSrvic.findProcssInsancById(procssInsanc.gId()); ExcuionSaus sa = insanc.gSa(); acivTaskNod.siz() > 0 || rryTaskExiss()){ // aciv a rurn runningSa(sa);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} // procss failur procssFaild()){ rurn ExcuionSaus.FAILURE; } // waiing hrad hasWaiingThradTask()){ rurn ExcuionSaus.WAITTING_THREAD; } // paus sa == ExcuionSaus.READY_PAUSE){ rurn procssRadyPaus(); } // sop sa == ExcuionSaus.READY_STOP){ Lis<TaskInsanc> sopLis = gComplTaskBySa(ExcuionSaus.STOP); Lis<TaskInsanc> killLis = gComplTaskBySa(ExcuionSaus.KILL); CollcionUils.isNoEmpy(sopLis) || CollcionUils.isNoEmpy(killLis) || !isComplmnEnd()){ rurn ExcuionSaus.STOP; }ls{ rurn ExcuionSaus.SUCCESS; } } // succss sa == ExcuionSaus.RUNNING_EXEUTION){ Lis<TaskInsanc> killTasks = gComplTaskBySa(ExcuionSaus.KILL); radyToSubmiTaskLis.siz() > 0){ //asks curr
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
rurn ExcuionSaus.RUNNING_EXEUTION; }ls CollcionUils.isNoEmpy(killTasks)){ // asks may rurn ExcuionSaus.FAILURE; }ls{ // if h w rurn ExcuionSaus.SUCCESS; } } rurn sa; } /** * whhr sandby ask lis hav rry asks * @rurn */ priva boolan rryTaskExiss() { boolan rsul = fals; for(Sring askNam : radyToSubmiTaskLis.kyS()){ TaskInsanc ask = radyToSubmiTaskLis.g(askNam); ask.gSa().ypIsFailur()){ rsul = ru; brak; } } rurn rsul; } /** * whhr complmn nd * @rurn Boolan whhr is complmn nd */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva boolan isComplmnEnd() { !procssInsanc.isComplmnDaa()){ rurn ru; } ry { Map<Sring, Sring> cmdParam = JSONUils.oMap(procssInsanc.gCommandParam()); Da ndTim = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_END_DATE)); rurn procssInsanc.gSchdulTim().quals(ndTim); } cach (Excpion ) { loggr.rror("complmn nd faild ",); rurn fals; } } /** * updaProcssInsanc procss insanc sa * afr ach bach of asks is xcud, h saus of h procss insanc is updad */ priva void updaProcssInsancSa() { ExcuionSaus sa = gProcssInsancSa(); procssInsanc.gSa() != sa){ loggr.info( "work flow procss insanc [id: {}, nam:{}], sa chang from {} o {}, cmd yp: {}", procssInsanc.gId(), procssInsanc.gNam(), procssInsanc.gSa(), sa, procssInsanc.gCommandTyp()); ProcssInsanc insanc = procssSrvic.findProcssInsancById(procssInsanc.gId()); insanc.sSa(sa); insanc.sProcssDfiniion(procssInsanc.gProcssDfiniion()); procssSrvic.updaProcssInsanc(insanc); procssInsanc = insanc;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} } /** * g ask dpndncy rsul * @param askInsanc ask insanc * @rurn DpndRsul */ priva DpndRsul gDpndRsulForTask(TaskInsanc askInsanc){ rurn isTaskDpsCompl(askInsanc.gNam()); } /** * add ask o sandby lis * @param askInsanc ask insanc */ priva void addTaskToSandByLis(TaskInsanc askInsanc){ loggr.info("add ask o sand by lis: {}", askInsanc.gNam()); radyToSubmiTaskLis.puIfAbsn(askInsanc.gNam(), askInsanc); } /** * rmov ask from sand by lis * @param askInsanc ask insanc */ priva void rmovTaskFromSandbyLis(TaskInsanc askInsanc){ loggr.info("rmov ask from sand by lis: {}", askInsanc.gNam()); radyToSubmiTaskLis.rmov(askInsanc.gNam()); } /** * has rry ask in sandby * @rurn Boolan whhr has rry ask in sandby */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva boolan hasRryTaskInSandBy(){ for (Map.Enry<Sring, TaskInsanc> nry: radyToSubmiTaskLis.nryS()) { nry.gValu().gSa().ypIsFailur()){ rurn ru; } } rurn fals; } /** * submi and wach h asks, unil h work flow sop */ priva void runProcss(){ // submi sar nod submiPosNod(null); boolan sndTimWarning = fals; whil(!procssInsanc.isProcssInsancSop()){ // snd warn !sndTimWarning && chckProcssTimOu(procssInsanc) ){ alrManagr.sndProcssTimouAlr(procssInsanc, procssSrvic.findProcssDfinById(procssInsanc.gProcssDfiniionId())); sndTimWarning = ru; } for(Map.Enry<MasrBasTaskExcThrad,Fuur<Boolan>> nry: acivTaskNod.nryS()) { Fuur<Boolan> fuur = nry.gValu(); TaskInsanc ask = nry.gKy().gTaskInsanc(); !fuur.isDon()){ coninu; } // nod moni ask = his.procssSrvic.findTaskInsancById(ask.gId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
ask == null){ his.askFaildSubmi = ru; acivTaskNod.rmov(nry.gKy()); coninu; } // nod moni ask.gSa().ypIsFinishd()){ acivTaskNod.rmov(nry.gKy()); } loggr.info("ask :{}, id:{} compl, sa is {} ", ask.gNam(), ask.gId(), ask.gSa()); // nod succ ask.gSa() == ExcuionSaus.SUCCESS){ complTaskLis.pu(ask.gNam(), ask); submiPosNod(ask.gNam()); coninu; } // nod fail ask.gSa().ypIsFailur()){ ask.gSa() == ExcuionSaus.NEED_FAULT_TOLERANCE){ his.rcovrTolrancFaulTaskLis.add(ask); } ask.askCanRry()){ addTaskToSandByLis(ask); }ls{ complTaskLis.pu(ask.gNam(), ask); ask.isCondiionsTask() || DagHlpr.havCondiionsAfrNod(ask.gNam(), dag)) { submiPosNod(ask.gNam()); }ls{
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
rrorTaskLis.pu(ask.gNam(), ask); procssInsanc.gFailurSragy() == FailurSragy.END){ killThOhrTasks(); } } } coninu; } // ohr sa complTaskLis.pu(ask.gNam(), ask); } // snd alr CollcionUils.isNoEmpy(his.rcovrTolrancFaulTaskLis)){ alrManagr.sndAlrWorkrTolrancFaul(procssInsanc, rcovrTolrancFaulTaskLis); his.rcovrTolrancFaulTaskLis.clar(); } // updaPro // failur p // if a ask rrorTaskLis.siz() > 0){ for(Map.Enry<Sring, TaskInsanc> nry: complTaskLis.nryS()) { TaskInsanc complTask = nry.gValu(); complTask.gSa()== ExcuionSaus.PAUSE){ complTask.sSa(ExcuionSaus.KILL); complTaskLis.pu(nry.gKy(), complTask); procssSrvic.updaTaskInsanc(complTask); } } } canSubmiTaskToQuu()){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
submiSandByTask(); } ry { Thrad.slp(Consans.SLEEP_TIME_MILLIS); } cach (InrrupdExcpion ) { loggr.rror(.gMssag(),); } updaProcssInsancSa(); } loggr.info("procss:{} nd, sa :{}", procssInsanc.gId(), procssInsanc.gSa()); } /** * whhr chck procss im ou * @param procssInsanc ask insanc * @rurn ru if im ou of procss insanc > running im of procss insanc */ priva boolan chckProcssTimOu(ProcssInsanc procssInsanc) { procssInsanc.gTimou() == 0 ){ rurn fals; } Da now = nw Da(); long runningTim = DaUils.diffMin(now, procssInsanc.gSarTim()); rurn runningTim > procssInsanc.gTimou(); } /** * whhr can submi ask o quu * @rurn boolan */ priva boolan canSubmiTaskToQuu() { rurn OSUils.chckRsourc(masrConfig.gMasrMaxCpuloadAvg(), masrConfig.gMasrRsrvdMmory());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} /** * clos h on going asks */ priva void killThOhrTasks() { loggr.info("kill calld on : {}, num: {}", procssInsanc.gId(), acivTaskNod.siz()); for (Map.Enry<MasrBasTaskExcThrad, Fuur<Boolan>> nry : acivTaskNod.nryS()) { MasrBasTaskExcThrad askExcThrad = nry.gKy(); Fuur<Boolan> fuur = nry.gValu(); TaskInsanc askInsanc = askExcThrad.gTaskInsanc(); askInsanc = procssSrvic.findTaskInsancById(askInsanc.gId()); askInsanc != null && askInsanc.gSa().ypIsFinishd()){ coninu; } if (!fuur.isDon()) { // rcord ki loggr.info("kill procss insanc, id: {}, ask: {}", procssInsanc.gId(), askExcThrad.gTaskInsanc().gId()); // kill nod askExcThrad.kill(); } } } /** * whhr h rry inrval is imd ou * @param askInsanc ask insanc * @rurn Boolan */ priva boolan rryTaskInrvalOvrTim(TaskInsanc askInsanc){ askInsanc.gSa() != ExcuionSaus.FAILURE){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
rurn ru; } askInsanc.gId() == 0 || askInsanc.gMaxRryTims() ==0 || askInsanc.gRryInrval() == 0 ){ rurn ru; } Da now = nw Da(); long faildTimInrval = DaUils.diffrSc(now, askInsanc.gEndTim()); // ask rry dos no ovr im, rurn fals rurn askInsanc.gRryInrval() * SEC_2_MINUTES_TIME_UNIT < faildTimInrval; } /** * handling h lis of asks o b submid */ priva void submiSandByTask(){ for(Map.Enry<Sring, TaskInsanc> nry: radyToSubmiTaskLis.nryS()) { TaskInsanc ask = nry.gValu(); DpndRsul dpndRsul = gDpndRsulForTask(ask); DpndRsul.SUCCESS == dpndRsul){ rryTaskInrvalOvrTim(ask)){ submiTaskExc(ask); rmovTaskFromSandbyLis(ask); } }ls DpndRsul.FAILED == dpndRsul){ // if h d dpndFaildTask.pu(nry.gKy(), ask); rmovTaskFromSandbyLis(ask); loggr.info("ask {},id:{} dpnd rsul : {}",ask.gNam(), ask.gId(), dpndRsul); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} } /** * g rcovry ask insanc * @param askId ask id * @rurn rcovry ask insanc */ priva TaskInsanc gRcovryTaskInsanc(Sring askId){ !SringUils.isNoEmpy(askId)){ rurn null; } ry { Ingr inId = Ingr.valuOf(askId); TaskInsanc ask = procssSrvic.findTaskInsancById(inId); ask == null){ loggr.rror("sar nod id canno b found: {}", askId); }ls { rurn ask; } }cach (Excpion ){ loggr.rror("g rcovry ask insanc faild ",); } rurn null; } /** * g sar ask insanc lis * @param cmdParam command param * @rurn ask insanc lis */ priva Lis<TaskInsanc> gSarTaskInsancLis(Sring cmdParam){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
Lis<TaskInsanc> insancLis = nw ArrayLis<>(); Map<Sring, Sring> paramMap = JSONUils.oMap(cmdParam); paramMap != null && paramMap.conainsKy(CMDPARAM_RECOVERY_START_NODE_STRING)){ Sring[] idLis = paramMap.g(CMDPARAM_RECOVERY_START_NODE_STRING).spli(Consans.COMMA); for(Sring nodId : idLis){ TaskInsanc ask = gRcovryTaskInsanc(nodId); ask != null){ insancLis.add(ask); } } } rurn insancLis; } /** * pars "SarNodNamLis" from cmd param * @param cmdParam command param * @rurn sar nod nam lis */ priva Lis<Sring> parsSarNodNam(Sring cmdParam){ Lis<Sring> sarNodNamLis = nw ArrayLis<>(); Map<Sring, Sring> paramMap = JSONUils.oMap(cmdParam); paramMap == null){ rurn sarNodNamLis; } paramMap.conainsKy(CMDPARAM_START_NODE_NAMES)){ sarNodNamLis = Arrays.asLis(paramMap.g(CMDPARAM_START_NODE_NAMES).spli(Consans.COMMA)); } rurn sarNodNamLis; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* gnra sar nod nam lis from parsing command param; * if "SarNodIdLis" xiss in command param, rurn SarNodIdLis * @rurn rcovry nod nam lis */ priva Lis<Sring> gRcovryNodNamLis(){ Lis<Sring> rcovryNodNamLis = nw ArrayLis<>(); CollcionUils.isNoEmpy(rcovrNodIdLis)) { for (TaskInsanc ask : rcovrNodIdLis) { rcovryNodNamLis.add(ask.gNam()); } } rurn rcovryNodNamLis; } /** * gnra flow dag * @param procssDfiniionJson procss dfiniion json * @param sarNodNamLis sar nod nam lis * @param rcovryNodNamLis rcovry nod nam lis * @param dpNodTyp dpnd nod yp * @rurn ProcssDag procss dag * @hrows Excpion xcpion */ public ProcssDag gnraFlowDag(Sring procssDfiniionJson, Lis<Sring> sarNodNamLis, Lis<Sring> rcovryNodNamLis, TaskDpndTyp dpNodTyp)hrows Excpion{ rurn DagHlpr.gnraFlowDag(procssDfiniionJson, sarNodNamLis, rcovryNodNamLis, dpNodTyp); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/DependentExecute.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.utils; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.DependResult; import org.apache.dolphinscheduler.common.enums.DependentRelation; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.model.DateInterval; import org.apache.dolphinscheduler.common.model.DependentItem; import org.apache.dolphinscheduler.common.model.TaskNode; import org.apache.dolphinscheduler.common.utils.CollectionUtils; import org.apache.dolphinscheduler.common.utils.DependentUtils; import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/DependentExecute.java
import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.dao.utils.DagHelper; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import org.apache.dolphinscheduler.service.process.ProcessService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.*; /** * dependent item execute */ public class DependentExecute { /** * process service */ private final ProcessService processService = SpringApplicationContext.getBean(ProcessService.class); /** * depend item list */ private List<DependentItem> dependItemList; /** * dependent relation */ private DependentRelation relation; /** * depend result */ private DependResult modelDependResult = DependResult.WAITING; /** * depend result map */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/DependentExecute.java
private Map<String, DependResult> dependResultMap = new HashMap<>(); /** * logger */ private Logger logger = LoggerFactory.getLogger(DependentExecute.class); /** * constructor * @param itemList item list * @param relation relation */ public DependentExecute(List<DependentItem> itemList, DependentRelation relation){ this.dependItemList = itemList; this.relation = relation; } /** * get dependent item for one dependent item * @param dependentItem dependent item * @param currentTime current time * @return DependResult */ private DependResult getDependentResultForItem(DependentItem dependentItem, Date currentTime){ List<DateInterval> dateIntervals = DependentUtils.getDateIntervalList(currentTime, dependentItem.getDateValue()); return calculateResultForTasks(dependentItem, dateIntervals ); } /** * calculate dependent result for one dependent item. * @param dependentItem dependent item * @param dateIntervals date intervals * @return dateIntervals */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/DependentExecute.java
private DependResult calculateResultForTasks(DependentItem dependentItem, List<DateInterval> dateIntervals) { DependResult result = DependResult.FAILED; for(DateInterval dateInterval : dateIntervals){ ProcessInstance processInstance = findLastProcessInterval(dependentItem.getDefinitionId(), dateInterval); if(processInstance == null){ logger.error("cannot find the right process instance: definition id:{}, start:{}, end:{}", dependentItem.getDefinitionId(), dateInterval.getStartTime(), dateInterval.getEndTime() ); return DependResult.FAILED; } if(dependentItem.getDepTasks().equals(Constants.DEPENDENT_ALL)){ result = dependResultByProcessInstance(processInstance); }else{ result = getDependTaskResult(dependentItem.getDepTasks(),processInstance); } if(result != DependResult.SUCCESS){ break; } } return result; } /** * depend type = depend_all * skip the condition tasks. * judge all the task * @return */ private DependResult dependResultByProcessInstance(ProcessInstance processInstance){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/DependentExecute.java
DependResult result = DependResult.FAILED; List<TaskNode> taskNodes = processService.getTaskNodeListByDefinitionId(processInstance.getProcessDefinitionId()); if(CollectionUtils.isEmpty(taskNodes)) { return result; } for(TaskNode taskNode:taskNodes){ if(taskNode.isConditionsTask() || DagHelper.haveConditionsAfterNode(taskNode.getName(), taskNodes)){ continue; } DependResult tmpResult = getDependTaskResult(taskNode.getName(),processInstance); if(DependResult.SUCCESS != tmpResult){ return tmpResult; } } return DependResult.SUCCESS; } /** * get depend task result * @param taskName * @param processInstance * @return */ private DependResult getDependTaskResult(String taskName, ProcessInstance processInstance) { DependResult result; TaskInstance taskInstance = null; List<TaskInstance> taskInstanceList = processService.findValidTaskListByProcessId(processInstance.getId()); for(TaskInstance task : taskInstanceList){ if(task.getName().equals(taskName)){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,464
[BUG] dependent task failed when conditions task exists
![image](https://user-images.githubusercontent.com/29528966/79708968-8ba91800-82f3-11ea-8bfb-ee1757bb2d80.png) description: 1. work flow A have a conditions task. 2. work flow B have a dependent task that depend work A 3. work flow B would failed always.
https://github.com/apache/dolphinscheduler/issues/2464
https://github.com/apache/dolphinscheduler/pull/2768
7a05c007b45ea742e3ed1a7558c1a641515c140c
184d64e85291b1e8fb82494bf5a8e2ea755a3dc1
"2020-04-20T02:48:35Z"
java
"2020-05-21T02:34:28Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/DependentExecute.java
taskInstance = task; break; } } if(taskInstance == null){ result = getDependResultByProcessStateWhenTaskNull(processInstance.getState()); }else{ result = getDependResultByState(taskInstance.getState()); } return result; } /** * find the last one process instance that : * 1. manual run and finish between the interval * 2. schedule run and schedule time between the interval * @param definitionId definition id * @param dateInterval date interval * @return ProcessInstance */ private ProcessInstance findLastProcessInterval(int definitionId, DateInterval dateInterval) { ProcessInstance runningProcess = processService.findLastRunningProcess(definitionId, dateInterval.getStartTime(), dateInterval.getEndTime()); if(runningProcess != null){ return runningProcess; } ProcessInstance lastSchedulerProcess = processService.findLastSchedulerProcessInterval( definitionId, dateInterval ); ProcessInstance lastManualProcess = processService.findLastManualProcessInterval(