can we start a new thread in foreachRDD in spark streaming? -


i want start child-thread in foreachrdd.

my situation is:

the job reading hdfs dir continuously, , every 100 batches, want launch model training task (i make snapshot of rdds @ time , start training task. training task takes long time(2 hours), , don't want training task influence reading new batch of data.

is starting new child thread solution? child thread use sparkcontext in main thread , use rdd in main thread?


Comments

Popular posts from this blog

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -