Thread.sleep(millisec) 方法会休眠当前正在执行的线程,millisec 单位为毫秒。
在driver中执行不会有什么问题, 在workor中执行的话,注意不要超过heartbeat时间,否则会被resource manager给kill掉
Does calling thread.sleep on a spark job have any issues with it? 多线程:Executor、Sleep、Deamon、Yeild
京公网安备 11010502049817号