I don't think that it is solution. I posted my comment there as well. 2017-05-29 15:20 GMT+03:00 Evgenii Zhuravlev <[email protected]>:
> Hi, > > question was answered here: https://stackoverflow.com/ > questions/44239558/how-to-return-id-of-ignite-task-to- > stop-this-task-in-the-future/44242152#44242152 > > 2017-05-29 13:02 GMT+03:00 Vadim Dedkov <[email protected]>: > >> I want to broadcast some Apache Ignite task for some entity with ID >> stored in DB of my app. At some moment I want to stop this task (may be >> even after restart of my app). For this I think that I need to broadcast this >> task, somehow return UUID of this task, save this task UUID near entity >> ID in DB of my app. For example, if I know this task UUID (taskUuid), >> then I can stop this task like this (scala code): >> >> val clusterGroup = ignite$.cluster().forServers() >> ignite$.compute(clusterGroup).broadcast(new IgniteRunnable { >> override def run(): Unit = { >> ignite$.compute().activeTaskFutures().asScala.filter( >> e => e._1.toString == taskUuid).foreach(e => e._2.cancel()) >> } >> }) >> >> So, my question is, how I can return this taskUuid, when I submit some >> task with IgniteCompute.broadcast(...) method? >> >> -- >> _______________ _______________ >> Best regards, С уважением >> Vadim Dedkov. Вадим Дедков. >> > > -- _______________ _______________ Best regards, С уважением Vadim Dedkov. Вадим Дедков.
