I'm not sure if new a thread pool for every call of resourceOffer() is a good choice, this function is called for every second by default...is this overhead necessary? I think it's OK to build a threadpool running in the lifecycle of taskscheduler, once the taskscheduler is shutdown, (SparkContext.stop() is called), you can shutdown the thread pool

Glad to hear others' voice