Seems currently there is no API you can use to detect the block manager lost. This mainly caused by Full GC or some others that block the communications
between client driver and executors’ block manager, when the executors recovered from block, they will re-register themselves to client driver, so for users there’s need to take special steps to recover. Also you can set “spark.storage.blockManagerTimeoutIntervalMs”
to large value to avoid this warning, default is “60000”.