//work split
spark.parallelize(1, 10k).map(item => doTask(i)).collect()
where I have some logging to do in database for doTask(i). it's uneasy to serialize the dbManager and send to worker node. is there anyway for spark to indicate back to driver node that taskI is done and then do the logging on driver node ?